Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
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)
|