ikechan8370 / chatgpt-plugin

云崽系机器人的智能聊天插件
https://www.yunzai.chat/
GNU General Public License v3.0
974 stars 100 forks source link

vits语音生成成功但报错 #523

Closed SunnyDesignor closed 11 months ago

SunnyDesignor commented 1 year ago

使用vits语音报错,生成成功,但报错:

发送消息错误:[{"type":"record","file":"https://ikech an8370-vits-uma-genshin-honkai.hf.space/file=/tmp/tmp1two07pq/tmplr4ofiol.wav"}] Error: 非法的语音元素: https://ikechan8370-vits-uma- genshin-honkai.hf.space/file=/tmp/tmp1two07pq/tmplr4ofiol.wav

生成出来的链接用浏览器打开可以播放,但报上述错误。

ffmpeg什么都是正常的,但多次尝试一样报错。

Windows11,插件最新版,apad协议。

最后一次正常使用已经是几个月前,后来想用却总是报错,无法解决。 没有找到相关的问题文档,查找到一个已关闭的类似报错issue,但是答复简陋模糊,无法解决问题。

image

HalcyonAlcedo commented 1 year ago

你试试在服务器上,下载这个链接的文件,然后用命令行转换音频,之后本地播放转换后的音频文件,看看能不能播放

SunnyDesignor commented 1 year ago

你试试在服务器上,下载这个链接的文件,然后用命令行转换音频,之后本地播放转换后的音频文件,看看能不能播放

本地可以正常播放,下载下来就是wav文件,ApiRejection { code: -60, message: 'read ECONNRESET'} 报错,是哪个地方的问题呢,QQ,插件,本地,还是第三方网站?

HalcyonAlcedo commented 1 year ago

这个是qq的报错,你的音频数据并不是可识别的音频,所以我让你用命令行转换后尝试播放转换后的文件,你的ffmpeg不一定是正常的

SunnyDesignor commented 1 year ago

这个是qq的报错,你的音频数据并不是可识别的音频,所以我让你用命令行转换后尝试播放转换后的文件,你的ffmpeg不一定是正常的

下载下来的wav可以直接播放,用ffmpeg转成amr后也可以播放,用的系统自带的媒体播放器

HalcyonAlcedo commented 1 year ago

你的截图不完整,把下面错误追踪部分截全,我看下是什么地方引起的,感觉上是直接把wav链接发给qq了,没转码肯定无法发送的,顺便给一下语音部分的配置内容,云服务api是否有填写?

SunnyDesignor commented 1 year ago

你的截图不完整,把下面错误追踪部分截全,我看下是什么地方引起的,感觉上是直接把wav链接发给qq了,没转码肯定无法发送的,顺便给一下语音部分的配置内容,云服务api是否有填写?

image

image

[YzBot][14:50:54.663][WARN] vits api 当前为https://ikechan8370-vits-uma-genshin- honkai.hf.space/api/generate,已校正为https://ikechan8370-vits-uma-genshin-honka i.hf.space [YzBot][14:50:54.664][INFO] 正在使用接口https://ikechan8370-vits-uma-genshin-hon kai.hf.space/api/generate [YzBot][14:51:06.432][INFO] 生成成功! 生成耗时 10.65 s [YzBot][14:51:08.119][ERRO] 发送消息错误:[{"type":"record","file":"https://ikech an8370-vits-uma-genshin-honkai.hf.space/file=/tmp/tmp1two07pq/tmp1iwmf800.wav"}] [YzBot][14:51:08.120][ERRO] ApiRejection { code: -60, message: 'read ECONNRESET' } [YzBot][14:51:08.121][ERRO] Error: 非法的语音元素: https://ikechan8370-vits-uma-genshin-honkai.hf.s pace/file=/tmp/tmp1two07pq/tmp1iwmf800.wav at Converter.record (E:\Automation\QQRobot\Yunzai-Bot\node_modules.pnpm\icqq@0.4.11\node_modul es\icqq\lib\message\converter.js:268:19) at Converter._convert (E:\Automation\QQRobot\Yunzai-Bot\node_modules.pnpm\icqq@0.4.11\node_mod ules\icqq\lib\message\converter.js:60:28) at new Converter (E:\Automation\QQRobot\Yunzai-Bot\node_modules.pnpm\icqq@0.4.11\node_modules\ icqq\lib\message\converter.js:47:22) at Group.makeForwardMsg (E:\Automation\QQRobot\Yunzai-Bot\node_modules.pnpm\icqq@0.4.11\node_m odules\icqq\lib\internal\contactable.js:521:27) at Yunzai.makeForwardMsg (E:\Automation\QQRobot\Yunzai-Bot\nodemodules.pnpm\icqq@0.4.11\node modules\icqq\lib\client.js:380:66) at e.reply (file:///E:/Automation/QQRobot/Yunzai-Bot/plugins/y-tian-plugin/apps/sese.js:112:28)

