DLI-SLQ commited on
Commit
70c66a8
1 Parent(s): 3957f90

add post sentence pause and slow down speech speed.

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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)