fixed "Dr." interruption (#245)

This commit is contained in:
chadbailey59
2024-06-19 20:53:04 -05:00
committed by GitHub
parent 55a9de78cd
commit ba878a19f4

View File

@@ -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 = ""