Spaces:
Sleeping
Sleeping
add top_k input
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2").to(device)
|
|
15 |
tts = TTS("xtts_v2.0.2")
|
16 |
|
17 |
|
18 |
-
async def generate_audio(text_input: str, creator: str) -> str:
|
19 |
|
20 |
refer_voices = ''
|
21 |
unique_id = str(uuid.uuid4())
|
@@ -41,6 +41,7 @@ async def generate_audio(text_input: str, creator: str) -> str:
|
|
41 |
speaker_wav=refer_voices,
|
42 |
language="en",
|
43 |
split_sentences=True,
|
|
|
44 |
)
|
45 |
|
46 |
source_audio_file_name = output_file
|
@@ -51,7 +52,8 @@ async def generate_audio(text_input: str, creator: str) -> str:
|
|
51 |
app = gr.Interface(
|
52 |
fn=generate_audio,
|
53 |
inputs=[gr.Textbox(label='Text to Speach'), gr.Dropdown(
|
54 |
-
['Roomie', 'Xavy', 'Bella', 'Julia'], label="Coice your creator")
|
|
|
55 |
|
56 |
outputs=['audio']
|
57 |
)
|
|
|
15 |
tts = TTS("xtts_v2.0.2")
|
16 |
|
17 |
|
18 |
+
async def generate_audio(text_input: str, creator: str, top_k_input: int) -> str:
|
19 |
|
20 |
refer_voices = ''
|
21 |
unique_id = str(uuid.uuid4())
|
|
|
41 |
speaker_wav=refer_voices,
|
42 |
language="en",
|
43 |
split_sentences=True,
|
44 |
+
top_k=top_k_input
|
45 |
)
|
46 |
|
47 |
source_audio_file_name = output_file
|
|
|
52 |
app = gr.Interface(
|
53 |
fn=generate_audio,
|
54 |
inputs=[gr.Textbox(label='Text to Speach'), gr.Dropdown(
|
55 |
+
['Roomie', 'Xavy', 'Bella', 'Julia'], label="Coice your creator"),
|
56 |
+
gr.Slider(0, 100, value=50, label='Emotion', info='Valores mas altos para tonos mas emocionado, valores bajos para tonos mas aburrido ')],
|
57 |
|
58 |
outputs=['audio']
|
59 |
)
|