LinTO Command Module purpose is to:
- Spot wake-up-word
- Detect beginning and end of voice command utterances.
linto-command module is a software brick for the LinTO Maker prototype. It is designed originaly to run on raspeberry pi 3 within LinTO-OS.
Its relies on several tiers libraries to acquire the audio from the microphone, detect voice activity, extract signal features and detect keyword using Tensorflow or Keras RNN models.
The easiest way to use linto-command-module is to download the binary package.
The module has been tested on x86-64 and armv7l, binary archives can be downloaded there:
Extract the folder:
ARCH=armv7l
VERSION=0.2
tar xzf linto-command_$VERSION_$ARCH.tar.gz- Download the repository
git clone https://github.com/linto-ai/linto-command-module.git
cd linto-command-module- Install dependencies (w/ or w/out using virtualenv)
MY_VENV_FOLDER=path/to/your/venv
virtualenv -p /usr/bin/python3.X --no-site-package $MY_VENV_FOLDER
source $MY_VENV_FOLDER/bin/activate
pip install -r requirements.txt- Executable from binary: EXTRACTED_FOLDER_LOCATION/command/command
- Executable from source: REPO/command/command.py
usage: command[.py] [-h] [--debug]
Voice Command Module
optional arguments:
-h, --help show this help message and exit
--debug Prompts debug
The executable comes alongside a .env_default file that contains its parameters. You can override those parameters using a .env file and you can overide those formers by using environment variables.
Exemple:
echo MODEL_FOLDER=/my/custom_model/path > .env && ./command --debug
or
MODEL_FOLDER=/my/custom_model/path ./command --debug
or
export MODEL_FOLDER=/my/custom_model/path && ./command --debug
Parameters are:
- MODEL_FOLDER: path to a folder containing a .net or .pb file alongside its .param file (default ~/model/kws)
- MQTT_LOCAL_HOST: MQTT local broker address (default localhost)
- MQTT_LOCAL_PORT: MQTT local broker port (default 1883)
- KWS_TH: Threshold for keyword detection (default 0.5)
- PyRTSTools - Custom tools for realtime speech processing.
- Tenacity - General-purpose retrying library
- paho-mqtt - MQTT client library.
This project is licensed under the GNU AFFERO License - see the LICENSE.md file for details.
