Engineering · Guide
Why we run speech recognition and Stockfish on your device
We listen to your answers and run Stockfish on your own device. Why we built it that way, and what it means for speed, privacy and our free plan.
4 min read
ChessTrainer.ai asks you to say squares and moves out loud, and it plays you with Stockfish. Both of those sound like server work: a speech service to transcribe your voice, an engine to search positions. We run both on your own device instead, inside the browser. This page explains why, and what it means for you.
The short version:
| Part | Where it runs |
|---|---|
| Listening to your answers | On your device, with open-source speech recognition built for chess answers. Where that is not available, your browser's own speech recognition. |
| The chess engine | Stockfish, on your device |
| Lessons, drills and puzzles | Shipped with the site, so browsing them needs no server |
| Our server | Saves your results, streaks and account. That is about all it does. |
Why on your device: so the free plan can stay free
We are a team of three, and our free plan has no time limit. That only works if a free player costs us close to nothing, so we set one rule before building any feature: the work happens on your device, not on ours. A hosted speech service bills for every second of audio, and a chess drill is people saying short answers many times a minute. A hosted engine needs a computer thinking whenever anyone is. Your phone or laptop can do both, so that is where they run.
Why voice was the hard part
Most speech recognition is built for sentences, not for "e four". Chess answers are short, several squares sound alike, and a drill moves fast, so a recogniser that is slightly slow or slightly unsure gets it wrong in a way you notice at once.
We started with the speech recognition built into browsers. On a laptop it was fine. On many Android phones it was too slow for a timed drill, it misheard some squares often, and Chrome plays a short chime every time it starts listening again, which in a drill is every answer.
So we built a listening setup made for chess answers that runs on the device. It is much faster and much more accurate for squares and moves, it works the same on Android, and nothing you say has to travel to a speech service to be understood. It took a lot of testing with real voices and real phones to get there, and we keep improving it.
What it means for you
- Fast answers. The drill hears you and checks the answer in well under a second on a typical phone.
- A one-time download. The first time you use voice, the browser downloads the speech files once (tens of megabytes) and keeps them. After that, starting a drill downloads nothing. On a slow or data-saving connection we skip that download and use the browser's own recognition instead.
- Tapping always works. Every drill can be answered by tapping, so voice is never required.
- Stockfish without waiting. Voice games and endgames run Stockfish on your device, at levels from about 800 to about 2400. Your moves never go to our server during a game.
Your audio, plainly
When the on-device recognition is listening, your voice is understood on your device. When your browser's own speech recognition is used instead, the browser sends the audio to its maker to be transcribed: Chrome to Google, Edge to Microsoft, Safari to Apple. Separately, to improve recognition, we keep about two seconds of audio for some answers, without your name, email or account, for up to 90 days. The privacy policy has the details.
Questions people ask
- Does ChessTrainer.ai send my voice to a server to be recognised?
- With the on-device recognition, no: your voice is understood on your device. When your browser's own speech recognition is used instead, Chrome sends the audio to Google's speech service, Edge to Microsoft's and Safari to Apple's. Separately, we keep about two seconds of audio for some answers, without name, email or account ID, for up to 90 days, to improve recognition.
- Do I have to use voice?
- No. Every drill can be answered by tapping, and voice games can be played by tapping moves too.
- Why is the first voice drill slower to start?
- The first time, your browser downloads the speech files once and keeps them. After that, voice starts straight away. On a slow or data-saving connection we skip the download and use the browser’s own recognition.