diff --git a/src/calibre/utils/windows/winspeech.py b/src/calibre/utils/windows/winspeech.py
index 05c9353539..cb433b500d 100644
--- a/src/calibre/utils/windows/winspeech.py
+++ b/src/calibre/utils/windows/winspeech.py
@@ -10,6 +10,13 @@ from threading import Thread
from calibre.utils.ipc.simple_worker import start_pipe_worker
+SSML_SAMPLE = '''
+
+
+ We are selling roses and daisies.
+
+
+'''
def decode_msg(line: bytes) -> dict:
parts = line.strip().split(b' ', 2)
@@ -23,7 +30,7 @@ def start_worker():
return start_pipe_worker('from calibre_extensions.winspeech import run_main_loop; raise SystemExit(run_main_loop())')
-def develop_speech(text='Lucca brazzi sleeps with the fishes'):
+def develop_speech(text=SSML_SAMPLE):
p = start_worker()
print('\x1b[32mSpeaking', text, '\x1b[39m]]'[:-2], flush=True)
q = Queue()
@@ -40,17 +47,25 @@ def develop_speech(text='Lucca brazzi sleeps with the fishes'):
p.stdin.flush()
Thread(name='Echo', target=echo_output, args=(p,), daemon=True).start()
+ exit_code = 0
with closing(p.stdin), closing(p.stdout):
+ text = text.replace('\n', ' ')
+ st = 'ssml' if '