[Bug] 文本转语音功能报错:EncodingError: Decoding failed
laye0619 opened this issue · comments
Bug Description
尝试使用文本转语音功能报错,同样的API Key在LobeChat中文本转语音(模型使用tts-1)就是正常的。错误信息如下
Steps to Reproduce
设置中启用文本转语音功能,模型选择tts-1或者tts-1-hd
在对话中随便选择一条文字,点击“朗读”
出错如上图
Expected Behavior
可以正常朗读
Screenshots
No response
Deployment Method
- Docker
- Vercel
- Server
Desktop OS
No response
Desktop Browser
No response
Desktop Browser Version
No response
Smartphone Device
No response
Smartphone OS
No response
Smartphone Browser
No response
Smartphone Browser Version
No response
Additional Logs
No response
Bot detected the issue body's language is not English, translate it automatically.
Check the interface call to see if it is normal. If the interface returns normally, please provide the browser used and the corresponding version. It may also be a browser API compatibility issue.
I just tried the demo environment and it is normal.
docker 和 vercel 版本都没有复现这个问题,你的中转服务是不是不支持 v1/audio/speech
路由的请求?
Bot detected the issue body's language is not English, translate it automatically.
Neither docker nor vercel versions reproduce this problem. Does your transit service not support v1/audio/speech
routing requests?
抱歉哈 中转服务是什么意思?我使用的是官方openai api
Bot detected the issue body's language is not English, translate it automatically.
Sorry, what does transit service mean? I am using the official openai api
就是是否有单独配置 BASE_URL
环境变量,tts 的请求这里只是中转到了 openai 的 v1/audio/speech
接口中,不太可能出现类似 404 的问题。
或者你看下后端的日志中是否有相关的错误信息?
openai 的接口文档:https://platform.openai.com/docs/guides/text-to-speech?lang=curl
Bot detected the issue body's language is not English, translate it automatically.
That is, whether the BASE_URL
environment variable is configured separately, the tts request is only forwarded to the v1/audio/speech
interface of openai, and it is unlikely that problems like 404 will occur.
Or can you check if there are any relevant error messages in the backend logs?
openai’s interface documentation: https://platform.openai.com/docs/guides/text-to-speech?lang=curl
感谢大神!问题解决了,是我配置的问题,耽误了您很多时间十分抱歉!
Bot detected the issue body's language is not English, translate it automatically.
Thank you God! The problem has been solved. It was a problem with my configuration. I'm sorry for wasting a lot of your time!
Close it.