This commit is contained in:
zpc 2025-03-28 02:50:37 +08:00
parent 7cf247a873
commit f99f4e1b4a
2 changed files with 29 additions and 27 deletions

View File

@ -413,6 +413,8 @@ namespace ShengShengBuXi.Hubs
_logger.LogInformation($"结束音频流: {Context.ConnectionId}");
// 结束音频处理
await _audioProcessingService.EndAudioStreamAsync(Context.ConnectionId);
var _speechsession = _speechToTextService.GetSessionStatus(Context.ConnectionId);
if (_speechsession.HasSavedText && !_speechsession.IsSentToDisplay)
@ -420,9 +422,9 @@ namespace ShengShengBuXi.Hubs
AddRecognizedTextToDisplay(_speechsession.FinalText, true, Context.ConnectionId, _speechsession);
_speechsession.IsSentToDisplay = true;
_logger.LogInformation($"结束音频流: {Context.ConnectionId}");
}
// 结束音频处理
await _audioProcessingService.EndAudioStreamAsync(Context.ConnectionId);
// 结束语音识别会话
await _speechToTextService.EndSessionAsync(Context.ConnectionId);

View File

@ -52,7 +52,7 @@
"needVad": true
}
},
"displayType": 0,
"displayType": 1,
"minDisplayText": 3,
"maxDisplayText": 60
}