oliverkirk-sudo / chat_voice

QChatGPT的插件,用于将输出内容转化为音频
30 stars 1 forks source link

[ERROR] : 插件chat_voice触发事件normal_message_responded时发生错误 #2

Closed niliovo closed 1 year ago

niliovo commented 1 year ago

[2023-03-17 04:09:18.838] host.py (314) - [ERROR] : 插件chat_voice触发事件normal_message_responded时发生错误 [2023-03-17 04:09:18.842] host.py (315) - [ERROR] : Traceback (most recent call last): File "/bot/pkg/plugin/host.py", line 308, in emit hook(plugin['instance'], kwargs) File "/bot/plugins/chat_voice/main.py", line 76, in person_normal_message_received send_msg(kwargs, msg) File "/bot/plugins/chat_voice/main.py", line 56, in send_msg host.send_person_message(kwargs['launcher_id'], msg) if kwargs[ File "/bot/pkg/plugin/host.py", line 265, in send_person_message asyncio.run(self.get_bot().send_friend_message(person, message)) File "/usr/local/lib/python3.9/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/usr/local/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete return future.result() File "/usr/local/lib/python3.9/site-packages/mirai/models/api.py", line 430, in call return await self.set(*args, *kwargs) File "/usr/local/lib/python3.9/site-packages/mirai/models/api.py", line 398, in set return await self._call_api( File "/usr/local/lib/python3.9/site-packages/mirai/models/api.py", line 386, in _call_api return await api.call(self.api_provider, method, response_type) File "/usr/local/lib/python3.9/site-packages/mirai/models/api.py", line 318, in call raw_response = await self._call(api_provider, method) File "/usr/local/lib/python3.9/site-packages/mirai/models/api.py", line 304, in _call return await api_provider.call_api( File "/usr/local/lib/python3.9/site-packages/mirai/bot.py", line 320, in call_api return await self._adapter.call_api(api, args, kwargs) File "/usr/local/lib/python3.9/site-packages/mirai/adapters/websocket.py", line 236, in call_api return await self._recv(sync_id) File "/usr/local/lib/python3.9/site-packages/mirai/adapters/websocket.py", line 165, in _recv raise exceptions.ApiError(data) mirai.exceptions.ApiError: (6, '[ERROR 6]指定文件不存在。', '文件不存在:/bot/voice_tmp/voice_9a450129a.silk')

oliverkirk-sudo commented 1 year ago

请检查有没有安装FFmpeg

niliovo commented 1 year ago

请检查有没有安装FFmpeg

安装了,而且生成了语音文件,部署方式为docker

root@qq-newbing-voice:/bot# ls voice_tmp voice_ac34fc1cd.pcm voice_ac34fc1cd.silk voice_ac34fc1cd.wav root@qq-newbing-voice:/bot# ffmpeg ffmpeg version 4.3.5-0+deb11u1 Copyright (c) 2000-2022 the FFmpeg developers built with gcc 10 (Debian 10.2.1-6) configuration: --prefix=/usr --extra-version=0+deb11u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared libavutil 56. 51.100 / 56. 51.100 libavcodec 58. 91.100 / 58. 91.100 libavformat 58. 45.100 / 58. 45.100 libavdevice 58. 10.100 / 58. 10.100 libavfilter 7. 85.100 / 7. 85.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 7.100 / 5. 7.100 libswresample 3. 7.100 / 3. 7.100 libpostproc 55. 7.100 / 55. 7.100 Hyper fast Audio and Video encoder usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg' root@qq-newbing-voice:/bot# pip show ffmpeg Name: ffmpeg Version: 1.4 Summary: ffmpeg python package url [https://github.com/jiashaokun/ffmpeg] Home-page: https://github.com/jiashaokun/ffmpeg Author: SkeyJIA Author-email: 363604236@qq.com License: MIT Licence Location: /usr/local/lib/python3.9/site-packages Requires: Required-by: root@qq-newbing-voice:/bot#

oliverkirk-sudo commented 1 year ago

有更详细的debug级别的信息嘛,我这边的ffmpeg的版本是6.0,而且不是用pip安装的,你用的这个库是二次封装的ffmpeg,不知道会不会有影响

niliovo commented 1 year ago

有更详细的debug级别的信息嘛,我这边的ffmpeg的版本是6.0,而且不是用pip安装的,你用的这个库是二次封装的ffmpeg,不知道会不会有影响

感谢回复,现在已经解决了,原因很简单,mirai无法访问到voice_tmp文件夹

kiropoi commented 1 year ago

有更详细的debug级别的信息嘛,我这边的ffmpeg的版本是6.0,而且不是用pip安装的,你用的这个库是二次封装的ffmpeg,不知道会不会有影响

感谢回复,现在已经解决了,原因很简单,mirai无法访问到voice_tmp文件夹

请问这个怎么解决

niliovo commented 1 year ago

有更详细的debug级别的信息嘛,我这边的ffmpeg的版本是6.0,而且不是用pip安装的,你用的这个库是二次封装的ffmpeg,不知道会不会有影响

感谢回复,现在已经解决了,原因很简单,mirai无法访问到voice_tmp文件夹

请问这个怎么解决

如果你是docker部署的话,将mirai容器和QChatGPT容器的volume均映射voice_tmp,例如 volumes: