{"id":35160977,"url":"https://github.com/humeai/hume-python-sdk","last_synced_at":"2026-05-21T02:06:41.694Z","repository":{"id":91523756,"uuid":"520951956","full_name":"HumeAI/hume-python-sdk","owner":"HumeAI","description":"Python client for Hume AI","archived":false,"fork":false,"pushed_at":"2026-05-15T20:56:54.000Z","size":6796,"stargazers_count":174,"open_issues_count":2,"forks_count":44,"subscribers_count":13,"default_branch":"main","last_synced_at":"2026-05-15T23:43:13.094Z","etag":null,"topics":["ai","analysis","audio","detection","emotion","evi","expression","face","hume","recognition","sdk","sentiment","speech","voice"],"latest_commit_sha":null,"homepage":"https://dev.hume.ai","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HumeAI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-08-03T16:18:48.000Z","updated_at":"2026-05-02T09:00:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"6da900e2-eea9-4816-a9fb-a78c1eeb9aba","html_url":"https://github.com/HumeAI/hume-python-sdk","commit_stats":null,"previous_names":[],"tags_count":73,"template":false,"template_full_name":null,"purl":"pkg:github/HumeAI/hume-python-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HumeAI%2Fhume-python-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HumeAI%2Fhume-python-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HumeAI%2Fhume-python-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HumeAI%2Fhume-python-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HumeAI","download_url":"https://codeload.github.com/HumeAI/hume-python-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HumeAI%2Fhume-python-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33285003,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-20T15:12:43.734Z","status":"online","status_checked_at":"2026-05-21T02:00:07.181Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","analysis","audio","detection","emotion","evi","expression","face","hume","recognition","sdk","sentiment","speech","voice"],"created_at":"2025-12-28T18:09:09.716Z","updated_at":"2026-05-21T02:06:41.685Z","avatar_url":"https://github.com/HumeAI.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://storage.googleapis.com/hume-public-logos/hume/hume-banner.png\"\u003e\n  \u003ch1\u003eHume AI Python SDK\u003c/h1\u003e\n\n  \u003cp\u003e\n    \u003cstrong\u003eIntegrate Hume APIs directly into your Python application\u003c/strong\u003e\n  \u003c/p\u003e\n\n  \u003cbr\u003e\n  \u003cdiv\u003e\n    \u003ca href=\"https://pypi.python.org/pypi/hume\"\u003e\u003cimg src=\"https://img.shields.io/pypi/v/hume\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://buildwithfern.com/\"\u003e\u003cimg src=\"https://img.shields.io/badge/%F0%9F%8C%BF-SDK%20generated%20by%20Fern-brightgreen\"\u003e\u003c/a\u003e\n  \u003c/div\u003e\n  \u003cbr\u003e\n\u003c/div\u003e\n\n## Migration Guide for Version 0.7.0 and Above\n\nThere were major breaking changes in version `0.7.0` of the SDK. If upgrading from a previous version, please \n**[View the Migration Guide](https://github.com/HumeAI/hume-python-sdk/wiki/Python-SDK-Migration-Guide)**. That release deprecated several interfaces and moved them to the `hume[legacy]` package extra. The `legacy` extra was removed in `0.9.0`. The last version to include `legacy` was `0.8.6`.\n\n## Documentation\n\nAPI reference documentation is available [here](https://dev.hume.ai/reference/).\n\n## Compatibility\n\nThe Hume Python SDK is compatible across several Python versions and operating systems.\n\n- For the [Empathic Voice Interface](https://dev.hume.ai/docs/empathic-voice-interface-evi/overview), Python versions `3.9` through `3.13` are supported on macOS and Linux.\n- For [Text-to-speech (TTS)](https://dev.hume.ai/docs/text-to-speech-tts/overview), Python versions `3.9` through `3.13` are supported on macOS, Linux, and Windows.\n- For [Expression Measurement](https://dev.hume.ai/docs/expression-measurement/overview), Python versions `3.9` through `3.13` are supported on macOS, Linux, and Windows.\n\nBelow is a table which shows the version and operating system compatibilities by product:\n\n|                          | Python Version                         | Operating System      |\n| ------------------------ | -------------------------------------- | --------------------- |\n| Empathic Voice Interface | `3.9`, `3.10`, `3.11`, `3.12`, `3.13` | macOS, Linux          |\n| Text-to-speech (TTS)     | `3.9`, `3.10`, `3.11`, `3.12`, `3.13` | macOS, Linux, Windows |\n| Expression Measurement   | `3.9`, `3.10`, `3.11`, `3.12`, `3.13` | macOS, Linux, Windows |\n\n## Installation\n\n```sh\npip install hume\n# or\npoetry add hume\n# or\nuv add hume\n```\n\n## Other Resources\n\n```python\nfrom hume.client import HumeClient\n\nclient = HumeClient(api_key=\"YOUR_API_KEY\")\nclient.empathic_voice.configs.list_configs()\n```\n\n### Examples\n\nStarter projects that use this SDK:\n\n- **[EVI Python quickstart](https://github.com/HumeAI/hume-api-examples/tree/main/evi/evi-python-quickstart)** — Empathic Voice Interface\n- **[TTS Python quickstart](https://github.com/HumeAI/hume-api-examples/tree/main/tts/tts-python-quickstart)** — Text-to-speech\n- **[Expression Measurement streaming (Python)](https://github.com/HumeAI/hume-api-examples/tree/main/expression-measurement/streaming/python-streaming-example)** — Streaming expression measurement\n\n## Async Client\n\nThe SDK also exports an async client so that you can make non-blocking calls to our API.\n\n```python\nimport asyncio\n\nfrom hume.client import AsyncHumeClient\n\nclient = AsyncHumeClient(api_key=\"YOUR_API_KEY\")\n\nasync def main() -\u003e None:\n    await client.empathic_voice.configs.list_configs()\n\nasyncio.run(main())\n```\n\n### Writing File\n\nWriting files with an async stream of bytes can be tricky in Python! `aiofiles` can simplify this some. For example,\nyou can download your job artifacts like so:\n\n```python\nimport aiofiles\n\nfrom hume import AsyncHumeClient\n\nclient = AsyncHumeClient()\nasync with aiofiles.open('artifacts.zip', mode='wb') as file:\n    async for chunk in client.expression_measurement.batch.get_job_artifacts(id=\"my-job-id\"):\n        await file.write(chunk)\n```\n\n## Namespaces\n\nThis SDK contains the APIs for empathic voice, tts, and expression measurement. Even\nif you do not plan on using more than one API to start, the SDK provides easy access in\ncase you would like to use additional APIs in the future.\n\nEach API is namespaced accordingly:\n\n```python\nfrom hume.client import HumeClient\n\nclient = HumeClient(api_key=\"YOUR_API_KEY\")\n\nclient.empathic_voice.         # APIs specific to Empathic Voice\nclient.tts.                    # APIs specific to Text-to-speech\nclient.expression_measurement. # APIs specific to Expression Measurement\n```\n\n## Exception Handling\n\nAll errors thrown by the SDK will be subclasses of [`ApiError`](./src/hume/core/api_error.py).\n\n```python\nfrom hume.client import HumeClient\nfrom hume.core import ApiError\n\nclient = HumeClient(api_key=\"YOUR_API_KEY\")\ntry:\n    client.expression_measurement.batch.get_job_predictions(id=\"my-job-id\")\nexcept ApiError as e:\n    print(e.status_code)\n    print(e.body)\n```\n\n## Pagination\n\nPaginated requests will return a `SyncPager` or `AsyncPager`, which can be used as generators for the underlying object. For example, `list_tools` will return a generator over `ReturnUserDefinedTool` and handle the pagination behind the scenes:\n\n```python\nfrom hume.client import HumeClient\n\nclient = HumeClient(api_key=\"YOUR_API_KEY\")\n\nfor tool in client.empathic_voice.tools.list_tools():\n    print(tool)\n```\n\nyou could also iterate page-by-page:\n\n```python\nfor page in client.empathic_voice.tools.list_tools().iter_pages():\n  print(page.items)\n```\n\nor manually:\n\n```python\npager = client.empathic_voice.tools.list_tools()\n# First page\nprint(pager.items)\n# Second page\npager = pager.next_page()\nprint(pager.items)\n```\n\n## WebSockets\n\nWe expose a websocket client for interacting with the EVI API as well as Expression Measurement.\n\nWhen interacting with these clients, you can use them very similarly to how you'd use the common `websockets` library:\n\n```python\nimport os\n\nfrom hume import AsyncHumeClient\n\nclient = AsyncHumeClient(api_key=os.getenv(\"HUME_API_KEY\"))\nasync with client.expression_measurement.stream.connect() as hume_socket:\n    print(await hume_socket.get_job_details())\n```\n\nModel configuration (e.g. face, language, prosody) is sent per payload when you send data (e.g. via `send_publish()`, `send_text()`, or `send_file()`), not at connect time.\n\nThe underlying connection, in this case `hume_socket`, will support intellisense/autocomplete for the different functions that are available on the socket!\n\n### Advanced\n\n#### Retries\n\nThe Hume SDK is instrumented with automatic retries with exponential backoff. A request will be\nretried as long as the request is deemed retriable and the number of retry attempts has not grown larger\nthan the configured retry limit.\n\nA request is deemed retriable when any of the following HTTP status codes is returned:\n\n- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)\n- [409](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/409) (Conflict)\n- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)\n- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors)\n\nUse the `max_retries` request option to configure this behavior.\n\n```python\nfrom hume.client import HumeClient\nfrom hume.core import RequestOptions\n\nclient = HumeClient(...)\n\n# Override retries for a specific method\nclient.expression_measurement.batch.get_job_predictions(...,\n    request_options=RequestOptions(max_retries=5)\n)\n```\n\n#### Timeouts\n\nBy default, requests time out after 60 seconds. You can configure this with a\ntimeout option at the client or request level.\n\n```python\nfrom hume.client import HumeClient\nfrom hume.core import RequestOptions\n\nclient = HumeClient(\n    # All timeouts are 20 seconds\n    timeout=20.0,\n)\n\n# Override timeout for a specific method\nclient.expression_measurement.batch.get_job_predictions(...,\n    request_options=RequestOptions(timeout_in_seconds=20)\n)\n```\n\n#### Custom HTTP client\n\nYou can override the httpx client to customize it for your use-case. Some common use-cases\ninclude support for proxies and transports.\n\n```python\nimport httpx\n\nfrom hume.client import HumeClient\n\nclient = HumeClient(\n    http_client=httpx.Client(\n        proxies=\"http://my.test.proxy.example.com\",\n        transport=httpx.HTTPTransport(local_address=\"0.0.0.0\"),\n    ),\n)\n```\n\n## Contributing\n\nWhile we value open-source contributions to this SDK, this library is generated programmatically.\n\nAdditions made directly to this library would have to be moved over to our generation code, otherwise they would be overwritten upon the next generated release. Feel free to open a PR as a proof of concept, but know that we will not be able to merge it as-is. We suggest opening an issue first to discuss with us!\n\nOn the other hand, contributions to the README are always very welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhumeai%2Fhume-python-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhumeai%2Fhume-python-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhumeai%2Fhume-python-sdk/lists"}