GabrielSalem commited on
Commit
182823c
·
verified ·
1 Parent(s): 9f7ddf5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -15,8 +15,8 @@ async def text_to_speech(text, voice, rate, pitch):
15
  return None, "Please select a voice."
16
 
17
  voice_short_name = voice.split(" - ")[0]
18
- rate_str = f"50%"
19
- pitch_str = f"50Hz"
20
  communicate = edge_tts.Communicate(text, voice_short_name, rate=rate_str, pitch=pitch_str)
21
  with tempfile.NamedTemporaryFile(delete=False, suffix=".mp3") as tmp_file:
22
  tmp_path = tmp_file.name
 
15
  return None, "Please select a voice."
16
 
17
  voice_short_name = voice.split(" - ")[0]
18
+ rate_str = f"{0:+d}%"
19
+ pitch_str = f"{0:+d}Hz"
20
  communicate = edge_tts.Communicate(text, voice_short_name, rate=rate_str, pitch=pitch_str)
21
  with tempfile.NamedTemporaryFile(delete=False, suffix=".mp3") as tmp_file:
22
  tmp_path = tmp_file.name