Ikaros-521 / AI-Vtuber

AI Vtuber是一个由 【ChatterBot/ChatGPT/claude/langchain/chatglm/text-gen-webui/闻达/千问/kimi/ollama】 驱动的虚拟主播【Live2D/UE/xuniren】,可以在 【Bilibili/抖音/快手/微信视频号/拼多多/斗鱼/YouTube/twitch/TikTok】 直播中与观众实时互动 或 直接在本地进行聊天。它使用TTS技术【edge-tts/VITS/elevenlabs/bark/bert-vits2/睿声】生成回答并可以选择【so-vits-svc/DDSP-SVC】变声;指令协同SD画图。
https://ikaros-521.github.io/Luna-Docs/site/
GNU General Public License v3.0
2.55k stars 396 forks source link

🙋 Linux环境部署专用讨论帖 #520

Open Ikaros-521 opened 7 months ago

Ikaros-521 commented 7 months ago

ubuntu22.04

安装相关软件

sudo apt install ffmpeg portaudio19-dev libasound2-dev alsa-utils -y

安装依赖

pip install -r requirements.txt

更多安装使用问题,可以参考:https://github.com/Ikaros-521/AI-Vtuber/issues/655

hfutly66 commented 6 months ago

我想在远程服务器上跑,结果出现了 TypeError: Jinja2Templates.TemplateResponse() got an unexpected keyword argument 'request'

Ikaros-521 commented 6 months ago

我想在远程服务器上跑,结果出现了 TypeError: Jinja2Templates.TemplateResponse() got an unexpected keyword argument 'request'

jinja2 嘶,具体是哪段代码报的错,看看。这错误还是第一次看见

hfutly66 commented 6 months ago

不好意思,应该是nicegui的版本问题,程序报错没提示哪一行,然后写了一行说是nicegui环境报错了,我更新了一下好了。因为开始报别的错了哈哈哈

Ikaros-521 commented 6 months ago

不好意思,应该是nicegui的版本问题,程序报错没提示哪一行,然后写了一行说是nicegui环境报错了,我更新了一下好了。因为开始报别的错了哈哈哈

那没事了

AWDSCAN commented 5 months ago

您好,我在Linux部署时pip产生了依赖,但是我不懂深度学习,请问一下这个问题该怎么解决? INFO: pip is looking at multiple versions of gradio to determine which version is compatible with other requirements. This could take a while. ERROR: Cannot install -r requirements.txt (line 19) and -r requirements.txt (line 76) because these package versions have conflicting dependencies.

The conflict is caused by: langchain 0.0.142 depends on pydantic<2 and >=1 gradio 4.16.0 depends on pydantic>=2.0

To fix this you could try to:

  1. loosen the range of package versions you've specified
  2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts 我是ubuntu20.04,我的python版本是3.10.13。此外requirements.txt的逻辑应该是存在问题的,如果不先安装requests这个库那么执行pip install -r requirements.txt时就会因为无法完成请求而错误退出

Ikaros-521 commented 5 months ago

您好,我在Linux部署时pip产生了依赖,但是我不懂深度学习,请问一下这个问题该怎么解决? INFO: pip is looking at multiple versions of gradio to determine which version is compatible with other requirements. This could take a while. ERROR: Cannot install -r requirements.txt (line 19) and -r requirements.txt (line 76) because these package versions have conflicting dependencies.

The conflict is caused by: langchain 0.0.142 depends on pydantic<2 and >=1 gradio 4.16.0 depends on pydantic>=2.0

To fix this you could try to:

  1. loosen the range of package versions you've specified
  2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts 我是ubuntu20.04,我的python版本是3.10.13。此外requirements.txt的逻辑应该是存在问题的,如果不先安装requests这个库那么执行pip install -r requirements.txt时就会因为无法完成请求而错误退出

手动安装一下冲突库就行了,pydantic维持在1.10.13

Somnus1437 commented 5 months ago
      import aiohttp
  ModuleNotFoundError: No module named 'aiohttp'
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip. 运行安装pip install -r requirements.txt报错,手动安装 pip install aiohttp和 pip install openai后再运行pip install -r requirements.txt 还是报错。另外Python包(langchain和gradio)在requirements.txt文件中指定了对pydantic包的不同版本依赖引起的 我用的是阿里云的云服务器,版本ubuntu22.04

Ikaros-521 commented 5 months ago
      import aiohttp
  ModuleNotFoundError: No module named 'aiohttp'
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip. 运行安装pip install -r requirements.txt报错,手动安装 pip install aiohttp和 pip install openai后再运行pip install -r requirements.txt 还是报错。另外Python包(langchain和gradio)在requirements.txt文件中指定了对pydantic包的不同版本依赖引起的 我用的是阿里云的云服务器,版本ubuntu22.04

删除冲突依赖部分,全部手动安装

Somnus1437 commented 4 months ago

Xlib.error.ConnectionClosedError: Display connection closed by server: Connection reset by peer

linux部署,运行main.py启动,提示要图形界面打不开,出现报错。能不能换成浏览器加端口访问呢,不如你本地演示的直接端口访问

Ikaros-521 commented 4 months ago

Xlib.error.ConnectionClosedError: Display connection closed by server: Connection reset by peer

linux部署,运行main.py启动,提示要图形界面打不开,出现报错。能不能换成浏览器加端口访问呢,不如你本地演示的直接端口访问

看下完整的报错

PrayerT commented 4 months ago

在Ubuntu20.0.4环境下 1.使用webui的 文本转语音-通用-试听 合成出的音频在webui中播放正常,声音正常 2.使用webui的 聊天-聊天框-发送/直接复读,log输出正常,如下:

2024-03-08 00:16:36 - /media/prayer/chat/AI-Vtuber-20240224/main.py[line:104] - INFO: API收到数据:{'type': 'reread', 'username': '主人', 'content': '你好'}
2024-03-08 00:16:36 - /media/prayer/chat/AI-Vtuber-20240224/utils/my_handle.py[line:1021] - INFO: 复读内容:你好
2024-03-08 00:16:36 - /media/prayer/chat/AI-Vtuber-20240224/utils/audio.py[line:809] - INFO: bert_vits2合成成功,合成内容:【你好】,输出到=/media/prayer/chat/AI-Vtuber-20240224/out/bert_vits2_5.wav
2024-03-08 00:16:36 - /media/prayer/chat/AI-Vtuber-20240224/utils/common.py[line:725] - INFO: 内容已成功写入文件:log/字幕.txt

但是完全没有音频声音。 其实有如下怀疑: 是否是ALSA出现问题?在python webui.py时,有如下奇怪输出:

