Voice-to-token normalization
Le problème
Natural speech has infinite phrasings for the same intent (turn on the fan vs fan on please).
Comment je l'ai résolu
Expanded canonical vocabulary with fuzzy matching and phrase normalization before MQTT publish.
def normalize_command(text: str) -> str | None:
text = text.lower().strip()
for phrase, token in VOCABULARY.items():
if phrase in text:
return token
return None


