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

Handling interruptions for Conversational AI #37

Open
duhtapioca opened this issue Dec 13, 2024 · 4 comments
Open

Handling interruptions for Conversational AI #37

duhtapioca opened this issue Dec 13, 2024 · 4 comments

Comments

@duhtapioca
Copy link

duhtapioca commented Dec 13, 2024

Hi @freddyaboulton,

With the "send-receive" mode and ReplyOnPause, it looks like when there's an output audio being emitted it's not possible to simultaneously also listen to audio to potentially handle interruptions.

Any advice on how to implement interruption handling to stop the LLM or TTS stream after detecting voice activity? I tried modifying the ReplyOnPause stream handler to process audio while state.responding == True, but I ran into issues as I'm not fully familiar with the code.

For context, I am working with ultravox with XTTSv2 streaming on top of the demo code from your PR in the repo. Any help regarding this would be really appreciated.

Thanks!

@freddyaboulton
Copy link
Owner

Hi @duhtapioca ! Thanks for the question.

I have not done this myself yet but I wrote some thoughts about how to do this here: #24 (comment)

Let me know how it goes - I'll look into this next week and maybe build something into the library as others are probably having the same question.

@seetimee
Copy link

the same need

@VijayRathore24
Copy link

Any advice on implementing interruption handling to stop the LLM or TTS stream after detecting voice activity? I tried modifying the ReplyOnPause stream handler to process audio while state. responding == True, but I ran into issues as I'm unfamiliar with the code.

@freddyaboulton
Copy link
Owner

Hi everyone will be building this into the codebase.

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

4 participants