v
Hi all, I am building a Zoom-like meeting interface for an AI SDR. I have set up Vapi squads for this using the Web SDK. The AI always responds in voice, but it can receive user input both in voice and, occasionally, via text. The setup works completely fine in pure voice mode. For text input, I understand that I need to use add-message with the role set as user to pass text input. This is what I am currently using: add-message to send the text to Vapi (with    triggerResponseEnabled: true,) I also tried calling vapiRef.current.say("", false, false, true); before add-message to stop the agent’s speech midway The behavior I want when text is input: If Vapi is currently speaking, it should stop speaking immediately (and ideally the LLM should stop streaming any new transcript) — stop the current response completely Vapi should treat the text as new input and generate a brand-new response However, what I am seeing is: Many times Vapi ignores the text input (even though I can see it in the transcript), or it continues the current turn’s speech and then processes the text input If I wait for the current AI speech to complete, it usually recognizes the text and processes it as expected. So the issue mostly occurs when text input is sent mid-speech Does anyone have advice on how to implement this behavior?
d
This is a common Vapi behavior. Text sent mid-speech via add-message is queued, not treated as an interrupt. say() only stops audio playback, not the LLM turn or stream. To get the behavior you want, you need to fully interrupt the turn (cancel the current response) before sending text typically by ending the turn / resetting the conversation state, then sending the text as a new user message. Otherwise Vapi will finish the current turn and process the text after. Happy to jump on a quick call and help you wire this correctly in the Web SDK. @Voice102
c
Please tell ChatGPT to generate better sentences for you.... I throw up a little every time you respond....
2 Views