Spaces:
Running
Running
eaysu
commited on
Commit
·
0d782ce
1
Parent(s):
d4af80c
voice preset menu again changed
Browse files
app.py
CHANGED
@@ -49,4 +49,23 @@ with gr.Blocks() as app:
|
|
49 |
# Model selection
|
50 |
model_preset_input = gr.Dropdown(["suno/bark", "suno/bark-small"], label="Select Model", value="suno/bark-small")
|
51 |
|
52 |
-
# Combined voice
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
# Model selection
|
50 |
model_preset_input = gr.Dropdown(["suno/bark", "suno/bark-small"], label="Select Model", value="suno/bark-small")
|
51 |
|
52 |
+
# Combined voice presets dropdown
|
53 |
+
voice_preset_input = gr.Dropdown(
|
54 |
+
choices=all_voice_presets,
|
55 |
+
label="Select Voice Preset"
|
56 |
+
)
|
57 |
+
|
58 |
+
# Button to generate voice
|
59 |
+
generate_button = gr.Button("Generate Voice")
|
60 |
+
|
61 |
+
# Output audio
|
62 |
+
audio_output = gr.Audio(label="Generated Voice", type="numpy")
|
63 |
+
|
64 |
+
# Generate voice on button click
|
65 |
+
generate_button.click(
|
66 |
+
generate_speech,
|
67 |
+
inputs=[text_input, model_preset_input, voice_preset_input],
|
68 |
+
outputs=audio_output
|
69 |
+
)
|
70 |
+
|
71 |
+
app.launch()
|