Your first wake word.

Use the WebAssembly runtime and model bundled with this website.

The browser SDK, the en-1 model and a keyword file are served from /wake/ on this website, so the example below runs as written on this origin.

Load, listen, release.

wake.js
import { Wake } from '/wake/index.mjs'; // 1. One model, and your phrases: a keyword file from the generator//    (its URL, the parsed file, or phrases written in code).const wake = await Wake.create({  model: '/wake/model.pwake',  keywords: '/wake/keywords.json',  sensitivity: 0.5, // 0 = fewest false alarms, 1 = most responsive}); // 2. Push 16 kHz mono Int16 PCM, up to 4096 samples at a time.export async function onAudio(pcm) {  for (const event of await wake.process(pcm)) {    console.log('Wake word:', event.keyword, event.timeSeconds);  }} // 3. Release the worker when you are done.export const close = () => wake.close();

The engine runs in a Web Worker; process resolves after the worker has scored the audio. For the microphone, WakeManager from /wake/capture.mjs captures 16 kHz audio and calls you on each detection. No audio is processed on a server.

Try a complete example

Open the standalone wake example. It uses the same SDK and model as the lab on the home page, with an intentionally small interface you can inspect in your browser.

Choose your phrases

A keyword file holds each phrase’s pronunciations and calibrated thresholds. Make one in the lab or the generator: both run the threshold generator in your browser and download keywords.json. Pass its URL, the parsed file, or the phrases themselves as keywords. The model is fixed; a new phrase never retrains anything.

Keep the boundaries explicit

  • Request microphone permission after a deliberate user action.
  • Give the engine 16 kHz mono signed 16-bit PCM.
  • Close the manager (or the Wake) when finished: tracks stop, the audio context closes and the worker ends.

Source and verification

/wake/ serves the Phonlet Wake browser SDK 0.1.0 (frontend 3f047efa, scalar and SIMD WebAssembly) and the en-1 model, SHA-256 8be3687d060f953d0069480cf53d1fd0aa66e04551c2a4b600823a992a864af8. The keyword file names that hash, and the SDK refuses it with any other model.