'commit'
This commit is contained in:
@@ -226,8 +226,8 @@ class ChatMonitorAudioBot:
|
||||
logger.info(">>> 立即按住发送语音按钮...")
|
||||
self.device.touch.down(pos[0], pos[1])
|
||||
|
||||
logger.info(">>> 等待 2 秒确保微信进入录音状态...")
|
||||
await asyncio.sleep(2.0)
|
||||
logger.info(">>> 等待 0.5 秒确保微信进入录音状态...")
|
||||
await asyncio.sleep(0.5)
|
||||
|
||||
logger.info(">>> 启动 TTS 播音...")
|
||||
tts_thread.start()
|
||||
@@ -333,15 +333,6 @@ class ChatMonitorAudioBot:
|
||||
if reply:
|
||||
logger.info(f"LLM 建议回复: {reply}")
|
||||
|
||||
# 如果触发回复的消息是语音,先点击语音条以清理状态
|
||||
if last_msg.get('type') == 'voice':
|
||||
try:
|
||||
cx, cy = last_msg.get('center', (0, 0))
|
||||
WxUtil.safe_device_click(self.device, cx, cy)
|
||||
await asyncio.sleep(1.5)
|
||||
except Exception as e:
|
||||
logger.warning(f"清理语音状态失败: {e}")
|
||||
|
||||
# 发送语音回复
|
||||
success = await self.send_voice_reply(reply)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user