Tonic commited on
Commit
51505df
β€’
1 Parent(s): c4d7f81

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -29,7 +29,7 @@ def parse_multilingual_text(input_text):
29
  segments = re.findall(pattern, input_text)
30
  return [(lang, text.strip()) for lang, text in segments if lang in LANGUAGES.keys()]
31
 
32
- # Function to generate audio for each language segment
33
  def generate_segment_audio(text, lang, speaker_url, pipe):
34
  stoks = pipe.t2s.generate([text], lang=[lang])
35
  audio_data = pipe.generate(stoks, speaker_url, lang)
 
29
  segments = re.findall(pattern, input_text)
30
  return [(lang, text.strip()) for lang, text in segments if lang in LANGUAGES.keys()]
31
 
32
+ @spaces.GPU
33
  def generate_segment_audio(text, lang, speaker_url, pipe):
34
  stoks = pipe.t2s.generate([text], lang=[lang])
35
  audio_data = pipe.generate(stoks, speaker_url, lang)