fastrtc icon indicating copy to clipboard operation
fastrtc copied to clipboard

Handling interruptions for Conversational AI

Open duhtapioca opened this issue 2 months ago • 4 comments

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!

duhtapioca avatar Dec 13 '24 17:12 duhtapioca