diff --git a/src/calibre/gui2/tts/linux.py b/src/calibre/gui2/tts/linux.py index 057fd303ee..2103515ed1 100644 --- a/src/calibre/gui2/tts/linux.py +++ b/src/calibre/gui2/tts/linux.py @@ -10,6 +10,11 @@ from .common import Event, EventType from .errors import TTSSystemUnavailable +def wrap_in_ssml(text): + return ('\n' + + text + '') + + class Client: mark_template = '' @@ -139,7 +144,7 @@ class Client: self.current_callback = cw self.ensure_state(use_ssml=True) - self.ssip_client.speak(text, callback=self.current_callback) + self.ssip_client.speak(wrap_in_ssml(text), callback=self.current_callback) def pause(self): if self.status['synthesizing'] and not self.status['paused']: @@ -160,7 +165,7 @@ class Client: else: text = self.current_marked_text[idx:] self.ensure_state(use_ssml=True) - self.ssip_client.speak(text, callback=self.current_callback) + self.ssip_client.speak(wrap_in_ssml(text), callback=self.current_callback) def stop(self): self.current_callback = self.current_marked_text = self.last_mark = None