tags 597406 + patch
thanks
Here is a patch.
Samuel
--- ./src/EspeakFrontend.py.original 2010-09-19 15:16:07.000000000 +0200
+++ ./src/EspeakFrontend.py 2010-09-19 15:16:21.000000000 +0200
@@ -178,7 +178,7 @@
voicesmb = []
pathVoices = '/usr/share/espeak-data/voices/mb/'
if not pathVoicesmb:
- pathVoicesmb = '/usr/share/mbrola/voices'
+ pathVoicesmb = '/usr/share/mbrola'
if os.path.isdir(pathVoices) and os.path.isdir(pathVoicesmb):
for voice in os.listdir(pathVoices):
# Only files
@@ -189,7 +189,7 @@
# Check if it's a valid voice
for line in voicecontent:
if line[:5] == 'name ':
- voicesmb.append((line[5:], voice,
os.path.isfile(os.path.join(pathVoicesmb, voice[3:]))))
+ voicesmb.append((line[5:], voice,
os.path.isfile(os.path.join(pathVoicesmb, voice[3:], voice[3:]))))
break
return voicesmb
--- ./src/Settings.py.original 2010-09-19 15:22:23.000000000 +0200
+++ ./src/Settings.py 2010-09-19 15:22:29.000000000 +0200
@@ -76,7 +76,7 @@
'VoiceDelay': [int, 10, __sectionVoiceSetting],
'VoiceTypeMale': [strbool, True, __sectionVoiceSetting],
'VoiceLanguage': [str, _('default language'), __sectionVoiceSetting],
- 'VoicesmbPath': [str, '/usr/share/mbrola/voices', __sectionMbrola]
+ 'VoicesmbPath': [str, '/usr/share/mbrola', __sectionMbrola]
}
def save(filename=conffile, clearDefaults=False):
--- ./src/gespeakerUI.py.original 2010-09-19 15:27:27.000000000 +0200
+++ ./src/gespeakerUI.py 2010-09-19 15:27:47.000000000 +0200
@@ -445,8 +445,9 @@
self.espeak.play(cmd, self.cmdPlayer, self.recordToFile)
else:
args = {
- '%l': '%s/%s' % (
+ '%l': '%s/%s/%s' % (
Settings.get('VoicesmbPath'),
+ language.replace('mb-', '', 1),
language.replace('mb-', '', 1))
}
cmdMbrola = [Settings.cmdMbrola] + [