Spaces:
Runtime error
Runtime error
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -159,7 +159,7 @@ def speak(text, voice="F2", speed=1.0, pitch_shift=0.0, pitch_range=1.0):
|
|
| 159 |
return (SAMPLE_RATE, audio.astype(np.float32)), " ".join(transcript)
|
| 160 |
|
| 161 |
|
| 162 |
-
with gr.Blocks(
|
| 163 |
with gr.Column(elem_id="col-container"):
|
| 164 |
gr.Markdown(
|
| 165 |
"# 🗣️ tiny-voca\n"
|
|
@@ -177,7 +177,7 @@ with gr.Blocks(theme=gr.themes.Citrus(), css=CSS) as demo:
|
|
| 177 |
scale=4,
|
| 178 |
)
|
| 179 |
run = gr.Button("Speak", variant="primary", scale=1)
|
| 180 |
-
audio = gr.Audio(label="Speech", type="numpy"
|
| 181 |
phones = gr.Textbox(label="Phonemes (dizione)", interactive=False, lines=2)
|
| 182 |
with gr.Row():
|
| 183 |
voice = gr.Radio(choices=list(VOICES), value="F2", label="Voice")
|
|
@@ -204,4 +204,4 @@ with gr.Blocks(theme=gr.themes.Citrus(), css=CSS) as demo:
|
|
| 204 |
run.click(speak, inputs=[text, voice, speed, pitch_shift, pitch_range],
|
| 205 |
outputs=[audio, phones], api_name="speak")
|
| 206 |
|
| 207 |
-
demo.launch(mcp_server=True)
|
|
|
|
| 159 |
return (SAMPLE_RATE, audio.astype(np.float32)), " ".join(transcript)
|
| 160 |
|
| 161 |
|
| 162 |
+
with gr.Blocks() as demo:
|
| 163 |
with gr.Column(elem_id="col-container"):
|
| 164 |
gr.Markdown(
|
| 165 |
"# 🗣️ tiny-voca\n"
|
|
|
|
| 177 |
scale=4,
|
| 178 |
)
|
| 179 |
run = gr.Button("Speak", variant="primary", scale=1)
|
| 180 |
+
audio = gr.Audio(label="Speech", type="numpy")
|
| 181 |
phones = gr.Textbox(label="Phonemes (dizione)", interactive=False, lines=2)
|
| 182 |
with gr.Row():
|
| 183 |
voice = gr.Radio(choices=list(VOICES), value="F2", label="Voice")
|
|
|
|
| 204 |
run.click(speak, inputs=[text, voice, speed, pitch_shift, pitch_range],
|
| 205 |
outputs=[audio, phones], api_name="speak")
|
| 206 |
|
| 207 |
+
demo.launch(theme=gr.themes.Citrus(), css=CSS, mcp_server=True)
|