Spaces:
Running
Running
Upload app.py
Browse files
app.py
CHANGED
@@ -16,6 +16,10 @@ logging.basicConfig(
|
|
16 |
logger = logging.getLogger(__name__)
|
17 |
|
18 |
import torch
|
|
|
|
|
|
|
|
|
19 |
import utils
|
20 |
from infer import infer, latest_version, get_net_g, infer_multilang
|
21 |
import gradio as gr
|
@@ -267,6 +271,7 @@ def process_text(
|
|
267 |
elif language.lower() == "auto":
|
268 |
_text, _lang = process_auto(text)
|
269 |
print(f"Text: {_text}\nLang: {_lang}")
|
|
|
270 |
audio_list.extend(
|
271 |
generate_audio_multilang(
|
272 |
_text,
|
|
|
16 |
logger = logging.getLogger(__name__)
|
17 |
|
18 |
import torch
|
19 |
+
import ssl
|
20 |
+
ssl._create_default_https_context = ssl._create_unverified_context
|
21 |
+
import nltk
|
22 |
+
nltk.download('cmudict')
|
23 |
import utils
|
24 |
from infer import infer, latest_version, get_net_g, infer_multilang
|
25 |
import gradio as gr
|
|
|
271 |
elif language.lower() == "auto":
|
272 |
_text, _lang = process_auto(text)
|
273 |
print(f"Text: {_text}\nLang: {_lang}")
|
274 |
+
_lang = [[lang.replace("JA", "JP") for lang in lang_list] for lang_list in _lang]
|
275 |
audio_list.extend(
|
276 |
generate_audio_multilang(
|
277 |
_text,
|