Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VITS: lang_list is not defined & optional dynamic_loading #187

Merged
merged 4 commits into from
Jan 5, 2025

Conversation

const-volatile
Copy link
Contributor

在修改之前,我得到了錯誤

2025-01-05 21:28:32 [INFO] [VITS] len:5 text:こんにちは [in views.voice_vits_api:150]
2025-01-05 21:28:32 [ERROR] Exception on /voice/vits [GET] [in app.log_exception:1744]
Traceback (most recent call last):
  File "/home/xxx/vits/env/lib/python3.10/site-packages/flask/app.py", line 2528, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/xxx/vits/env/lib/python3.10/site-packages/flask/app.py", line 1825, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/xxx/vits/env/lib/python3.10/site-packages/flask_cors/extension.py", line 194, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
  File "/home/xxx/vits/env/lib/python3.10/site-packages/flask/app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/xxx/vits/env/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 "/home/xxx/vits/vits-simple-api/tts_app/voice_api/auth.py", line 10, in check_api_key
    return func(*args, **kwargs)
  File "/home/xxx/vits/vits-simple-api/tts_app/voice_api/views.py", line 189, in voice_vits_api
    "lang": lang_list,
NameError: name 'lang_list' is not defined
2025-01-05 21:37:20 [ERROR] Exception on /voice/vits [POST] [in app.log_exception:1744]
Traceback (most recent call last):
  File "/home/xxx/vits/env/lib/python3.10/site-packages/flask/app.py", line 2528, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/xxx/vits/env/lib/python3.10/site-packages/flask/app.py", line 1825, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/xxx/vits/env/lib/python3.10/site-packages/flask_cors/extension.py", line 194, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
  File "/home/xxx/vits/env/lib/python3.10/site-packages/flask/app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/xxx/vits/env/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 "/home/xxx/vits/vits-simple-api/tts_app/voice_api/auth.py", line 10, in check_api_key
    return func(*args, **kwargs)
  File "/home/xxx/vits/vits-simple-api/tts_app/voice_api/views.py", line 203, in voice_vits_api
    audio = tts_manager.vits_infer(state)
  File "/home/xxx/vits/vits-simple-api/manager/TTSManager.py", line 274, in vits_infer
    if config.vits_config.dynamic_loading:
  File "/home/xxx/vits/env/lib/python3.10/site-packages/pydantic/main.py", line 734, in __getattr__
    raise AttributeError(f'{type(self).__name__!r} object has no attribute {item!r}')
AttributeError: 'VitsConfig' object has no attribute 'dynamic_loading'

lang": lang_list[0],可能不對,因為它只使用第一種語言,但目前對我來說是有效的。

dynamic_loading default value
defined lang_list
'dynamic_loading' is optional
@Artrajz
Copy link
Owner

Artrajz commented Jan 5, 2025

LGTM,感谢提醒!是我先前的合并粗心大意合并了旧代码导致的😭
稍后我会再次修改,不过还是感谢你的提交!

@Artrajz Artrajz merged commit 66ac048 into Artrajz:main Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants