Update app.py
Browse files
app.py
CHANGED
@@ -119,17 +119,30 @@ def clone_and_speak(text, selected_speaker_key):
|
|
119 |
|
120 |
|
121 |
# Gradio interface
|
122 |
-
gr.Interface(
|
123 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
inputs=[
|
125 |
-
gr.Textbox(label="
|
126 |
-
gr.
|
127 |
],
|
128 |
-
outputs=gr.Audio(label="
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
|
|
133 |
|
134 |
|
135 |
# import os
|
|
|
119 |
|
120 |
|
121 |
# Gradio interface
|
122 |
+
# gr.Interface(
|
123 |
+
# fn=clone_and_speak,
|
124 |
+
# inputs=[
|
125 |
+
# gr.Textbox(label="Enter Text"),
|
126 |
+
# gr.Audio(type="filepath", label="Upload a Reference Voice (.wav)")
|
127 |
+
# ],
|
128 |
+
# outputs=gr.Audio(label="Synthesized Output"),
|
129 |
+
# flagging_dir="/tmp/flagged",
|
130 |
+
# title="Text to Voice using Melo TTS + OpenVoice",
|
131 |
+
# description="Use Melo TTS for base synthesis and OpenVoice to apply a reference speaker's tone.",
|
132 |
+
# ).launch()
|
133 |
+
|
134 |
+
iface = gr.Interface(
|
135 |
+
fn=clone_with_base_speaker,
|
136 |
inputs=[
|
137 |
+
gr.Textbox(label="Input Text", placeholder="Enter text to synthesize..."),
|
138 |
+
gr.Dropdown(choices=base_speaker_choices, label="Select Base Speaker"),
|
139 |
],
|
140 |
+
outputs=gr.Audio(type="filepath", label="Cloned Voice Output"),
|
141 |
+
title="Voice Cloning with OpenVoice Base Speakers",
|
142 |
+
description="Choose a base speaker from OpenVoice and enter text to generate voice."
|
143 |
+
)
|
144 |
+
|
145 |
+
iface.launch()
|
146 |
|
147 |
|
148 |
# import os
|