I am encountering a KeyError: 'xtts_v1' when attempting to download the model using the TTS API.

#3
by yachty66 - opened

Detailed Traceback:

Traceback (most recent call last):
    tts = TTS("tts_models/multilingual/multi-dataset/xtts_v1")
  File "/opt/conda/lib/python3.8/site-packages/TTS/api.py", line 289, in __init__
    self.load_tts_model_by_name(model_name, gpu)
  File "/opt/conda/lib/python3.8/site-packages/TTS/api.py", line 385, in load_tts_model_by_name
    model_path, config_path, vocoder_path, vocoder_config_path, model_dir = self.download_model_by_name(
  File "/opt/conda/lib/python3.8/site-packages/TTS/api.py", line 348, in download_model_by_name
    model_path, config_path, model_item = self.manager.download_model(model_name)
  File "/opt/conda/lib/python3.8/site-packages/TTS/utils/manage.py", line 287, in download_model
    model_item, model_full_name, model = self._set_model_item(model_name)
  File "/opt/conda/lib/python3.8/site-packages/TTS/utils/manage.py", line 269, in _set_model_item
    model_item = self.models_dict[model_type][lang][dataset][model]
KeyError: 'xtts_v1'

Environment:

  • Running inside a Docker container.
  • Python Version: 3.8
  • PyTorch Version: 1.11.0
  • CUDA Version: 11.3
  • Installation method: Installed TTS API via pip install TTS
Coqui.ai org

you need to accept terms of service for model .
If you set COQUI_TOS_AGREED=1 environmet varible before import you can agree

thanks but this still isnt working if i install with pip install TTS. I have now:

import os
os.environ['COQUI_TOS_AGREED'] = '1'
from TTS.api import TTS

next release will fix it, you can install TTS from dev branch
Edit: new TTS for this fix released, if you rebuild and set os.environ['COQUI_TOS_AGREED'] = '1' it should work out now.

This comment has been hidden
yachty66 changed discussion status to closed

Sign up or log in to comment