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

ValueError: 'in' is not a valid parameter name #4072

Open
fontnet1 opened this issue Dec 10, 2024 · 2 comments
Open

ValueError: 'in' is not a valid parameter name #4072

fontnet1 opened this issue Dec 10, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@fontnet1
Copy link

Describe the bug

ValueError: 'in' is not a valid parameter name

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

ValueError Traceback (most recent call last)
Cell In[1], line 2
1 import torch
----> 2 from TTS.api import TTS
4 # Get device
5 device = "cuda" if torch.cuda.is_available() else "cpu"

File c:\Users\Abbasian\Desktop\ps VsCode\FONT2_vnve\Lib\site-packages\TTS_init_.py:16
13 import torch
15 from TTS.config.shared_configs import BaseDatasetConfig
---> 16 from TTS.tts.configs.xtts_config import XttsConfig
17 from TTS.tts.models.xtts import XttsArgs, XttsAudioConfig
18 from TTS.utils.radam import RAdam

File c:\Users\Abbasian\Desktop\ps VsCode\FONT2_vnve\Lib\site-packages\TTS\tts\configs\xtts_config.py:5
2 from typing import List
4 from TTS.tts.configs.shared_configs import BaseTTSConfig
----> 5 from TTS.tts.models.xtts import XttsArgs, XttsAudioConfig
8 @DataClass
9 class XttsConfig(BaseTTSConfig):
10 """Defines parameters for XTTS TTS model.
11
12 Args:
(...)
...
2714 if is_keyword or not name.isidentifier():
-> 2715 raise ValueError('{!r} is not a valid parameter name'.format(name))
2717 self._name = name

ValueError: 'in' is not a valid parameter name
Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings...

Logs

No response

Environment

(FONT2_Vnve) PS C:\Users\Abbasian\Desktop\ps VsCode> pip list | findstr torch
torchaudio                     2.5.1+cu118
torchvision                    0.20.1+cu118
(FONT2_Vnve) PS C:\Users\Abbasian\Desktop\ps VsCode> pip list | findstr TTS  
TTS                            0.22.0
(FONT2_Vnve) PS C:\Users\Abbasian\Desktop\ps VsCode>

Additional context

No response

@fontnet1 fontnet1 added the bug Something isn't working label Dec 10, 2024
@eginhard
Copy link
Contributor

Can you try it with our fork (available via pip install coqui-tts)? This repo is not maintained anymore.

@fontnet1
Copy link
Author

Well, that means you can answer any of my problems

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

2 participants