hume-python-sdk icon indicating copy to clipboard operation
hume-python-sdk copied to clipboard

I want to get each response in real time, so that I will post-process and print on the screen. How should I do that

Open kujta1 opened this issue 1 year ago • 0 comments

import asyncio
from hume import HumeVoiceClient, MicrophoneInterface


async def main() -> None:
    # Paste your Hume API key here
    HUME_API_KEY = "key"
    # Connect and authenticate with Hume
    client = HumeVoiceClient(HUME_API_KEY)

    # Start streaming EVI over your device's microphone and speakers
    async with client.connect(config_id="id") as socket:
        results = await MicrophoneInterface.start(socket)
        while True:
            message = await socket.receive()
            print("message", message)


asyncio.run(main())

kujta1 avatar Jun 09 '24 10:06 kujta1