Error processing line 1 of /opt/anaconda3/envs/ai/lib/python3.11/site-packages/distutils-precedence.pth:

  Traceback (most recent call last):
    File "<frozen site>", line 195, in addpackage
    File "<string>", line 1, in <module>
  ModuleNotFoundError: No module named '_distutils_hack'

Remainder of file ignored
pygame 2.3.0 (SDL 2.24.2, Python 3.11.8)
Hello from the pygame community. https://www.pygame.org/contribute.html
2024-03-08 00:03:24 - /media/prayer/chat/AI-Vtuber-20240224/utils/audio.py[line:75] - INFO: 文案模式的Audio初始化...
2024-03-08 00:03:24 - /media/prayer/chat/AI-Vtuber-20240224/webui.py[line:3078] - INFO: 本地Live2D模型名列表:['chitose', 'Haru', 'haru2', 'haruto', 'hibiki', 'Hiyori', 'koharu', 'Mao', 'miara_pro_en', 'Natori', 'nito', 'sizuku', 'tororo', 'tsumiki']
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.USB-Audio.pcm.hdmi.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM hdmi
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.USB-Audio.pcm.hdmi.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM hdmi
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.USB-Audio.pcm.modem.0:CARD=0'
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline:CARD=0,DEV=0
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.USB-Audio.pcm.modem.0:CARD=0'
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline:CARD=0,DEV=0
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.USB-Audio.pcm.modem.0:CARD=0'
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM phoneline
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.USB-Audio.pcm.modem.0:CARD=0'
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM phoneline
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
NiceGUI ready to go on http://localhost:8081

执行sudo apt-get reinstall alsa-utils之后仍然报这个错误(感觉还是驱动问题,不识别usb耳机,可是暂时没有3.5mm的音响/耳机测试)

Ikaros-521 commented 4 months ago

在Ubuntu20.0.4环境下 1.使用webui的 文本转语音-通用-试听 合成出的音频在webui中播放正常,声音正常 2.使用webui的 聊天-聊天框-发送/直接复读,log输出正常,如下:

2024-03-08 00:16:36 - /media/prayer/chat/AI-Vtuber-20240224/main.py[line:104] - INFO: API收到数据:{'type': 'reread', 'username': '主人', 'content': '你好'}
2024-03-08 00:16:36 - /media/prayer/chat/AI-Vtuber-20240224/utils/my_handle.py[line:1021] - INFO: 复读内容:你好
2024-03-08 00:16:36 - /media/prayer/chat/AI-Vtuber-20240224/utils/audio.py[line:809] - INFO: bert_vits2合成成功,合成内容:【你好】,输出到=/media/prayer/chat/AI-Vtuber-20240224/out/bert_vits2_5.wav
2024-03-08 00:16:36 - /media/prayer/chat/AI-Vtuber-20240224/utils/common.py[line:725] - INFO: 内容已成功写入文件:log/字幕.txt

但是完全没有音频声音。 其实有如下怀疑: 是否是ALSA出现问题?在python webui.py时,有如下奇怪输出:

Error processing line 1 of /opt/anaconda3/envs/ai/lib/python3.11/site-packages/distutils-precedence.pth:

  Traceback (most recent call last):
    File "<frozen site>", line 195, in addpackage
    File "<string>", line 1, in <module>
  ModuleNotFoundError: No module named '_distutils_hack'

Remainder of file ignored
pygame 2.3.0 (SDL 2.24.2, Python 3.11.8)
Hello from the pygame community. https://www.pygame.org/contribute.html
2024-03-08 00:03:24 - /media/prayer/chat/AI-Vtuber-20240224/utils/audio.py[line:75] - INFO: 文案模式的Audio初始化...
2024-03-08 00:03:24 - /media/prayer/chat/AI-Vtuber-20240224/webui.py[line:3078] - INFO: 本地Live2D模型名列表:['chitose', 'Haru', 'haru2', 'haruto', 'hibiki', 'Hiyori', 'koharu', 'Mao', 'miara_pro_en', 'Natori', 'nito', 'sizuku', 'tororo', 'tsumiki']
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.USB-Audio.pcm.hdmi.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM hdmi
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.USB-Audio.pcm.hdmi.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM hdmi
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.USB-Audio.pcm.modem.0:CARD=0'
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline:CARD=0,DEV=0
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.USB-Audio.pcm.modem.0:CARD=0'
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline:CARD=0,DEV=0
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.USB-Audio.pcm.modem.0:CARD=0'
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM phoneline
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.USB-Audio.pcm.modem.0:CARD=0'
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM phoneline
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
NiceGUI ready to go on http://localhost:8081

执行sudo apt-get reinstall alsa-utils之后仍然报这个错误(感觉还是驱动问题,不识别usb耳机,可是暂时没有3.5mm的音响/耳机测试)

确实 估计还是声卡驱动问题的样子

liuxunfei commented 4 months ago

QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/python3.10/bin/platforms" ... 2024-03-20 09:17:00,485 - /root/xfliu11/luna-ai/main.py[line:3695] - INFO: 可以直接访问Live2D页, http://127.0.0.1:12345/Live2D/ loaded library "/usr/local/python3.10/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so" qt.qpa.xcb: could not connect to display localhost:10.0 qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.

Aborted 这个咋解决,博主

Ikaros-521 commented 4 months ago

QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/python3.10/bin/platforms" ... 2024-03-20 09:17:00,485 - /root/xfliu11/luna-ai/main.py[line:3695] - INFO: 可以直接访问Live2D页, http://127.0.0.1:12345/Live2D/ loaded library "/usr/local/python3.10/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so" qt.qpa.xcb: could not connect to display localhost:10.0 qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.

Aborted 这个咋解决,博主

好家伙 为什么你还在用qt,qt已经废弃了

liuxunfei commented 4 months ago

啊,直接拉的master的代码,构建的,现在使用哪个版本比较好

Ikaros-521 commented 4 months ago

啊,直接拉的master的代码,构建的,现在使用哪个版本比较好

git clone https://github.com/Ikaros-521/AI-Vtuber.git

OpenSorceYCW commented 4 months ago

在Ubuntu20.0.4环境下 1.使用webui的 文本转语音-通用-试听 合成出的音频在webui中播放正常,声音正常 2.使用webui的 聊天-聊天框-发送/直接复读,log输出正常,如下:

2024-03-08 00:16:36 - /media/prayer/chat/AI-Vtuber-20240224/main.py[line:104] - INFO: API收到数据:{'type': 'reread', 'username': '主人', 'content': '你好'}
2024-03-08 00:16:36 - /media/prayer/chat/AI-Vtuber-20240224/utils/my_handle.py[line:1021] - INFO: 复读内容:你好
2024-03-08 00:16:36 - /media/prayer/chat/AI-Vtuber-20240224/utils/audio.py[line:809] - INFO: bert_vits2合成成功,合成内容:【你好】,输出到=/media/prayer/chat/AI-Vtuber-20240224/out/bert_vits2_5.wav
2024-03-08 00:16:36 - /media/prayer/chat/AI-Vtuber-20240224/utils/common.py[line:725] - INFO: 内容已成功写入文件:log/字幕.txt

但是完全没有音频声音。 其实有如下怀疑: 是否是ALSA出现问题?在python webui.py时,有如下奇怪输出:

Error processing line 1 of /opt/anaconda3/envs/ai/lib/python3.11/site-packages/distutils-precedence.pth:

  Traceback (most recent call last):
    File "<frozen site>", line 195, in addpackage
    File "<string>", line 1, in <module>
  ModuleNotFoundError: No module named '_distutils_hack'

Remainder of file ignored
pygame 2.3.0 (SDL 2.24.2, Python 3.11.8)
Hello from the pygame community. https://www.pygame.org/contribute.html
2024-03-08 00:03:24 - /media/prayer/chat/AI-Vtuber-20240224/utils/audio.py[line:75] - INFO: 文案模式的Audio初始化...
2024-03-08 00:03:24 - /media/prayer/chat/AI-Vtuber-20240224/webui.py[line:3078] - INFO: 本地Live2D模型名列表:['chitose', 'Haru', 'haru2', 'haruto', 'hibiki', 'Hiyori', 'koharu', 'Mao', 'miara_pro_en', 'Natori', 'nito', 'sizuku', 'tororo', 'tsumiki']
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.USB-Audio.pcm.hdmi.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM hdmi
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.USB-Audio.pcm.hdmi.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM hdmi
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.USB-Audio.pcm.modem.0:CARD=0'
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline:CARD=0,DEV=0
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.USB-Audio.pcm.modem.0:CARD=0'
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline:CARD=0,DEV=0
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.USB-Audio.pcm.modem.0:CARD=0'
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM phoneline
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.USB-Audio.pcm.modem.0:CARD=0'
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM phoneline
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
NiceGUI ready to go on http://localhost:8081

执行sudo apt-get reinstall alsa-utils之后仍然报这个错误(感觉还是驱动问题,不识别usb耳机,可是暂时没有3.5mm的音响/耳机测试)

博主您好,在Ubuntu20.0.4环境下 1.使用webui的 文本转语音-通用-试听 合成出的音频在webui中播放正常,声音正常 2.使用webui的 聊天-聊天框-发送/直接复读, 声音正常 我遇到的问题如下: 运行程序,按q键进行录音的时候报错,请您看一下报错信息分析下原因,感谢! 报错信息输出如下: pygame 2.5.2 (SDL 2.28.2, Python 3.10.11) Hello from the pygame community. https://www.pygame.org/contribute.html 2024-03-24 10:20:00 - /mnt/data2/project/company/AI-Vtuber/utils/audio.py[line:75] - INFO: 文案模式的Audio初始化... 2024-03-24 10:20:00 - /mnt/data2/project/company/AI-Vtuber/webui.py[line:3611] - INFO: 本地Live2D模型名列表:['hibiki', 'chitose', 'tsumiki', 'koharu', 'Natori', 'haru2', 'tororo', 'Mao', 'haruto', 'Hiyori', 'Haru'] ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card NiceGUI ready to go on http://localhost:8081 2024-03-24 10:20:12 - /mnt/data2/project/company/AI-Vtuber/webui.py[line:258] - INFO: 程序开始运行 pygame 2.5.2 (SDL 2.28.2, Python 3.10.11) Hello from the pygame community. https://www.pygame.org/contribute.html 2024-03-24 10:20:13 - /mnt/data2/project/company/AI-Vtuber/utils/my_handle.py[line:75] - INFO: 初始化My_handle... 2024-03-24 10:20:13 - /mnt/data2/project/company/AI-Vtuber/utils/audio.py[line:204] - INFO: 创建音频合成消息队列线程 2024-03-24 10:20:13 - /mnt/data2/project/company/AI-Vtuber/utils/audio.py[line:1096] - INFO: 文案播放线程运行中... 2024-03-24 10:20:14 - /mnt/data2/project/company/AI-Vtuber/utils/audio.py[line:1186] - INFO: 重载所有文案数据 2024-03-24 10:20:14 - /mnt/data2/project/company/AI-Vtuber/utils/gpt_model/claude.py[line:28] - INFO: Claude slack_user_token or bot_user_id 为空,不进行实例化. 2024-03-24 10:20:14 - /mnt/data2/project/company/AI-Vtuber/utils/gpt_model/gpt.py[line:75] - INFO: GPT_MODEL: 进入get方法 2024-03-24 10:20:14 - /mnt/data2/project/company/AI-Vtuber/utils/my_handle.py[line:224] - INFO: ./log/log-2024-3-24.txt 日志文件已存在,跳过 2024-03-24 10:20:14 - /mnt/data2/project/company/AI-Vtuber/utils/my_handle.py[line:233] - INFO: ./log/comment-2024-3-24.txt 弹幕文件已存在,跳过 2024-03-24 10:20:14 - /mnt/data2/project/company/AI-Vtuber/utils/my_handle.py[line:269] - INFO: 创建数据库:data/data.db 2024-03-24 10:20:14 - /mnt/data2/project/company/AI-Vtuber/utils/my_handle.py[line:145] - INFO: 配置数据加载成功。 2024-03-24 10:20:14 - /mnt/data2/project/company/AI-Vtuber/main.py[line:490] - INFO: 单击键盘 Q 按键进行录音喵~ 由于其他任务还要启动,如果按键没有反应,请等待一段时间 2024-03-24 10:20:14 - /mnt/data2/project/company/AI-Vtuber/main.py[line:820] - INFO: 当前平台:talk

ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card 2024-03-24 10:20:38 - /mnt/data2/project/company/AI-Vtuber/main.py[line:326] - INFO: 录音中... 2024-03-24 10:20:38 - /mnt/data2/project/company/AI-Vtuber/main.py[line:326] - INFO: 录音中... python: src/hostapi/alsa/pa_linux_alsa.c:3641: PaAlsaStreamComponent_BeginPolling: Assertion ret == self->nfds' failed. python: src/hostapi/alsa/pa_linux_alsa.c:3641: PaAlsaStreamComponent_BeginPolling: Assertionret == self->nfds' failed.

Ikaros-521 commented 4 months ago

在Ubuntu20.0.4环境下 1.使用webui的 文本转语音-通用-试听 合成出的音频在webui中播放正常,声音正常 2.使用webui的 聊天-聊天框-发送/直接复读,log输出正常,如下:

2024-03-08 00:16:36 - /media/prayer/chat/AI-Vtuber-20240224/main.py[line:104] - INFO: API收到数据:{'type': 'reread', 'username': '主人', 'content': '你好'}
2024-03-08 00:16:36 - /media/prayer/chat/AI-Vtuber-20240224/utils/my_handle.py[line:1021] - INFO: 复读内容:你好
2024-03-08 00:16:36 - /media/prayer/chat/AI-Vtuber-20240224/utils/audio.py[line:809] - INFO: bert_vits2合成成功,合成内容:【你好】,输出到=/media/prayer/chat/AI-Vtuber-20240224/out/bert_vits2_5.wav
2024-03-08 00:16:36 - /media/prayer/chat/AI-Vtuber-20240224/utils/common.py[line:725] - INFO: 内容已成功写入文件:log/字幕.txt

但是完全没有音频声音。 其实有如下怀疑: 是否是ALSA出现问题?在python webui.py时,有如下奇怪输出:

Error processing line 1 of /opt/anaconda3/envs/ai/lib/python3.11/site-packages/distutils-precedence.pth:

  Traceback (most recent call last):
    File "<frozen site>", line 195, in addpackage
    File "<string>", line 1, in <module>
  ModuleNotFoundError: No module named '_distutils_hack'

Remainder of file ignored
pygame 2.3.0 (SDL 2.24.2, Python 3.11.8)
Hello from the pygame community. https://www.pygame.org/contribute.html
2024-03-08 00:03:24 - /media/prayer/chat/AI-Vtuber-20240224/utils/audio.py[line:75] - INFO: 文案模式的Audio初始化...
2024-03-08 00:03:24 - /media/prayer/chat/AI-Vtuber-20240224/webui.py[line:3078] - INFO: 本地Live2D模型名列表:['chitose', 'Haru', 'haru2', 'haruto', 'hibiki', 'Hiyori', 'koharu', 'Mao', 'miara_pro_en', 'Natori', 'nito', 'sizuku', 'tororo', 'tsumiki']
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.USB-Audio.pcm.hdmi.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM hdmi
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.USB-Audio.pcm.hdmi.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM hdmi
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.USB-Audio.pcm.modem.0:CARD=0'
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline:CARD=0,DEV=0
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.USB-Audio.pcm.modem.0:CARD=0'
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline:CARD=0,DEV=0
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.USB-Audio.pcm.modem.0:CARD=0'
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM phoneline
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.USB-Audio.pcm.modem.0:CARD=0'
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM phoneline
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
NiceGUI ready to go on http://localhost:8081

执行sudo apt-get reinstall alsa-utils之后仍然报这个错误(感觉还是驱动问题,不识别usb耳机,可是暂时没有3.5mm的音响/耳机测试)

博主您好,在Ubuntu20.0.4环境下 1.使用webui的 文本转语音-通用-试听 合成出的音频在webui中播放正常,声音正常 2.使用webui的 聊天-聊天框-发送/直接复读, 声音正常 我遇到的问题如下: 运行程序,按q键进行录音的时候报错,请您看一下报错信息分析下原因,感谢! 报错信息输出如下: pygame 2.5.2 (SDL 2.28.2, Python 3.10.11) Hello from the pygame community. https://www.pygame.org/contribute.html 2024-03-24 10:20:00 - /mnt/data2/project/company/AI-Vtuber/utils/audio.py[line:75] - INFO: 文案模式的Audio初始化... 2024-03-24 10:20:00 - /mnt/data2/project/company/AI-Vtuber/webui.py[line:3611] - INFO: 本地Live2D模型名列表:['hibiki', 'chitose', 'tsumiki', 'koharu', 'Natori', 'haru2', 'tororo', 'Mao', 'haruto', 'Hiyori', 'Haru'] ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card NiceGUI ready to go on http://localhost:8081 2024-03-24 10:20:12 - /mnt/data2/project/company/AI-Vtuber/webui.py[line:258] - INFO: 程序开始运行 pygame 2.5.2 (SDL 2.28.2, Python 3.10.11) Hello from the pygame community. https://www.pygame.org/contribute.html 2024-03-24 10:20:13 - /mnt/data2/project/company/AI-Vtuber/utils/my_handle.py[line:75] - INFO: 初始化My_handle... 2024-03-24 10:20:13 - /mnt/data2/project/company/AI-Vtuber/utils/audio.py[line:204] - INFO: 创建音频合成消息队列线程 2024-03-24 10:20:13 - /mnt/data2/project/company/AI-Vtuber/utils/audio.py[line:1096] - INFO: 文案播放线程运行中... 2024-03-24 10:20:14 - /mnt/data2/project/company/AI-Vtuber/utils/audio.py[line:1186] - INFO: 重载所有文案数据 2024-03-24 10:20:14 - /mnt/data2/project/company/AI-Vtuber/utils/gpt_model/claude.py[line:28] - INFO: Claude slack_user_token or bot_user_id 为空,不进行实例化. 2024-03-24 10:20:14 - /mnt/data2/project/company/AI-Vtuber/utils/gpt_model/gpt.py[line:75] - INFO: GPT_MODEL: 进入get方法 2024-03-24 10:20:14 - /mnt/data2/project/company/AI-Vtuber/utils/my_handle.py[line:224] - INFO: ./log/log-2024-3-24.txt 日志文件已存在,跳过 2024-03-24 10:20:14 - /mnt/data2/project/company/AI-Vtuber/utils/my_handle.py[line:233] - INFO: ./log/comment-2024-3-24.txt 弹幕文件已存在,跳过 2024-03-24 10:20:14 - /mnt/data2/project/company/AI-Vtuber/utils/my_handle.py[line:269] - INFO: 创建数据库:data/data.db 2024-03-24 10:20:14 - /mnt/data2/project/company/AI-Vtuber/utils/my_handle.py[line:145] - INFO: 配置数据加载成功。 2024-03-24 10:20:14 - /mnt/data2/project/company/AI-Vtuber/main.py[line:490] - INFO: 单击键盘 Q 按键进行录音喵~ 由于其他任务还要启动,如果按键没有反应,请等待一段时间 2024-03-24 10:20:14 - /mnt/data2/project/company/AI-Vtuber/main.py[line:820] - INFO: 当前平台:talk

  • Serving Flask app 'main'
  • Debug mode: off Address already in use Port 8082 is in use by another program. Either identify and stop that program, or start the server with a different port. 2024-03-24 10:20:36 - /mnt/data2/project/company/AI-Vtuber/main.py[line:445] - INFO: 检测到单击键盘 q,即将开始录音~ 2024-03-24 10:20:36 - /mnt/data2/project/company/AI-Vtuber/main.py[line:445] - INFO: 检测到单击键盘 q,即将开始录音~ qALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card 2024-03-24 10:20:38 - /mnt/data2/project/company/AI-Vtuber/main.py[line:326] - INFO: 录音中... 2024-03-24 10:20:38 - /mnt/data2/project/company/AI-Vtuber/main.py[line:326] - INFO: 录音中... python: src/hostapi/alsa/pa_linux_alsa.c:3641: PaAlsaStreamComponent_BeginPolling: Assertion ret == self->nfds' failed. python: src/hostapi/alsa/pa_linux_alsa.c:3641: PaAlsaStreamComponent_BeginPolling: Assertionret == self->nfds' failed.

不好说,感觉是麦克风驱动和库的兼容性问题

OpenSorceYCW commented 4 months ago

博主您好,运行时发现文本转语音部分,只能通过显示屏自带声音输出,耳机无声音,应该如何修改配置呢? img_v3_029b_91ebc982-fb9c-410e-a1b4-47c06e18fc3g 另外聊天窗口输出正常,可以通过耳机输出: 57c44fd9-b740-4d96-a410-a39c56eb29d3

Ikaros-521 commented 4 months ago

博主您好,运行时发现文本转语音部分,只能通过显示屏自带声音输出,耳机无声音,应该如何修改配置呢? img_v3_029b_91ebc982-fb9c-410e-a1b4-47c06e18fc3g 另外聊天窗口输出正常,可以通过耳机输出: 57c44fd9-b740-4d96-a410-a39c56eb29d3

image 输出选耳机

OpenSorceYCW commented 4 months ago

博主您好,运行时发现文本转语音部分,只能通过显示屏自带声音输出,耳机无声音,应该如何修改配置呢? img_v3_029b_91ebc982-fb9c-410e-a1b4-47c06e18fc3g 另外聊天窗口输出正常,可以通过耳机输出: 57c44fd9-b740-4d96-a410-a39c56eb29d3

image 输出选耳机

博主,是我先系统都设置好耳机输出,播放视频都正常,运行python webui.py后,聊天窗口正常输出,文本生成部分可以正常生成声音,但是点声音播放时没有声音,同时关闭程序,打开网页视频,也没有声音了。 问题可能在于运行程序时,对系统配置进行了更改,或者是ubuntu下ALSA库哪儿配置的不合理,导致出现了这种情况,请您给予指导排查这个问题,感谢!

Ikaros-521 commented 4 months ago

博主您好,运行时发现文本转语音部分,只能通过显示屏自带声音输出,耳机无声音,应该如何修改配置呢? img_v3_029b_91ebc982-fb9c-410e-a1b4-47c06e18fc3g 另外聊天窗口输出正常,可以通过耳机输出: 57c44fd9-b740-4d96-a410-a39c56eb29d3

image 输出选耳机

博主,是我先系统都设置好耳机输出,播放视频都正常,运行python webui.py后,聊天窗口正常输出,文本生成部分可以正常生成声音,但是点声音播放时没有声音,同时关闭程序,打开网页视频,也没有声音了。 问题可能在于运行程序时,对系统配置进行了更改,或者是ubuntu下ALSA库哪儿配置的不合理,导致出现了这种情况,请您给予指导排查这个问题,感谢!

程序不会修改输出声卡的,是默认声卡输出的

OpenSorceYCW commented 4 months ago

博主,经过大量测试,目前的问题总结如下:

  1. 启动程序后,没用一键运行,如何直接点文本生成语音,生成的声音可以用耳机听到。
  2. 如果启动程序后一键运行,再用耳机听取声音则会阻塞,一直卡在开始播放那儿。
  3. 关闭程序后,耳机能听到文本合成的声音。
  4. 启动程序后,一键运行,聊天出能正常播放语音。 根据这些情况,是否是一件运行后系统的声卡配置会变化,我应该如何修改,请您指导下,感谢! image
Ikaros-521 commented 4 months ago

博主,经过大量测试,目前的问题总结如下:

  1. 启动程序后,没用一键运行,如何直接点文本生成语音,生成的声音可以用耳机听到。
  2. 如果启动程序后一键运行,再用耳机听取声音则会阻塞,一直卡在开始播放那儿。
  3. 关闭程序后,耳机能听到文本合成的声音。
  4. 启动程序后,一键运行,聊天出能正常播放语音。 根据这些情况,是否是一件运行后系统的声卡配置会变化,我应该如何修改,请您指导下,感谢! image

运行过程中播放由pygame接管,默认声卡播放,照着说法很可能pygame不兼容,但应该不至于,是有人测过ubuntu运行的 不需要播放的就是直接浏览器的

seablue77 commented 4 months ago

Ubuntu20.04 运行python webui.py 报错 (AI-Vtuber) minwe@minwe:/data/AI/AI-Vtuber$ python webui.py pygame 2.5.2 (SDL 2.28.2, Python 3.10.14) Hello from the pygame community. https://www.pygame.org/contribute.html Traceback (most recent call last): File "/data/AI/AI-Vtuber/webui.py", line 15, in from utils.audio import Audio File "/data/AI/AI-Vtuber/utils/audio.py", line 16, in from elevenlabs import generate, play, set_api_key ImportError: cannot import name 'generate' from 'elevenlabs' (/data/anaconda3/envs/AI-Vtuber/lib/python3.10/site-packages/elevenlabs/init.py) (AI-Vtuber) minwe@minwe:/data/AI/AI-Vtuber$ pip show elevenlabs Name: elevenlabs Version: 1.0.2 Summary: Home-page: Author: Author-email: License: Location: /data/anaconda3/envs/AI-Vtuber/lib/python3.10/site-packages Requires: httpx, ipython, pydantic, requests, typing_extensions, websockets Required-by:

Ikaros-521 commented 4 months ago

Ubuntu20.04 运行python webui.py 报错 (AI-Vtuber) minwe@minwe:/data/AI/AI-Vtuber$ python webui.py pygame 2.5.2 (SDL 2.28.2, Python 3.10.14) Hello from the pygame community. https://www.pygame.org/contribute.html Traceback (most recent call last): File "/data/AI/AI-Vtuber/webui.py", line 15, in from utils.audio import Audio File "/data/AI/AI-Vtuber/utils/audio.py", line 16, in from elevenlabs import generate, play, set_api_key ImportError: cannot import name 'generate' from 'elevenlabs' (/data/anaconda3/envs/AI-Vtuber/lib/python3.10/site-packages/elevenlabs/init.py) (AI-Vtuber) minwe@minwe:/data/AI/AI-Vtuber$ pip show elevenlabs Name: elevenlabs Version: 1.0.2 Summary: Home-page: Author: Author-email: License: Location: /data/anaconda3/envs/AI-Vtuber/lib/python3.10/site-packages Requires: httpx, ipython, pydantic, requests, typing_extensions, websockets Required-by:

降低elevenlabs到0.xx

OpenSorceYCW commented 4 months ago

博主,经过大量测试,目前的问题总结如下:

  1. 启动程序后,没用一键运行,如何直接点文本生成语音,生成的声音可以用耳机听到。
  2. 如果启动程序后一键运行,再用耳机听取声音则会阻塞,一直卡在开始播放那儿。
  3. 关闭程序后,耳机能听到文本合成的声音。
  4. 启动程序后,一键运行,聊天出能正常播放语音。 根据这些情况,是否是一件运行后系统的声卡配置会变化,我应该如何修改,请您指导下,感谢! image

运行过程中播放由pygame接管,默认声卡播放,照着说法很可能pygame不兼容,但应该不至于,是有人测过ubuntu运行的 不需要播放的就是直接浏览器的

有什么好的调试方案或者查询办法,目前卡在程序一运行就没声音了,求助

Ikaros-521 commented 4 months ago

博主,经过大量测试,目前的问题总结如下:

  1. 启动程序后,没用一键运行,如何直接点文本生成语音,生成的声音可以用耳机听到。
  2. 如果启动程序后一键运行,再用耳机听取声音则会阻塞,一直卡在开始播放那儿。
  3. 关闭程序后,耳机能听到文本合成的声音。
  4. 启动程序后,一键运行,聊天出能正常播放语音。 根据这些情况,是否是一件运行后系统的声卡配置会变化,我应该如何修改,请您指导下,感谢! image

运行过程中播放由pygame接管,默认声卡播放,照着说法很可能pygame不兼容,但应该不至于,是有人测过ubuntu运行的 不需要播放的就是直接浏览器的

有什么好的调试方案或者查询办法,目前卡在程序一运行就没声音了,求助

pygame的调用实现其实就几行代码,没啥东西,具体为什么导致声音没了这也没法说,跑到pygame库里倒腾也不现实,要么试试换audio player对接试试,基于pyaudio实现的

chenwei39094342 commented 3 months ago

pygetwindow不支持linux,你们怎么解决的?

Ikaros-521 commented 3 months ago

pygetwindow不支持linux,你们怎么解决的?

注释相关功能(图像识别页)

farjar commented 3 months ago

lxc容器内跑起不来,必须要有GUI的linux吗,虚拟机能跑吗? root@AI:~/AI-Vtuber# python3 webui.py pygame 2.5.2 (SDL 2.28.2, Python 3.10.12) Hello from the pygame community. https://www.pygame.org/contribute.html 2024-04-24 08:04:32 - /root/AI-Vtuber/utils/audio.py[line:77] - INFO: 文案模式的Audio初始化... 2024-04-24 08:04:32 - /root/AI-Vtuber/webui.py[line:4692] - INFO: 本地Live2D模型名列表:['Hiyori', 'Mao', 'tororo', 'Haru', 'koharu', 'haruto', 'Natori', 'haru2', 'tsumiki', 'hibiki', 'chitose'] ALSA lib confmisc.c:855:(parse_card) cannot find card '0' ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM sysdefault ALSA lib confmisc.c:855:(parse_card) cannot find card '0' ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM sysdefault ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21 ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21 ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40 ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41 ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50 ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51 ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71 ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958 ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958 ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958 ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline ALSA lib confmisc.c:855:(parse_card) cannot find card '0' ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM default ALSA lib confmisc.c:855:(parse_card) cannot find card '0' ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM default ALSA lib confmisc.c:855:(parse_card) cannot find card '0' ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_id returned error: No such file or directory ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM dmix 2024-04-24 08:04:32 - /root/AI-Vtuber/utils/data_analysis.py[line:86] - WARNING: 数据库:data/data.db 不存在,如果您是第一次启动项目,且没有 运行的情况下,那么请忽略此报错信息,正常运行后,会自动创建数据库,无须担心 2024-04-24 08:04:32 - /root/AI-Vtuber/utils/data_analysis.py[line:154] - WARNING: 数据库:data/data.db 不存在,如果您是第一次启动项目,且没有 运行的情况下,那么请忽略此报错信息,正常运行后,会自动创建数据库,无须担心 2024-04-24 08:04:32 - /root/AI-Vtuber/utils/data_analysis.py[line:318] - WARNING: 数据库:data/data.db 不存在,如果您是第一次启动项目,且没有 运行的情况下,那么请忽略此报错信息,正常运行后,会自动创建数据库,无须担心 NiceGUI ready to go on http://localhost:8081

Ikaros-521 commented 3 months ago

lxc容器内跑起不来,必须要有GUI的linux吗,虚拟机能跑吗? root@AI:~/AI-Vtuber# python3 webui.py pygame 2.5.2 (SDL 2.28.2, Python 3.10.12) Hello from the pygame community. https://www.pygame.org/contribute.html 2024-04-24 08:04:32 - /root/AI-Vtuber/utils/audio.py[line:77] - INFO: 文案模式的Audio初始化... 2024-04-24 08:04:32 - /root/AI-Vtuber/webui.py[line:4692] - INFO: 本地Live2D模型名列表:['Hiyori', 'Mao', 'tororo', 'Haru', 'koharu', 'haruto', 'Natori', 'haru2', 'tsumiki', 'hibiki', 'chitose'] ALSA lib confmisc.c:855:(parse_card) cannot find card '0' ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM sysdefault ALSA lib confmisc.c:855:(parse_card) cannot find card '0' ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM sysdefault ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21 ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21 ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40 ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41 ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50 ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51 ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71 ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958 ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958 ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958 ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline ALSA lib confmisc.c:855:(parse_card) cannot find card '0' ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM default ALSA lib confmisc.c:855:(parse_card) cannot find card '0' ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM default ALSA lib confmisc.c:855:(parse_card) cannot find card '0' ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_id returned error: No such file or directory ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM dmix 2024-04-24 08:04:32 - /root/AI-Vtuber/utils/data_analysis.py[line:86] - WARNING: 数据库:data/data.db 不存在,如果您是第一次启动项目,且没有 运行的情况下,那么请忽略此报错信息,正常运行后,会自动创建数据库,无须担心 2024-04-24 08:04:32 - /root/AI-Vtuber/utils/data_analysis.py[line:154] - WARNING: 数据库:data/data.db 不存在,如果您是第一次启动项目,且没有 运行的情况下,那么请忽略此报错信息,正常运行后,会自动创建数据库,无须担心 2024-04-24 08:04:32 - /root/AI-Vtuber/utils/data_analysis.py[line:318] - WARNING: 数据库:data/data.db 不存在,如果您是第一次启动项目,且没有 运行的情况下,那么请忽略此报错信息,正常运行后,会自动创建数据库,无须担心 NiceGUI ready to go on http://localhost:8081

