Hi @JGKK ,
I have a node-red-contrib flow a little bit working with my seed 2mic audio.
I installed the samples and tried it with the preferred english /home/pi/en-us_kaldi-zamia-2.0. that works OK!
After that i made my own config with
/home/pi/nl_kaldi-cgn-1.1
The default dutch sentences do work, but i still have to use the english hot word (hey mycraft) !
How can i change the english hotword in a dutch word. I see that there are different techniques for making a hotword. Which technique do i have to use with my dutch config ?
do i have to use the kaldi hotword technique (because i have a kaldi profile /acoustic model type) or can i use other techniques like
[
{
"id": "753d8ebd.d4e2a",
"type": "tab",
"label": "Flow 2",
"disabled": false,
"info": ""
},
{
"id": "4406bef1.4010f8",
"type": "voice2json-stt",
"z": "753d8ebd.d4e2a",
"name": "stt",
"voice2JsonConfig": "82191045.5e541",
"inputField": "payload",
"controlField": "control",
"outputField": "payload",
"autoStart": true,
"x": 910,
"y": 420,
"wires": [
[
"803d64ac.6bbee8",
"3377e4ea.0b3bec"
]
]
},
{
"id": "803d64ac.6bbee8",
"type": "debug",
"z": "753d8ebd.d4e2a",
"name": "Show stt transcription text",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1190,
"y": 300,
"wires": []
},
{
"id": "77d09bd5.298a44",
"type": "voice2json-training",
"z": "753d8ebd.d4e2a",
"name": "nlKaldi",
"voice2JsonConfig": "82191045.5e541",
"inputField": "payload",
"outputField": "payload",
"loadedProfile": "",
"x": 350,
"y": 180,
"wires": [
[
"d6b9d7df.44f5e8"
]
]
},
{
"id": "6942354d.5578ac",
"type": "inject",
"z": "753d8ebd.d4e2a",
"name": "Start training",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "train",
"payloadType": "str",
"x": 170,
"y": 180,
"wires": [
[
"77d09bd5.298a44"
]
]
},
{
"id": "d6b9d7df.44f5e8",
"type": "debug",
"z": "753d8ebd.d4e2a",
"name": "Training result",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 660,
"y": 180,
"wires": []
},
{
"id": "3377e4ea.0b3bec",
"type": "voice2json-tti",
"z": "753d8ebd.d4e2a",
"name": "tti",
"voice2JsonConfig": "82191045.5e541",
"inputField": "payload.text",
"controlField": "control",
"outputField": "payload",
"autoStart": false,
"x": 1130,
"y": 420,
"wires": [
[
"33639506.781d1a"
]
]
},
{
"id": "33639506.781d1a",
"type": "debug",
"z": "753d8ebd.d4e2a",
"name": "show intent recognition result",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1520,
"y": 300,
"wires": []
},
{
"id": "732f01fc.c743a8",
"type": "comment",
"z": "753d8ebd.d4e2a",
"name": "Readme for this voice2json example flow",
"info": "This example flow shows the use of the voice2json train, stt and tti node.\nTo try everything please make sure to first download the english kaldi profile to your home folder from:\nhttps://github.com/synesthesiam/en-us_kaldi-zamia/archive/v2.0.tar.gz\nIf you should save the profile folder to a different location please edit the profile path in the config accordingly.\nBefore trying the stt and tti node you have to train the profile.\nFor detailed instructions please read the complete documentation at: https://github.com/johanneskropf/node-red-contrib-voice2json/blob/master/README.md & http://voice2json.org/",
"x": 260,
"y": 100,
"wires": []
},
{
"id": "a9ecce69.dc2d58",
"type": "sox-record",
"z": "753d8ebd.d4e2a",
"name": "",
"buttonStart": "msg",
"inputs": 1,
"inputSource": "1,0",
"manualSource": "",
"inputChannels": "",
"inputRate": "",
"inputBits": "",
"byteOrder": "-L",
"encoding": "signed-integer",
"channels": 1,
"rate": 16000,
"bits": 16,
"gain": "0",
"lowpass": 8000,
"showDuration": false,
"durationType": "forever",
"durationLength": 0,
"silenceDetection": "nothing",
"silenceDuration": "2.0",
"silenceThreshold": "2.0",
"outputFormat": "stream",
"manualPath": "color",
"debugOutput": false,
"x": 170,
"y": 380,
"wires": [
[
"f66171fb.010238"
],
[]
]
},
{
"id": "f66171fb.010238",
"type": "voice2json-wait-wake",
"z": "753d8ebd.d4e2a",
"name": "",
"voice2JsonConfig": "82191045.5e541",
"inputField": "payload",
"controlField": "control",
"outputField": "payload",
"nonContinousListen": true,
"x": 380,
"y": 380,
"wires": [
[
"115731c4.96b7a6",
"e0d849c1.b7df"
],
[
"162067ed.6f5898",
"e0d849c1.b7df"
]
]
},
{
"id": "a4c2b1f.02510d",
"type": "debug",
"z": "753d8ebd.d4e2a",
"name": "",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 870,
"y": 300,
"wires": []
},
{
"id": "115731c4.96b7a6",
"type": "trigger",
"z": "753d8ebd.d4e2a",
"name": "3s than listen",
"op1": "",
"op2": "listen",
"op1type": "nul",
"op2type": "str",
"duration": "3",
"extend": false,
"overrideDelay": false,
"units": "s",
"reset": "",
"bytopic": "all",
"topic": "topic",
"outputs": 1,
"x": 390,
"y": 280,
"wires": [
[
"f66171fb.010238"
]
]
},
{
"id": "146c7ce5.b957b3",
"type": "comment",
"z": "753d8ebd.d4e2a",
"name": "wait-wake example hey mycraft what time is it",
"info": "Prerequisites for this example flow are that you must have a [node-red-sox-utils](https://github.com/johanneskropf/node-red-contrib-sox-utils) installed and a microphone connected to your raspberry or other device. Choose your input device in the mic nodes config and click the button to start recording. After a brief start up period the wait-wake node can be triggered by speaking the standard wake word of *hey mycroft* if no custom wake word has been configured in the selected profiles profile.yml. The wait-wake node will than forward the audio from the mic for three seconds on its second output and ignore wake words until told to listen again. You can restart (stop) the node by injecting start to the control topic.",
"x": 230,
"y": 460,
"wires": []
},
{
"id": "9c9fc89d.e5a858",
"type": "comment",
"z": "753d8ebd.d4e2a",
"name": "stop listening",
"info": "Prerequisites for this example flow are that you must have a [node-red-sox-utils](https://github.com/johanneskropf/node-red-contrib-sox-utils) installed and a microphone connected to your raspberry or other device. Choose your input device in the mic nodes config and click the button to start recording. After a brief start up period the wait-wake node can be triggered by speaking the standard wake word of *hey mycroft* if no custom wake word has been configured in the selected profiles profile.yml. The wait-wake node will than forward the audio from the mic for three seconds on its second output and ignore wake words until told to listen again. You can restart (stop) the node by injecting start to the control topic.",
"x": 390,
"y": 540,
"wires": []
},
{
"id": "162067ed.6f5898",
"type": "voice2json-record-command",
"z": "753d8ebd.d4e2a",
"name": "record",
"voice2JsonConfig": "82191045.5e541",
"inputField": "payload",
"outputField": "payload",
"x": 590,
"y": 420,
"wires": [
[
"4406bef1.4010f8",
"a4c2b1f.02510d"
]
]
},
{
"id": "f02fa400.3daca8",
"type": "inject",
"z": "753d8ebd.d4e2a",
"name": "stop",
"props": [
{
"p": "control",
"v": "stop",
"vt": "str"
},
{
"p": "topic",
"vt": "str"
},
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "stop",
"payloadType": "str",
"x": 150,
"y": 540,
"wires": [
[
"6b5ba463.053334"
]
]
},
{
"id": "8fec2a16.63125",
"type": "inject",
"z": "753d8ebd.d4e2a",
"name": "start",
"props": [
{
"p": "control",
"v": "start",
"vt": "str"
},
{
"p": "topic",
"vt": "str"
},
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "start",
"payloadType": "str",
"x": 150,
"y": 580,
"wires": [
[
"9a25dec3.ca75b"
]
]
},
{
"id": "90c3936d.42fa1",
"type": "comment",
"z": "753d8ebd.d4e2a",
"name": "start listening",
"info": "Prerequisites for this example flow are that you must have a [node-red-sox-utils](https://github.com/johanneskropf/node-red-contrib-sox-utils) installed and a microphone connected to your raspberry or other device. Choose your input device in the mic nodes config and click the button to start recording. After a brief start up period the wait-wake node can be triggered by speaking the standard wake word of *hey mycroft* if no custom wake word has been configured in the selected profiles profile.yml. The wait-wake node will than forward the audio from the mic for three seconds on its second output and ignore wake words until told to listen again. You can restart (stop) the node by injecting start to the control topic.",
"x": 390,
"y": 580,
"wires": []
},
{
"id": "9a25dec3.ca75b",
"type": "link out",
"z": "753d8ebd.d4e2a",
"name": "",
"links": [
"12d6de01.b06ad2"
],
"x": 275,
"y": 580,
"wires": []
},
{
"id": "6b5ba463.053334",
"type": "link out",
"z": "753d8ebd.d4e2a",
"name": "",
"links": [
"12d6de01.b06ad2"
],
"x": 275,
"y": 540,
"wires": []
},
{
"id": "12d6de01.b06ad2",
"type": "link in",
"z": "753d8ebd.d4e2a",
"name": "",
"links": [
"6b5ba463.053334",
"9a25dec3.ca75b"
],
"x": 375,
"y": 480,
"wires": [
[
"4406bef1.4010f8",
"3377e4ea.0b3bec",
"162067ed.6f5898",
"f66171fb.010238",
"a9ecce69.dc2d58"
]
]
},
{
"id": "e0d849c1.b7df",
"type": "debug",
"z": "753d8ebd.d4e2a",
"name": "",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 650,
"y": 300,
"wires": []
},
{
"id": "82191045.5e541",
"type": "voice2json-config",
"profilePath": "/home/pi/nl_kaldi-cgn-1.1",
"name": "nlkaldi",
"sentences": "[ChangeLightState]\nzet de (woonkamerverlichting | woonkamerlamp | garageverlichting){name} (aan | uit){state}\n\n[GetTime]\nhoe laat is het\n\n[GetTemperature]\nwat is de temperatuur\nhoe (warm | koud) is het\n\n[GetGarageState]\nis de garagepoort (open | gesloten)",
"slots": [
{
"fileName": "rhasspy/number",
"managedBy": "external",
"fileContent": null,
"executable": true
}
],
"removeSlots": false,
"profile": "---\nname: \"nl_kaldi-cgn\"\nversion: \"1.1\"\n\nlanguage:\n name: \"dutch\"\n code: \"nl\"\n\ntext-to-speech:\n espeak:\n voice: \"nl\"\n\nspeech-to-text:\n acoustic-model-type: \"kaldi\"\n kaldi:\n model-type: \"nnet3\"\n\ntraining:\n acoustic-model-type: \"kaldi\"\n kaldi:\n model-type: \"nnet3\"\n large-files:\n - !env \"${profile_dir}/base_dictionary.txt\"\n - !env \"${profile_dir}/base_language_model.txt\"\n - !env \"${profile_dir}/base_language_model.fst\"\n - !env \"${profile_dir}/g2p.fst\"\n - !env \"${profile_dir}/acoustic_model/model/final.mdl\"\n - !env \"${profile_dir}/acoustic_model/model/graph/HCLG.fst\"\n"
}
]