[Announce] node-red-contrib-personal-wake-word

Crashed Node-Red
MaxOS Mojaci v 10.14.6
Node-RED version: v1.2.7
Node.js version: v12.13.0

  1. Created a number of recordings of my wake word
  2. ran a flow inject-> sox-record -> wakeword -> debug
  3. node-red crashes.
29 Jan 07:04:32 - [info] Started modified flows
29 Jan 07:04:32 - [warn] [wake-word:86fa8e09.877658] ignoring .DS_Store as it is not a wav
29 Jan 07:04:47 - [warn] [sox-record:d55d0da6.48c738] support for other platforms than linux is experimental.
29 Jan 07:04:48 - [red] Uncaught Exception:
29 Jan 07:04:48 - TypeError: Cannot read property 'length' of undefined
    at WakewordDetector._normalizeFeatures (/Users/Paul/.node-red/node_modules/node-personal-wakeword/src/detector.js:289:34)
    at ReadStream.<anonymous> (/Users/Paul/.node-red/node_modules/node-personal-wakeword/src/detector.js:128:20)
    at ReadStream.emit (events.js:215:7)
    at endReadableNT (_stream_readable.js:1183:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
Pauls-mini:.node-red Paul$ 

(Note: the .DS_Store is a hidden file that macOS puts in every folder)

Here are the flows I used:

[{"id":"4446bb55.7e2ab4","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"b640954b.a3fbe","type":"sox-record","z":"4446bb55.7e2ab4","name":"","buttonStart":"msg","inputs":1,"inputSource":"default","manualSource":"","inputEncoding":"signed-integer","inputChannels":1,"inputRate":16000,"inputBits":16,"byteOrder":"-L","encoding":"signed-integer","channels":1,"rate":16000,"bits":16,"gain":"0","lowpass":8000,"showDuration":true,"durationType":"forever","durationLength":0,"silenceDetection":"nothing","silenceDuration":"2.0","silenceThreshold":"2.0","outputFormat":"file","manualPath":"/Users/Paul/wakeword/wake0","debugOutput":false,"x":310,"y":240,"wires":[["403b3143.4348e8"],["c0261d02.dc95b"]]},{"id":"86fa8e09.877658","type":"wake-word","z":"4446bb55.7e2ab4","wakeword":"f6b41482.228fb8","threshold":0.5,"averaging":true,"inputProp":"payload","outputProp":"payload","controlProp":"control","passthrough":false,"name":"","x":510,"y":500,"wires":[["535c8e54.defe3"],["fe4bc217.b882f"]]},{"id":"e166e4d5.57a8a8","type":"inject","z":"4446bb55.7e2ab4","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"start","payloadType":"str","x":110,"y":200,"wires":[["b640954b.a3fbe"]]},{"id":"487bb105.2f8eb","type":"inject","z":"4446bb55.7e2ab4","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"stop","payloadType":"str","x":110,"y":260,"wires":[["b640954b.a3fbe"]]},{"id":"5c520f91.275fb8","type":"file","z":"4446bb55.7e2ab4","name":"","filename":"/Users/Paul/wakeword/word0.wav","appendNewline":false,"createDir":true,"overwriteFile":"true","encoding":"none","x":600,"y":300,"wires":[["1aaf09e2.c7a0ee","97c38cde.176d8"]]},{"id":"eb361045.0e5ed","type":"debug","z":"4446bb55.7e2ab4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":870,"y":360,"wires":[]},{"id":"1f232e64.c9e6d2","type":"inject","z":"4446bb55.7e2ab4","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"0","payloadType":"num","x":110,"y":100,"wires":[["c63390cf.64ce"]]},{"id":"c63390cf.64ce","type":"change","z":"4446bb55.7e2ab4","name":"","rules":[{"t":"set","p":"mw_count","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":340,"y":100,"wires":[[]]},{"id":"403b3143.4348e8","type":"change","z":"4446bb55.7e2ab4","name":"","rules":[{"t":"set","p":"mw_count","pt":"msg","to":"mw_count","tot":"flow"},{"t":"set","p":"mw_count","pt":"msg","to":"mw_count+1","tot":"jsonata"},{"t":"set","p":"mw_count","pt":"flow","to":"mw_count","tot":"msg"},{"t":"set","p":"filename","pt":"msg","to":"wakefoo.wav","tot":"str"},{"t":"change","p":"filename","pt":"msg","from":"foo","fromt":"str","to":"mw_count","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":540,"y":240,"wires":[["66bb950b.40fb9c","5c520f91.275fb8"]]},{"id":"66bb950b.40fb9c","type":"debug","z":"4446bb55.7e2ab4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":770,"y":240,"wires":[]},{"id":"1aaf09e2.c7a0ee","type":"debug","z":"4446bb55.7e2ab4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":850,"y":300,"wires":[]},{"id":"97c38cde.176d8","type":"fs-ops-move","z":"4446bb55.7e2ab4","name":"Rename the wake0.wav using mw_count","sourcePath":"/Users/Paul/wakeword/","sourcePathType":"str","sourceFilename":"wake0.wav","sourceFilenameType":"str","destPath":"/Users/Paul/wakeword/","destPathType":"str","destFilename":"filename","destFilenameType":"msg","link":false,"x":620,"y":360,"wires":[["eb361045.0e5ed"]]},{"id":"d55d0da6.48c738","type":"sox-record","z":"4446bb55.7e2ab4","name":"","buttonStart":"msg","inputs":1,"inputSource":"default","manualSource":"","inputEncoding":"signed-integer","inputChannels":1,"inputRate":16000,"inputBits":16,"byteOrder":"-L","encoding":"signed-integer","channels":1,"rate":16000,"bits":16,"gain":"0","lowpass":8000,"showDuration":true,"durationType":"forever","durationLength":0,"silenceDetection":"nothing","silenceDuration":"2.0","silenceThreshold":"2.0","outputFormat":"stream","manualPath":"/Users/Paul/wakeword/wake0","debugOutput":false,"x":290,"y":500,"wires":[["86fa8e09.877658"],[]]},{"id":"fe4bc217.b882f","type":"debug","z":"4446bb55.7e2ab4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":710,"y":520,"wires":[]},{"id":"535c8e54.defe3","type":"debug","z":"4446bb55.7e2ab4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":710,"y":480,"wires":[]},{"id":"f2d57990.61f71","type":"inject","z":"4446bb55.7e2ab4","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"start","payloadType":"str","x":130,"y":480,"wires":[["d55d0da6.48c738"]]},{"id":"df5c8d4c.88a798","type":"inject","z":"4446bb55.7e2ab4","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"stop","payloadType":"str","x":130,"y":520,"wires":[["d55d0da6.48c738"]]},{"id":"2522f857.efe5c8","type":"comment","z":"4446bb55.7e2ab4","name":"set my word counter to 0","info":"","x":150,"y":60,"wires":[]},{"id":"c0261d02.dc95b","type":"debug","z":"4446bb55.7e2ab4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":310,"y":300,"wires":[]},{"id":"d90d143d.062f28","type":"comment","z":"4446bb55.7e2ab4","name":"record the wake word and give them unique names","info":"","x":240,"y":160,"wires":[]},{"id":"92a8be8e.922048","type":"comment","z":"4446bb55.7e2ab4","name":"try out the wake word - BUT this crashes Node-RED","info":"","x":250,"y":420,"wires":[]},{"id":"f6b41482.228fb8","type":"wakeword-config","name":"","files":["/Users/Paul/wakeword"]}]