Hardware

Components

Software

THE PROGRAM ITSELF IT'S PUBLISHED HERE

Instalation

If you are running it on a raspberry pi, you need to install raspbian

First of all you must have python 2.7 installed on your computer. To check this type python --version in the terminal. If it is not installed just google how to install it on your linux distro.

Python tools

sudo apt-get install python-dev
sudo apt-get install python-setuptools
sudo apt-get install python-pip
sudo pip install --upgrade pip

Required modules

To prevent errors, we're installing all the modules manually instead of using pip.

PyAudio to use the microphone

sudo apt-get install git
git clone http://people.csail.mit.edu/hubert/git/pyaudio.git
sudo apt-get install libportaudio0 libportaudio2 libportaudiocpp0 portaudio19-dev
cd pyaudio/
sudo python setup.py install

Pygame for playing sound/music

sudo apt-get install python-pygame

Wikipedia unofficial API

git clone https://github.com/goldsmith/Wikipedia.git
cd Wikipedia/
sudo python setup.py install

Wolframalpha API

sudo pip install wolframalpha

Tweepy for using twitter

git clone https://github.com/tweepy/tweepy.git
cd tweepy
python setup.py install

Goslate as a translator (google)

sudo pip install goslate

Pushbullet as Notificacion Service

sudo pip install pushbullet.py

TTS

Google TTS (Online) For google tts we use a bash script, and we mpg123 and mplayer.

sudo apt-get install mpg123 
sudo apt-get install mplayer

Pyttsx fork (Offline)

git clone https://github.com/parente/pyttsx.git
cd pyttsx 
sudo python setup.py install

Festival (Offline)

sudo apt-get install festival festvox-don

STT

SpeechRecognition as stt (speech to text)

git clone https://github.com/Uberi/speech_recognition.git
cd speech_recognition
sudo python setup.py install

Flac to use google stt

sudo apt-get install flac

GPIO

RPi.GPIO for using the Button to stop/play music

wget https://pypi.python.org/packages/source/R/RPi.GPIO/RPi.GPIO-0.5.11.tar.gz
tar -xzvf RPi.GPIO-0.5.11.tar.gz
cd RPi.GPIO-0.5.11
sudo python setup.py install

Configuration

USB Sound Card

If you´re using a raspberry you´ll need to set up usb sound card: Connect it to the USB port, and check if it´s recognized:

lsusb

If you see a Audio Adapter or something like this, it´s fine. Now we need to set this as the main soundcard, so we open alsa-base.conf

sudo nano /etc/modprobe.d/alsa-base.conf

Change the following line:

options snd-usb-audio index=-2

To this:

options snd-usb-audio index=0
options snd_bcm2835 index=1

Reboot the raspberry sudo reboot After this, we need to adjust the volume, so open alsamixer:

alsamixer

Adjust the speaker and mic volume with left/right and up/down keys, press esc, and to save it:

sudo alsactl store

Next, test that recording and playing audio works well:

arecord temp.wav
aplay -D hw:1,0 temp.wav

Once that this works, we can download and setup the program itself.

Setup the program

First of all, open the profile.py file to configure the different options.

Name

The name you want it to have, for automatic recognition

TTS

You can choose between FESTIVAL, GOOGLE or PYTTSX (You have to write them like this)

Auto recognition - True or False.

If it's False it will only recognize when you are pushing the button, and you won't need to say the name. Otherwise it'll recognize when it hears the name and play a beep sound.

Language

Actually it just works on Spanish as you have to translate the modules and the brain. I've given up with this project, but you can fork it and translate it.

wolfram_api

You'll have to get your own API at http://products.wolframalpha.com/api/

notification_service - PUSHBULLET or PUSHETTA

You'll need to get a API for the service you choose. Just google for that.

Music

For listening to your music you have to put all your mp3 files at a folder called "music"

Calibrate the microphone

Just open intensity.py in the room where VAOS is going to be. The room should be quiet when you open the program. It'll return the average of mic's intensity levels: Average audio intensity is 290.338523211 In this example, we take some more values and if they're similar.

sudo nano stt/auto_recorder.py
Searh for the line wich says THRESHOLD and change it to 310, for example, in this case.

You have to choose a slightly higher value than the one returned by the script.