Is it possible to cancel TTS processing to just di...
# agents
b
Is it possible to cancel TTS processing to just display text transcript? I want to have a functionality for the user to “skip” long dialogs, but not really interrupting
r
We have an example where agent interrupts user that may have something helpful in there: https://github.com/livekit-examples/python-agents-examples/blob/main/pipeline-llm/interrupt_user.py#L47-L86 I've not attempted this usecase but, I guess it is obvious that you will need some signal from the client to the agent. I guess you could use an RPC or data message to signal that and set some state in the agent to bypass remainng TTS output. For the TTS bit I guess you will hook a TTS Node somewhere. Maybe where the frames are streamed? I guess you will need to do something to clear the bypass TTS state too once the TTS has been discontinued.
👍 1
b
Thanks! That sounds complicated, but I guess I can figure it out!
r
Which part seems complicated?
I think that should be pretty straight forward. Sometimes the way I start with that is to just use the text chat to trigger it. That will let you focus on the interrupt part initially. Then come back to UI to trigger it later.
👍 1
b
Clearing the TTS state, but will see how it goes :)
r
Yea, that could be tricky in some race condition cases.