Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -128,7 +128,7 @@ BARK_PROMPTS = [
|
|
128 |
|
129 |
def list_speaker_choices(metadata):
|
130 |
"""Helper function to list speakers from metadata (for VCTK and Coqui)"""
|
131 |
-
return [f"Speaker {sid} | {meta['gender']} | {meta['accent']}" for sid, meta in
|
132 |
|
133 |
def get_speaker_id_from_label(label):
|
134 |
"""Extract speaker ID from label string"""
|
@@ -143,7 +143,7 @@ def generate_audio(sample_text, speaker_label, engine):
|
|
143 |
if engine == "bark":
|
144 |
model = TTS("bark_model_path") # Replace with actual path for Bark model
|
145 |
elif engine == "coqui":
|
146 |
-
model = TTS("
|
147 |
elif engine == "vctk":
|
148 |
model = TTS(VOICE_MODEL) # Replace with actual path for VCTK model
|
149 |
|
|
|
128 |
|
129 |
def list_speaker_choices(metadata):
|
130 |
"""Helper function to list speakers from metadata (for VCTK and Coqui)"""
|
131 |
+
return [f"Speaker {sid} | {meta['gender']} | {meta['accent']}" for sid, meta in SPEAKER_METADATA.items()]
|
132 |
|
133 |
def get_speaker_id_from_label(label):
|
134 |
"""Extract speaker ID from label string"""
|
|
|
143 |
if engine == "bark":
|
144 |
model = TTS("bark_model_path") # Replace with actual path for Bark model
|
145 |
elif engine == "coqui":
|
146 |
+
model = TTS("tts_models/multilingual/multi-dataset/xtts_v2") # Replace with actual path for Coqui model
|
147 |
elif engine == "vctk":
|
148 |
model = TTS(VOICE_MODEL) # Replace with actual path for VCTK model
|
149 |
|