@wakebox/browser
v0.1.2
Published
On-device wake word. No key.
Readme
On-device wake word, no key.
npm install @wakebox/browserCreate a phrase file at https://wakebox.ai, then:
import { Wakebox, Microphone } from "@wakebox/browser"
const engine = await Wakebox.create(["phrase.onnx"], [0.5])
const mic = new Microphone(engine, {
onDetection(index) {
console.log(index) // 0, or nothing
},
})
await mic.start()process takes 16 kHz mono int16 audio and returns the phrase index, or null. Sensitivity is a number from 0 to 1 on each file. It is not stored in the file. React and other web frameworks use this package directly. There is no separate React package.
The shared mel and embedding models ship inside the package. A bundler that understands new URL(..., import.meta.url) will serve them. You can also pass the model bytes as mel and embedding on Wakebox.create.
