-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
配置企业微信识别用户发送的语音时报错,使用的百度语音 #90
Comments
我使用讯飞语音,也遇到了类似错误: [WARNING][2024-09-05 18:35:30][chat_channel.py:207] - [chat_channel]any to wav error, use raw path. [WinError 2] 系统找不到指定的文件。 |
我的问题解决了,可以识别语音了,解决方法: |
我安装了ffmpeg,我的是找不到硬盘上的语音文件,如果我硬编码一个语音文件在硬盘上,然后让百度识别是没问题的。我试试讯飞。。 |
前置确认
操作系统类型?
Windows
运行的python版本是?
python 3.10
使用的dify-on-wechat版本是?
Latest Release
运行的
channel
类型是?other
复现步骤 🕹
企业微信配置百度语音,给配置好的企业微信发送文字能正常回复文字,发送文字也可以正常回复语音,唯独发送语音时报错。
{
"coze_api_base": "https://api.coze.cn/open_api/v2",
"coze_api_key": "没问题",
"coze_bot_id": "没问题",
"channel_type": "wework",
"model": "coze",
"single_chat_prefix": [""],
"single_chat_reply_prefix": "",
"group_chat_prefix": ["@bot"],
"group_name_white_list": ["ALL_GROUP"],
"accept_friend_commands": ["加好友"],
"group_exit_msg": "退群聊通知文案",
"speech_recognition": "True",
"group_speech_recognition": "True",
"voice_to_text": "baidu",
"text_to_voice": "baidu",
"baidu_dev_pid": 1536,
"baidu_app_id": "没问题",
"baidu_api_key": "没问题",
"baidu_secret_key": "没问题",
"accept_friend_msg": "通过好友发送的提示语"
}
问题描述 😯
配了百度语音识别,就一直报这个错误,
[ERROR][2024-09-03 19:23:13][wework_message.py:101] - D:\coze-workchat\dify-on-wechat\tmp\20240903192311.silk
[ERROR][2024-09-03 19:23:13][chat_channel.py:326] - Worker return exception: Error: could not open input file
Traceback (most recent call last):
File "C:\Users\lizhi\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "D:\coze-workchat\dify-on-wechat\channel\chat_channel.py", line 175, in _handle
reply = self._generate_reply(context)
File "D:\coze-workchat\dify-on-wechat\channel\chat_channel.py", line 201, in _generate_reply
cmsg.prepare()
File "D:\coze-workchat\dify-on-wechat\channel\chat_message.py", line 68, in prepare
self._prepare_fn()
File "D:\coze-workchat\dify-on-wechat\channel\wework\wework_message.py", line 133, in
self.prepare_fn = lambda: c2c_download_and_convert(wework, wework_msg, file_name)
File "D:\coze-workchat\dify-on-wechat\channel\wework\wework_message.py", line 102, in c2c_download_and_convert
pilk.silk_to_wav(save_path, wav_file, rate=24000)
File "C:\Users\lizhi\AppData\Local\Programs\Python\Python310\lib\site-packages\pilk_init.py", line 45, in silk_to_wav
decode(silk, pcm_path, pcm_rate=rate)
OSError: Error: could not open input file
语音输入对方接收到后找不到语音文件。查看本地临时文件20240903153618.silk.cdncomtdl都是这种,多了个后缀.cdncomtdl导致找不到,不知道啥原因。有人说是下载语音文件时没完成,但是不知道具体原因。求解?
终端日志 📒
The text was updated successfully, but these errors were encountered: