I have been developing a voice operating Raspberry Pi. The code is designed for easily add plugin applications around the core. Both hardware and software components are put together so I can easily carry it with me and use it while I am on the move.
- Listen to the voice, and convert it to text
- Read out the text informations
- Shutdown & reboot Raspberry Pi via voice commands
- Use desktop, mobile phone, or tablet in the local network as displays
- Location based applications with Raspberry Pi GPS module
The app is extendable with plugin programs. So far I've developed,
- Search for short answers via WolfRamAlpha
- Make or receive phone calls via pjsip + Twilio
- Email via Mailgun
- SMS via Twilio
- Twitter read & write
- Google Talk and xmpp messenger
Though not in code repository yet, I also developed,
- Voice operate Roomba
- JIRA plugin (Opens dashboard on web browser)
- Phabricator plugin
It is also planned to be integrated with my life log API project.
- Raspberry Pi
- Wifi USB dongle
- Raspberry Pi case
I bought a set called "Onion Pi" pack sold by Adafruit. (Yes, setting up a Raspberry Pi as a Tor proxy was my first project with it.) This pack is indeed convenient for any project that requires wifi access. I liked it because this pack also comes with a console cable and an AC adapter that I use almost everyday for development.
To "wear" Raspberry Pi, you will also need, these.
- Wireless headset: I bought Platronics W440. It's not bluetooth, so it worked out of box with no configuration. And it's sleek.
- Battery: I am using EasyAcc 12000mAh External Battery Charger 4 USB Power Bank. It runs my Raspberry Pi 12 hours per full-charge
I recommend simply following these Adafruit's lessons:
- Adafruit's Raspberry Pi Lesson 1. Preparing an SD Card for your Raspberry P
- Adafruit's Raspberry Pi Lesson 2. First Time Configuration
- Adafruit's Raspberry Pi Lesson 3. Network Setup
- Adafruit's Raspberry Pi Lesson 5. Using a Console Cable(Optional if you have a console cable)
- Adafruit's Raspberry Pi Lesson 6. Using SSH
- Adafruit's Raspberry Pi Lesson 7. Remote Control with VNC
From here, I assume you are logged into Raspberry Pi as the user "pi", and Raspberry Pi is connected to the internet.
Set up microphone device as the primary audio device.
apt-get install rpi-update
apt-get install git-core
rpi-update
Connect a headset or a microphone to USB port. Reboot the Raspi.
Open /etc/modprobe.d/alsa-base.conf with an editor, and change this:
options snd-usb-audio index=-2
To:
options snd-usb-audio index=0
Close the file and reload alsa:
alsa force-reload
psittaceous uses CMU Sphinx for voice recognition
wget http://sourceforge.net/projects/cmusphinx/files/sphinxbase/0.8/sphinxbase-0.8.tar.gz/download
mv download sphinxbase-0.8.tar.gz
wget http://sourceforge.net/projects/cmusphinx/files/pocketsphinx/0.8/pocketsphinx-0.8.tar.gz/download
mv download pocketsphinx-0.8.tar.gz
tar -xzvf sphinxbase-0.8.tar.gz
tar -xzvf pocketsphinx-0.8.tar.gz
apt-get install bison
apt-get install libasound2-dev
cd sphinxbase-0.8
./configure --enable-fixed
make
make install
cd ../pocketsphinx-0.8/
./configure
make
sudo make install
You will need to set up github account in Raspberry Pi.
Some where under pi home directory you want to keep the source code, type:
git clone: git@github.com:daigotanaka/psittaceous.git
It will create a directory called psittaceous and fetch all the source code.
Change into psittaceous directory, and type:
virtualenv env --distribute
source env/bin/activate
pip install -r requirement.txt
This will install all the necessary dependency for psittaceous to the virtual environment.
Turn off your Raspberry Pi by "sudo shutdown -h now" and connect USB headset or the USB dongle for the wireless headset. Turn on Raspberry Pi.
(To be written)
alsamixer
(To be written)
Edit config.ini
Go to psittaceous directory, and type:
python app.py