The fix for hopefully not reading all spaces broke review by character. Hopefully fix that.

This commit is contained in:
Storm Dragon
2025-06-09 12:48:02 -04:00
parent e2fb28d92f
commit d935ef2e3c
6 changed files with 13 additions and 9 deletions

View File

@ -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:

View File

@ -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:

View File

@ -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)