Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 #141

Open
kujta1 opened this issue Jun 9, 2024 · 0 comments

Comments

@kujta1
Copy link

kujta1 commented Jun 9, 2024

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())

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant