fire end of stream at turn.end, not at speech.end
This commit is contained in:
Родитель
f495d7423a
Коммит
bf94d4cef1
|
@ -349,12 +349,12 @@ export abstract class ServiceRecognizerBase implements IDisposable {
|
||||||
if (!!this.privRecognizer.speechEndDetected) {
|
if (!!this.privRecognizer.speechEndDetected) {
|
||||||
this.privRecognizer.speechEndDetected(this.privRecognizer, speechStopEventArgs);
|
this.privRecognizer.speechEndDetected(this.privRecognizer, speechStopEventArgs);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
case "turn.end":
|
||||||
if (requestSession.isSpeechEnded && this.privRecognizerConfig.isContinuousRecognition) {
|
if (requestSession.isSpeechEnded && this.privRecognizerConfig.isContinuousRecognition) {
|
||||||
this.cancelRecognitionLocal(requestSession, CancellationReason.EndOfStream, CancellationErrorCode.NoError, undefined, successCallback);
|
this.cancelRecognitionLocal(requestSession, CancellationReason.EndOfStream, CancellationErrorCode.NoError, undefined, successCallback);
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
case "turn.end":
|
|
||||||
const sessionStopEventArgs: SessionEventArgs = new SessionEventArgs(requestSession.sessionId);
|
const sessionStopEventArgs: SessionEventArgs = new SessionEventArgs(requestSession.sessionId);
|
||||||
requestSession.onServiceTurnEndResponse(this.privRecognizerConfig.isContinuousRecognition);
|
requestSession.onServiceTurnEndResponse(this.privRecognizerConfig.isContinuousRecognition);
|
||||||
if (!this.privRecognizerConfig.isContinuousRecognition || requestSession.isSpeechEnded) {
|
if (!this.privRecognizerConfig.isContinuousRecognition || requestSession.isSpeechEnded) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче