DEV Community

milo0914
milo0914

Posted on

How I Built a FPS-Style TOEIC Vocabulary Game with the Web Speech API

How I Built a FPS-Style TOEIC Vocabulary Game with the Web Speech API

Memorizing TOEIC vocabulary from a list never worked for me. I could recognize a word on paper, but I couldn't hear it fast enough in Part 1-4 listening, and I couldn't recall it under time pressure.

So I built Sniper English — a free, game-like TOEIC vocabulary and listening trainer. You play a sniper. Every vocabulary question is a shot.

Try it here: https://sniper-english.ai.studio/

The idea in one sentence

Don't just read the word. Hear it, aim, and shoot the right meaning before the moment passes.

That maps directly to what TOEIC actually tests: vocabulary in business, daily life, office, and travel contexts, plus the speed to recognize it by ear.

The game loop

  1. You hear a word first. Each word is read aloud, so listening comes before reading.
  2. You aim and choose. A first-person scope view, a dynamic crosshair, and a time limit turn a quiz into a mission.
  3. You get immediate feedback. A hit or a miss, points, and a level-up path from recruit upward, with titles and effects to unlock.
  4. You compete. A live leaderboard compares your score with other players.

The loop is deliberately short. The design goal is 10 minutes a day, repeated often — spaced repetition, not a three-hour cram session.

Why the Web Speech API matters

The core technical choice is simple: use the browser's speech synthesis for pronunciation, instead of shipping hundreds of audio files.

function speak(word) {
  const utterance = new SpeechSynthesisUtterance(word);
  utterance.lang = "en-US";
  utterance.rate = 0.9;
  speechSynthesis.cancel();
  speechSynthesis.speak(utterance);
}
Enter fullscreen mode Exit fullscreen mode

That one function does most of the listening-training work:

  • No audio assets to record, store, or serve for every word
  • Every word gets consistent, repeatable pronunciation
  • The player can replay the word and shadow it — listen, then say it quietly along with the audio

The tradeoff is real: voices vary by browser and OS, and speech synthesis is not a human recording. For a free vocabulary trainer, the tradeoff was worth it. The next step is to let players pick a voice and speed, and to add real recorded audio for the highest-frequency words.

What I learned building it

1. Make listening the default, not an option.
If the audio is a small speaker icon players can ignore, they will ignore it. In Sniper English, hearing comes first in the flow, and the written options are the target.

2. Time pressure is a feature, not just difficulty.
TOEIC is a timed test. Practicing without a clock trains recognition, but not recall under pressure. A short timer trains the reflex: hear it, know it, shoot it.

3. Progression beats a score alone.
Points are forgettable. Ranks, titles, and unlocks give a reason to come back tomorrow. That matters more than another 10 words in one sitting.

4. A game site still needs to be findable.
This is the part I'm working on now. The game is a single-page app behind a login screen, which is great for play and terrible for search. The public vocabulary lists, guides, and the free mock test need their own crawlable pages, titles, and internal links — for example:

If you build a game as a SPA, plan the public, indexable surface from the start. Don't bolt it on after launch.

Try it, and tell me what breaks

Sniper English is free — sign in with Google or play as a guest:

https://sniper-english.ai.studio/

I'm especially interested in feedback from developers and TOEIC learners on three things:

  1. Does the speech sound clear enough on your browser / device?
  2. Does the timer help, or does it just add stress?
  3. What would make you come back for day 2 and day 7?

If you have a better way to do pronunciation, spaced repetition, or listening-first vocabulary training, I'd love to hear it in the comments.

Top comments (0)