[Bug] ValueError: Model is not multi-lingual but language
is provided.
#3280
Labels
bug
Something isn't working
language
is provided.
#3280
Describe the bug
I got the "ValueError: Model is not multi-lingual but
language
is provided." when i used XTTSv2To Reproduce
import torch
from TTS.api import TTS
Get device
device = "cuda" if torch.cuda.is_available() else "cpu"
List available 🐸TTS models
print(TTS().list_models())
Init TTS
tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2").to(device)
Run TTS
❗ Since this model is multi-lingual voice cloning model, we must set the target speaker_wav and language
Text to speech list of amplitude values as output
wav = tts.tts(text="Hello world!", speaker_wav="my/cloning/audio.wav", language="en")
Text to speech to a file
tts.tts_to_file(text="Hello world!", speaker_wav="my/cloning/audio.wav", language="en", file_path="output.wav")
Expected behavior
No response
Logs
No response
Environment
Additional context
No response
The text was updated successfully, but these errors were encountered: