hi I am facing an issue:-
# general-english
a
hi I am facing an issue:- The
speech-end
event indicates that Vapi has finished processing the current speech segment, but this doesn’t guarantee that the audio has been fully played through the client’s speakers. Due to this
vapi.stop()
is called before actual audio completion Is there any soution for this???
k
To avoid calling vapi.stop() too early, either listen for the audio element’s ended event or add a short delay after speech-end before stopping.
a
i don't think we can use audio element with vapi
i don't see anything like that in docs
can you please share any reference
k
The best is adding a delay after speech-end or using say() with endCallAfterSpoken: true to ensure audio playback finishes before calling vapi.stop().
4 Views