wakekit 🌼

Train a wake word for any language with TTS, run it in the browser.
No GPU, no torch, no cloud — three small ONNX models on a worker thread.
เทรน wake word ภาษาไหนก็ได้ ด้วย TTS แล้วรันในเบราว์เซอร์
ไม่ต้องมี GPU ไม่ต้องมี torch ไม่ต้องพึ่งคลาวด์ — โมเดล ONNX เล็ก ๆ สามตัวบน worker thread

จาร์วิส
จาร์วิส — wakekitจาร์วิส — wake word

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 กดเริ่ม แล้วพูดใส่ไมโครโฟน การตรวจจับคำปลุกรันในแท็บนี้ทั้งหมด — เสียงในขั้นตอนนั้นไม่ถูกส่งออกจากเครื่องของคุณ

idle
score every 80 ms · dashed line = threshold · a crossing = detection คะแนนทุก 80 ms · เส้นประ = ค่าเกณฑ์ · ข้ามเส้น = ตรวจพบ

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. การตรวจจับคำปลุกทำงานในเครื่องคุณทั้งหมด แต่ขั้นตอนถอดเสียงเป็นข้อความไม่ใช่แบบนั้น — ระหว่างที่ทำงาน เบราว์เซอร์จะส่งเสียงไปยังบริการถอดเสียงของเบราว์เซอร์เอง เราไม่ได้เก็บอะไรไว้ ข้อความด้านล่างจะหายไปเมื่อคุณรีโหลดหน้านี้

  1. nothing yet — say the wake word, then keep talkingยังไม่มี — พูดคำปลุก แล้วพูดต่อได้เลย

Detectionsการตรวจพบ

  1. 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 ไม่ต้องแก้โค้ด

labelstatusสถานะlangfilethresholdnotes

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/ แล้ว:

app.ts
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

  1. Corpuscopy 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 ของคุณ
  2. Featurizenode scripts/featurize.mjs corpus/ features/
  3. Trainpython3 scripts/train.py features/ models/yourword.onnx
  4. Measurenode scripts/eval.mjs eval/clips models/yourword.onnx 0.95 — recall and false-fires-per-minute on held-out voices, then add the entry to manifest.json with 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