add post sentence pause and slow down speech speed.
Browse files
app.py
CHANGED
@@ -39,7 +39,7 @@ def synthesize_speech(text):
|
|
39 |
wav_file.setframerate(voice.config.sample_rate)
|
40 |
wav_file.setsampwidth(2)
|
41 |
wav_file.setnchannels(1)
|
42 |
-
voice.synthesize(text, wav_file)
|
43 |
|
44 |
buffer.seek(0)
|
45 |
audio_data = np.frombuffer(buffer.read(), dtype=np.int16)
|
|
|
39 |
wav_file.setframerate(voice.config.sample_rate)
|
40 |
wav_file.setsampwidth(2)
|
41 |
wav_file.setnchannels(1)
|
42 |
+
voice.synthesize(text, wav_file, sentence_silence=0.75, length_scale=1.2)
|
43 |
|
44 |
buffer.seek(0)
|
45 |
audio_data = np.frombuffer(buffer.read(), dtype=np.int16)
|