add volume
This commit is contained in:
parent
73338931bd
commit
b81b35a6cf
@ -12,6 +12,7 @@ pitch=50
|
|||||||
module=espeak
|
module=espeak
|
||||||
voice=de
|
voice=de
|
||||||
language=de
|
language=de
|
||||||
|
volume=200
|
||||||
|
|
||||||
[braille]
|
[braille]
|
||||||
enabled=False
|
enabled=False
|
||||||
|
@ -19,6 +19,7 @@ class outputManager():
|
|||||||
environment['runtime']['speechDriver'].setPitch(environment['runtime']['settingsManager'].getSettingAsInt(environment, 'speech', 'pitch'))
|
environment['runtime']['speechDriver'].setPitch(environment['runtime']['settingsManager'].getSettingAsInt(environment, 'speech', 'pitch'))
|
||||||
environment['runtime']['speechDriver'].setSpeed(environment['runtime']['settingsManager'].getSettingAsInt(environment, 'speech', 'rate'))
|
environment['runtime']['speechDriver'].setSpeed(environment['runtime']['settingsManager'].getSettingAsInt(environment, 'speech', 'rate'))
|
||||||
environment['runtime']['speechDriver'].setModule(environment['runtime']['settingsManager'].getSetting(environment, 'speech', 'module'))
|
environment['runtime']['speechDriver'].setModule(environment['runtime']['settingsManager'].getSetting(environment, 'speech', 'module'))
|
||||||
|
environment['runtime']['speechDriver'].setVolume(environment['runtime']['settingsManager'].getSettingAsInt(environment, 'speech', 'volume'))
|
||||||
|
|
||||||
environment['runtime']['speechDriver'].speak(Text)
|
environment['runtime']['speechDriver'].speak(Text)
|
||||||
|
|
||||||
|
@ -15,6 +15,8 @@ settings = {
|
|||||||
'pitch': 1,
|
'pitch': 1,
|
||||||
'module': '',
|
'module': '',
|
||||||
'voice': 'de',
|
'voice': 'de',
|
||||||
|
'language': 'de',
|
||||||
|
'volume': 100
|
||||||
},
|
},
|
||||||
'braille':{
|
'braille':{
|
||||||
'enabled': False,
|
'enabled': False,
|
||||||
|
@ -59,5 +59,10 @@ class speech():
|
|||||||
return False
|
return False
|
||||||
return self._es.set_voice(language)
|
return self._es.set_voice(language)
|
||||||
|
|
||||||
|
def setVolume(self, volume):
|
||||||
|
if not self._isInitialized:
|
||||||
|
return False
|
||||||
|
return self._es.set_parameter(self._es.Parameter().Volume, volume)
|
||||||
|
|
||||||
def shutdown(self):
|
def shutdown(self):
|
||||||
pass
|
pass
|
||||||
|
@ -76,6 +76,11 @@ class speech():
|
|||||||
return False
|
return False
|
||||||
self._sd.set_language(language)
|
self._sd.set_language(language)
|
||||||
|
|
||||||
|
def setVolume(self, volume):
|
||||||
|
if not self._isInitialized:
|
||||||
|
return False
|
||||||
|
self._sd.set_volume(volume)
|
||||||
|
|
||||||
def shutdown(self):
|
def shutdown(self):
|
||||||
if not self._isInitialized:
|
if not self._isInitialized:
|
||||||
return False
|
return False
|
||||||
|
Loading…
Reference in New Issue
Block a user