Spaces:
Running
on
T4
Running
on
T4
gorkemgoknar
commited on
Commit
•
5edb992
1
Parent(s):
3666957
japanese will be opened up after tts update
Browse files
app.py
CHANGED
@@ -45,9 +45,9 @@ model_path = os.path.join(get_user_data_dir("tts"), "tts_models--multilingual--m
|
|
45 |
config = XttsConfig()
|
46 |
config.load_json(os.path.join(model_path, "config.json"))
|
47 |
|
48 |
-
if "ja-jp" not in config.languages:
|
49 |
-
#fix to have JP before next TTS update
|
50 |
-
config.languages.append("ja-jp")
|
51 |
|
52 |
model = Xtts.init_from_config(config)
|
53 |
model.load_checkpoint(
|
@@ -66,7 +66,7 @@ DEVICE_ASSERT_LANG=None
|
|
66 |
|
67 |
def predict(prompt, language, audio_file_pth, mic_file_path, use_mic, voice_cleanup, no_lang_auto_detect, agree,):
|
68 |
if agree == True:
|
69 |
-
supported_languages=["en","es","fr","de","it","pt","pl","tr","ru","nl","cs","ar","zh-cn"
|
70 |
|
71 |
if language not in supported_languages:
|
72 |
gr.Warning(f"Language you put {language} in is not in is not in our Supported Languages, please choose from dropdown")
|
@@ -85,11 +85,11 @@ def predict(prompt, language, audio_file_pth, mic_file_path, use_mic, voice_clea
|
|
85 |
#we use zh-cn
|
86 |
language_predicted = "zh-cn"
|
87 |
|
88 |
-
if language_predicted == "ja":
|
89 |
-
|
90 |
-
|
91 |
-
if language == "ja":
|
92 |
-
|
93 |
|
94 |
print(f"Detected language:{language_predicted}, Chosen language:{language}")
|
95 |
|
@@ -402,16 +402,16 @@ examples = [
|
|
402 |
False,
|
403 |
True,
|
404 |
],
|
405 |
-
[
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
],
|
415 |
]
|
416 |
|
417 |
|
@@ -441,7 +441,6 @@ gr.Interface(
|
|
441 |
"cs",
|
442 |
"ar",
|
443 |
"zh-cn",
|
444 |
-
"ja-jp"
|
445 |
],
|
446 |
max_choices=1,
|
447 |
value="en",
|
|
|
45 |
config = XttsConfig()
|
46 |
config.load_json(os.path.join(model_path, "config.json"))
|
47 |
|
48 |
+
#if "ja-jp" not in config.languages:
|
49 |
+
# #fix to have JP before next TTS update
|
50 |
+
# config.languages.append("ja-jp")
|
51 |
|
52 |
model = Xtts.init_from_config(config)
|
53 |
model.load_checkpoint(
|
|
|
66 |
|
67 |
def predict(prompt, language, audio_file_pth, mic_file_path, use_mic, voice_cleanup, no_lang_auto_detect, agree,):
|
68 |
if agree == True:
|
69 |
+
supported_languages=["en","es","fr","de","it","pt","pl","tr","ru","nl","cs","ar","zh-cn"]
|
70 |
|
71 |
if language not in supported_languages:
|
72 |
gr.Warning(f"Language you put {language} in is not in is not in our Supported Languages, please choose from dropdown")
|
|
|
85 |
#we use zh-cn
|
86 |
language_predicted = "zh-cn"
|
87 |
|
88 |
+
#if language_predicted == "ja":
|
89 |
+
# #we use zh-cn
|
90 |
+
# language_predicted = "ja-jp"
|
91 |
+
#if language == "ja":
|
92 |
+
# language = "ja-jp"
|
93 |
|
94 |
print(f"Detected language:{language_predicted}, Chosen language:{language}")
|
95 |
|
|
|
402 |
False,
|
403 |
True,
|
404 |
],
|
405 |
+
#[
|
406 |
+
# "かつて6歳のとき、素晴らしい絵を見ました",
|
407 |
+
# "ja-jp",
|
408 |
+
# "examples/female.wav",
|
409 |
+
# None,
|
410 |
+
# False,
|
411 |
+
# True,
|
412 |
+
# False,
|
413 |
+
# True,
|
414 |
+
#],
|
415 |
]
|
416 |
|
417 |
|
|
|
441 |
"cs",
|
442 |
"ar",
|
443 |
"zh-cn",
|
|
|
444 |
],
|
445 |
max_choices=1,
|
446 |
value="en",
|