{"id":21448,"library":"hume","title":"Hume AI Python SDK","description":"A Python SDK for Hume AI, providing access to Hume's Empathic Voice Interface (EVI), speech-to-text, text-to-speech, and emotion analysis APIs. Current version 0.13.11, released March 2026. Active development with frequent releases (bi-weekly).","status":"active","version":"0.13.11","language":"python","source_language":"en","source_url":"https://github.com/HumeAI/hume-python-sdk","tags":["ai","emotion","speech","evi","hume","sdk"],"install":[{"cmd":"pip install hume","lang":"bash","label":"Install latest"}],"dependencies":[{"reason":"Required for real-time EVI streaming connections","package":"websockets","optional":false},{"reason":"Used for REST API calls","package":"httpx","optional":true}],"imports":[{"note":"In older SDK versions (<0.10), client was from hume.core. Changed in 0.10+.","wrong":"from hume.client import HumeClient","symbol":"HumeClient","correct":"from hume import HumeClient"},{"note":"Wrong path; use top-level import.","wrong":"from hume.microphone import MicrophoneInterface","symbol":"MicrophoneInterface","correct":"from hume import MicrophoneInterface"}],"quickstart":{"code":"import os\nimport asyncio\nfrom hume import HumeClient\n\nasync def main():\n    client = HumeClient(api_key=os.environ.get('HUME_API_KEY', ''))\n    # Perform a job inference\n    try:\n        result = await client.expression_measurement.batch.start_inference(\n            urls=[\"https://example.com/audio.wav\"]\n        )\n        print(f\"Job started: {result.job_id}\")\n    except Exception as e:\n        print(f\"Error: {e}\")\n\nasyncio.run(main())","lang":"python","description":"Asynchronous job submission for batch expression measurement."},"warnings":[{"fix":"Review v0.13.0 migration guide. For SessionSettings, ensure not to pass as required positional arg in newer versions.","message":"In v0.13.6, SessionSettings became optional; in v0.13.0, major restructuring moved EVI config. Always check changelog when upgrading.","severity":"breaking","affected_versions":">=0.13.0,<0.13.6"},{"fix":"Use 'async with HumeClient(api_key=...) as client:' or explicitly call await client.aclose() after use.","message":"The HumeClient must be used as an async context manager or have .close() called to avoid unclosed websockets.","severity":"gotcha","affected_versions":"all"},{"fix":"Replace 'client.expression_measurement...' with 'client.emotion...'.","message":"The 'expression_measurement' namespace is deprecated; use 'emotion' endpoints instead.","severity":"deprecated","affected_versions":">=0.12.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Ensure 'hume' is installed: pip install --upgrade hume. Then import from hume import HumeClient.","cause":"Wrong import path; often because the package is not installed or an older version.","error":"ImportError: cannot import name 'HumeClient' from 'hume'"},{"fix":"Use async client: from hume import AsyncHumeClient, or use client.sync method.","cause":"Attempting to await a non-async method, e.g., using sync client with async/await.","error":"TypeError: object bytes can't be used in 'await' expression"},{"fix":"Check API documentation for required fields. For example, batch start requires 'urls' list.","cause":"Invalid payload sent to API, often missing required fields or incorrect data types.","error":"hume.exceptions.UnprocessableEntityError: (422) ..."},{"fix":"Implement reconnection logic or increase ping interval. The SDK may have settings for keepalive.","cause":"WebSocket connection dropped due to network issues or idle timeout.","error":"websockets.exceptions.ConnectionClosedError: no close frame received or sent"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}