From b54924a2dc3946aa6ccd42994d4d71b895c6135a Mon Sep 17 00:00:00 2001 From: will wade Date: Fri, 25 Oct 2024 23:03:33 +0100 Subject: [PATCH] fixing commas and puctuation breaking reading --- pyttsx3/drivers/espeak.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyttsx3/drivers/espeak.py b/pyttsx3/drivers/espeak.py index 256479c..5700284 100644 --- a/pyttsx3/drivers/espeak.py +++ b/pyttsx3/drivers/espeak.py @@ -28,7 +28,7 @@ def __init__(self, proxy): # espeak cannot initialize more than once per process and has # issues when terminating from python (assert error on close) # so just keep it alive and init once - rate = _espeak.Initialize(_espeak.AUDIO_OUTPUT_RETRIEVAL, 1000) + rate = _espeak.Initialize(_espeak.AUDIO_OUTPUT_SYNCH_PLAYBACK, 1000) if rate == -1: raise RuntimeError("could not initialize espeak") EspeakDriver._defaultVoice = "default" @@ -134,7 +134,7 @@ def save_to_file(self, text, filename): self._text_to_say = text code = self.numerise(filename) _espeak.Synth( - toUtf8(text), flags=_espeak.ENDPAUSE | _espeak.CHARS_UTF8, user_data=code + toUtf8(text), flags=_espeak.ENDPAUSE | _espeak.CHARS_AUTO, user_data=code ) def _start_synthesis(self, text):