at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async e.reply (file:///E:/Automation/QQRobot/Yunzai-Bot/plugins/yunzai-c-v-plugin/apps/%E6%B

6%88%E6%81%AF%E9%A3%8E%E6%8E%A7%E5%A4%84%E7%90%86.js:33:17) at async chatgpt.abstractChat (file:///E:/Automation/QQRobot/Yunzai-Bot/plugins/chatgpt-plugin/ apps/chat.js:1205:11) at async chatgpt (file:///E:/Automation/QQRobot/Yunzai-Bot/plugins/chatgpt-plugin/apps/chat.js: 782:5)

HalcyonAlcedo commented 1 year ago

你的插件版本是多少

SunnyDesignor commented 1 year ago

你的插件版本是多少

最近几天的版本吧,前几天才重装的插件

HalcyonAlcedo commented 1 year ago

根据你的错误提示追踪到了1205行的abstractChat函数,最新版本的1205行并非是abstractChat的调用

SunnyDesignor commented 1 year ago

根据你的错误提示追踪到了1205行的abstractChat函数,最新版本的1205行并非是abstractChat的调用

行数不对应是因为我对本地源码进行了一点个性化修改,但跟这没什么关系,我拉取了最新的v2,报错依然发生。

[YzBot][15:29:48.330][INFO] 生成成功! 生成耗时 10.08 s [YzBot][15:29:48.851][ERRO] 发送消息错误:[{"type":"record","file":"https://ikechan8370-vits-uma-gen shin-honkai.hf.space/file=/tmp/tmp1two07pq/tmpaplt0gw6.wav"}] [YzBot][15:29:48.851][ERRO] ApiRejection { code: -60, message: 'read ECONNRESET' } [YzBot][15:29:48.853][ERRO] Error: 非法的语音元素: https://ikechan8370-vits-uma-genshin-honkai.hf.s pace/file=/tmp/tmp1two07pq/tmpaplt0gw6.wav at Converter.record (E:\Automation\QQRobot\Yunzai-Bot\node_modules.pnpm\icqq@0.4.11\node_modul es\icqq\lib\message\converter.js:268:19) at Converter._convert (E:\Automation\QQRobot\Yunzai-Bot\node_modules.pnpm\icqq@0.4.11\node_mod ules\icqq\lib\message\converter.js:60:28) at new Converter (E:\Automation\QQRobot\Yunzai-Bot\node_modules.pnpm\icqq@0.4.11\node_modules\ icqq\lib\message\converter.js:47:22) at Group.makeForwardMsg (E:\Automation\QQRobot\Yunzai-Bot\node_modules.pnpm\icqq@0.4.11\node_m odules\icqq\lib\internal\contactable.js:521:27) at Yunzai.makeForwardMsg (E:\Automation\QQRobot\Yunzai-Bot\nodemodules.pnpm\icqq@0.4.11\node modules\icqq\lib\client.js:380:66) at e.reply (file:///E:/Automation/QQRobot/Yunzai-Bot/plugins/y-tian-plugin/apps/sese.js:112:28) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async e.reply (file:///E:/Automation/QQRobot/Yunzai-Bot/plugins/yunzai-c-v-plugin/apps/%E6%B 6%88%E6%81%AF%E9%A3%8E%E6%8E%A7%E5%A4%84%E7%90%86.js:33:17) at async chatgpt.abstractChat (file:///E:/Automation/QQRobot/Yunzai-Bot/plugins/chatgpt-plugin/ apps/chat.js:1224:11) at async chatgpt (file:///E:/Automation/QQRobot/Yunzai-Bot/plugins/chatgpt-plugin/apps/chat.js: 815:5) [YzBot][15:29:48.892][MARK] puppeteer Chromium 启动中... [YzBot][15:29:49.392][MARK] puppeteer Chromium 启动成功

HalcyonAlcedo commented 1 year ago

在qq群里吗,这里沟通效率太低了

SunnyDesignor commented 1 year ago

在qq群里吗,这里沟通效率太低了

在,我到群里发一个消息