Install & Compatibility
Where this runs
tested against v0.14.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.778s · 36.3MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 4.1s · import 0.730s · 36MB
35MB installed
● package 35MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
HumeClient
✓ from hume import HumeClient
✗ from hume.client import HumeClient
In older SDK versions (<0.10), client was from hume.core. Changed in 0.10+.
MicrophoneInterface
✓ from hume import MicrophoneInterface
✗ from hume.microphone import MicrophoneInterface
Wrong path; use top-level import.
Asynchronous job submission for batch expression measurement.
import os
import asyncio
from hume import HumeClient
async def main():
client = HumeClient(api_key=os.environ.get('HUME_API_KEY', ''))
# Perform a job inference
try:
result = await client.expression_measurement.batch.start_inference(
urls=["https://example.com/audio.wav"]
)
print(f"Job started: {result.job_id}")
except Exception as e:
print(f"Error: {e}")
asyncio.run(main())
Debug
Known issues
breakingIn v0.13.6, SessionSettings became optional; in v0.13.0, major restructuring moved EVI config. Always check changelog when upgrading.fixReview v0.13.0 migration guide. For SessionSettings, ensure not to pass as required positional arg in newer versions.
affects: >=0.13.0,<0.13.6
gotchaThe HumeClient must be used as an async context manager or have .close() called to avoid unclosed websockets.fixUse 'async with HumeClient(api_key=...) as client:' or explicitly call await client.aclose() after use.
affects: all
deprecatedThe 'expression_measurement' namespace is deprecated; use 'emotion' endpoints instead.fixReplace 'client.expression_measurement...' with 'client.emotion...'.
affects: >=0.12.0
Errors
Common errors & fixes
ImportError: cannot import name 'HumeClient' from 'hume'
Wrong import path; often because the package is not installed or an older version.
fixEnsure 'hume' is installed: pip install --upgrade hume. Then import from hume import HumeClient.
TypeError: object bytes can't be used in 'await' expression
Attempting to await a non-async method, e.g., using sync client with async/await.
fixUse async client: from hume import AsyncHumeClient, or use client.sync method.
hume.exceptions.UnprocessableEntityError: (422) ...
Invalid payload sent to API, often missing required fields or incorrect data types.
fixCheck API documentation for required fields. For example, batch start requires 'urls' list.
websockets.exceptions.ConnectionClosedError: no close frame received or sent
WebSocket connection dropped due to network issues or idle timeout.
fixImplement reconnection logic or increase ping interval. The SDK may have settings for keepalive.
Upgrade
Version history
0.14.0latest on PyPI · released Jun 17, 2026
Audit
Dependencies
websocketsrequiredRequired for real-time EVI streaming connections
httpxoptionalUsed for REST API calls