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
我同样的问题,获取最新的代码后在执行,提示:
[ERROR][2023-03-10 10:00:50][wechat_channel.py:151] - No module named 'aip'
Traceback (most recent call last):
File "/root/chatgpt-on-wechat/channel/wechat/wechat_channel.py", line 147, in _do_send_voice
replyFile = super().build_text_to_voice(reply_text)
File "/root/chatgpt-on-wechat/channel/channel.py", line 37, in build_text_to_voice
return Bridge().fetch_text_to_voice(text)
File "/root/chatgpt-on-wechat/bridge/bridge.py", line 16, in fetch_text_to_voice
return voice_factory.create_voice("baidu").textToVoice(text)
File "/root/chatgpt-on-wechat/voice/voice_factory.py", line 12, in create_voice
from voice.baidu.baidu_voice import BaiduVoice
File "/root/chatgpt-on-wechat/voice/baidu/baidu_voice.py", line 6, in
from aip import AipSpeech
ModuleNotFoundError: No module named 'aip'
我同样的问题,获取最新的代码后在执行,提示: [ERROR][2023-03-10 10:00:50][wechat_channel.py:151] - No module named 'aip' Traceback (most recent call last): File "/root/chatgpt-on-wechat/channel/wechat/wechat_channel.py", line 147, in _do_send_voice replyFile = super().build_text_to_voice(reply_text) File "/root/chatgpt-on-wechat/channel/channel.py", line 37, in build_text_to_voice return Bridge().fetch_text_to_voice(text) File "/root/chatgpt-on-wechat/bridge/bridge.py", line 16, in fetch_text_to_voice return voice_factory.create_voice("baidu").textToVoice(text) File "/root/chatgpt-on-wechat/voice/voice_factory.py", line 12, in create_voice from voice.baidu.baidu_voice import BaiduVoice File "/root/chatgpt-on-wechat/voice/baidu/baidu_voice.py", line 6, in from aip import AipSpeech ModuleNotFoundError: No module named 'aip'
[DEBUG][2024-09-18 22:03:15][chat_channel.py:190] - [chat_channel] ready to handle context: type=VOICE, content=tmp/240918-220315.mp3 [INFO][2024-09-18 22:03:16][bridge.py:68] - create bot for voice_to_text [ERROR][2024-09-18 22:03:16][chat_channel.py:303] - Worker return exception: Traceback (most recent call last): File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run result = self.fn(*self.args, **self.kwargs) File "/root/chatgpt-on-wechat/channel/chat_channel.py", line 170, in _handle reply = self._generate_reply(context) File "/root/chatgpt-on-wechat/channel/chat_channel.py", line 205, in _generate_reply reply = super().build_voice_to_text(wav_path) File "/root/chatgpt-on-wechat/channel/channel.py", line 41, in build_voice_to_text return Bridge().fetch_voice_to_text(voice_file) File "/root/chatgpt-on-wechat/bridge/bridge.py", line 86, in fetch_voice_to_text return self.get_bot("voice_to_text").voiceToText(voiceFile) File "/root/chatgpt-on-wechat/bridge/bridge.py", line 72, in get_bot self.bots[typename] = create_voice(self.btype[typename]) File "/root/chatgpt-on-wechat/voice/factory.py", line 53, in create_voice raise RuntimeError RuntimeError
Thanks for reporting this! This issue has had no activity for over a year and predates our major rewrite, so we're closing it during a backlog cleanup.
🚀 CowAgent has been upgraded to 2.0 — an open-source super AI assistant & agent harness. It plans tasks, runs tools and skills, and autonomously grows with memory and a local knowledge base. Multi-model, multi-channel, lightweight, extensible, one-line install.
If your need still applies to the new version, we'd love to hear it — feel free to open a fresh issue. ❤️
Activity
dhlsam commentedon Mar 9, 2023
同问,如何添加语音合成平台的api key
zhayujie commentedon Mar 9, 2023
一、接收语音,回复文字
config.json中设置 "speech_recognition": true 即可, 这个配置在 template中有。 启动程序后 私聊 就会支持语音识别,会对所有收到的语音消息转成文字,并回复文字。二、接收语音,回复语音
有多种可选平台,以下提供两种方案,默认是OpenAI识别,Google语音合成:
1.百度
(1) 安装依赖:
pip3 install baidu-aip chardet(2) 在
config.json中添加配置:{ "speech_recognition": true, "voice_reply_voice": true, "baidu_app_id": "YOUR BAIDU APP ID", "baidu_api_key": "YOUR BAIDU API KEY", "baidu_secret_key": "YOUR BAIDU SERVICE KEY" }2.Google
(1) 安装 SpeechRecognition:
pip3 install SpeechRecognition(2) 安装 ffmpeg 和 espeak
(3) 在
config.json中添加配置:{ "speech_recognition": true, "voice_reply_voice": true }注:在itchat中只能回复mp3文件;在wechaty中可以回复语音消息,wechaty中使用需要安装额外依赖:
三、群组语音
"group_speech_recognition": true加入配置项PR:
#385 by @wanggang1987
#476 by @Chiaki-Chan
#623 by @Chiaki-Chan
[-]对应语音合成平台的key要添加到哪里呢?[/-][+]关于语音识别功能的使用[/+]4331599 commentedon Mar 10, 2023
你好。为什么我填好了之后还是提示这个错误呢?
[ERROR][2023-03-10 09:04:23][wechat_channel.py:151] - 'session_id' Traceback (most recent call last): File "E:\Enviroment\PythonWorks\src\chatgpt-on-wechat-20230310\chatgpt-on-wechat-1.0.5\channel\wechat\wechat_channel.py", line 145, in _do_send_voice reply_text = super().build_reply_content(query, context) File "E:\Enviroment\PythonWorks\src\chatgpt-on-wechat-20230310\chatgpt-on-wechat-1.0.5\channel\channel.py", line 31, in build_reply_content return Bridge().fetch_reply_content(query, context) File "E:\Enviroment\PythonWorks\src\chatgpt-on-wechat-20230310\chatgpt-on-wechat-1.0.5\bridge\bridge.py", line 10, in fetch_reply_content return bot_factory.create_bot("chatGPT").reply(query, context) File "E:\Enviroment\PythonWorks\src\chatgpt-on-wechat-20230310\chatgpt-on-wechat-1.0.5\bot\chatgpt\chat_gpt_bot.py", line 27, in reply session_id = context['session_id'] KeyError: 'session_id'fix: variable name compatibility modification #415
zhayujie commentedon Mar 10, 2023
修改了下,可以获取最新代码再试试
yuyang0702 commentedon Mar 10, 2023
我同样的问题,获取最新的代码后在执行,提示:
[ERROR][2023-03-10 10:00:50][wechat_channel.py:151] - No module named 'aip'
Traceback (most recent call last):
File "/root/chatgpt-on-wechat/channel/wechat/wechat_channel.py", line 147, in _do_send_voice
replyFile = super().build_text_to_voice(reply_text)
File "/root/chatgpt-on-wechat/channel/channel.py", line 37, in build_text_to_voice
return Bridge().fetch_text_to_voice(text)
File "/root/chatgpt-on-wechat/bridge/bridge.py", line 16, in fetch_text_to_voice
return voice_factory.create_voice("baidu").textToVoice(text)
File "/root/chatgpt-on-wechat/voice/voice_factory.py", line 12, in create_voice
from voice.baidu.baidu_voice import BaiduVoice
File "/root/chatgpt-on-wechat/voice/baidu/baidu_voice.py", line 6, in
from aip import AipSpeech
ModuleNotFoundError: No module named 'aip'
Ayuyyae commentedon Mar 10, 2023
你需要安装:pip install baidu-aip
wanggang1987 commentedon Mar 10, 2023
安装下pip3 install baidu-aip chardet
huanyan commentedon Mar 10, 2023
因为调用了baidu-aip库,终端输入pip3 install baidu-aip chardet 。
yuyang0702 commentedon Mar 10, 2023
谢谢,已经解决了,程序默认的语音类型的百度,我没安装百度的这个库,刚刚改成谷歌了。谢谢~~
wangjiangmin1115 commentedon Mar 10, 2023
[INFO][2023-03-10 16:30:44][openai_voice.py:22] - [Openai] voiceToText text=回复一个语言 voice file name=tmp/230310-163043.mp3
[INFO][2023-03-10 16:30:44][chat_gpt_bot.py:26] - [OPEN_AI] query=回复一个语言
[INFO][2023-03-10 16:30:46][google_voice.py:49] - [Google] textToVoice text=您好!请问题用哪种语言提问,我将用相同的语言进行回答。 voice file name=tmp/语音回复_1678437046.mp3
[INFO][2023-03-10 16:30:46][wechat_channel.py:149] - [WX] sendFile=tmp/语音回复_1678437046.mp3, receiver=@68bd8f5f7464a0ffee8f9ef10bf401e8b83abc33ad375cc6c2c6167d6842e19b
使用的是谷歌的语音类型,但是微信没有回复任何消息
wangjiangmin1115 commentedon Mar 10, 2023
在itchat中只能回复mp3文件,在wechaty中可以回复语音消息
wechaty 所需要的版本是多少,需要指定某个版本吗?
itchat和wechaty,是在哪个配置项,还是哪个文件上指定了
lingwecho commentedon Mar 11, 2023
wechaty比itchat更容易被封吗?
67 remaining items
KunBoy5240 commentedon Jul 31, 2023
请问你用的是啥通道能看到Google的语音回复?好像我的wechatmp这个通道不能使用语音识别?多次显示http状态吗200之后就直接错误了[ERROR]
Failed to connect. Probable cause: Unknown不知道啥请款。 @zhayujie 能帮解惑一下嘛
AnCool-OvO commentedon Jan 22, 2024
为什么我在微信中使用回复的还是mp3文件呀
jones-so commentedon Jan 22, 2024
AnCool-OvO commentedon Jan 23, 2024
请问你这个解决了吗,我也是遇到这样的问题返回的不是微信语音而是mp3文件
1600858489 commentedon Apr 21, 2024
我也是这个问题,请问您解决了吗,我用的是百度的短语音识别api
jones-so commentedon Apr 21, 2024
spacex-3 commentedon Sep 18, 2024
依赖都安装了,收到语音还是提示错误,请问如何解决呀?应该是默认用的tts-1和whisper-1模型吧?我也没其他设置
[DEBUG][2024-09-18 22:03:15][chat_channel.py:190] - [chat_channel] ready to handle context: type=VOICE, content=tmp/240918-220315.mp3 [INFO][2024-09-18 22:03:16][bridge.py:68] - create bot for voice_to_text [ERROR][2024-09-18 22:03:16][chat_channel.py:303] - Worker return exception: Traceback (most recent call last): File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run result = self.fn(*self.args, **self.kwargs) File "/root/chatgpt-on-wechat/channel/chat_channel.py", line 170, in _handle reply = self._generate_reply(context) File "/root/chatgpt-on-wechat/channel/chat_channel.py", line 205, in _generate_reply reply = super().build_voice_to_text(wav_path) File "/root/chatgpt-on-wechat/channel/channel.py", line 41, in build_voice_to_text return Bridge().fetch_voice_to_text(voice_file) File "/root/chatgpt-on-wechat/bridge/bridge.py", line 86, in fetch_voice_to_text return self.get_bot("voice_to_text").voiceToText(voiceFile) File "/root/chatgpt-on-wechat/bridge/bridge.py", line 72, in get_bot self.bots[typename] = create_voice(self.btype[typename]) File "/root/chatgpt-on-wechat/voice/factory.py", line 53, in create_voice raise RuntimeError RuntimeErrorjones-so commentedon Sep 18, 2024
fix: variable name compatibility modification zhayujie#415
fix: variable name compatibility modification zhayujie#415
fix: variable name compatibility modification zhayujie#415
zhayujie commentedon Jun 1, 2026
Thanks for reporting this! This issue has had no activity for over a year and predates our major rewrite, so we're closing it during a backlog cleanup.
🚀 CowAgent has been upgraded to 2.0 — an open-source super AI assistant & agent harness. It plans tasks, runs tools and skills, and autonomously grows with memory and a local knowledge base. Multi-model, multi-channel, lightweight, extensible, one-line install.
If your need still applies to the new version, we'd love to hear it — feel free to open a fresh issue. ❤️
感谢反馈!此 issue 一年多没有活动,且属于项目大版本重构之前的时期,我们在清理历史 backlog 时将其关闭。
🚀 CowAgent 已升级到 2.0,升级为开源的超级 AI 助手 & Agent Harness 框架。能规划任务、调用工具与技能,并通过记忆和本地知识库自主成长。多模型、多渠道,轻量、可扩展,一行命令安装。
如果你的需求在新版本上依然适用,欢迎新建一个 issue 告诉我们 ❤️
jones-so commentedon Jun 1, 2026