mirror of
https://github.com/hanxi/xiaomusic.git
synced 2026-06-01 12:15:48 +08:00
fix: 修复循环播放tts语音的问题之一 (#888)
This commit is contained in:
@@ -950,7 +950,8 @@ class XiaoMusicDevice:
|
||||
if duration > 0:
|
||||
|
||||
async def _tts_timeout():
|
||||
await asyncio.sleep(duration)
|
||||
# 增加2秒,确保小爱音箱缓存完毕后,触发后续stop
|
||||
await asyncio.sleep(duration + 2)
|
||||
try:
|
||||
self.log.info("TTS 播放定时器时间到")
|
||||
current_timer = self._tts_timer
|
||||
@@ -1324,4 +1325,4 @@ class XiaoMusicDevice:
|
||||
selected_name = self._pending_selection[index - 1]
|
||||
self.log.info(f"用户选择了第{index}个: {selected_name}")
|
||||
# 保持待选择状态不变,支持用户继续选择其他歌曲
|
||||
await self._playmusic(selected_name)
|
||||
await self._playmusic(selected_name)
|
||||
Reference in New Issue
Block a user