A dead simple STT library in Node
Sonus lets you quickly and easily add a VUI (Voice User Interface) to any hardware or software project. Just like Alexa, Google Assistant, and Siri, Sonus is always listening offline for a customizable hotword. Once that hotword is detected your speech is streamed to the cloud recognition service of your choice - then you get the results in realtime.
- Linux - most major distros (Including Raspbian)
Streaming Recognition Services
- Google Cloud Speech
- Alexa Voice Services
- Microsoft Cognitive Services
npm install --save sonus
npm install should suffice. This module however, requires you to install SoX.
For most linux disto's
arecord, which comes with most linux distros.
sudo apt-get install sox libsox-fmt-all
brew install sox
Configure out cloud speech recognition system of choice, like Google Cloud Speech API.
Note: You need to use the
GOOGLE_APPLICATION_CREDENTIALS environment variable for your JSON keyfile, or check the examples to see how you can pass in the keyflie path.
Add sonus and said recognizer:
const Sonus =const speech =const client =
Add your keyword and initialize Sonus with a Snowboy hotword:
const hotwords = file: 'resources/snowboy.umdl' hotword: 'snowboy'const sonus = Sonus
Create your own Alexa in less than a tweet:
This project uses semantic versioning as of
How do I set up Google Cloud Speech API?
Follow these instructions.
How do I make my own hotword?
If you've build a project with Sonus send a PR and include it here!
Licensed under MIT.