zhayujie / chatgpt-on-wechat

基于大模型搭建的聊天机器人,同时支持 微信公众号、企业微信应用、飞书、钉钉 等接入,可选择GPT3.5/GPT-4o/GPT-o1/ Claude/文心一言/讯飞星火/通义千问/ Gemini/GLM-4/Claude/Kimi/LinkAI,能处理文本、语音和图片,访问操作系统和互联网,支持基于自有知识库进行定制企业智能客服。
https://docs.link-ai.tech/cow
MIT License
29.85k stars 7.88k forks source link

使用语音时报错 'latin-1' codec can't encode characters in position 7-14: ordinal not in range(256) #1481

Open smilyming opened 11 months ago

smilyming commented 11 months ago

前置确认

⚠️ 搜索issues中是否已存在类似问题

操作系统类型?

MacOS

运行的python版本是?

python 3.8

使用的chatgpt-on-wechat版本是?

Latest Release

运行的channel类型是?

wechatmp(公众号, 订阅号)

问题描述 😯

订阅号接文心一言文字对答没问题,添加了百度语音,用语音对话出现报错 'latin-1' codec can't encode characters in position 7-14: ordinal not in range(256)

终端日志 📒

[INFO][2023-10-19 03:48:20][passive_reply.py:97] - [wechatmp] Request 1 from olBOl0zTKywrIzF1qfJP7KFLh-_Q 24304625001142324 81.69.103.129:57904
tmp/FB-lFer5SOKm7RZLuCV2uMhuEg9DI-oZqObW6I0Yss5zYs3uLDUkTOX76KNEA2u0.amr
/usr/local/lib/python3.8/site-packages/pydub/utils.py:198: RuntimeWarning: Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work
  warn("Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work", RuntimeWarning)
[WARNING][2023-10-19 03:48:21][chat_channel.py:186] - [WX]any to wav error, use raw path. [Errno 2] No such file or directory: 'ffprobe'
[INFO][2023-10-19 03:48:21][bridge.py:39] - create bot openai for voice_to_text
[INFO][2023-10-19 03:48:22][wechatmp_channel.py:85] - [wechatmp] text cached, receiver olBOl0zTKywrIzF1qfJP7KFLh-_Q
[ERROR]
'latin-1' codec can't encode characters in position 7-14: ordinal not in range(256)
[INFO][2023-10-19 03:48:22][passive_reply.py:153] - [wechatmp] Request 1 do send to olBOl0zTKywrIzF1qfJP7KFLh-_Q 24304625001142324: tmp/FB-lFer5SOKm7RZLuCV2uMhuEg9DI-oZqObW6I0Yss5zYs3uLDUkTOX76KNEA2u0.amr
[ERROR]
'latin-1' codec can't encode characters in position 7-14: ordinal not in range(256)
hd19820806 commented 8 months ago

语音识别超难搞哦