SohomToom commited on
Commit
b3721bb
·
verified ·
1 Parent(s): 92eba2d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 metadata.items()]
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("coqui_model_path") # Replace with actual path for Coqui model
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