respect speech settings

This commit is contained in:
chrys 2016-07-14 23:27:50 +02:00
parent 6f6ab0c68e
commit a845cf0de6
2 changed files with 6 additions and 6 deletions

View File

@ -6,9 +6,9 @@ theme=default
[speech]
enabled=True
driver=speechd
driver=espeak
rate=100
pitch=1
pitch=100
module=espeak
voice=de
language=de

View File

@ -38,17 +38,17 @@ class speech():
def setVoice(self, voice):
if not self._isInitialized:
return False
return _es.set_voice(voice)
return self._es.set_voice(voice)
def setPitch(self, pitch):
if not self._isInitialized:
return False
return _es.set_parameter(espeak.Parameter.Pitch, pitch)
return self._es.set_parameter(espeak.Parameter.Pitch, pitch)
def setSpeed(self, speed):
if not self._isInitialized:
return False
return _es.set_parameter(espeak.Parameter.Rate, speed)
return self._es.set_parameter(espeak.Parameter.Rate, speed)
def setModule(self, module):
if not self._isInitialized:
@ -57,7 +57,7 @@ class speech():
def setLanguage(self, language):
if not self._isInitialized:
return False
return _es.set_voice(voice)
return self._es.set_voice(language)
def shutdown(self):
pass