NitinBot001 commited on
Commit
df017c0
·
verified ·
1 Parent(s): d7b937e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -92,9 +92,9 @@ async def generate_speech_async(text: str, voice: str, pitch: str, rate: str, ou
92
  """Generate speech asynchronously"""
93
  try:
94
  # Create SSML with pitch and rate adjustments
95
- ssml_text = f'<speak><prosody pitch="{pitch}" rate="{rate}">{text}</prosody></speak>'
96
 
97
- communicate = edge_tts.Communicate(ssml_text, voice)
98
  await communicate.save(output_file)
99
  return True
100
  except Exception as e:
 
92
  """Generate speech asynchronously"""
93
  try:
94
  # Create SSML with pitch and rate adjustments
95
+ # ssml_text = f'<speak><prosody pitch="{pitch}" rate="{rate}">{text}</prosody></speak>'
96
 
97
+ communicate = edge_tts.Communicate(text = text, voice = voice, rate = rate, pitch = pitch)
98
  await communicate.save(output_file)
99
  return True
100
  except Exception as e: