以下是我从Microsoft Azure speech SDK的文件中输出的语音识别。我想知道如何从输出中提取“文本”部分,而不是完整部分
SpeechRecognitionEventArgs(session_id=e28f6907838640e191f214035d69f5e0, result=SpeechRecognitionResult(result_id=c27fa5b36bcd466f8162ca3c6ce5f935, text="Hello good morning, my name is Arihant. How may I help you?", reason=ResultReason.RecognizedSpeech))
CANCELED SpeechRecognitionCanceledEventArgs(session_id=e28f6907838640e191f214035d69f5e0, result=SpeechRecognitionResult(result_id=5681af6a81994a76a11b7e94307c7c2e, text="", reason=ResultReason.Canceled))
CLOSING on SessionEventArgs(session_id=e28f6907838640e191f214035d69f5e0)
如果这是您正在使用的以下代码:
您只能使用
evt.result
获取文本相关问题 更多 >
编程相关推荐