HumeStreamClient
Bases: ClientBase
Streaming API client.
Example
import asyncio
from hume import HumeStreamClient, StreamSocket
from hume.config import FaceConfig
async def main():
client = HumeStreamClient("<your-api-key>")
configs = [FaceConfig(identify_faces=True)]
async with client.connect(configs) as socket:
socket: StreamSocket
result = await socket.send_file("<your-image-filepath>")
print(result)
asyncio.run(main())
Source code in hume/_stream/hume_stream_client.py
__init__(*args, **kwargs)
Construct a HumeStreamClient.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
api_key |
str
|
Hume API key. |
required |
Source code in hume/_stream/hume_stream_client.py
connect(configs)
async
Connect to the streaming API.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
configs |
List[JobConfigBase]
|
List of job configs. |
required |