marks commited on
Commit
8660783
·
1 Parent(s): 9b92628

Fixed voice names

Browse files
Files changed (1) hide show
  1. api_clients.py +6 -2
api_clients.py CHANGED
@@ -116,11 +116,15 @@ class ElevenLabsClient:
116
  Synchronously get available voices from ElevenLabs
117
 
118
  Returns:
119
- List of tuples containing (voice_id, voice_name)
 
120
  """
121
  try:
122
  voices = elevenlabs.voices()
123
- return [(voice.voice_id, voice.name) for voice in voices]
 
 
 
124
  except Exception as e:
125
  logger.error("Failed to fetch voices from ElevenLabs", exc_info=True)
126
  raise
 
116
  Synchronously get available voices from ElevenLabs
117
 
118
  Returns:
119
+ List of tuples containing (voice_id, display_name)
120
+ where display_name combines name and description
121
  """
122
  try:
123
  voices = elevenlabs.voices()
124
+ return [(
125
+ voice.voice_id,
126
+ f"{voice.name} - {voice.description[:50]}..."
127
+ ) for voice in voices]
128
  except Exception as e:
129
  logger.error("Failed to fetch voices from ElevenLabs", exc_info=True)
130
  raise