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?