From 629482510bb7b6779061acd1707dec9b6bc5ba4e Mon Sep 17 00:00:00 2001 From: Daniel Schnabel Date: Mon, 26 Apr 2021 12:38:11 -0700 Subject: [PATCH] Added steps to train personal models using Docker --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index 8d97efcd..7f1f861c 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,26 @@ python generate_pmdl.py -r1=record1.wav -r2=record2.wav -r3=record3.wav -lang=en python demo.py hotword.pmdl ``` +### Build your own personal models (using Docker) +* Build a new docker image based on `Dockerfile` from this repo: +``` +docker build -t snowboy-pmdl . +``` + +* This will create an image which you can run to train your personal model. In order for this to work you'll need to create a directory called model on your host machine (Ubuntu 18 or whatever) and place your three audio files in there. So the directory should look something like this (note: the wav files need the exact names as below or it won't work): +``` +$ ls model/ +record1.wav record2.wav record3.wav +``` + +* Finally you can call docker (note: need to be in the parent directory of model): +``` +docker run -it -v $(pwd)/model:/snowboy-master/examples/Python/model snowboy-pmdl +``` +_This command mounts the model directory in the docker container and runs a script which calls generate_pmdl.py_ + +* If everything went well, you should now have a file called hotword.pmdl in your model directory. + ## Alexa support Snowboy now brings hands-free experience to the [Alexa AVS sample app](https://github.com/alexa/avs-device-sdk/wiki/Raspberry-Pi-Quick-Start-Guide-with-Script) on Raspberry Pi! See more info below regarding the performance and how you can use other hotword models. The following instructions currently support AVS sdk Version 1.12.1.