Why a filter at all?
Raw speech‑to‑text is noisy. “Night f3”, “rookie a1”, “castle king side please” — you get the idea. Our filter fixes chess‑specific errors, rejects TTS echoes, and only passes commands that look legal.
The layers (in order)
1. Strip the fluff. Ignore filler like “move”, “please”, “to”. Keep the chess bits.
2. Fix chess words. Night→knight, rookie→rook, in passant→en passant, long/short castle→queenside/kingside.
3. Game commands first. “new game”, “repeat last move”, “show board”, “hide board”. These do not move pieces.
4. Pattern checks. UCI like “e2e4” or “e7e8q” maps straight to moves. Verbal patterns like “knight f3”, “bishop takes f7”, “castle king side” become canonical.
5. Ambiguity guard. If two pieces can go to the same square, we listen for disambiguation (“queen rook a1”). If it’s unclear, we ignore the command instead of guessing.
6. TTS loop protection. We never treat our own spoken feedback as input (“you played”, “engine played”).
What this is not
- Not a chess engine explainer. We don’t pretend to analyze your position via voice (though we might build that in the future.)
- Not a universal speech model. We aim at one thing: making legal chess moves from natural speech.
What’s next
- We want to better handle edge pronunciations/accents in upcoming releases. Eventually support different languages as well.
- In some instances where there is file and rank disambiguation, the web speech API is not as smooth in picking up commands. We’ll add optional prompts to clarify when a command is close but ambiguous.