Barge-in

Barge-in, properly referred to as full-duplex barge-in, allows voice data to be recorded from the voice channel at the same time as voice data is being played in the opposite direction; voice data is going both ways at the same time, just as it is when two people are having a conversation and both are speaking at once. The most important use of barge-in is to allow spoken input to be sent to a speech recognizer while a prompt is being played.

Figure 1. Barge-in
The graphic shows a prompt playing, and continuing to play, whilst voice data from the caller is being sent to a speech recognizer.

Essentially, to implement barge-in, you start a recognition session before beginning to play the prompt. You can use barge-in either with or without voice interrupt detection, depending on the needs of your application. With voice interrupt detection, the prompt stops as soon as the caller speaks, even if the word is not in the expected vocabulary. Without voice interrupt detection, the prompt continues until a custom server event happens (for example, when an utterance is recognized) or to the end.