You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2023-05-04 14:14:00,785 - robot.ASR - ASR.py - transcribe - line 154 - INFO - tencent-asr 语音识别到了:进入极客模式。
2023-05-04 14:14:03,566 - robot.Brain - Brain.py - query - line 71 - INFO - '进入极客模式。' 命中技能 geek
2023-05-04 14:14:03,566 - robot.Conversation - Conversation.py - say - line 398 - INFO - 即将朗读语音:进入极客模式
2023-05-04 14:14:03,567 - robot.Conversation - Conversation.py - _tts - line 305 - INFO - _tts
2023-05-04 14:14:04,583 - robot.TTS - TTS.py - async_get_speech - line 365 - INFO - edge-tts 语音合成成功,合成路径:/Users/tf/Project/wkrobot/wukong-robot/temp/1ab9d2bc46e54090998bce39a980e0de.mp3
2023-05-04 14:14:04,583 - robot.Conversation - Conversation.py - _ttsAction - line 85 - INFO - 第0段TTS合成成功。msg: 进入极客模式
2023-05-04 14:14:04,583 - robot.Conversation - Conversation.py - _ttsAction - line 90 - INFO - 即将播放第0段TTS。msg: 进入极客模式
2023-05-04 14:14:04,584 - robot.Player - Player.py - playLoop - line 101 - INFO - 开始播放音频:/Users/tf/Project/wkrobot/wukong-robot/temp/1ab9d2bc46e54090998bce39a980e0de.mp3
2023-05-04 14:14:07,255 - robot.Player - Player.py - doPlay - line 125 - INFO - 播放完成:/Users/tf/Project/wkrobot/wukong-robot/temp/1ab9d2bc46e54090998bce39a980e0de.mp3
2023-05-04 14:14:07,259 - robot.Conversation - Conversation.py - activeListen - line 418 - INFO - 进入主动聆听...
2023-05-04 14:14:16,849 - robot.ASR - ASR.py - transcribe - line 154 - INFO - tencent-asr 语音识别到了:what's your name?
2023-05-04 14:14:19,992 - robot.AI - AI.py - stream_chat - line 238 - INFO - msg: what's your name
2023-05-04 14:14:19,993 - robot.AI - AI.py - stream_chat - line 247 - INFO - 开始流式请求
2023-05-04 14:14:21,556 - robot.Conversation - Conversation.py - _ttsAction - line 99 - ERROR - 语音合成失败:Cannot run the event loop while another loop is running
Stack (most recent call last):
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 995, in _bootstrap
self._bootstrap_inner()
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
self.run()
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 975, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 607, in run_forever
self._run_once()
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 1922, in _run_once
handle._run()
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Player.py", line 91, in executeOnCompleted
res and onCompleted and onCompleted()
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 94, in
onCompleted=lambda: self._lastCompleted(index, onCompleted),
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 63, in _lastCompleted
onCompleted and onCompleted()
File "/Users/tf/Project/wkrobot/wukong-robot/plugins/Geek.py", line 23, in
onCompleted=lambda: self.onAsk(self.activeListen(silent=True)),
File "/Users/tf/Project/wkrobot/wukong-robot/plugins/Geek.py", line 33, in onAsk
self.con.doResponse(input)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 170, in doResponse
self.stream_say(stream, True, onCompleted=self.checkRestore)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 365, in stream_say
audio = self._tts_line(line.strip(), cache, index, onCompleted)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 293, in _tts_line
result = self._ttsAction(line, cache, index, onCompleted)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 99, in _ttsAction
logger.error(f"语音合成失败:{e}", stack_info=True)
Traceback (most recent call last):
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 84, in _ttsAction
voice = self.tts.get_speech(msg)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/tf/Project/wkrobot/wukong-robot/robot/TTS.py", line 373, in get_speech
tmpfile = event_loop.run_until_complete(self.async_get_speech(phrase))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 629, in run_until_complete
self._check_running()
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 590, in _check_running
raise RuntimeError(
RuntimeError: Cannot run the event loop while another loop is running
/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py:102: RuntimeWarning: coroutine 'EdgeTTS.async_get_speech' was never awaited
return None
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
2023-05-04 14:14:22,716 - robot.Conversation - Conversation.py - _ttsAction - line 99 - ERROR - 语音合成失败:Cannot run the event loop while another loop is running
Stack (most recent call last):
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 995, in _bootstrap
self._bootstrap_inner()
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
self.run()
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 975, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 607, in run_forever
self._run_once()
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 1922, in _run_once
handle._run()
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Player.py", line 91, in executeOnCompleted
res and onCompleted and onCompleted()
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 94, in
onCompleted=lambda: self._lastCompleted(index, onCompleted),
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 63, in _lastCompleted
onCompleted and onCompleted()
File "/Users/tf/Project/wkrobot/wukong-robot/plugins/Geek.py", line 23, in
onCompleted=lambda: self.onAsk(self.activeListen(silent=True)),
File "/Users/tf/Project/wkrobot/wukong-robot/plugins/Geek.py", line 33, in onAsk
self.con.doResponse(input)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 170, in doResponse
self.stream_say(stream, True, onCompleted=self.checkRestore)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 365, in stream_say
audio = self._tts_line(line.strip(), cache, index, onCompleted)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 293, in _tts_line
result = self._ttsAction(line, cache, index, onCompleted)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 99, in _ttsAction
logger.error(f"语音合成失败:{e}", stack_info=True)
Traceback (most recent call last):
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 84, in _ttsAction
voice = self.tts.get_speech(msg)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/tf/Project/wkrobot/wukong-robot/robot/TTS.py", line 373, in get_speech
tmpfile = event_loop.run_until_complete(self.async_get_speech(phrase))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 629, in run_until_complete
self._check_running()
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 590, in _check_running
raise RuntimeError(
RuntimeError: Cannot run the event loop while another loop is running
2023-05-04 14:14:23,214 - robot.Conversation - Conversation.py - _ttsAction - line 99 - ERROR - 语音合成失败:Cannot run the event loop while another loop is running
Stack (most recent call last):
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 995, in _bootstrap
self._bootstrap_inner()
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
self.run()
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 975, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 607, in run_forever
self._run_once()
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 1922, in _run_once
handle._run()
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Player.py", line 91, in executeOnCompleted
res and onCompleted and onCompleted()
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 94, in
onCompleted=lambda: self._lastCompleted(index, onCompleted),
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 63, in _lastCompleted
onCompleted and onCompleted()
File "/Users/tf/Project/wkrobot/wukong-robot/plugins/Geek.py", line 23, in
onCompleted=lambda: self.onAsk(self.activeListen(silent=True)),
File "/Users/tf/Project/wkrobot/wukong-robot/plugins/Geek.py", line 33, in onAsk
self.con.doResponse(input)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 170, in doResponse
self.stream_say(stream, True, onCompleted=self.checkRestore)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 365, in stream_say
audio = self._tts_line(line.strip(), cache, index, onCompleted)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 293, in _tts_line
result = self._ttsAction(line, cache, index, onCompleted)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 99, in _ttsAction
logger.error(f"语音合成失败:{e}", stack_info=True)
Traceback (most recent call last):
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 84, in _ttsAction
voice = self.tts.get_speech(msg)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/tf/Project/wkrobot/wukong-robot/robot/TTS.py", line 373, in get_speech
tmpfile = event_loop.run_until_complete(self.async_get_speech(phrase))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 629, in run_until_complete
self._check_running()
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 590, in _check_running
raise RuntimeError(
RuntimeError: Cannot run the event loop while another loop is running
复现步骤
对wukong说“进入极客模式”成功后,再任意向其说一句话,终端就会报错,错误信息见如上日志。
The text was updated successfully, but these errors were encountered:
确认已寻找过答案
我已确认在 Github issue 页、常见问题页、文档 中都查找过,没有找到类似问题和资料。我也没有 google / bing/ 百度 / duckduckgo 到相关解答。
安装方式
手动安装
操作系统
macOS Monterey Version 12.6.5(21G531)
离线唤醒相关
非离线唤醒相关的问题。
我已确保录音、播放都正常工作才尝试 wukong-robot 。
问题描述
进入极客模式后,对其说话会报错,日志如下:
2023-05-04 14:14:00,785 - robot.ASR - ASR.py - transcribe - line 154 - INFO - tencent-asr 语音识别到了:进入极客模式。
2023-05-04 14:14:03,566 - robot.Brain - Brain.py - query - line 71 - INFO - '进入极客模式。' 命中技能 geek
2023-05-04 14:14:03,566 - robot.Conversation - Conversation.py - say - line 398 - INFO - 即将朗读语音:进入极客模式
2023-05-04 14:14:03,567 - robot.Conversation - Conversation.py - _tts - line 305 - INFO - _tts
2023-05-04 14:14:04,583 - robot.TTS - TTS.py - async_get_speech - line 365 - INFO - edge-tts 语音合成成功,合成路径:/Users/tf/Project/wkrobot/wukong-robot/temp/1ab9d2bc46e54090998bce39a980e0de.mp3
2023-05-04 14:14:04,583 - robot.Conversation - Conversation.py - _ttsAction - line 85 - INFO - 第0段TTS合成成功。msg: 进入极客模式
2023-05-04 14:14:04,583 - robot.Conversation - Conversation.py - _ttsAction - line 90 - INFO - 即将播放第0段TTS。msg: 进入极客模式
2023-05-04 14:14:04,584 - robot.Player - Player.py - playLoop - line 101 - INFO - 开始播放音频:/Users/tf/Project/wkrobot/wukong-robot/temp/1ab9d2bc46e54090998bce39a980e0de.mp3
2023-05-04 14:14:07,255 - robot.Player - Player.py - doPlay - line 125 - INFO - 播放完成:/Users/tf/Project/wkrobot/wukong-robot/temp/1ab9d2bc46e54090998bce39a980e0de.mp3
2023-05-04 14:14:07,259 - robot.Conversation - Conversation.py - activeListen - line 418 - INFO - 进入主动聆听...
2023-05-04 14:14:16,849 - robot.ASR - ASR.py - transcribe - line 154 - INFO - tencent-asr 语音识别到了:what's your name?
2023-05-04 14:14:19,992 - robot.AI - AI.py - stream_chat - line 238 - INFO - msg: what's your name
2023-05-04 14:14:19,993 - robot.AI - AI.py - stream_chat - line 247 - INFO - 开始流式请求
2023-05-04 14:14:21,556 - robot.Conversation - Conversation.py - _ttsAction - line 99 - ERROR - 语音合成失败:Cannot run the event loop while another loop is running
Stack (most recent call last):
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 995, in _bootstrap
self._bootstrap_inner()
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
self.run()
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 975, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 607, in run_forever
self._run_once()
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 1922, in _run_once
handle._run()
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Player.py", line 91, in executeOnCompleted
res and onCompleted and onCompleted()
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 94, in
onCompleted=lambda: self._lastCompleted(index, onCompleted),
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 63, in _lastCompleted
onCompleted and onCompleted()
File "/Users/tf/Project/wkrobot/wukong-robot/plugins/Geek.py", line 23, in
onCompleted=lambda: self.onAsk(self.activeListen(silent=True)),
File "/Users/tf/Project/wkrobot/wukong-robot/plugins/Geek.py", line 33, in onAsk
self.con.doResponse(input)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 170, in doResponse
self.stream_say(stream, True, onCompleted=self.checkRestore)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 365, in stream_say
audio = self._tts_line(line.strip(), cache, index, onCompleted)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 293, in _tts_line
result = self._ttsAction(line, cache, index, onCompleted)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 99, in _ttsAction
logger.error(f"语音合成失败:{e}", stack_info=True)
Traceback (most recent call last):
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 84, in _ttsAction
voice = self.tts.get_speech(msg)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/tf/Project/wkrobot/wukong-robot/robot/TTS.py", line 373, in get_speech
tmpfile = event_loop.run_until_complete(self.async_get_speech(phrase))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 629, in run_until_complete
self._check_running()
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 590, in _check_running
raise RuntimeError(
RuntimeError: Cannot run the event loop while another loop is running
/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py:102: RuntimeWarning: coroutine 'EdgeTTS.async_get_speech' was never awaited
return None
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
2023-05-04 14:14:22,716 - robot.Conversation - Conversation.py - _ttsAction - line 99 - ERROR - 语音合成失败:Cannot run the event loop while another loop is running
Stack (most recent call last):
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 995, in _bootstrap
self._bootstrap_inner()
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
self.run()
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 975, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 607, in run_forever
self._run_once()
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 1922, in _run_once
handle._run()
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Player.py", line 91, in executeOnCompleted
res and onCompleted and onCompleted()
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 94, in
onCompleted=lambda: self._lastCompleted(index, onCompleted),
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 63, in _lastCompleted
onCompleted and onCompleted()
File "/Users/tf/Project/wkrobot/wukong-robot/plugins/Geek.py", line 23, in
onCompleted=lambda: self.onAsk(self.activeListen(silent=True)),
File "/Users/tf/Project/wkrobot/wukong-robot/plugins/Geek.py", line 33, in onAsk
self.con.doResponse(input)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 170, in doResponse
self.stream_say(stream, True, onCompleted=self.checkRestore)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 365, in stream_say
audio = self._tts_line(line.strip(), cache, index, onCompleted)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 293, in _tts_line
result = self._ttsAction(line, cache, index, onCompleted)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 99, in _ttsAction
logger.error(f"语音合成失败:{e}", stack_info=True)
Traceback (most recent call last):
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 84, in _ttsAction
voice = self.tts.get_speech(msg)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/tf/Project/wkrobot/wukong-robot/robot/TTS.py", line 373, in get_speech
tmpfile = event_loop.run_until_complete(self.async_get_speech(phrase))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 629, in run_until_complete
self._check_running()
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 590, in _check_running
raise RuntimeError(
RuntimeError: Cannot run the event loop while another loop is running
2023-05-04 14:14:23,214 - robot.Conversation - Conversation.py - _ttsAction - line 99 - ERROR - 语音合成失败:Cannot run the event loop while another loop is running
Stack (most recent call last):
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 995, in _bootstrap
self._bootstrap_inner()
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
self.run()
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 975, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 607, in run_forever
self._run_once()
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 1922, in _run_once
handle._run()
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Player.py", line 91, in executeOnCompleted
res and onCompleted and onCompleted()
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 94, in
onCompleted=lambda: self._lastCompleted(index, onCompleted),
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 63, in _lastCompleted
onCompleted and onCompleted()
File "/Users/tf/Project/wkrobot/wukong-robot/plugins/Geek.py", line 23, in
onCompleted=lambda: self.onAsk(self.activeListen(silent=True)),
File "/Users/tf/Project/wkrobot/wukong-robot/plugins/Geek.py", line 33, in onAsk
self.con.doResponse(input)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 170, in doResponse
self.stream_say(stream, True, onCompleted=self.checkRestore)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 365, in stream_say
audio = self._tts_line(line.strip(), cache, index, onCompleted)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 293, in _tts_line
result = self._ttsAction(line, cache, index, onCompleted)
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 99, in _ttsAction
logger.error(f"语音合成失败:{e}", stack_info=True)
Traceback (most recent call last):
File "/Users/tf/Project/wkrobot/wukong-robot/robot/Conversation.py", line 84, in _ttsAction
voice = self.tts.get_speech(msg)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/tf/Project/wkrobot/wukong-robot/robot/TTS.py", line 373, in get_speech
tmpfile = event_loop.run_until_complete(self.async_get_speech(phrase))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 629, in run_until_complete
self._check_running()
File "/usr/local/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 590, in _check_running
raise RuntimeError(
RuntimeError: Cannot run the event loop while another loop is running
复现步骤
对wukong说“进入极客模式”成功后,再任意向其说一句话,终端就会报错,错误信息见如上日志。
The text was updated successfully, but these errors were encountered: