Closed jinghuashang closed 1 month ago
貌似是模型问题,但是加载了正常vits模型还是不能发出音频
2024-07-27 23:03:28 [INFO] [VITS] id:5 format:wav lang:auto length:1.0 noise:0.33 noisew:0.4 segment_size:50 [in views.voice_vits_api:146]
2024-07-27 23:03:28 [INFO] [VITS] len:8 text:你好,こんにちは [in views.voice_vits_api:148]
2024-07-27 23:03:28 [DEBUG] [JA]你好,こんにちは[JA] [in sentence.sentence_split_and_markup:184]
WARNING: JPCommonLabel_make() in jcomon_label.c: No phoneme.
[2024-07-27 23:05:29 +0800] [1] [CRITICAL] WORKER TIMEOUT (pid:27)
[2024-07-27 23:05:30 +0800] [1] [ERROR] Worker (pid:27) was sent SIGKILL! Perhaps out of memory?
[2024-07-27 23:05:30 +0800] [28] [INFO] Booting worker with pid: 28
Worker (pid:27) was sent SIGKILL! Perhaps out of memory?
请问机器性能足够吗?这里说是内存不足,不过合成过慢导致超时也会报这个错。可以使用wsgi而不是gunicorn启动服务,看看是否还会出现问题,在docker-compose.yaml中添加command: [ 'python', 'app.py' ]
完整文件如下
version: '3.4'
services:
vits:
image: artrajz/vits-simple-api:latest
restart: always
ports:
- 23456:23456
environment:
LANG: 'C.UTF-8'
TZ: Asia/Shanghai #timezone
command: [ 'python', 'app.py' ]
volumes:
- ./data:/app/data # 挂载模型文件夹
# - ./config.py:/app/config.py # 挂载配置文件
- ./config.yaml:/app/config.yaml # 挂载配置文件
- ./logs:/app/logs # logging logs
- ./gunicorn_config.py:/app/gunicorn_config.py # gunicorn configuration
- ./pyopenjtalk/open_jtalk_dic_utf_8-1.11:/usr/local/lib/python3.10/site-packages/pyopenjtalk/open_jtalk_dic_utf_8-1.11 #pyopentjalk
- ./nltk_data:/usr/local/share/nltk_data
Worker (pid:27) was sent SIGKILL! Perhaps out of memory?
请问机器性能足够吗?这里说是内存不足,不过合成过慢导致超时也会报这个错。可以使用wsgi而不是gunicorn启动服务,看看是否还会出现问题,在docker-compose.yaml中添加
command: [ 'python', 'app.py' ]
完整文件如下
version: '3.4' services: vits: image: artrajz/vits-simple-api:latest restart: always ports: - 23456:23456 environment: LANG: 'C.UTF-8' TZ: Asia/Shanghai #timezone command: [ 'python', 'app.py' ] volumes: - ./data:/app/data # 挂载模型文件夹 # - ./config.py:/app/config.py # 挂载配置文件 - ./config.yaml:/app/config.yaml # 挂载配置文件 - ./logs:/app/logs # logging logs - ./gunicorn_config.py:/app/gunicorn_config.py # gunicorn configuration - ./pyopenjtalk/open_jtalk_dic_utf_8-1.11:/usr/local/lib/python3.10/site-packages/pyopenjtalk/open_jtalk_dic_utf_8-1.11 #pyopentjalk - ./nltk_data:/usr/local/share/nltk_data
感谢 ,加上command: [ 'python', 'app.py' ]
就正常了
使用有中文的vits模型会报错,如下
2024-07-29 13:54:50 [INFO] [VITS] id:0 format:wav lang:auto length:1.0 noise:0.33 noisew:0.4 segment_size:50 [in views.voice_vits_api:146]
2024-07-29 13:54:50 [INFO] [VITS] len:8 text:你好,こんにちは [in views.voice_vits_api:148]
2024-07-29 13:54:50 [ERROR] Exception on /voice/vits [POST] [in app.log_exception:1744]
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 2528, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1825, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.10/site-packages/flask_cors/extension.py", line 178, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1823, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/app/tts_app/voice_api/auth.py", line 10, in check_api_key
return func(*args, **kwargs)
File "/app/tts_app/voice_api/views.py", line 197, in voice_vits_api
audio = tts_manager.vits_infer(state)
File "/app/manager/TTSManager.py", line 274, in vits_infer
sentences_list = sentence_split_and_markup(state["text"], state["segment_size"], state["lang"],
File "/app/utils/sentence.py", line 178, in sentence_split_and_markup
markup_language(i,
File "/app/utils/sentence.py", line 22, in markup_language
pattern = config.LanguageIdentification.split_pattern
AttributeError: 'Config' object has no attribute 'LanguageIdentification'
模型来源 https://github.com/MaxMax2016/VITSModels?tab=readme-ov-file#nene--nanami--rong--tang
AttributeError: 'Config' object has no attribute 'LanguageIdentification'
已提交修复该问题 https://github.com/Artrajz/vits-simple-api/commit/deea020d60952505b6bd6c2744a3f6a17e90fd3b 近期添加了在配置修改正则表达式的功能,代码里配置未正确获取导致的
哇大佬真快
拉的新镜像就正常了
使用docker部署,环境为ubuntu 24
在 admin 选择模型加载后无反应,查询日志如下
在此之前还有报错,不知道是不是影响了的