GithubHelp home page GithubHelp logo

ericbdc / wakeword Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 203 KB

Train a personalised wakeword model thanks to [OpenWakeWord](https://github.com/dscripka/openWakeWord).

Jupyter Notebook 47.14% Python 51.46% Shell 1.39%

wakeword's Introduction

Wakeword

Allows to train a personalised wakeword model thanks to OpenWakeWord.

It modifies a bit the provided great python notebook so that you can use it directly as a automatic_model_training.py file (then you can use it without any IPython kernel).

Troubleshoots

For now it is not available on MacOS (because of piper-phonemize library), then you will have to train it on a Linux platform.

Launch on a remote cloud machine

A set of scripts are available in this repository to rapidly configure a remote machine.

Clone this repository on your local machine

git clone [email protected]:ericbdc/wakeword.git
cd wakeword

Get a remote machine

First you need a running Linux platform available, e.g.: AWS EC2 Ubuntu (all runs in ~30min on a t3.2xlarge).

โš ๏ธ Beware that you will need about 32Gb space disk if your chose only 1 hour clips.

In that case, you will generate a Key Pair, name it wakeword and download the wakeword.pem file to your ~/.ssh/ folder.

Check you can connect through ssh, replace user@ip with yours:

ssh -i ~/.ssh/wakeword.pem [email protected]

Configure remote machine

Copy useful scripts

./send_to_remote.sh 'ec2-xx-xx-xx-xxx.eu-west-3.compute.amazonaws.com'

Do the basic setup on the remote machine

ssh -i ~/.ssh/wakeword.pem [email protected] ./setup_remote.sh

Train your model with your wake sentence

Better launch the script in a Linux screen

screen -S wakeword
ssh -i ~/.ssh/wakeword.pem [email protected] python automatic_model_training.py | at now -m

You can detach your screen session by doing Ctrl+A Ctrl+D. If you want to re-attach your screen do screen -R wakeword. To exit your screen do exit and press Enter. You will lose the shell outputs as screen launchs a subshell.

Regenerating the automatic_model_training.py file

Activate the venv and install dev requirements locally

python -m venv venv
source venv/bin/activate
pip install -r requirements-dev.txt
jupyter nbconvert automatic_model_training.ipynb --to python

If you made any change, you will need to copy it again to your remote machine.

Testing the wakeword model

python detect_from_microphone.py --inference_framework=onnx --model_path='my_custom_model/simbad.onnx'

wakeword's People

Contributors

ericbdc avatar

Stargazers

Charith Madhuranga avatar

Watchers

 avatar

Forkers

vioneta

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.