From ba878a19f42a769c367ed23b09dd8fb3af05f866 Mon Sep 17 00:00:00 2001 From: chadbailey59 Date: Wed, 19 Jun 2024 20:53:04 -0500 Subject: [PATCH] fixed "Dr." interruption (#245) --- src/pipecat/services/ai_services.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pipecat/services/ai_services.py b/src/pipecat/services/ai_services.py index adcb8fceb..7cade2339 100644 --- a/src/pipecat/services/ai_services.py +++ b/src/pipecat/services/ai_services.py @@ -110,7 +110,9 @@ class TTSService(AIService): text = frame.text else: self._current_sentence += frame.text - if self._current_sentence.strip().endswith((".", "?", "!")): + if self._current_sentence.strip().endswith( + (".", "?", "!")) and not self._current_sentence.strip().endswith( + ("Mr,", "Mrs.", "Ms.", "Dr.")): text = self._current_sentence.strip() self._current_sentence = ""