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] ValueError: Model is not multi-lingual but language is provided. #3280

Closed
JJun-Guo opened this issue Nov 21, 2023 · 5 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@JJun-Guo
Copy link

Describe the bug

I got the "ValueError: Model is not multi-lingual but language is provided." when i used XTTSv2

To 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

Environment u provided

Additional context

No response

@JJun-Guo JJun-Guo added the bug Something isn't working label Nov 21, 2023
@jackyin68
Copy link

I just commented out parameter check line, and waiting for fix.

@ANK789
Copy link

ANK789 commented Nov 21, 2023

em, the same question,waiting

@yhyu13
Copy link

yhyu13 commented Nov 23, 2023

Code_awUrXJBd9I

I encountered the same error msg when loading from local model checkpoint,

turns out you need to input the model name for xtts to be recognized as multilingual.

But since you guys load from model name instead of loading from a given local model checkpoint, xtts2 should be fine with multilingual, this is strange

@Edresson
Copy link
Contributor

Hi @JJun-Guo @jackyin68 @yhyu13 @ANK789,

It was fixed on #3273. Please try to update your 🐸 TTS version to the latest one :).

@Edresson Edresson self-assigned this Nov 27, 2023
@JJun-Guo
Copy link
Author

JJun-Guo commented Dec 1, 2023

Hi @JJun-Guo @jackyin68 @yhyu13 @ANK789,

It was fixed on #3273. Please try to update your 🐸 TTS version to the latest one :).

But i got the other bug " File "./TTS/TTS/tts/layers/xtts/tokenizer.py", line 653, in encode
return self.tokenizer.encode(txt).ids
AttributeError: 'NoneType' object has no attribute 'encode'"

I have done !!!

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

No branches or pull requests

5 participants