Skip to content

Instantly share code, notes, and snippets.

@aylarov
Created January 1, 2017 10:40
Show Gist options
  • Save aylarov/677d36689fea4aeff0c3becfd3b4344a to your computer and use it in GitHub Desktop.
Save aylarov/677d36689fea4aeff0c3becfd3b4344a to your computer and use it in GitHub Desktop.
Voximplant ASR example #3: long streaming
var streaming_result = "";
asr.addEventListener(ASREvents.SpeechCaptured, function (e) {
// Don't stop sending media after SpeechCaptured event
//call.stopMediaTo(asr);
});
// Recognition results will continue arriving to the Result handler
asr.addEventListener(ASREvents.Result, function (e) {
if (e.confidence > 0) {
streaming_result += " " + e.text;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment