如何在Microsoft语音服务中仅从已识别对象中获取文本部分

2024-09-30 12:15:07 发布

您现在位置:Python中文网/ 问答频道 /正文

以下是我从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)


Tags: 文件text文本idsessionsdk语音result

热门问题