Skip to content

MSafter/voicecontrolled-smarthome

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

voicecontrolled-smarthome

Simple voice controlled smart home stack with python and nodeJS

New Features

  • Audio file upload
  • Audio file can be used as input for the voice recognition

Next Steps

  • Working on a HTML5 application which records audio and uploads it to the backend

Prerequirements

  • Some linux packages
  • Python 2.7
  • NodeJS
  • Sphinxbase
  • Pocketsphinx
  • Dictionary and Languagemodel for Sphinx

Needed linux packages

sudo apt-get install python-dev python-pyaudio libasound2-dev libtool autoconf python libpulse-dev swig bison

Installation of Sphinxbase

$ git clone https://github.com/cmusphinx/sphinxbase
$ cd sphinxbase
$ ./autogen.sh
$ ./configure
$ sudo make
$ sudo make check 
$ sudo make install

Installation of Pocketsphinx

$ git clone https://github.com/cmusphinx/pocketsphinx
$ cd pocketsphinx
$ ./autogen.sh
$ ./configure --enable-fixed
$ sudo make check
$ sudo make install

Dictionary and Languagemodel for Sphinx

Sphinx needs at least a dictionary (.dic) and a language model (.lm) file to validate your audio imput. You can create those file here If you have created your dictionary and language model, specify the location of those files in the pihome.conf file. Otherwise you will get the following error message after runnning the python script pihome.py:

  • RuntimeError: new_Decoder returned -1

Installation

First of all install all needed dependencies for Python and node:

  • Python dependencies
sudo pip install -r requirements.txt
  • NodeJS dependencies
cd backend
npm install

Test

Now test if everything works fine by starting the pihome.py python script and the server.js nodeJS backend in seperate terminals

  • Python script
python pihome.py
  • NodeJS backend
node server.js

About

Simple voice controlled smart home stack with python and nodeJS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published