'commit'
This commit is contained in:
@@ -98,6 +98,13 @@ class MyCallback(QwenTtsRealtimeCallback):
|
||||
print('[TTS] 会话结束')
|
||||
self.all_data_received = True
|
||||
self.complete_event.set()
|
||||
|
||||
# [Fix] 如果直到会话结束都还没达到缓冲阈值(短文本情况),强制启动播放
|
||||
if not self.is_playing:
|
||||
print("[TTS] 会话已结束但未达缓冲阈值,强制启动播放...")
|
||||
self.is_playing = True
|
||||
self.playback_thread = threading.Thread(target=self._playback_worker)
|
||||
self.playback_thread.start()
|
||||
except Exception as e:
|
||||
print(f'[Error] 处理回调事件异常: {e}')
|
||||
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user