Skip to content

Commit

Permalink
Skip mbrola voices from available voices
Browse files Browse the repository at this point in the history
  • Loading branch information
reubenadams committed Aug 22, 2024
1 parent 2261227 commit b2db56a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions phonemizer/backend/espeak/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,11 @@ def available_voices(self, name=None):
# voices is an array to pointers, terminated by None
while voices[index]:
voice = voices[index].contents
available_voices.append(EspeakVoice(
name=os.fsdecode(voice.name).replace('_', ' '),
language=os.fsdecode(voice.languages)[1:],
identifier=os.fsdecode(voice.identifier)))
if not voice.identifier.startswith(b'mb'):
available_voices.append(EspeakVoice(
name=os.fsdecode(voice.name).replace('_', ' '),
language=os.fsdecode(voice.languages)[1:],
identifier=os.fsdecode(voice.identifier)))
index += 1
return available_voices

Expand Down

0 comments on commit b2db56a

Please sign in to comment.