Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change EndpointerType to match new API #49

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ CloudSpeechRecognizer.startStreaming = (options, audioStream, cloudSpeechRecogni
recognitionStream.on('data', data => {
if (data) {
cloudSpeechRecognizer.emit('data', data)
if (data.speechEventType === 'END_OF_SINGLE_UTTERANCE') {
if (data.speechEventType === 'END_OF_UTTERANCE') {
cloudSpeechRecognizer.listening = false
audioStream.unpipe(recognitionStream)
}
Expand Down Expand Up @@ -107,7 +107,7 @@ Sonus.init = (options, recognizer) => {
} else {
sonus.emit('partial-result', result.transcript)
}
} else if (data.speechEventType === 'END_OF_SINGLE_UTTERANCE' && transcriptEmpty) {
} else if (data.speechEventType === 'END_OF_UTTERANCE' && transcriptEmpty) {
sonus.emit('final-result', "")
} else if (data.error) {
sonus.emit('error', data.error)
Expand Down