Skip to content

Commit

Permalink
Merge branch 'i5651' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelDCurran committed Mar 9, 2016
2 parents 4e67353 + 32025c5 commit 0711522
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions source/synthDrivers/espeak.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ def _getAvailableVoices(self):
voices=OrderedDict()
for v in _espeak.getVoiceList():
l=v.languages[1:]
identifier=os.path.basename(v.identifier)
# For backwards compatibility, voice identifies should always be lowercase
identifier=os.path.basename(v.identifier).lower()
voices[identifier]=VoiceInfo(identifier,v.name,l)
return voices

Expand All @@ -203,11 +204,14 @@ def _get_voice(self):
curVoice = _espeak.getCurrentVoice()
if not curVoice:
return ""
return curVoice.identifier.split('+')[0]
# For backwards compatibility, voice identifies should always be lowercase
return curVoice.identifier.split('+')[0].lower()

def _set_voice(self, identifier):
if not identifier:
return
# For backwards compatibility, voice identifies should always be lowercase
identifier=identifier.lower()
if "\\" in identifier:
identifier=os.path.basename(identifier)
self._voice=identifier
Expand Down

0 comments on commit 0711522

Please sign in to comment.