Normalize question marks before local TTS
This commit is contained in:
@@ -120,6 +120,11 @@ class LanguageSegmentationTests(unittest.TestCase):
|
||||
)
|
||||
self.assertNotRegex(spoken, r"[:;\-‐‑‒–—−]")
|
||||
|
||||
def test_question_and_exclamation_marks_are_not_sent_to_xtts(self):
|
||||
spoken = gateway.clean_for_speech("Wie geht es dir? Wirklich gut!")
|
||||
self.assertEqual(spoken, "Wie geht es dir. Wirklich gut.")
|
||||
self.assertNotRegex(spoken, r"[!?]")
|
||||
|
||||
def test_punctuation_only_segments_are_never_synthesized(self):
|
||||
segments = gateway.prepare_segments("Status: – alles läuft.")
|
||||
self.assertTrue(segments)
|
||||
|
||||
Reference in New Issue
Block a user