Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -83,10 +83,9 @@ with gr.Blocks(title="VoxCPM Text-to-Speech") as demo:
|
|
| 83 |
|
| 84 |
with gr.Accordion("Voice Cloning (Optional)", open=False):
|
| 85 |
prompt_audio = gr.Audio(
|
| 86 |
-
label="Reference Audio",
|
| 87 |
type="filepath",
|
| 88 |
-
sources=["upload"]
|
| 89 |
-
info="Upload a reference audio file for voice cloning"
|
| 90 |
)
|
| 91 |
prompt_text = gr.Textbox(
|
| 92 |
label="Reference Text",
|
|
@@ -166,22 +165,6 @@ with gr.Blocks(title="VoxCPM Text-to-Speech") as demo:
|
|
| 166 |
"""
|
| 167 |
)
|
| 168 |
|
| 169 |
-
# Examples
|
| 170 |
-
gr.Examples(
|
| 171 |
-
examples=[
|
| 172 |
-
["Hello! Welcome to the VoxCPM text-to-speech demonstration. This model can generate highly expressive and natural-sounding speech.", None, None, 2.0, 10],
|
| 173 |
-
["The quick brown fox jumps over the lazy dog. This pangram contains all letters of the alphabet.", None, None, 2.5, 15],
|
| 174 |
-
["Artificial intelligence is transforming the way we interact with technology, making it more natural and intuitive.", None, None, 2.0, 10],
|
| 175 |
-
],
|
| 176 |
-
inputs=[text_input, prompt_audio, prompt_text, cfg_value, inference_timesteps],
|
| 177 |
-
outputs=audio_output,
|
| 178 |
-
fn=lambda t, pa, pt, cfg, its: generate_speech(
|
| 179 |
-
t, pa, pt, cfg, its, True, True, True, 3, 6.0
|
| 180 |
-
),
|
| 181 |
-
cache_examples=True,
|
| 182 |
-
cache_mode="lazy"
|
| 183 |
-
)
|
| 184 |
-
|
| 185 |
# Connect the generate button
|
| 186 |
generate_btn.click(
|
| 187 |
fn=generate_speech,
|
|
|
|
| 83 |
|
| 84 |
with gr.Accordion("Voice Cloning (Optional)", open=False):
|
| 85 |
prompt_audio = gr.Audio(
|
| 86 |
+
label="Reference Audio (Upload a reference audio file for voice cloning)",
|
| 87 |
type="filepath",
|
| 88 |
+
sources=["upload"]
|
|
|
|
| 89 |
)
|
| 90 |
prompt_text = gr.Textbox(
|
| 91 |
label="Reference Text",
|
|
|
|
| 165 |
"""
|
| 166 |
)
|
| 167 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 168 |
# Connect the generate button
|
| 169 |
generate_btn.click(
|
| 170 |
fn=generate_speech,
|