Update Modules/Generate_Speech.py
Browse files
Modules/Generate_Speech.py
CHANGED
|
@@ -507,9 +507,9 @@ def List_Supertonic_Voices() -> list[str]:
|
|
| 507 |
|
| 508 |
# Single source of truth for the LLM-facing tool description
|
| 509 |
TOOL_SUMMARY = (
|
| 510 |
-
"Synthesize speech from text using Supertonic (default) or Kokoro-82M. "
|
| 511 |
-
"Supertonic:
|
| 512 |
-
"Kokoro:
|
| 513 |
"Return the generated media to the user in this format ``."
|
| 514 |
)
|
| 515 |
|
|
@@ -648,7 +648,8 @@ def build_interface() -> gr.Blocks:
|
|
| 648 |
supertonic_voices = get_supertonic_voices()
|
| 649 |
|
| 650 |
with gr.Blocks(title="Generate Speech") as demo:
|
| 651 |
-
gr.Markdown("<
|
|
|
|
| 652 |
|
| 653 |
with gr.Row():
|
| 654 |
with gr.Column():
|
|
@@ -667,9 +668,9 @@ def build_interface() -> gr.Blocks:
|
|
| 667 |
|
| 668 |
# Supertonic specific
|
| 669 |
with gr.Group() as supertonic_params:
|
| 670 |
-
steps_slider = gr.Slider(minimum=1, maximum=50, value=5, step=1, label="Steps
|
| 671 |
-
silence_slider = gr.Slider(minimum=0.0, maximum=2.0, value=0.3, step=0.1, label="Silence Duration
|
| 672 |
-
chunk_slider = gr.Slider(minimum=50, maximum=1000, value=300, step=10, label="Max Chunk Size
|
| 673 |
|
| 674 |
with gr.Row():
|
| 675 |
clear_btn = gr.Button("Clear")
|
|
|
|
| 507 |
|
| 508 |
# Single source of truth for the LLM-facing tool description
|
| 509 |
TOOL_SUMMARY = (
|
| 510 |
+
"Synthesize speech from text using Supertonic-66M (default) or Kokoro-82M. "
|
| 511 |
+
"Supertonic: faster, supports steps/silence/chunking. Default voice 'F1'. "
|
| 512 |
+
"Kokoro: slower, supports many languages/accents. Default voice 'af_heart'. "
|
| 513 |
"Return the generated media to the user in this format ``."
|
| 514 |
)
|
| 515 |
|
|
|
|
| 648 |
supertonic_voices = get_supertonic_voices()
|
| 649 |
|
| 650 |
with gr.Blocks(title="Generate Speech") as demo:
|
| 651 |
+
gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Generate Speech</h1>")
|
| 652 |
+
gr.Markdown("<div style=\"text-align:center\">Generate speech with Supertonic-66M or Kokoro-82M. Runs on CPU.</div>")
|
| 653 |
|
| 654 |
with gr.Row():
|
| 655 |
with gr.Column():
|
|
|
|
| 668 |
|
| 669 |
# Supertonic specific
|
| 670 |
with gr.Group() as supertonic_params:
|
| 671 |
+
steps_slider = gr.Slider(minimum=1, maximum=50, value=5, step=1, label="Steps", info="Supertonic only")
|
| 672 |
+
silence_slider = gr.Slider(minimum=0.0, maximum=2.0, value=0.3, step=0.1, label="Silence Duration", info="Supertonic only")
|
| 673 |
+
chunk_slider = gr.Slider(minimum=50, maximum=1000, value=300, step=10, label="Max Chunk Size", info="Supertonic only")
|
| 674 |
|
| 675 |
with gr.Row():
|
| 676 |
clear_btn = gr.Button("Clear")
|