class MyEventHandler(TranscriptResultStreamHandler):
async def handle_transcript_event(self, transcript_event: TranscriptEvent):
# This handler can be implemented to handle transcriptions as needed.
# Here's an example to get started.
results = transcript_event.transcript.results
for result in results:
for alt in result.alternatives:
transcription_text.insert(
transcription_text.insert("end", alt.transcript + "\n")
)
此代码正在将实时流音频转录发送到文本框我设法让它工作但我必须每次为每个单词按下按钮所以我会尝试这样做感谢你的帮助