Increasing speak limit of mozilla tts

600 views Asked by At

I am a beginner, I downloaded the model and tried studying it. But whenever I convert a sentence to speech, The model stops at 35 seconds or around 440 characters giving max_decoder_steps warning. I want to convert a story to speech which would be around 1000 characters. Is there any way to bypass this limit?

3

There are 3 answers

1
Egon Kirchof On

Of course you can. I just opened tacotron2.py, looked for max_decoder_steps and put the value 5000 as a test, and now it creates longer wav files.

0
Rony Macfly On

Increase the value of "max_decoder_steps".

For example, I use the Tacotron2 model.

tts --text "Hello"
 > tts_models/en/ljspeech/tacotron2-DDC is already downloaded.
 > vocoder_models/en/ljspeech/hifigan_v2 is already downloaded.
 > Using model: Tacotron2
 > Models reduction rate r is set to: 1
 > Vocoder Model: hifigan
 > Generator Model: hifigan_generator
 > Discriminator Model: hifigan_discriminator

The installed project can be found here. Debian 10.

/home/user/.local/lib/python3.7/site-packages/TTS

We need a config file.

/home/user/.local/lib/python3.7/site-packages/TTS/tts/configs/tacotron_config.py

Changing values.

max_decoder_steps: int = 500

to

max_decoder_steps: int = 10000

Thanks to SteveDaulton.

Works in virtual environments. The tacotron_config.py file was located in the folder.

.venv/lib/python3.8/site-packages/TTS/tts/configs/
0
Olaf On

No, as the model is trained on shorter inputs. You can either train a model yourself (very time consuming) or you split your input into smaller sequences like sentences.