AI4Bharat / Indic-TTS

Text-to-Speech for languages of India
MIT License
122 stars 27 forks source link

speaker id required #14

Open nellorebhanuteja opened 11 months ago

nellorebhanuteja commented 11 months ago

Hi,

I am trying to run en model

python -m TTS.bin.synthesize --text "Hi, how are you?" --model_path en/fastpitch/best_model.pth --config_path en/fastpitch/config.json --vocoder_path en/hifigan/best_model.pth --vocoder_config_path en/hifigan/config.json --out_path speech.wav

However, I am getting an error

[!] Look like you use a multi-speaker model. You need to define either aspeaker_nameor aspeaker_wavto use a multi-speaker model. i tried using --speaker_id with 0 and 1.

piyushsinghpasi commented 10 months ago

@nellorebhanuteja

--speaker_id "male" worked for us.

We faced the same problem. I think TTS.bin.synthesize has argument parser. You can check the arguments. Argument --list_speaker_ids will list all speaker names and its corresponding indices. (It should print a dictionary something like {'female':0, 'male':1}). The argument --speaker_id seems to be misleading because for us we had to give speaker name instead.