Spaces:
Running
Running
Trying to avoid max_decoder_steps issue
Browse files
app.py
CHANGED
@@ -27,6 +27,7 @@ def estimate_chunk_durations(text, words_per_second=2.5, min_sec=5, max_sec=7):
|
|
27 |
|
28 |
def generate_speech(text):
|
29 |
tts = TTS("tts_models/en/ljspeech/tacotron2-DDC")
|
|
|
30 |
wav_path = "speech.wav"
|
31 |
tts.tts_to_file(text=text, file_path=wav_path)
|
32 |
return wav_path
|
|
|
27 |
|
28 |
def generate_speech(text):
|
29 |
tts = TTS("tts_models/en/ljspeech/tacotron2-DDC")
|
30 |
+
tts.synthesizer.model.decoder.max_decoder_steps = 30000 # Increase limit
|
31 |
wav_path = "speech.wav"
|
32 |
tts.tts_to_file(text=text, file_path=wav_path)
|
33 |
return wav_path
|