gladys-voice v0.1.2
Gladys Voice Recognition Engine
This simple module allows you to speak to gladys. More informations about Gladys on our website.
It uses snowboy to detect the hotword "Gladys", and then it streams your voice to a speech recognition service.
For now it only support Google Cloud Speech.
Installation
First, you need to install a few dependencies :
For linux :
sudo apt-get install sox libsox-fmt-all libatlas-base-dev mpg321For macOS
brew install soxThen, install this module on your machine (Raspberry Pi, any linux or Mac) :
Note : You need Node.js >= v6
npm install gladys-voiceThen go to the folder where it has been installed :
cd node_modules/gladys-voiceCreating a Google Project
Go to the Google Cloud Console.
- Create an account if you don't have one, and create a project.
- In the
Librarypanel in your project, activate theGoogle Cloud Speech API. - Then, you need to activate billing on your account. Unfortunately, it's not possible to use the service without having a credit card saved. Note that it won't take you money, you have a bunch of free requests and as you are alone on your project, it will certainly be enough without paying.
- Go to the
Credentialspanel, create new credentials, selectKeyand create a JSON key. - Put this JSON key file in your
datafolder in thegladys-voicefolder of your installation.
Modify the config file
You can know edit the config.js file with your informations, or define environment variable (recommended), modify :
- Your Google Project Id
- The path to your Google Key File
- The URL of your Gladys instance
- Your Gladys access token (You can create an access token in
Parameters=>Securityin Gladys)
Start the module
To start the module, two options, for testing you can start it with node :
node app.jsFor long term usage, prefer using pm2 so that the module will restart in case of crash.
Install PM2 if you don't already have it :
npm install -g pm2Then, start the module :
pm2 start app.js --name gladys-voice