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

[Bug] Cant run any of the xtts models using the TTS Command Line Interface (CLI) #3270

Closed
240db opened this issue Nov 20, 2023 · 1 comment · Fixed by #3294
Closed

[Bug] Cant run any of the xtts models using the TTS Command Line Interface (CLI) #3270

240db opened this issue Nov 20, 2023 · 1 comment · Fixed by #3294
Labels
bug Something isn't working

Comments

@240db
Copy link

240db commented Nov 20, 2023

Describe the bug

Hello I just started playing with the TTS library and I am running tests using the TTS Command Line Interface (CLI).
I was able to try capacitron, vits (english and portuguese) and tacotron2 successfully. But when I tried any of the xtts models, I get the same error that suggests I have yet to set a language option.

To Reproduce

I tried running the following and it issues the error

tts --text "Welcome. This is a TTS test." --model_name "tts_models/multilingual/multi-dataset/xtts_v2" --language en --out_path TTS_english_test_xtts_output2.wav

tts --text "Welcome. This is a TTS test." --model_name "tts_models/multilingual/multi-dataset/xtts_v1.1" --language en --out_path TTS_english_test_xtts_output2.wav

I tried these commands on multiple systems yet I get the same error
AssertionError: ❗ Language None is not supported. Supported languages are ['en', 'es', 'fr', 'de', 'it', 'pt', 'pl', 'tr', 'ru', 'nl', 'cs', 'ar', 'zh-cn', 'hu', 'ko', 'ja']

Expected behavior

No response

Logs

No response

Environment

- TTS installed from pip install TTS
- Linux OS

Additional context

My guess is that --language en is ignored and perhaps the xtts_v2 and xtts_v1.1 models are required to run in Python? I wanted to try a multilingual model through the command line interface (CLI) are there any missing steps I am missing here?

I was able to run bark using

tts --text "Welcome. This is a TTS test." --model_name "tts_models/multilingual/multi-dataset/bark" --language en --out_path TTS_english_test_bark_output2.wav

@240db 240db added the bug Something isn't working label Nov 20, 2023
@WeberJulian
Copy link
Contributor

~$ tts --help
usage: tts [-h] [--list_models [LIST_MODELS]]
           [--model_info_by_idx MODEL_INFO_BY_IDX]
           [--model_info_by_name MODEL_INFO_BY_NAME] [--text TEXT]
           [--model_name MODEL_NAME] [--vocoder_name VOCODER_NAME]
           [--config_path CONFIG_PATH] [--model_path MODEL_PATH]
           [--out_path OUT_PATH] [--use_cuda USE_CUDA] [--device DEVICE]
           [--vocoder_path VOCODER_PATH]
           [--vocoder_config_path VOCODER_CONFIG_PATH]
           [--encoder_path ENCODER_PATH]
           [--encoder_config_path ENCODER_CONFIG_PATH] [--cs_model CS_MODEL]
           [--emotion EMOTION] [--language LANGUAGE] [--pipe_out [PIPE_OUT]]
           [--speed SPEED] [--speakers_file_path SPEAKERS_FILE_PATH]
           [--language_ids_file_path LANGUAGE_IDS_FILE_PATH]
           [--speaker_idx SPEAKER_IDX] [--language_idx LANGUAGE_IDX]
           [--speaker_wav SPEAKER_WAV [SPEAKER_WAV ...]]
           [--gst_style GST_STYLE]
           [--capacitron_style_wav CAPACITRON_STYLE_WAV]
           [--capacitron_style_text CAPACITRON_STYLE_TEXT]
           [--list_speaker_idxs [LIST_SPEAKER_IDXS]]
           [--list_language_idxs [LIST_LANGUAGE_IDXS]]
           [--save_spectogram SAVE_SPECTOGRAM] [--reference_wav REFERENCE_WAV]
           [--reference_speaker_idx REFERENCE_SPEAKER_IDX]
           [--progress_bar PROGRESS_BAR] [--source_wav SOURCE_WAV]
           [--target_wav TARGET_WAV] [--voice_dir VOICE_DIR]

As you can see in the help, or in the documentation, the proper argument name for specifying the language is --language_idx

eginhard added a commit to idiap/coqui-ai-TTS that referenced this issue Nov 23, 2023
…ment

In multilingual models, the target language is specified via the
`--language_idx` argument. However, the `tts` CLI also accepts a `--language`
argument for use with Coqui Studio, so it is easy to choose the wrong one,
resulting in the following confusing error at synthesis time:

```
AssertionError:  ❗ Language None is not supported. Supported languages are
['en', 'es', 'fr', 'de', 'it', 'pt', 'pl', 'tr', 'ru', 'nl', 'cs', 'ar',
'zh-cn', 'hu', 'ko', 'ja']
```

This commit adds a better error message when `--language` is passed for a
non-studio model.

Fixes coqui-ai#3270, fixes coqui-ai#3291
erogol pushed a commit that referenced this issue Nov 24, 2023
…ment (#3294)

In multilingual models, the target language is specified via the
`--language_idx` argument. However, the `tts` CLI also accepts a `--language`
argument for use with Coqui Studio, so it is easy to choose the wrong one,
resulting in the following confusing error at synthesis time:

```
AssertionError:  ❗ Language None is not supported. Supported languages are
['en', 'es', 'fr', 'de', 'it', 'pt', 'pl', 'tr', 'ru', 'nl', 'cs', 'ar',
'zh-cn', 'hu', 'ko', 'ja']
```

This commit adds a better error message when `--language` is passed for a
non-studio model.

Fixes #3270, fixes #3291
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants