From 4d337594044f38ecf4445e5d5c17ee09075a670b Mon Sep 17 00:00:00 2001 From: chrys Date: Sat, 11 Nov 2017 01:07:48 +0100 Subject: [PATCH] fix voice --- src/fenrir/core/speechDriver.py | 2 -- src/fenrir/speechDriver/speechdDriver.py | 5 +++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/fenrir/core/speechDriver.py b/src/fenrir/core/speechDriver.py index 36c9facb..539412f3 100644 --- a/src/fenrir/core/speechDriver.py +++ b/src/fenrir/core/speechDriver.py @@ -47,8 +47,6 @@ class speechDriver(): def setVoice(self, voice): if not self._isInitialized: return - if not isinstance(voice, float): - return if voice == '': return self.voice = voice diff --git a/src/fenrir/speechDriver/speechdDriver.py b/src/fenrir/speechDriver/speechdDriver.py index 90014597..99293a8f 100644 --- a/src/fenrir/speechDriver/speechdDriver.py +++ b/src/fenrir/speechDriver/speechdDriver.py @@ -46,8 +46,9 @@ class driver(speechDriver): self.env['runtime']['debug'].writeDebugOut('speechDriver setModule:' + str(e),debug.debugLevel.ERROR) try: - if self.voice != '': - self._sd.set_voice(self.voice) + if self.voice: + if self.voice != '': + self._sd.set_voice(self.voice) except Exception as e: self.env['runtime']['debug'].writeDebugOut('speechDriver setVoice:' + str(e),debug.debugLevel.ERROR) try: