Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -338,10 +338,10 @@ def transcribe_audio(audio_path):
|
|
| 338 |
text = " ".join([seg.text for seg in segments])
|
| 339 |
return text
|
| 340 |
|
| 341 |
-
# === TTS
|
| 342 |
tts = TTS(model_name="tts_models/en/ljspeech/tacotron2-DDC", progress_bar=False)
|
| 343 |
|
| 344 |
-
def
|
| 345 |
out_path = os.path.join(tempfile.gettempdir(), "tts_output.wav")
|
| 346 |
tts.tts_to_file(text=text, file_path=out_path)
|
| 347 |
return out_path
|
|
@@ -554,14 +554,7 @@ with gr.Blocks(title="AI Audio Studio", css="style.css") as demo:
|
|
| 554 |
"Stage Mode"
|
| 555 |
]),
|
| 556 |
gr.Checkbox(label="Isolate Vocals After Effects"),
|
| 557 |
-
gr.Dropdown(choices=
|
| 558 |
-
"🎙 Clean Vocal",
|
| 559 |
-
"🧪 Vocal Distortion",
|
| 560 |
-
"🎶 Singer's Harmony",
|
| 561 |
-
"🌫 ASMR Vocal",
|
| 562 |
-
"🎼 Stage Mode",
|
| 563 |
-
"🎵 Auto-Tune Style"
|
| 564 |
-
], label="Select Vocal Preset", value="Default"),
|
| 565 |
gr.Dropdown(choices=["MP3", "WAV"], label="Export Format", value="MP3")
|
| 566 |
],
|
| 567 |
outputs=[
|
|
|
|
| 338 |
text = " ".join([seg.text for seg in segments])
|
| 339 |
return text
|
| 340 |
|
| 341 |
+
# === TTS Tab ===
|
| 342 |
tts = TTS(model_name="tts_models/en/ljspeech/tacotron2-DDC", progress_bar=False)
|
| 343 |
|
| 344 |
+
def generate_tTS(text):
|
| 345 |
out_path = os.path.join(tempfile.gettempdir(), "tts_output.wav")
|
| 346 |
tts.tts_to_file(text=text, file_path=out_path)
|
| 347 |
return out_path
|
|
|
|
| 554 |
"Stage Mode"
|
| 555 |
]),
|
| 556 |
gr.Checkbox(label="Isolate Vocals After Effects"),
|
| 557 |
+
gr.Dropdown(choices=preset_names, label="Select Vocal Preset", value="Default"),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 558 |
gr.Dropdown(choices=["MP3", "WAV"], label="Export Format", value="MP3")
|
| 559 |
],
|
| 560 |
outputs=[
|