使用自定义 tkinter python 在文本框内打印

问题描述 投票:0回答:0
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")
                )

此代码正在将实时流音频转录发送到文本框我设法让它工作但我必须每次为每个单词按下按钮所以我会尝试这样做感谢你的帮助

python user-interface tkinter stream
© www.soinside.com 2019 - 2024. All rights reserved.