Test it liveทดลองเลย
Pick a wake word, press start, say it into your microphone. Wake-word detection runs entirely in this tab — audio for that step never leaves your machine. เลือก wake word กดเริ่ม แล้วพูดใส่ไมโครโฟน การตรวจจับคำปลุกรันในแท็บนี้ทั้งหมด — เสียงในขั้นตอนนั้นไม่ถูกส่งออกจากเครื่องของคุณ
Say the name, then ครับ or คะ within ~2.5 s. Cuts false wakes during long conversations. พูดชื่อ แล้วตามด้วย ครับ หรือ คะ ภายใน ~2.5 วิ ช่วยลดการปลุกผิดตอนคุยยาว ๆ
Transcriptข้อความที่ถอดได้
Wake detection runs entirely on-device. This dictation step does not: while it runs, your browser sends the audio to its own speech service. Nothing is stored — the text below is gone when you reload. การตรวจจับคำปลุกทำงานในเครื่องคุณทั้งหมด แต่ขั้นตอนถอดเสียงเป็นข้อความไม่ใช่แบบนั้น — ระหว่างที่ทำงาน เบราว์เซอร์จะส่งเสียงไปยังบริการถอดเสียงของเบราว์เซอร์เอง เราไม่ได้เก็บอะไรไว้ ข้อความด้านล่างจะหายไปเมื่อคุณรีโหลดหน้านี้
Live dictation needs the speech recognition built into the browser — Chrome and Edge have it, Firefox and Safari don't. Everything above still works here: wake-word detection is unaffected, only this transcript step is unavailable in this browser. การถอดเสียงสดต้องใช้ระบบรู้จำเสียงที่ติดมากับตัวเบราว์เซอร์ ซึ่งตอนนี้มีใน Chrome และ Edge แต่ Firefox กับ Safari ยังไม่มี ทุกอย่างด้านบนยังใช้ได้ตามปกติ — การตรวจจับคำปลุกไม่ได้รับผลกระทบ ขาดแค่ขั้นตอนถอดข้อความในเบราว์เซอร์นี้เท่านั้น
- nothing yet — say the wake word, then keep talkingยังไม่มี — พูดคำปลุก แล้วพูดต่อได้เลย
Detectionsการตรวจพบ
- none yetยังไม่มี
Wake wordsคำปลุกทั้งหมด
One repo, many wake words. The mel-spectrogram and speech-embedding models are frozen and
shared; each wake word is a single trained head (~0.4 MB). Adding one — อีดี,
jarvis, yours — is a .onnx file plus one entry in
models/manifest.json. No code change.
รีโปเดียว หลาย wake word — โมเดล mel-spectrogram และ speech-embedding ถูก freeze
และใช้ร่วมกัน แต่ละ wake word คือ head ที่เทรนแล้วหนึ่งตัว (~0.4 MB) การเพิ่มคำใหม่ — อีดี,
jarvis, คำของคุณเอง — คือไฟล์ .onnx หนึ่งไฟล์กับหนึ่งรายการใน
models/manifest.json ไม่ต้องแก้โค้ด
| label | statusสถานะ | lang | file | threshold | notes |
|---|
⬇ All models — GitHub Release (.onnx + manifest) โมเดลทั้งหมด — GitHub Release (.onnx + manifest) 🌼 Request a wake word ขอเสนอชื่อ AI ที่อยากได้
Test resultsผลทดสอบ
Measured on held-out TTS speakers the model never trained on
(scripts/eval.mjs, at each model's shipped threshold). TTS numbers, not a
real room — a noisy far-field mic will do worse.
วัดบนเสียง TTS ที่โมเดลไม่เคยเห็นตอนเทรน
(scripts/eval.mjs ที่ค่าเกณฑ์ของแต่ละโมเดล) เป็นตัวเลขจาก TTS ไม่ใช่ห้องจริง —
ไมค์ไกล ๆ ในห้องที่มีเสียงรบกวนจะได้ต่ำกว่านี้
| modelโมเดล | held-out voicesเสียงที่กันไว้ | pos clipsคลิปคำปลุก | recall | neg clipsคลิปลวง | false fires/minปลุกพลาด/นาที |
|---|
Use the libraryใช้งานไลบรารี
npm install wakekit —
the package ships the models too. Copy models/ into your static dir (plus the two
ort-wasm-simd-threaded.* files from onnxruntime-web/dist), or point
base at cdn.jsdelivr.net/npm/wakekit/models/, then:
npm install wakekit —
แพ็กเกจแถมโมเดลมาให้ด้วย คัดลอก models/ ไปไว้ใน static dir ของคุณ (พร้อมไฟล์
ort-wasm-simd-threaded.* สองไฟล์จาก onnxruntime-web/dist) หรือชี้
base ไปที่ cdn.jsdelivr.net/npm/wakekit/models/ แล้ว:
import { WakeKit, listenMic, loadManifest } from 'wakekit';
const models = await loadManifest('/models/');
const kit = await WakeKit.load({
model: models.find((m) => m.id === 'lada'),
base: '/models/', // where the .onnx files are served
onHit: (score) => {
console.log('wake word heard!', score);
// answer with the browser's own voice — no TTS server needed
const u = new SpeechSynthesisUtterance('ค่ะ ว่ามาได้เลยค่ะ');
u.lang = 'th-TH';
speechSynthesis.speak(u);
},
});
const stop = await listenMic(kit); // mic → detector, all local
// ...later: stop(); kit.dispose();
index.html + models/ + prebuilt wakekit.js — no npm, just serve the folder (python3 -m http.server)index.html + models/ + wakekit.js สำเร็จรูป — ไม่ต้อง npm แค่เสิร์ฟโฟลเดอร์ (python3 -m http.server)
Not using a mic helper? Feed audio yourself from any source —
kit.push(float32Samples, sampleRate) resamples to the 16 kHz the models expect.
ไม่ใช้ mic helper? ป้อนเสียงเองจากแหล่งไหนก็ได้ —
kit.push(float32Samples, sampleRate) จะ resample เป็น 16 kHz ตามที่โมเดลต้องการ
Beyond the browserนอกเบราว์เซอร์
The three models are plain ONNX — the same files run under any ONNX Runtime binding. Each example below is a direct port of the browser worker: raw 16 kHz audio in, wake-word hits out. โมเดลทั้งสามคือ ONNX ธรรมดา — ไฟล์เดียวกันรันได้บน ONNX Runtime binding ใดก็ได้ ตัวอย่างด้านล่างคือ port ตรง ๆ ของ browser worker: เสียงดิบ 16 kHz เข้า, การตรวจพบ wake word ออก
Pipeline spec, install lines, and the porting checklist: docs/other-languages.md. สเปกไปป์ไลน์ คำสั่งติดตั้ง และเช็กลิสต์การ port: docs/other-languages.md
Train your own — any languageเทรนเอง — ได้ทุกภาษา
openWakeWord's own sample generator ships one English TTS checkpoint, which is why upstream calls itself English-only. wakekit sidesteps that: any TTS that can say your wake word can build your corpus. The Thai "ละดา" heads above were trained this way — ~1000 short TTS clips, a numpy-only trainer (~110k params), no GPU. sample generator ของ openWakeWord มาพร้อม TTS checkpoint ภาษาอังกฤษตัวเดียว ต้นทางจึงบอกว่ารองรับแค่ภาษาอังกฤษ wakekit เลี่ยงข้อจำกัดนี้: TTS อะไรก็ได้ที่พูดคำปลุกของคุณได้ ก็สร้างคอร์ปัสได้ head ภาษาไทย "ละดา" ด้านบนก็เทรนแบบนี้ — คลิป TTS สั้น ๆ ~1000 คลิป, เทรนเนอร์ numpy ล้วน (~110k พารามิเตอร์), ไม่ใช้ GPU
- Corpus —
copy
scripts/corpus-lada.sh, swap in your wake word, its rhyming trap words (the decisive negatives) and everyday sentences in your language, and point it at your TTS. คัดลอกscripts/corpus-lada.shเปลี่ยนเป็นคำปลุกของคุณ ใส่ คำกับดักที่เสียงคล้ายกัน (เนกาทีฟตัวชี้ขาด) กับประโยคใช้ทั่วไปในภาษาของคุณ แล้วชี้ไปที่ TTS ของคุณ - Featurize —
node scripts/featurize.mjs corpus/ features/ - Train —
python3 scripts/train.py features/ models/yourword.onnx - Measure —
node scripts/eval.mjs eval/clips models/yourword.onnx 0.95— recall and false-fires-per-minute on held-out voices, then add the entry tomanifest.jsonwith the threshold you measured. — วัด recall และ false-fires-per-minute บนเสียง held-out แล้วเพิ่มรายการในmanifest.jsonด้วยค่าเกณฑ์ที่คุณวัดได้จริง
Full guide with the ละดา case study: docs/training.md. No TTS? Train from your own recordings (.wav / .mp3): docs/train-from-recordings.md. คู่มือฉบับเต็มพร้อมกรณีศึกษา "ละดา": docs/training.md ไม่มี TTS? เทรนจากเสียงที่อัดเอง (.wav / .mp3): docs/train-from-recordings.md