Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -7,17 +7,19 @@ os.environ["COQUI_TOS_AGREED"] = "1"
|
|
7 |
import gradio as gr
|
8 |
from TTS.api import TTS
|
9 |
from TTS.utils.manage import ModelManager
|
10 |
-
|
11 |
from TTS.tts.configs.xtts_config import XttsConfig
|
12 |
from TTS.tts.models.xtts import XttsAudioConfig
|
13 |
from TTS.config.shared_configs import BaseDatasetConfig
|
14 |
from TTS.tts.models.xtts import XttsArgs
|
|
|
15 |
import torch.serialization
|
16 |
# torch.serialization.add_safe_globals([XttsConfig])
|
|
|
17 |
model_names = TTS().list_models()
|
18 |
print(model_names.__dict__)
|
19 |
print(model_names.__dir__())
|
20 |
-
model_name = "tts_models/multilingual/multi-dataset/xtts_v2" #
|
21 |
|
22 |
#m = ModelManager().download_model(model_name)
|
23 |
#print(m)
|
@@ -33,7 +35,7 @@ def predict(prompt, language, audio_file_pth, mic_file_path, use_mic, agree, req
|
|
33 |
I have been obliged to include a ‘display of additional information’ relating to the use of this area.
|
34 |
As a reminder, sending illegal content (se*ual, offensive or threatening content) in any language is of course FORBIDDEN.
|
35 |
language, is of course FORBIDDEN. I cannot be held responsible for those who violate a strictly [ETHICAL and MORAL] use of this space.
|
36 |
-
use of this model.
|
37 |
"""
|
38 |
|
39 |
try:
|
@@ -112,30 +114,20 @@ def predict(prompt, language, audio_file_pth, mic_file_path, use_mic, agree, req
|
|
112 |
gr.Warning("Please accept the Terms & Condition!")
|
113 |
return None
|
114 |
|
115 |
-
title = "XTTS
|
116 |
|
117 |
description = f"""
|
118 |
-
<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.
|
119 |
-
<br/>
|
120 |
XTTS is built on previous research, like Tortoise, with additional architectural innovations and training to make cross-language voice cloning and multilingual speech generation possible.
|
121 |
-
<br/>
|
122 |
This is the same model that powers our creator application <a href="https://coqui.ai">Coqui Studio</a> as well as the <a href="https://docs.coqui.ai">Coqui API</a>. In production we apply modifications to make low-latency streaming possible.
|
123 |
-
<
|
124 |
-
|
125 |
-
<br/>
|
126 |
-
<p>For faster inference without waiting in the queue, you should duplicate this space and upgrade to GPU via the settings.
|
127 |
-
<br/>
|
128 |
<a href="https://huggingface.co/spaces/coqui/xtts?duplicate=true">
|
129 |
<img style="margin-top: 0em; margin-bottom: 0em" src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a>
|
130 |
</p>
|
131 |
<p>
|
132 |
-
<br>
|
133 |
-
Due to the large number of abuses observed in the console's logs, ‘additional information’ on the use of this space has been added.
|
134 |
-
<br>
|
135 |
As a reminder, sending illegal content (se*ual, offensive or threatening content) in any language is, of course, FORBIDDEN.
|
136 |
-
<br>
|
137 |
The authors of this space cannot be held responsible for those who violate the strictly [ETHICAL AND MORAL] use of this model.
|
138 |
-
<br>
|
139 |
</p>
|
140 |
"""
|
141 |
|
@@ -251,7 +243,7 @@ gr.Interface(
|
|
251 |
gr.Textbox(
|
252 |
label="Text Prompt",
|
253 |
info="One or two sentences at a time is better",
|
254 |
-
value="Hello, World
|
255 |
),
|
256 |
gr.Dropdown(
|
257 |
label="Language",
|
|
|
7 |
import gradio as gr
|
8 |
from TTS.api import TTS
|
9 |
from TTS.utils.manage import ModelManager
|
10 |
+
|
11 |
from TTS.tts.configs.xtts_config import XttsConfig
|
12 |
from TTS.tts.models.xtts import XttsAudioConfig
|
13 |
from TTS.config.shared_configs import BaseDatasetConfig
|
14 |
from TTS.tts.models.xtts import XttsArgs
|
15 |
+
|
16 |
import torch.serialization
|
17 |
# torch.serialization.add_safe_globals([XttsConfig])
|
18 |
+
|
19 |
model_names = TTS().list_models()
|
20 |
print(model_names.__dict__)
|
21 |
print(model_names.__dir__())
|
22 |
+
model_name = "tts_models/multilingual/multi-dataset/xtts_v2" # using v2
|
23 |
|
24 |
#m = ModelManager().download_model(model_name)
|
25 |
#print(m)
|
|
|
35 |
I have been obliged to include a ‘display of additional information’ relating to the use of this area.
|
36 |
As a reminder, sending illegal content (se*ual, offensive or threatening content) in any language is of course FORBIDDEN.
|
37 |
language, is of course FORBIDDEN. I cannot be held responsible for those who violate a strictly [ETHICAL and MORAL] use of this space.
|
38 |
+
use of this model. <- Glz's text not Deep50D's
|
39 |
"""
|
40 |
|
41 |
try:
|
|
|
114 |
gr.Warning("Please accept the Terms & Condition!")
|
115 |
return None
|
116 |
|
117 |
+
title = "XTTS Deep50D's remake of Glz's remake (Functional TTS)"
|
118 |
|
119 |
description = f"""
|
120 |
+
<p><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.
|
|
|
121 |
XTTS is built on previous research, like Tortoise, with additional architectural innovations and training to make cross-language voice cloning and multilingual speech generation possible.
|
|
|
122 |
This is the same model that powers our creator application <a href="https://coqui.ai">Coqui Studio</a> as well as the <a href="https://docs.coqui.ai">Coqui API</a>. In production we apply modifications to make low-latency streaming possible.
|
123 |
+
Leave a star on the Github <a href="https://github.com/coqui-ai/TTS">TTS</a>, where our open-source inference and training code lives.</p>
|
124 |
+
<p>For faster inference without waiting in the queue, you should duplicate this space.
|
|
|
|
|
|
|
125 |
<a href="https://huggingface.co/spaces/coqui/xtts?duplicate=true">
|
126 |
<img style="margin-top: 0em; margin-bottom: 0em" src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a>
|
127 |
</p>
|
128 |
<p>
|
|
|
|
|
|
|
129 |
As a reminder, sending illegal content (se*ual, offensive or threatening content) in any language is, of course, FORBIDDEN.
|
|
|
130 |
The authors of this space cannot be held responsible for those who violate the strictly [ETHICAL AND MORAL] use of this model.
|
|
|
131 |
</p>
|
132 |
"""
|
133 |
|
|
|
243 |
gr.Textbox(
|
244 |
label="Text Prompt",
|
245 |
info="One or two sentences at a time is better",
|
246 |
+
value="Hello, World! Here's an example of light voice cloning. Try to upload your best audio samples",
|
247 |
),
|
248 |
gr.Dropdown(
|
249 |
label="Language",
|