How to Detect Wake Words on the Web

2026-02-07

In one of my projects, I was asked to implement a feature that detects a wake word.

When I looked into it, I found plenty of information about native solutions, but for the web it seemed… pretty tough.

After bouncing ideas around with ChatGPT and Claude Code, I ended up creating an npm package that sort of does the job.

use-ear


The implementation itself is very simple.

It just uses the Web Speech API and performs keyword matching.

There are some constraints—like keeping the page open, or continuously playing audio—but in practice, it doesn’t feel too restrictive for real-world use.

The real issue is the browser support for the Web Speech API.

Surprisingly, Firefox does not support it at all.


Because of that, the package doesn’t achieve full cross-browser support.

That said, it should work fine in most modern environments.

If you really need full support including Firefox, you’ll probably have to combine this approach with a real-time speech-to-text service such as AmiVoice.


That’s about it.

It’s completely free to use, so feel free to give it a try.