没桌面 约等于没法用,1.没画面,2.没声音 虚拟机应该是可以的,但依然需要桌面+声卡

couse1989 commented 3 months ago

大佬,请问一键启动后异常报错,这个要怎么解决?

python: 3.10.12 系统: Ubuntu 22.04

Exception in thread Thread-2 (key_listener): Traceback (most recent call last): File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() 2024-04-25 07:47:08 - /home/bob/Applications/AI-Vtuber/main.py[line:1021] - INFO: 当前平台:bilibili2 File "/usr/lib/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/bob/Applications/AI-Vtuber/main.py", line 516, in key_listener keyboard.on_press(on_key_press) File "/home/bob/.local/lib/python3.10/site-packages/keyboard/init.py", line 474, in on_press return hook(lambda e: e.event_type == KEY_UP or callback(e), suppress=suppress) File "/home/bob/.local/lib/python3.10/site-packages/keyboard/init.py", line 461, in hook

Ikaros-521 commented 3 months ago

大佬,请问一键启动后异常报错,这个要怎么解决?

python: 3.10.12 系统: Ubuntu 22.04

Exception in thread Thread-2 (key_listener): Traceback (most recent call last): File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() 2024-04-25 07:47:08 - /home/bob/Applications/AI-Vtuber/main.py[line:1021] - INFO: 当前平台:bilibili2 File "/usr/lib/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/home/bob/Applications/AI-Vtuber/main.py", line 516, in key_listener keyboard.on_press(on_key_press) File "/home/bob/.local/lib/python3.10/site-packages/keyboard/init.py", line 474, in on_press return hook(lambda e: e.event_type == KEY_UP or callback(e), suppress=suppress) File "/home/bob/.local/lib/python3.10/site-packages/keyboard/init.py", line 461, in hook

  • Serving Flask app 'main'
  • Debug mode: off append(callback) File "/home/bob/.local/lib/python3.10/site-packages/keyboard/_generic.py", line 67, in add_handler self.start_if_necessary() File "/home/bob/.local/lib/python3.10/site-packages/keyboard/_generic.py", line 35, in start_if_necessary self.init() File "/home/bob/.local/lib/python3.10/site-packages/keyboard/init.py", line 196, in init _os_keyboard.init() File "/home/bob/.local/lib/python3.10/site-packages/keyboard/_nixkeyboard.py", line 113, in init build_device() File "/home/bob/.local/lib/python3.10/site-packages/keyboard/_nixkeyboard.py", line 109, in build_device ensure_root() File "/home/bob/.local/lib/python3.10/site-packages/keyboard/_nixcommon.py", line 174, in ensure_root raise ImportError('You must be root to use this library on linux.') ImportError: You must be root to use this library on linux. Traceback (most recent call last): File "/home/bob/Applications/AI-Vtuber/main.py", line 2639, in start_server() File "/home/bob/Applications/AI-Vtuber/main.py", line 1272, in start_server import blivedm.models.open_live as open_models ModuleNotFoundError: No module named 'blivedm.models.open_live'; 'blivedm.models' is not a package 2024-04-25 07:47:18 - /home/bob/.local/lib/python3.10/site-packages/werkzeug/_internal.py[line:96] - INFO: WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.

root用户启动 另外库版本不对

Ikaros-521 commented 1 month ago
ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
XDG_RUNTIME_DIR (/run/user/1000) is not owned by us (uid 0), but by uid 1000! (This could e.g. happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.)
2024-06-12 00:00:16 - /home/wei/AITest/AI-Vtuber/utils/audio.py[line:1590] - ERROR: Traceback (most recent call last):
  File "/home/wei/AITest/AI-Vtuber/utils/audio.py", line 1413, in only_play_copywriting
    Audio.mixer_copywriting.init()
pygame.error: ALSA: Couldn't open audio device: Device or resource busy

2024-06-12 00:00:16 - /home/wei/AITest/AI-Vtuber/utils/audio.py[line:1242] - ERROR: Traceback (most recent call last):
  File "/home/wei/AITest/AI-Vtuber/utils/audio.py", line 1240, in only_play_audio
    Audio.mixer_normal.init()
pygame.error: ALSA: Couldn't open audio device: Device or resource busy
Ikaros-521 commented 2 weeks ago

