Task: Add browser-based single-word speech recognition for child responses
Add browser-based single-word speech recognition for child responses
15.09.2026uchitsya-legko.rf
Recognize short spoken answers from a child using the Web Speech API in "What is shown in the picture?" tasks.
Objective
Add a simple child voice response scenario to picture exercises.
Example:
- A picture of a dog is shown on the screen.
- The child presses the microphone button.
- Says: "Dog".
- The browser recognizes what was said.
- The app receives the text and compares it with the expected answer.
Similarly for short answers like "fish", "cat", "house", etc.
Technical Foundation
Use the browser's Web Speech API:
SpeechRecognitionorwebkitSpeechRecognition;recognition.lang = 'ru-RU';- for a single answer,
continuous = false; interimResults = falsecan be used for the simplest initial version;- get the result from
event.results/transcript.
What to Support
- recording start button;
- "listening" visual state;
- stopping after a short answer;
- receiving the final recognized text;
- text normalization before comparison: lowercase, trim, and punctuation removal if necessary;
- comparison with the expected word;
- states: correct / not recognized / microphone access error / API unavailable;
- ability to retry.
Limitations
SpeechRecognition has inconsistent browser support and may use the browser's/platform's external speech-recognition service. This is acceptable for this scenario: the task is not about local phonetic recognition or LLMs, but about a child's short, practical single-word response.
At the first stage, do not attempt to recognize free speech, sentences, or evaluate phoneme pronunciation.