Update speechdDriver.py

This commit is contained in:
chrys 2019-02-22 16:35:16 +01:00 committed by GitHub
parent 2f7b55f3b8
commit 67c99c0dfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,15 +49,12 @@ class driver(speechDriver):
self.env['runtime']['debug'].writeDebugOut('speechDriver setModule:' + str(e),debug.debugLevel.ERROR) self.env['runtime']['debug'].writeDebugOut('speechDriver setModule:' + str(e),debug.debugLevel.ERROR)
try: try:
if self.language != '': self._sd.set_language(self.language)
self._sd.set_language(self.language)
except Exception as e: except Exception as e:
self.env['runtime']['debug'].writeDebugOut('speechDriver set_language:' + str(e),debug.debugLevel.ERROR) self.env['runtime']['debug'].writeDebugOut('speechDriver set_language:' + str(e),debug.debugLevel.ERROR)
try: try:
if self.voice: self._sd.set_synthesis_voice(self.voice)
if self.voice != '':
self._sd.set_synthesis_voice(self.voice)
except Exception as e: except Exception as e:
self.env['runtime']['debug'].writeDebugOut('speechDriver setVoice:' + str(e),debug.debugLevel.ERROR) self.env['runtime']['debug'].writeDebugOut('speechDriver setVoice:' + str(e),debug.debugLevel.ERROR)