The fix for hopefully not reading all spaces broke review by character. Hopefully fix that.
This commit is contained in:
@ -22,7 +22,7 @@ class driver(speechDriver):
|
||||
self._isInitialized = False
|
||||
print('Speech Debug Driver: Shutdown')
|
||||
|
||||
def speak(self,text, queueable=True):
|
||||
def speak(self,text, queueable=True, ignorePunctuation=False):
|
||||
if not self._isInitialized:
|
||||
return
|
||||
if not queueable:
|
||||
|
@ -52,7 +52,7 @@ class driver(speechDriver):
|
||||
self.cancel()
|
||||
self.textQueue.put(-1)
|
||||
|
||||
def speak(self,text, queueable=True):
|
||||
def speak(self,text, queueable=True, ignorePunctuation=False):
|
||||
if not self._isInitialized:
|
||||
return
|
||||
if not queueable:
|
||||
|
@ -37,7 +37,7 @@ class driver(speechDriver):
|
||||
pass
|
||||
self._isInitialized = False
|
||||
|
||||
def speak(self,text, queueable=True):
|
||||
def speak(self,text, queueable=True, ignorePunctuation=False):
|
||||
if not queueable:
|
||||
self.cancel()
|
||||
if not self._isInitialized:
|
||||
@ -66,7 +66,10 @@ class driver(speechDriver):
|
||||
self.env['runtime']['debug'].writeDebugOut('speechDriver setVoice:' + str(e),debug.debugLevel.ERROR)
|
||||
|
||||
try:
|
||||
self._sd.set_punctuation(self._punct.NONE)
|
||||
if ignorePunctuation:
|
||||
self._sd.set_punctuation(self._punct.ALL)
|
||||
else:
|
||||
self._sd.set_punctuation(self._punct.NONE)
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('speechDriver set_punctuation:' + str(e),debug.debugLevel.ERROR)
|
||||
|
||||
|
Reference in New Issue
Block a user