Tonic mrfakename commited on
Commit
ceb9e64
1 Parent(s): 12da9ab

Try to fix #4 (#6)

Browse files

- Try to fix #4 (3dd9e31276fa7f7068fdc7d9e8ea308ace19f231)


Co-authored-by: mrfakename <mrfakename@users.noreply.huggingface.co>

Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -37,7 +37,7 @@ def parse_multilingual_text(input_text):
37
  segments = re.findall(pattern, input_text)
38
  return [(lang, text.strip()) for lang, text in segments if lang in LANGUAGES.keys()]
39
 
40
- @spaces.GPU
41
  def generate_segment_audio(text, lang, speaker_url, pipe):
42
  if not isinstance(text, str):
43
  text = text.decode("utf-8") if isinstance(text, bytes) else str(text)
@@ -53,7 +53,7 @@ def concatenate_audio_segments(segments):
53
  return concatenated_audio
54
 
55
 
56
- @spaces.GPU
57
  def whisper_speech_demo(multilingual_text, speaker_audio):
58
  segments = parse_multilingual_text(multilingual_text)
59
  if not segments:
 
37
  segments = re.findall(pattern, input_text)
38
  return [(lang, text.strip()) for lang, text in segments if lang in LANGUAGES.keys()]
39
 
40
+ @spaces.GPU(enable_queue=True)
41
  def generate_segment_audio(text, lang, speaker_url, pipe):
42
  if not isinstance(text, str):
43
  text = text.decode("utf-8") if isinstance(text, bytes) else str(text)
 
53
  return concatenated_audio
54
 
55
 
56
+ @spaces.GPU(enable_queue=True)
57
  def whisper_speech_demo(multilingual_text, speaker_audio):
58
  segments = parse_multilingual_text(multilingual_text)
59
  if not segments: