Normalize German TTS abbreviations and units

This commit is contained in:
Mikei386
2026-09-05 15:11:57 +02:00
parent 63e7a93ee4
commit cbc312257c
3 changed files with 20 additions and 8 deletions
@@ -122,11 +122,15 @@ class LanguageSegmentationTests(unittest.TestCase):
def test_qwen_speaks_temperature_and_time_ranges_with_bis(self):
spoken = gateway.prepare_for_qwen_speech(
"15°–23 °C, 93 %, ca. 12 mm, vor allem um 05–06 Uhr."
"15°–23 °C, 93 %, ca. 12 mm, v.a. um 05–06 Uhr, "
"Wind max. 16 km/h."
)
self.assertIn("15 bis 23 Grad", spoken)
self.assertIn("93 Prozent", spoken)
self.assertIn("circa 12 mm", spoken)
self.assertIn("vor allem", spoken)
self.assertIn("5 bis 6 Uhr", spoken)
self.assertIn("Wind maximal 16 Kilometer pro Stunde", spoken)
def test_qwen_keeps_prosody_punctuation(self):
spoken = gateway.prepare_for_qwen_speech(