Normalize wind speed units for German TTS

This commit is contained in:
Mikei386
2026-08-23 13:58:04 +02:00
parent c60031c957
commit 06e1a7029a
2 changed files with 17 additions and 0 deletions
@@ -99,6 +99,17 @@ class LanguageSegmentationTests(unittest.TestCase):
self.assertIn("example Punkt O R G", spoken)
self.assertNotIn("https", spoken)
def test_wind_speed_is_spoken_as_a_unit(self):
for text in (
"Böen bis etwa 29 km/h.",
"Böen bis etwa 29 KM / H.",
"Wind mit 29 kmh.",
):
with self.subTest(text=text):
spoken = gateway.clean_for_speech(text)
self.assertIn("29 Kilometer pro Stunde", spoken)
self.assertNotIn("km", spoken.lower())
class FallbackTests(unittest.TestCase):
def setUp(self):