Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -100,7 +100,6 @@ def voice_to_voice_clone(reference_audio, input_audio, language="en"):
|
|
| 100 |
except Exception as e:
|
| 101 |
return None, f"❌ Voice cloning error: {str(e)}\nModel: {MODEL_STATUS}"
|
| 102 |
|
| 103 |
-
# Gradio Interface
|
| 104 |
with gr.Blocks(title="Voice Cloning Studio") as demo:
|
| 105 |
gr.HTML("""
|
| 106 |
<div style="text-align: center; padding: 25px;">
|
|
@@ -121,65 +120,60 @@ with gr.Blocks(title="Voice Cloning Studio") as demo:
|
|
| 121 |
type="filepath",
|
| 122 |
sources=["upload", "microphone"]
|
| 123 |
)
|
| 124 |
-
language = gr.Dropdown(
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
)
|
| 174 |
-
|
| 175 |
clone_btn = gr.Button("Clone Voice", variant="primary", size="lg")
|
| 176 |
with gr.Column():
|
| 177 |
output_audio = gr.Audio(label="Cloned Voice Result")
|
| 178 |
-
status_output = gr.Textbox(
|
| 179 |
-
label="Status",
|
| 180 |
-
lines=12,
|
| 181 |
-
interactive=False
|
| 182 |
-
)
|
| 183 |
|
| 184 |
clone_btn.click(
|
| 185 |
fn=voice_to_voice_clone,
|
|
|
|
| 100 |
except Exception as e:
|
| 101 |
return None, f"❌ Voice cloning error: {str(e)}\nModel: {MODEL_STATUS}"
|
| 102 |
|
|
|
|
| 103 |
with gr.Blocks(title="Voice Cloning Studio") as demo:
|
| 104 |
gr.HTML("""
|
| 105 |
<div style="text-align: center; padding: 25px;">
|
|
|
|
| 120 |
type="filepath",
|
| 121 |
sources=["upload", "microphone"]
|
| 122 |
)
|
| 123 |
+
language = gr.Dropdown(
|
| 124 |
+
choices=[
|
| 125 |
+
("English", "en"),
|
| 126 |
+
("Spanish", "es"),
|
| 127 |
+
("French", "fr"),
|
| 128 |
+
("German", "de"),
|
| 129 |
+
("Italian", "it"),
|
| 130 |
+
("Portuguese", "pt"),
|
| 131 |
+
("Polish", "pl"),
|
| 132 |
+
("Turkish", "tr"),
|
| 133 |
+
("Russian", "ru"),
|
| 134 |
+
("Dutch", "nl"),
|
| 135 |
+
("Czech", "cs"),
|
| 136 |
+
("Arabic", "ar"),
|
| 137 |
+
("Chinese", "zh"),
|
| 138 |
+
("Japanese", "ja"),
|
| 139 |
+
("Korean", "ko"),
|
| 140 |
+
("Hindi", "hi"),
|
| 141 |
+
("Ukrainian", "uk"),
|
| 142 |
+
("Vietnamese", "vi"),
|
| 143 |
+
("Romanian", "ro"),
|
| 144 |
+
("Greek", "el"),
|
| 145 |
+
("Hebrew", "he"),
|
| 146 |
+
("Finnish", "fi"),
|
| 147 |
+
("Hungarian", "hu"),
|
| 148 |
+
("Swedish", "sv"),
|
| 149 |
+
("Catalan", "ca"),
|
| 150 |
+
("Indonesian", "id"),
|
| 151 |
+
("Malay", "ms"),
|
| 152 |
+
("Bulgarian", "bg"),
|
| 153 |
+
("Slovak", "sk"),
|
| 154 |
+
("Danish", "da"),
|
| 155 |
+
("Norwegian", "no"),
|
| 156 |
+
("Lithuanian", "lt"),
|
| 157 |
+
("Croatian", "hr"),
|
| 158 |
+
("Serbian", "sr"),
|
| 159 |
+
("Slovenian", "sl"),
|
| 160 |
+
("Estonian", "et"),
|
| 161 |
+
("Latvian", "lv"),
|
| 162 |
+
("Filipino", "fil"),
|
| 163 |
+
("Bengali", "bn"),
|
| 164 |
+
("Tamil", "ta"),
|
| 165 |
+
("Telugu", "te"),
|
| 166 |
+
("Urdu", "ur"),
|
| 167 |
+
("Farsi", "fa"),
|
| 168 |
+
("Thai", "th"),
|
| 169 |
+
],
|
| 170 |
+
value="en",
|
| 171 |
+
label="Language"
|
| 172 |
+
)
|
|
|
|
| 173 |
clone_btn = gr.Button("Clone Voice", variant="primary", size="lg")
|
| 174 |
with gr.Column():
|
| 175 |
output_audio = gr.Audio(label="Cloned Voice Result")
|
| 176 |
+
status_output = gr.Textbox(label="Status", lines=12, interactive=False)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 177 |
|
| 178 |
clone_btn.click(
|
| 179 |
fn=voice_to_voice_clone,
|