add volume
This commit is contained in:
@ -19,6 +19,7 @@ class outputManager():
|
||||
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'].setModule(environment['runtime']['settingsManager'].getSetting(environment, 'speech', 'module'))
|
||||
environment['runtime']['speechDriver'].setVolume(environment['runtime']['settingsManager'].getSettingAsInt(environment, 'speech', 'volume'))
|
||||
|
||||
environment['runtime']['speechDriver'].speak(Text)
|
||||
|
||||
|
@ -15,6 +15,8 @@ settings = {
|
||||
'pitch': 1,
|
||||
'module': '',
|
||||
'voice': 'de',
|
||||
'language': 'de',
|
||||
'volume': 100
|
||||
},
|
||||
'braille':{
|
||||
'enabled': False,
|
||||
|
@ -59,5 +59,10 @@ class speech():
|
||||
return False
|
||||
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):
|
||||
pass
|
||||
|
@ -76,6 +76,11 @@ class speech():
|
||||
return False
|
||||
self._sd.set_language(language)
|
||||
|
||||
def setVolume(self, volume):
|
||||
if not self._isInitialized:
|
||||
return False
|
||||
self._sd.set_volume(volume)
|
||||
|
||||
def shutdown(self):
|
||||
if not self._isInitialized:
|
||||
return False
|
||||
|
Reference in New Issue
Block a user