Voice-to-token normalization
The Problem
Natural speech has infinite phrasings for the same intent (turn on the fan vs fan on please).
How I Solved It
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


