cnph001 commited on
Commit
552e40c
·
verified ·
1 Parent(s): d8ba2dd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -66,6 +66,7 @@ async def get_voices():
66
  return {f"{v['ShortName']} - {v['Locale']} ({v['Gender']})": v['ShortName'] for v in voices}
67
 
68
  async def generate_audio_with_voice_prefix(text_segment, default_voice, rate, pitch):
 
69
  """Generates audio for a text segment, handling voice prefixes, retries, and fallback."""
70
  print(f"Text: {text_segment}") #Debug
71
  voice_map = {
 
66
  return {f"{v['ShortName']} - {v['Locale']} ({v['Gender']})": v['ShortName'] for v in voices}
67
 
68
  async def generate_audio_with_voice_prefix(text_segment, default_voice, rate, pitch):
69
+ global default_voice_short # Use the global variable
70
  """Generates audio for a text segment, handling voice prefixes, retries, and fallback."""
71
  print(f"Text: {text_segment}") #Debug
72
  voice_map = {