wip; sugar3.speech - espeak-ng does not have default voice
This commit is contained in:
parent
7c2a2ba94a
commit
9722cfab1e
@ -71,7 +71,7 @@ translated_espeak_voices = {
|
|||||||
'de': _('German'),
|
'de': _('German'),
|
||||||
# Translators: http://en.wikipedia.org/wiki/Modern_Greek
|
# Translators: http://en.wikipedia.org/wiki/Modern_Greek
|
||||||
'el': _('Greek'),
|
'el': _('Greek'),
|
||||||
'en': _('Default'),
|
'en': _('English'),
|
||||||
# Translators: http://en.wikipedia.org/wiki/British_English
|
# Translators: http://en.wikipedia.org/wiki/British_English
|
||||||
'en_gb': _('English Britain'),
|
'en_gb': _('English Britain'),
|
||||||
# Translators: http://en.wikipedia.org/wiki/Scottish_English
|
# Translators: http://en.wikipedia.org/wiki/Scottish_English
|
||||||
@ -267,7 +267,7 @@ class SpeechManager(GObject.GObject):
|
|||||||
else:
|
else:
|
||||||
voice_name = self._player.get_all_voices()[lang_code]
|
voice_name = self._player.get_all_voices()[lang_code]
|
||||||
if text:
|
if text:
|
||||||
logging.debug('PLAYING "%s" lang %s', text, voice_name)
|
logging.error('PLAYING %r lang %r pitch %r rate %r', text, voice_name, pitch, rate)
|
||||||
self._player.speak(pitch, rate, voice_name, text)
|
self._player.speak(pitch, rate, voice_name, text)
|
||||||
|
|
||||||
def say_selected_text(self):
|
def say_selected_text(self):
|
||||||
@ -441,5 +441,5 @@ class _GstSpeechPlayer(GObject.GObject):
|
|||||||
language_location = 'es_la'
|
language_location = 'es_la'
|
||||||
|
|
||||||
best = voices.get(language_location) or voices.get(language) \
|
best = voices.get(language_location) or voices.get(language) \
|
||||||
or 'default'
|
or 'english'
|
||||||
return best
|
return best
|
||||||
|
Loading…
Reference in New Issue
Block a user