This project is build upon Python with mainly Flask.
Dependencies
- Flask
- PyAudio
- Numpy
- audioop
- BeautifulSoup
- MySql
- hashlib
This project assumes that you have 2 Raspberry Pis. One running the server(site) and one being the client(microphone).
Besides that, it assumes that you setup your MySql databae has been setup like database.sql in the server folder
It also assumes that on your server you have your GPIOs setup(BOARD) with
GPIO 7 being the red LED
GPIO 11 the yellow LED
GPIO 22 the green LED
How you run the application:
1. Setup a wifi network on your client with the following settings in /etc/network/interfaces
auto wlan0
iface wlan0 inet static
address 192.168.1.1
netmask 255.255.255.0
wireless-channel 1
wireless-essid Pi
wireless-mode ad-hoc
2. On your server connect to this network with the following setting in again /etc/network/interfaces
auto wlan0
iface wlan0 inet static
address 192.168.1.4
netmask 255.255.255.0
wireless-channel 1
wireless-essid Pi
wireless-mode ad-hoc
The device you want to connect to the server can have any IP you choose
Attention, this doesn't setup a WPA2 secured connection! It is an open network so anyone can connect to the network and assign an IP
3. Reboot both your pi's(first client then server)
4. Run main.py on the client first, than run main.py on the server.
NOTE: PyAudio will give a lot of errors when you try to run it with a microphone plugged in. Try editing your /usr/share/alsa/alsa.conf and comment the lines which are in error codes.
This post helped me a lot