duckmind name detector: 「蛋黃」 (dan4 huang2), KWS v4 — did NOT pass its acceptance
繁中摘要: 這是 duckmind 小鴨「聽自己的名字」的本機關鍵字偵測模型(名字「蛋黃」)。 它沒有通過自己的驗收:10 dB 噪音下偵測率 75.0%(要求 ≥ 95%)、5 dB 下 65.1%(要求 ≥ 90%)。 誤報、易混詞、大小、延遲這幾項有過。所以 duckmind 本身沒有把它接進模擬器,耳朵預設關閉。 訓練用的正例全部是合成語音(Qwen3-TTS 設計聲音,和用 Common Voice 說話者當參考複製的聲音); 沒有任何真實家人的錄音。只在研究或自己再訓練時當起點使用;不要拿來當安全或門禁用途。
A small causal, streaming keyword spotter that fires when someone says one name — 「蛋黃」 — in Mandarin (Taiwan and mainland accents). It is the "ear" for the name of the demo duck in duckmind, an unofficial cognition stack for Microduck-style robots. Not affiliated with Pollen Robotics.
Status: acceptance NOT passed
The frozen acceptance for this model was set before training. It missed the detection targets by about 20 percentage points, so duckmind does not wire it into the simulator, and the name ear is off by default. It is published so that others can reproduce, compare and improve, not because it is good enough.
| Gate (frozen before training) | Required | Measured | Pass |
|---|---|---|---|
| True accept at 10 dB SNR | ≥ 95% | 75.0% | no |
| True accept at 5 dB SNR | ≥ 90% | 65.1% | no |
| False accepts on held-out real speech | ≤ 1 per 24 h | 4 in 130.45 h = 0.74 per 24 h (Poisson 95% upper bound ≈ 1.7) | yes (point estimate) |
| Confusable words 蛋糕 / 但是 / 黃色 / 蛋 / 旦 (clean and 10 dB) | each ≤ 5% | worst 1.8% (旦, clean) | yes |
| Size | ≤ 250 k parameters or ≤ 1 MB int8 | 635,937 parameters; int8 0.72 MB | yes (int8 clause) |
| Latency, end of name → trigger | ≤ 300 ms | p50 −15 ms, p95 175 ms, max 295 ms | yes (at the limit) |
| Streaming (chunked with cache) | equal to whole-clip | ONNX vs PyTorch max diff 9.5e-6 | yes |
The operating point is threshold 0.9677 with 12-frame smoothing, chosen only on a separate 42.2 h dev set (at most 1 false accept allowed there). More of the trade-off, on the same test data (for information; not used to pick the threshold):
| Threshold | True accept 10 dB | True accept 5 dB | Real-speech false accepts per 24 h |
|---|---|---|---|
| 0.50 | 95.9% | 92.8% | 27.6 |
| 0.80 | 90.8% | 84.4% | 4.97 |
| 0.90 | 85.4% | 78.3% | 2.21 |
| 0.95 | 79.5% | 70.7% | 1.10 |
| 0.98 | 69.0% | 59.1% | 0.55 |
Full numbers: evaluation/gate.json (by noise type, distance, phrase and
source) and the evaluation block of name_kws.json.
Where it is weak
- The name followed straight away by more words: 「蛋黃過來」 65% and 「蛋黃你好」 67% at 10 dB, against 89% for 「好乖蛋黃」 and 78% for 「蛋黃」 alone.
- TV speech in the background: 71% at 10 dB, 56% at 5 dB.
- All positive examples are synthetic. No real person saying 「蛋黃」 was recorded or used. Real children's voices are not represented in the cloned voices (adults only).
- In an informal spot check on 13 fixed lines synthesised locally (a different TTS engine, used for evaluation only, never for training), 「蛋黃,過來這裡。」 was missed.
What it does
- Input: 16 kHz mono audio, as 40-band log-mel frames (25 ms window, 10 ms hop, 20–7600 Hz),
streamed; the model keeps a cache of shape
[1, 224, 180]between chunks. - Output: one logit per frame for "the name was just heard". The decision rule (threshold,
smoothing, refractory 1.5 s) is in
name_kws.json. - Runtime:
duckmind.namekws.detector.NameDetectorreadsname_kws.onnxand its sidecarname_kws.json(sidecar format 2) and runs on ONNX Runtime, CPU only.
from pathlib import Path
import numpy as np
from duckmind.namekws.detector import NameDetector
ear = NameDetector(Path("name_kws.onnx")) # name_kws.json must sit next to it
times = ear.push(pcm_float32_16k) # seconds at which the name was heard
Cost (one CPU core, ONNX Runtime 1 thread, per 20 ms of audio): fp32 0.38 ms on an Apple-silicon Mac, 0.37 ms on an Arm server core. int8 dynamic quantisation was slower on Arm and agreed with fp32 on 294 of 300 positives, so only fp32 is published. A Raspberry Pi Zero 2 W was not measured; a rough estimate is about half of one core.
Architecture
NameTCN: a causal temporal convolutional network — 12 depthwise-separable 1-D convolution
blocks (3 stacks × 4 layers, kernel 5, dilation 1–8), hidden width 224, receptive field 181 frames
(1.8 s); 635,937 parameters; fp32 ONNX 2.55 MB.
Training
Trained off-board on one GPU, in rounds with hard-negative mining (3 s windows; the max logit
before the name must stay low, the max logit from 250 ms after the name must be high). An
auxiliary pinyin initial/final + tone CTC head (on 167,753 real transcribed utterances) was used
during training only and dropped at export; it roughly doubled detection at equal false-accept
rate. Augmentation: simulated rooms (image-source method; microphone 15–30 cm above the floor,
talker 0.4–1.7 m high) plus real room impulse responses, background talkers, noise and music at
−1…28 dB SNR, gain −40…−3 dBFS, speed 0.85–1.18, SpecAugment; bf16. This checkpoint is
m3, round 4 (initialised from the previous m2b round 5); the full argument list is in the
provenance block of name_kws.json.
Code. The runtime detector and an earlier recipe (duckmind.namekws.synth/train,
notebooks/name_kws_colab.sh) are in the duckmind repository. The v4 data pipeline and trainer
that produced this checkpoint are not published yet, so this exact training run cannot be
reproduced from public code today.
Data and licences
| Data | Used for | Licence |
|---|---|---|
| Synthetic positives and confusable negatives from Qwen3-TTS 12Hz 1.7B VoiceDesign (about 40% child-like voices aged 3–9, teens to grandparents, several Taiwanese and mainland accents, from written voice descriptions) | train, dev, test (speakers disjoint) | Apache-2.0 (model) |
| Voice clones made with Qwen3-TTS 12Hz 1.7B Base from Common Voice zh-TW speakers as reference audio: 400 + part of 511 speakers for training, 160 different speakers for testing | train, test | Apache-2.0 (model); references CC0-1.0 |
| Common Voice zh-TW (Mozilla) | real-speech negatives (train 65 h, dev, held-out test 47.1 h), CTC transcripts, clone references | CC0-1.0 |
| AISHELL-1 (OpenSLR 33) | real-speech negatives (train 151 h, test 10.0 h), CTC transcripts | Apache-2.0 |
| YODAS2 Chinese (ESPnet) | real-speech negatives (train 51 h, dev, test 60.6 h) | CC BY 3.0 |
| AISHELL-4 far-field meetings (OpenSLR 111) | held-out evaluation only (12.7 h of false-accept testing) | CC BY-SA 4.0 |
| MUSAN noise and music (OpenSLR 17) | augmentation (file-level train/dev/test split) | CC BY 4.0 |
| DEMAND (Zenodo 1227121) | augmentation (the DKITCHEN environment held out for test) | CC BY 4.0 |
| RIRS_NOISES (OpenSLR 28) | real room impulse responses (train) | Apache-2.0 |
| Breeze-ASR-25 (MediaTek Research) | filtering mispronounced synthetic positives (test set: 4,320 of 5,319 kept) | Apache-2.0 |
Every sentence containing 蛋黃/蛋黄 was removed from the real-speech data. No audio of the author's family or of any real person saying the name was used, and no audio left the training machines. None of the audio is redistributed here.
Attribution (CC BY): YODAS2 by the ESPnet project (Li et al., 2023); MUSAN by Snyder, Chen and Povey (2015); DEMAND by Thiemann, Ito and Vincent (2013). AISHELL-4 by Fu et al. (2021), used unchanged and for evaluation only.
Why the model is Apache-2.0 (licence reasoning)
- AISHELL-4 (CC BY-SA 4.0) was used only to count false accepts on held-out audio. It was
not in the training, dev or threshold-selection data (the training arguments in
name_kws.jsonlist the negative, dev and CTC sets; none includes AISHELL-4). The weights are therefore not adapted from AISHELL-4, and its share-alike condition does not reach them. No AISHELL-4 audio is shared here. - CC BY data (YODAS2, MUSAN, DEMAND) asks for attribution, given above; it does not restrict the licence of a model trained with it.
- Everything else is CC0-1.0 or Apache-2.0, and the synthetic audio comes from Apache-2.0 models.
Intended use
- Research on small on-device keyword spotting for a pet robot's name; a starting point for retraining on a different name or with real recordings (with consent).
- Not for: security, access control, surveillance, identifying speakers, safety-critical stop commands, or any use where a missed or false trigger causes harm. It only says "the name was probably heard"; it does not know who spoke.
Limitations
- Below its own acceptance targets (see above). Expect about 1 in 4 calls missed at 10 dB.
- One fixed name; a different name needs retraining.
- Synthetic positives only; adult-only clones; children's real voices are missing.
- Measured in simulation-style mixtures (simulated rooms at 1, 2 and 3 m), not with a real robot microphone, motor noise or a real home.
Ethics
- Voice cloning was used only to make training and test utterances of the name from Common Voice speakers, whose recordings are released under CC0. The cloned audio is not published, and this detector cannot generate speech or reproduce anyone's voice. Common Voice asks users not to try to identify its speakers; nothing here does.
- The detector runs locally and is meant to keep audio on the device. In duckmind it is off by default.
Files
| File | sha256 |
|---|---|
name_kws.onnx | 3a033ed54a83fa41a1798def02dc76291e4b76af58e5111c9a0000a88672a7e2 |
name_kws.json | see SHA256SUMS |
evaluation/gate.json | see SHA256SUMS |
Citation
@misc{duckmind-name-kws-2026,
author = {joseyarashio},
title = {duckmind name detector (KWS v4)},
year = {2026},
url = {https://huggingface.co/joseyarashio/duckmind-name-kws-danhuang}
}