E}Z152J(C6 HEN42IVH@UMP apt-get install -y kmod kbd

yht4work commented 1 week ago

滴,感谢提供这么优秀的repo。

有个问题想咨询一下,我在文本转语音的tab下测试是成功的。 image

但是在转到聊天模式下,调用的TTS却不是bert_vits2, 似乎是Edge TTS。 image

在通用配置里,我确定是选了bert_vits2的 image

以下是日志

2024-07-23 16:22:44.501 | INFO     | __main__:send:160 - API收到数据:{'type': 'comment', 'platform': 'webui', 'username': '主人', 'content': '再来一个'}
2024-07-23 16:22:45.506 | INFO     | __main__:callback:651 - callback接口 收到数据:{'type': 'llm', 'data': {'type': '弹幕信息', 'username': '主人', 'user_face': 'https://robohash.org/ui', 'content_type': 'question', 'content': '再来一个', 'timestamp': '2024-07-23 16:22:45'}}
2024-07-23 16:22:45.849 | INFO     | utils.audio:data_priority_insert:491 - 等待合成消息 优先级: 20 内容:【主人说道:再来一个】
2024-07-23 16:22:45.853 | INFO     | utils.audio:metahuman_stream_api:411 - metahuman发送成功
2024-07-23 16:22:49.316 | INFO     | utils.gpt_model.chatgpt:chat:61 - 会话ID: {'msg': [{'role': 'system', 'content': '请扮演一个AI虚拟主播。不要回答任何敏感问题!不要强调你是主播,只需要回答问题!'}, {'role': 'system', 'content': 'current time is:2024-07-23 16:10:45'}], 'id': '主人'}
2024-07-23 16:22:49.329 | INFO     | __main__:callback:651 - callback接口 收到数据:{'type': 'llm', 'data': {'type': 'chatgpt', 'username': '主人', 'content_type': 'answer', 'content': '很久很久以前,月亮上的兔儿国里,有一个名叫影子的兔子,它拥有神奇的月光尾巴。每当它在月光下跳舞,就能让花园里的花朵盛开。有一天,影子的舞蹈治愈了王国的冬天,从此,月光下的兔儿国四季如春,幸福满满。', 'timestamp': '2024-07-23 16:22:49'}}
2024-07-23 16:22:49.331 | INFO     | utils.my_handle:comment_handle:2606 - [AI回复主人]:很久很久以前,月亮上的兔儿国里,有一个名叫影子的兔子,它拥有神奇的月光尾巴。每当它在月光下跳舞,就能让花园里的花朵盛开。有一天,影子的舞蹈治愈了王国的冬天,从此,月光下的兔儿国四季如春,幸福满满。
2024-07-23 16:22:49.511 | INFO     | utils.audio:data_priority_insert:491 - 等待合成消息 优先级: 20 内容:【很久很久以前,月亮上的兔儿国里,有一个名叫影子的兔子
,它拥有神奇的月光尾巴。】
2024-07-23 16:22:49.512 | INFO     | utils.audio:data_priority_insert:491 - 等待合成消息 优先级: 20 内容:【每当它在月光下跳舞,就能让花园里的花朵盛开。】       
2024-07-23 16:22:49.514 | INFO     | utils.audio:data_priority_insert:491 - 等待合成消息 优先级: 20 内容:【有一天,影子的舞蹈治愈了王国的冬天,从此,月光下的兔 儿国四季如春,幸福满满。】
2024-07-23 16:22:49.515 | INFO     | utils.audio:metahuman_stream_api:411 - metahuman发送成功
2024-07-23 16:22:49.518 | INFO     | utils.audio:metahuman_stream_api:411 - metahuman发送成功
2024-07-23 16:22:49.520 | INFO     | utils.audio:metahuman_stream_api:411 - metahuman发送成功
Ikaros-521 commented 1 week ago

滴,感谢提供这么优秀的repo。

有个问题想咨询一下,我在文本转语音的tab下测试是成功的。 image

但是在转到聊天模式下,调用的TTS却不是bert_vits2, 似乎是Edge TTS。 image

在通用配置里,我确定是选了bert_vits2的 image

以下是日志

2024-07-23 16:22:44.501 | INFO     | __main__:send:160 - API收到数据:{'type': 'comment', 'platform': 'webui', 'username': '主人', 'content': '再来一个'}
2024-07-23 16:22:45.506 | INFO     | __main__:callback:651 - callback接口 收到数据:{'type': 'llm', 'data': {'type': '弹幕信息', 'username': '主人', 'user_face': 'https://robohash.org/ui', 'content_type': 'question', 'content': '再来一个', 'timestamp': '2024-07-23 16:22:45'}}
2024-07-23 16:22:45.849 | INFO     | utils.audio:data_priority_insert:491 - 等待合成消息 优先级: 20 内容:【主人说道:再来一个】
2024-07-23 16:22:45.853 | INFO     | utils.audio:metahuman_stream_api:411 - metahuman发送成功
2024-07-23 16:22:49.316 | INFO     | utils.gpt_model.chatgpt:chat:61 - 会话ID: {'msg': [{'role': 'system', 'content': '请扮演一个AI虚拟主播。不要回答任何敏感问题!不要强调你是主播,只需要回答问题!'}, {'role': 'system', 'content': 'current time is:2024-07-23 16:10:45'}], 'id': '主人'}
2024-07-23 16:22:49.329 | INFO     | __main__:callback:651 - callback接口 收到数据:{'type': 'llm', 'data': {'type': 'chatgpt', 'username': '主人', 'content_type': 'answer', 'content': '很久很久以前,月亮上的兔儿国里,有一个名叫影子的兔子,它拥有神奇的月光尾巴。每当它在月光下跳舞,就能让花园里的花朵盛开。有一天,影子的舞蹈治愈了王国的冬天,从此,月光下的兔儿国四季如春,幸福满满。', 'timestamp': '2024-07-23 16:22:49'}}
2024-07-23 16:22:49.331 | INFO     | utils.my_handle:comment_handle:2606 - [AI回复主人]:很久很久以前,月亮上的兔儿国里,有一个名叫影子的兔子,它拥有神奇的月光尾巴。每当它在月光下跳舞,就能让花园里的花朵盛开。有一天,影子的舞蹈治愈了王国的冬天,从此,月光下的兔儿国四季如春,幸福满满。
2024-07-23 16:22:49.511 | INFO     | utils.audio:data_priority_insert:491 - 等待合成消息 优先级: 20 内容:【很久很久以前,月亮上的兔儿国里,有一个名叫影子的兔子
,它拥有神奇的月光尾巴。】
2024-07-23 16:22:49.512 | INFO     | utils.audio:data_priority_insert:491 - 等待合成消息 优先级: 20 内容:【每当它在月光下跳舞,就能让花园里的花朵盛开。】       
2024-07-23 16:22:49.514 | INFO     | utils.audio:data_priority_insert:491 - 等待合成消息 优先级: 20 内容:【有一天,影子的舞蹈治愈了王国的冬天,从此,月光下的兔 儿国四季如春,幸福满满。】
2024-07-23 16:22:49.515 | INFO     | utils.audio:metahuman_stream_api:411 - metahuman发送成功
2024-07-23 16:22:49.518 | INFO     | utils.audio:metahuman_stream_api:411 - metahuman发送成功
2024-07-23 16:22:49.520 | INFO     | utils.audio:metahuman_stream_api:411 - metahuman发送成功

metahuman-stream的tts是由其项目内部托管,不受ai vtb的tts限制,可以参考其项目文档,更换tts到GSV等

yht4work commented 1 week ago

metahuman-stream的tts是由其项目内部托管,不受ai vtb的tts限制,可以参考其项目文档,更换tts到GSV等

感谢回复@Ikaros-521 ,我以为metahuman-stream是提供了啥API。看到了,谢谢

https://github.com/lipku/metahuman-stream/blob/0c63e9a11be04229c5f2d697c21bc4bc88feb944/lipreal.py#L168-L173

Ikaros-521 commented 1 week ago

metahuman-stream的tts是由其项目内部托管,不受ai vtb的tts限制,可以参考其项目文档,更换tts到GSV等

感谢回复@Ikaros-521 ,我以为metahuman-stream是提供了啥API。看到了,谢谢

https://github.com/lipku/metahuman-stream/blob/0c63e9a11be04229c5f2d697c21bc4bc88feb944/lipreal.py#L168-L173

对的