# Using the node-red-contrib-personal-wake-word node

**URL:** <https://discourse.nodered.org/t/using-the-node-red-contrib-personal-wake-word-node/84381>\
**Category:** General\
**Created:** [8 January 2024 07:30 UTC](https://discourse.nodered.org/t/using-the-node-red-contrib-personal-wake-word-node/84381 "2024-01-08T07:30:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jdo300](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jdo300/32/79415_2.png) [@Jdo300](https://discourse.nodered.org/u/Jdo300)\
**Post date:** [8 January 2024 07:30 UTC](https://discourse.nodered.org/t/using-the-node-red-contrib-personal-wake-word-node/84381/1 "2024-01-08T07:30:00Z")

</div>

Hello All,

I'm using this node along with the @kevingodell/node-red-ffmpeg node to create a compatible audio stream from my mic to feed into it. The issue is that I'm not sure I'm configuring the wake word setup correctly. I wanted to ask if there is anyone here who has had experience using this node? (especially preparing the wake-word audio files). I tried to record a couple of clear samples of my saying "Hey Computer" but it doesn't seem to recognize them.

The node is based on the [node-personal-wakeword](https://github.com/mathquis/node-personal-wakeword) library. Does anyone know if there are any tools to help make the wakeword audio samples?

Here's the portion of my flow that I made for testing this node:

```auto
[
    {
        "id": "f38c430b8da6b413",
        "type": "wake-word",
        "z": "c5d098062cd1c674",
        "wakeword": "78bc3731a6c83c3e",
        "threshold": "0.04",
        "averaging": false,
        "inputProp": "payload",
        "outputProp": "payload",
        "controlProp": "control",
        "passthrough": true,
        "name": "",
        "x": 600,
        "y": 100,
        "wires": [
            [
                "569e849b6e27d696"
            ],
            []
        ]
    },
    {
        "id": "9ae7bd2136af36a9",
        "type": "ffmpeg",
        "z": "c5d098062cd1c674",
        "name": "Microphone Stream",
        "outputs": 2,
        "cmdPath": "ffmpeg",
        "cmdArgs": "[\"-f\",\"dshow\",\"-i\",\"audio=Microphone (Realtek(R) Audio)\",\"-map\",\"0\",\"-acodec\",\"pcm_s16le\",\"-ac\",\"1\",\"-ar\",\"16000\",\"-f\",\"wav\",\"pipe:1\"]",
        "cmdOutputs": 1,
        "killSignal": "SIGTERM",
        "x": 370,
        "y": 100,
        "wires": [
            [],
            [
                "f38c430b8da6b413"
            ]
        ]
    },
    {
        "id": "f3434123ecca60d9",
        "type": "inject",
        "z": "c5d098062cd1c674",
        "name": "Start",
        "props": [
            {
                "p": "action.command",
                "v": "start",
                "vt": "str"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "x": 110,
        "y": 100,
        "wires": [
            [
                "9ae7bd2136af36a9"
            ]
        ]
    },
    {
        "id": "6abef099c6a87941",
        "type": "inject",
        "z": "c5d098062cd1c674",
        "name": "Stop",
        "props": [
            {
                "p": "action.command",
                "v": "stop",
                "vt": "str"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "x": 110,
        "y": 140,
        "wires": [
            [
                "9ae7bd2136af36a9"
            ]
        ]
    },
    {
        "id": "9f956efc08de4580",
        "type": "udp in",
        "z": "c5d098062cd1c674",
        "name": "",
        "iface": "",
        "port": "5850",
        "ipv": "udp4",
        "multicast": "false",
        "group": "",
        "datatype": "buffer",
        "x": 340,
        "y": 320,
        "wires": [
            [
                "5d4249895ae582b9"
            ]
        ]
    },
    {
        "id": "5d4249895ae582b9",
        "type": "function",
        "z": "c5d098062cd1c674",
        "name": "Append Data",
        "func": "function appendBuffers(buffer1, buffer2) {\n // Check if the destination buffer is empty.\n if (!buffer1.length) {\n return Buffer.from(buffer2);\n }\n\n // Check if the source buffer is empty.\n if (!buffer2.length) {\n return Buffer.from(buffer1);\n }\n\n // Concatenate the buffers into a new buffer.\n const concatenatedBuffer = Buffer.concat([buffer1, buffer2]);\n\n return concatenatedBuffer;\n}\n\nlet dataBuffer = context.get(\"dataBuffer\") || Buffer.from([]);\nlet resultBuffer = appendBuffers(dataBuffer, msg.payload);\n\nif (resultBuffer.length >= 32767 * 4) {\n msg.payload = resultBuffer;\n context.set(\"dataBuffer\", Buffer.from([]));\n return msg;\n} else {\n context.set(\"dataBuffer\", resultBuffer);\n}",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 510,
        "y": 320,
        "wires": [
            [
                "e00611ad7b5f1d06"
            ]
        ]
    },
    {
        "id": "569e849b6e27d696",
        "type": "debug",
        "z": "c5d098062cd1c674",
        "name": "debug 34",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 780,
        "y": 100,
        "wires": []
    },
    {
        "id": "60a0c66471142669",
        "type": "inject",
        "z": "c5d098062cd1c674",
        "name": "listen",
        "props": [
            {
                "p": "control",
                "v": "listen",
                "vt": "str"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "x": 410,
        "y": 160,
        "wires": [
            [
                "f38c430b8da6b413"
            ]
        ]
    },
    {
        "id": "d34a11495c92ad9d",
        "type": "inject",
        "z": "c5d098062cd1c674",
        "name": "stop",
        "props": [
            {
                "p": "control",
                "v": "stop",
                "vt": "str"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "x": 410,
        "y": 200,
        "wires": [
            [
                "f38c430b8da6b413"
            ]
        ]
    },
    {
        "id": "e00611ad7b5f1d06",
        "type": "debug",
        "z": "c5d098062cd1c674",
        "name": "debug 35",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 700,
        "y": 320,
        "wires": []
    },
    {
        "id": "78bc3731a6c83c3e",
        "type": "wakeword-config",
        "name": "",
        "files": [
            "C:\\\\Users\\\\Jason\\\\.node-red\\\\wake-words"
        ]
    }
]

```

Any feedback and/or pointers greatly appreciated!

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [8 January 2024 11:21 UTC](https://discourse.nodered.org/t/using-the-node-red-contrib-personal-wake-word-node/84381/2 "2024-01-08T11:21:54Z")

</div>

> [@Jdo300](#):
>
> especially preparing the wake-word audio files)

If you click on the node and open the 'Help' in the side bar and then click the 'wakeword-config` you will get information about creating the wake word:

 ![Screenshot 2024-01-08 at 6.13.07 AM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/b/bb1b442ad7a24a41e6d2372921635353d12f0b99.jpeg)

Note: the node hasn't been [updated three years](https://github.com/johanneskropf/node-red-contrib-personal-wake-word) and the author has not been seen on GItHub since 2021 so I would assume it has been abandoned.

---

<div class="post-metadata">

**Author:** ![Jdo300](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jdo300/32/79415_2.png) [@Jdo300](https://discourse.nodered.org/u/Jdo300)\
**Post date:** [8 January 2024 12:43 UTC](https://discourse.nodered.org/t/using-the-node-red-contrib-personal-wake-word-node/84381/3 "2024-01-08T12:43:27Z")

</div>

Thanks, I currently have a path to the directory containing my .wav audio samples setup in the configuration node:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/1/015cc3684ca3add510228c646ee794e89b3b4573.png)

Knowing that this node has likely been abandoned. Would you happen to know if any alternatives that people are using nowadays? (Or if not a node, a library that I could implement in a function node or something). I'm just look for the simplest way to go about doing this.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [8 January 2024 13:44 UTC](https://discourse.nodered.org/t/using-the-node-red-contrib-personal-wake-word-node/84381/4 "2024-01-08T13:44:19Z")

</div>

> [@Jdo300](#):
>
> Would you happen to know if any alternatives that people are using nowadays?

Sorry but no I don't. HOWEVER a search of the forum found these threads that might be useful:

> [@\[Announce\] node-red-contrib-personal-wake-word](https://discourse.nodered.org/t/announce-node-red-contrib-personal-wake-word/39992/2):
>
> Crashed Node-Red MaxOS Mojaci v 10.14.6 Node-RED version: v1.2.7 Node.js version: v12.13.0 Created a number of recordings of my wake word ran a flow inject-\> sox-record -\> wakeword -\> debug 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 Ex…

The author might respond...

> [@Using the node-red-contrib-personal-wake-word node](https://discourse.nodered.org/t/using-the-node-red-contrib-personal-wake-word-node/84381):
>
> Hello All, I'm using this node along with the @kevingodell/node-red-ffmpeg node to create a compatible audio stream from my mic to feed into it. The issue is that I'm not sure I'm configuring the wake word setup correctly. I wanted to ask if there is anyone here who has had experience using this node? (especially preparing the wake-word audio files). I tried to record a couple of clear samples of my saying "Hey Computer" but it doesn't seem to recognize them. The node is based on the [node-pers…](https://github.com/mathquis/node-personal-wakeword)

> [@\[Announce\] node-red-contrib-personal-wake-word](https://discourse.nodered.org/t/announce-node-red-contrib-personal-wake-word/39992/24):
>
> I had this running a while ago. Now days some nodes needed does not seems to work for me anymore and I had to remove them. They kept crashing my node red / docker. I did not remember exactly which and where but there where dependencies to nodes that has not been revisited since 7 years. @JGKK does not seem to react to reported issues on git. Maybe he moved on or so. The wake word node worked but only with decent results if there are no background noises else there where massive false alters. I…

[v](https://discourse.nodered.org/t/update-node-red-contrib-deepspeech-stt-v0-4-0-added-streaming-inference-support/43395)

> [@\[Update\] node-red-contrib-voice2json (beta)](https://discourse.nodered.org/t/update-node-red-contrib-voice2json-beta/35652):
>
> continuing from [[Announce] node-red-contrib-voice2json (beta)](https://discourse.nodered.org/t/announce-node-red-contrib-voice2json-beta/29066) Bump to 0.6.1 As I now have some more time on my hands again the work continues slight_smile Bump to 0.6.1 adds an important fix for a possible race condition that could happen on slower pi s like the 3 a+ where voice2json would already prematurely close its stdin pipe before finishing causing an uncaught exception that would crash nodered. This would especially happen if voice2json only detected silence or had a timeout. So plea…

> [@SEPIA Open Assistant - Privacy respecting, self-hosted voice-control](https://discourse.nodered.org/t/sepia-open-assistant-privacy-respecting-self-hosted-voice-control/28238):
>
> Hello everybody, I'd like to introduce you to a project of mine called SEPIA Open Assistant. SEPIA is an open-source, self-hosted digital voice assistant that works on your mobile phone (similar to Google Assistant) and as smart speaker/display in your living-room (similar to Amazon Echo) while respecting your privacy and giving you back full control over your personal data slight_smile The project is hosted on GitHub under the MIT license meaning all source code is freely available and eve…

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [8 March 2024 13:44 UTC](https://discourse.nodered.org/t/using-the-node-red-contrib-personal-wake-word-node/84381/5 "2024-03-08T13:44:59Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
