Ir al contenido

Offline Wake Words from Training to Deployment

Esta página aún no está disponible en tu idioma.

Offline Wake Words from Training to Deployment

“Hearing a wake word without the internet” is a must for privacy-sensitive and weak-network settings. On AI-extended chips like the ESP32-S3 you can run keyword spotting locally: train a custom wake word, quantise it into a small model, deploy it for always-on listening, and trigger the follow-up on a hit. This section covers the whole chain — train a wake word, quantise, deploy, then trade off always-on power against false accepts. By the end you will be able to:

  • Train a custom wake word (keyword-spotting model) with existing toolchains
  • Quantise and deploy the model to ESP32 for resident listening
  • Trade off accept rate, false accepts, latency, and power
  • Design the post-hit action and fallback (local commands versus triggering online recognition)
  • Completed Chapter 25 Section 13 (actuators) and the display/audio basics
  • A mic-equipped ESP32-S3 kit (analogue/digital mic, suitable gain)
  • Wake-word recordings ready (multiple speakers, multiple noise conditions)
  1. Capture: microphone → I2S → windowed features (MFCC/mel-spectrogram), with gain and denoise in the front end
  2. Train: use a toolchain (open-source KWS projects or a “micro wake word”-style repo) to train the custom word, covering speakers and environments
  3. Quantise and deploy: int8 quantise plus convert to an on-device format, budgeting Flash/PSRAM and compute
  4. Always-on run: low-power listening that triggers the follow-up when the word is hit
  • Few samples overfit easily: a custom word needs enough speakers/distances/noise samples or it fails when the room changes
  • Keep the vocabulary small: the device carries only your few words/commands; do not expect open vocabulary
  • Negative samples matter: include non-wake speech and noise to suppress false accepts
Metric To raise it Cost
Accept rate More sensitive/longer window More false accepts
False accepts (lower) Stricter threshold/more negatives Lower accept rate
Response latency Short window/bigger model More power/compute
Always-on power Small model/tiered listening Lower sensitivity

Engineering answer: tiered detection — a cheap low-power coarse check wakes first, then hands to the full KWS for confirmation.

  • Local commands: follow the wake word with a few fixed commands (on/off, level) all executed offline — best for privacy
  • Trigger recognition: after wake, start a larger model or online ASR for free speech (see the next section on 16 MB offline transcription)
  • Fail gracefully: on repeated false accepts or unclear speech, give feedback and a cooldown

[Photos pending] Training-flow screenshots, measured accept/false-accept statistics (across distance/noise/speaker), and always-on power measurement are needed.

Check Expected result Verified
Custom word trainable Accept rate meets target on a held-out set
False accepts controlled Long always-on runs stay acceptable
Works across environments Still effective for different speakers/distances/noise
Always-on power in budget Listening-state current within the battery budget
Post-hit action correct Wake triggers the intended command/flow

Issue 1: wakes fine in the lab, fails in another room

Section titled “Issue 1: wakes fine in the lab, fails in another room”

Cause: training environments too narrow, overfitting.

Action: add noise/distance/reverb samples and retrain; add front-end denoise and AGC gain.

Issue 2: it self-starts when nobody speaks

Section titled “Issue 2: it self-starts when nobody speaks”

Cause: threshold too loose / too few negatives.

Action: add negatives, raise the threshold, use tiered detection to cut always-on false reports.

  • Do: pick a short, clearly-syllabled wake word unlike everyday speech to reduce false accepts
  • Do: cover speakers/environments in training and treat negatives as first-class data
  • Do: use tiered listening to balance power and sensitivity
  • Don’t: expect open vocabulary; carry only the needed commands
  • Don’t: ignore always-on power and drain the battery

Key points of this section:

  1. KWS four steps: capture, train, quantise-deploy, always-on — front-end features and gain are critical
  2. Data decides success: speaker/environment coverage plus negatives, avoid overfitting
  3. Accept/false-accept/latency/power pull against each other, tiered detection reconciles them
  4. After wake, run local commands or trigger larger recognition — privacy versus capability by scenario

Building a commercial IoT product?

We provide ESP32 ODM design-to-manufacturing services. From prototype to production — the team behind this tutorial can build it with you.

💡 Mention tutorial.imagrove.com in your Alibaba chat with us — get 10% off your custom project quote.

Talk to us →

Publicado por primera vez entutorial.imagrove.com/es/project-industrial-broadcast/15-offline-wake-words-from-training-to-deployment/Al citar o reproducir, indica la fuente Imagrove y enlaza a esta página.

¿Dudas o problemas con este tutorial?

Inicia sesión con GitHub para comentar. Si un paso te falla, avísanos: lo verificamos y actualizamos el tutorial.