-
Notifications
You must be signed in to change notification settings - Fork 102
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
fire end of stream at turn.end, not at speech.end #7
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets review to make sure it matches the sdk for the other languages
@@ -349,12 +349,12 @@ export abstract class ServiceRecognizerBase implements IDisposable { | |||
if (!!this.privRecognizer.speechEndDetected) { | |||
this.privRecognizer.speechEndDetected(this.privRecognizer, speechStopEventArgs); | |||
} | |||
|
|||
break; | |||
case "turn.end": | |||
if (requestSession.isSpeechEnded && this.privRecognizerConfig.isContinuousRecognition) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we return EndOfStream result for RecognizeOnceAsync()? The main purpose of EndOfStream is for RecognizeOnceAsync(). If users calls RecognizeOnceAsync() and there is no audio to be processed anymore, EndOfStream is returned as result (Reason is set to Canceled, and then CancellationDetails returns EndOfStream). #Closed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i changed the code to be more consistent with the c++ implementation, i.e., make sure we fire the event in case the stream has ended and we have seen a turn-start message.
in this case, we fire the eof cancel event once.
re-buffering on the audio side is done through the audio-node, so we are not loosing data here, however,
since we are not yet handling the timestamps in the reco messages, it might be that the message come "too early" which means, there is so much data in flight that there will be a subsequent turn.start/end after the current one.
(note: this /should/ only happen for file data since microphone data is streamed in realtime to the service and thus responsed should not be behind the actual audio data)
#Closed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No description provided.