Closed jbflow closed 3 years ago
You need the "xxd" command line program. It comes available on Mac by default, maybe Linux also. I added a bash script to do the conversion to a JS array:
https://github.com/jaxcore/bumblebee-hotword/blob/master/tools/convert_ppn.sh
Just name your ppn file ending with "_wasm.ppn" and then do:
./convert_ppn.sh yourhotword_wasm.ppn
And will create a file named "yourhotword.js". Then load that into Bumblebee/Porcupine.
The API to add the hotword to Bumblebee is:
addHotword(name, data, sensitivity)
So make sure the JS file is loaded into your web page and do:
var yourhotword = require('yourhotword.js');
bumbebee.addHotword('yourhotword', yourhotword, 0.5);
The sensitivity number may or may not have much effect. It's very inconsistent.
The PPN file will also work on the NodeJS version:
Perfect thanks for your help, I'm running on Windows but I was able to convert to a JS array in Python.
It is now working.
How is it possible to add custom wake words?
I have a wasm model aquired from Pico Voice which is in .ppn format but am having trouble understanding how to integrate this.