fix voice
This commit is contained in:
parent
5da4ed3749
commit
4d33759404
@ -47,8 +47,6 @@ class speechDriver():
|
|||||||
def setVoice(self, voice):
|
def setVoice(self, voice):
|
||||||
if not self._isInitialized:
|
if not self._isInitialized:
|
||||||
return
|
return
|
||||||
if not isinstance(voice, float):
|
|
||||||
return
|
|
||||||
if voice == '':
|
if voice == '':
|
||||||
return
|
return
|
||||||
self.voice = voice
|
self.voice = voice
|
||||||
|
@ -46,8 +46,9 @@ 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.voice != '':
|
if self.voice:
|
||||||
self._sd.set_voice(self.voice)
|
if self.voice != '':
|
||||||
|
self._sd.set_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)
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user