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
31.11k stars 8.12k forks source link

使用azure text_to_voice时报错。 #1466

Open BR1981 opened 1 year ago

BR1981 commented 1 year ago

前置确认

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

操作系统类型?

Linux

运行的python版本是?

python 3.7

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

Latest Release

运行的channel类型是?

wechatmp_service(公众号, 服务号)

复现步骤 🕹

config.json文件里,text_to_voice=azure。 运行程序后,给公众号发语音就会提示,抱歉,语音合成失败

问题描述 😯

3c7cd203d1ab66711ce1611a263ec06

终端日志 📒

4|app | [INFO][2023-10-04 12:51:01][bridge.py:39] - create bot chatGPT for chat 4|app | [INFO][2023-10-04 12:51:01][chat_gpt_bot.py:49] - [CHATGPT] query=你好。 4|app | [INFO][2023-10-04 12:51:10][bridge.py:39] - create bot azure for text_to_voice 4|app | [INFO][2023-10-04 12:51:12][azure_voice.py:77] - [Azure] textToVoice auto detect language=zh, voice=zh-CN-XiaozhenNeural 4|app | [ERROR][2023-10-04 12:51:13][azure_voice.py:93] - [Azure] textToVoice error, result=SpeechSynthesisResult(result_id=e929da7eed7046588df5608f6c226c92, reason=ResultReason.Canceled, audio_length=0), errordetails=Connection failed (no connection to the remote host). Internal error: 1. Error details: Failed with error: WS_OPEN_ERROR_UNDERLYING_IO_OPEN_FAILED 4|app | wss://westus.tts.speech.microsoft.com/cognitiveservices/websocket/v1 4|app | X-ConnectionId: 3089e7c58122493581e99cd3e5c64947 USP state: Sending. Received audio size: 0 bytes. 4|app | [INFO][2023-10-04 12:51:14][wechatmp_channel.py:153] - [wechatmp] Do send text to obRWr5lRuWbqQ5USxzDEUhXDPDR8: [ERROR] 4|app | 抱歉,语音合成失败

BR1981 commented 1 year ago

解决了

eginner01 commented 10 months ago

语音回复怎么实现回复消息,而不是文件啊?

wrylwj commented 2 weeks ago

解决了

如何解决的?