Train an ONNX Keyword Spotting Model Online in 2026

August 2026 · Keyword spotting · Multi-command ONNX

Keyword spotting (KWS) detects a small, predefined command set directly from audio. If an app only needs “start,” “stop,” “next,” or a few device actions, a compact offline model can be simpler than continuous speech-to-text.

Wake word vs KWS: a wake word usually activates another system. A multi-keyword model can map several phrases directly to application actions.

Why train one multi-keyword model?

Running a separate model for every command repeats feature extraction and complicates threshold management. A shared multi-keyword model processes the audio once and returns the scores for the configured command set. It is useful for smart-home controls, accessibility tools, kiosks, games, robots, industrial panels, and hands-free application shortcuts.

Example command set

start recording
stop recording
next page
previous page
cancel

Choose phrases that are acoustically distinct from one another. Avoid putting a short word and a longer phrase containing the same word into the same set unless you have tested their separation carefully.

Online training steps

  1. Sign in to Voicute and select the target language.
  2. Choose the multi-keyword model type.
  3. Add two or more commands and confirm their spelling and pronunciation.
  4. Optionally add real recordings for commands with unusual pronunciation.
  5. Submit the task and wait for generation, augmentation, training, and export.
  6. Test each command plus ordinary speech before downloading the model package.

Use the result in an application

The runtime callback returns the detected label, so the application can use a small command map:

ACTIONS = {
    "start recording": start_recording,
    "stop recording": stop_recording,
    "next page": next_page,
    "previous page": previous_page,
    "cancel": cancel_action,
}

def on_detected(word, probability, info):
    action = ACTIONS.get(word)
    if action:
        action()

Inference runs locally through ONNX Runtime on desktop and mobile targets, ONNX Runtime Web in a browser, or a compatible embedded runtime. No speech transcript is generated, and live audio does not need to leave the device.

KWS or ASR?

RequirementBetter starting point
A few fixed commandsKeyword spotting
Always-listening activation phraseSingle wake-word model
Free-form dictation or conversationASR
Wake first, then understand a requestWake word followed by ASR

Validate the command set

Test every command with unseen speakers and the final microphone. Also play ordinary speech and phrases that sound similar to the commands. Tune the threshold against both missed commands and unintended activations; optimizing only recall is not enough for a control interface.

Privacy boundary: model generation is online, but the downloaded ONNX/TFLite model performs runtime detection locally. The training service is not required for every inference.
Train an ONNX KWS model