You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from TTS.api import TTS
api = TTS("tts_models/rus/fairseq/vits")
To Reproduce
Run code from the task description.
See UnboundLocalError.
Expected behavior
No exceptions.
Logs
Traceback (most recent call last):
File "<stdin>", line 1, in<module>
File "/home/arkady/.local/lib/python3.11/site-packages/TTS/api.py", line 81, in __init__
self.load_tts_model_by_name(model_name, gpu)
File "/home/arkady/.local/lib/python3.11/site-packages/TTS/api.py", line 195, in load_tts_model_by_name
model_path, config_path, vocoder_path, vocoder_config_path, model_dir = self.download_model_by_name(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/arkady/.local/lib/python3.11/site-packages/TTS/api.py", line 149, in download_model_by_name
model_path, config_path, model_item = self.manager.download_model(model_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/arkady/.local/lib/python3.11/site-packages/TTS/utils/manage.py", line 407, in download_model
model_item, model_full_name, model, md5sum = self._set_model_item(model_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/arkady/.local/lib/python3.11/site-packages/TTS/utils/manage.py", line 326, in _set_model_item
model_full_name = f"{model_type}--{lang}--{dataset}--{model}"
^^^^^^^
UnboundLocalError: cannot access local variable 'dataset' where it is not associated with a value
The error seems to stem from changes made in _set_model_item in manage.py introduced in version 0.21.3. namely line 128 was moved down, so when fairseq is used, the variable dataset is undefined.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You might also look our discussion channels.
Describe the bug
To Reproduce
Expected behavior
No exceptions.
Logs
Environment
Additional context
No response
The text was updated successfully, but these errors were encountered: