Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
import spaces
|
2 |
import tempfile
|
3 |
import wave
|
4 |
import gradio as gr
|
@@ -34,7 +34,7 @@ def parse_multilingual_text(input_text):
|
|
34 |
segments = re.findall(pattern, input_text)
|
35 |
return [(lang, text.strip()) for lang, text in segments if lang in LANGUAGES.keys()]
|
36 |
|
37 |
-
|
38 |
def generate_segment_audio(text, lang, speaker_url, pipe):
|
39 |
if not isinstance(text, str):
|
40 |
text = text.decode("utf-8") if isinstance(text, bytes) else str(text)
|
@@ -76,7 +76,7 @@ def concatenate_audio_segments(segments):
|
|
76 |
|
77 |
# The rest of the code in app.py remains the same
|
78 |
|
79 |
-
@spaces.GPU
|
80 |
def whisper_speech_demo(multilingual_text, speaker_audio):
|
81 |
segments = parse_multilingual_text(multilingual_text)
|
82 |
if not segments:
|
|
|
1 |
+
# import spaces
|
2 |
import tempfile
|
3 |
import wave
|
4 |
import gradio as gr
|
|
|
34 |
segments = re.findall(pattern, input_text)
|
35 |
return [(lang, text.strip()) for lang, text in segments if lang in LANGUAGES.keys()]
|
36 |
|
37 |
+
#@spaces.GPU
|
38 |
def generate_segment_audio(text, lang, speaker_url, pipe):
|
39 |
if not isinstance(text, str):
|
40 |
text = text.decode("utf-8") if isinstance(text, bytes) else str(text)
|
|
|
76 |
|
77 |
# The rest of the code in app.py remains the same
|
78 |
|
79 |
+
# @spaces.GPU
|
80 |
def whisper_speech_demo(multilingual_text, speaker_audio):
|
81 |
segments = parse_multilingual_text(multilingual_text)
|
82 |
if not segments:
|