yihong0618 / xiaogpt

Play ChatGPT and other LLM with Xiaomi AI Speaker
MIT License
5.86k stars 817 forks source link

edge-tts 无法播放chatgpt的回答 #445

Closed xHansonx closed 4 months ago

xHansonx commented 4 months ago

mi tts 可以正常播放,edge-tts无法播放。服务部署在局域网内的PC上,访问音频MP3的url可以在浏览器播放,但是用micli.py play url 播放小爱音响显示蓝色光环,但是无声音。 配置如下: { "hardware": "L06A", "account": "XXX", "password": "XXX", "openai_key": "XXX", "glm_key": "", "gemini_key": "", "qwen_key": "", "bard_token": "", "serpapi_api_key": "", "cookie": "", "mi_did": "726xxx847", "use_command": false, "mute_xiaoai": true, "verbose": true, "bot": "chatgptapi", "tts": "edge", "edge_tts_voice": "zh-CN-XiaoxiaoNeural", "prompt": "请用100字以内回答", "keyword": ["请"], "change_prompt_keyword": ["更改提示词"], "start_conversation": "开始持续对话", "end_conversation": "结束持续对话", "stream": false, "proxy": "", "gpt_options": {}, "bing_cookie_path": "", "bing_cookies": {}, "api_base": "https://apiXXX", "deployment_id": "" }

日志如下:

问题:问瓢虫的英文为啥是LADY_BUG? DEBUG Sleep 0.247237, timestamp: xiaogpt.py:74 1707453800288
以下是小爱的回答: 瓢虫的英语是 以下是 ChatGPT 的回答: [02/09/24 12:43:22] DEBUG Listening new message, timestamp: xiaogpt.py:59 1707453800288
DEBUG Polling_event, timestamp: xiaogpt.py:64 1707453800288
Ladybug的英文来源于中世纪英国时期,当时人们相信这种昆虫是上帝派来保护庄稼免受有 害昆虫侵扰的,因此被认为是上帝派来的贵妇。Lady即意为“女士”或“贵妇”,而bug意为“ 昆虫”,因此Ladybug就是指这种被认为是贵妇的昆虫。虽然其官方学名为Coccinellidae, 但由于历史原因,Ladybug这个名称一直延续至今。 回答完毕 [02/09/24 12:45:52] DEBUG Listening new message, timestamp: xiaogpt.py:59 1707453800288
DEBUG Polling_event, timestamp: xiaogpt.py:64 1707453948714

micli.py play url 执行结果如下: (base) Z:\xiaogpt>python micli.py play http://192.168.31.252:8059/tmphhhe8nos.mp3

yihong0618 commented 4 months ago

啥执行结果呀

xHansonx commented 4 months ago

micli.py play url 执行结果为空行,小爱音响有蓝色光环,但是没有播报

yihong0618 commented 4 months ago

micli.py play url 执行结果为空行,小爱音响有蓝色光环,但是没有播报

用的 python 自带的 http.server?

xHansonx commented 4 months ago

micli.py play url 执行结果为空行,小爱音响有蓝色光环,但是没有播报

用的 python 自带的 http.server?

是的

yihong0618 commented 4 months ago

micli.py play url 执行结果为空行,小爱音响有蓝色光环,但是没有播报

用的 python 自带的 http.server?

是的

那个性能带不起来。用这个 https://github.com/TheWaWaR/simple-http-server

xHansonx commented 4 months ago

micli.py play url 执行结果为空行,小爱音响有蓝色光环,但是没有播报

用的 python 自带的 http.server?

是的

那个性能带不起来。用这个 https://github.com/TheWaWaR/simple-http-server

方便给个demo,怎么修改base.py吗,rust不是很熟

yihong0618 commented 4 months ago

micli.py play url 执行结果为空行,小爱音响有蓝色光环,但是没有播报

用的 python 自带的 http.server?

是的

那个性能带不起来。用这个 https://github.com/TheWaWaR/simple-http-server

方便给个demo,怎么修改base.py吗,rust不是很熟

用 micli play xxx 不需要改代码啊。

hz109919 commented 3 months ago

我也遇到同样的问题,但我的是docker部署的,可以怎么调整呢,大神们