Spaces:
Runtime error
Runtime error
Try to fix #4
#6
by
mrfakename
- opened
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:
|