Record a sound from input and publish on Clyp.it.
- Raspberry PI 2
- Analog audio input (USB)
- iPhone Personal Hotspot over USB
Write SD card with Raspberry instruction.
sudo apt-get install usbmuxd
cat > /etc/asound.conf << EOF
pcm.!default {
type hw card 1
}
ctl.!default {
type hw card 1
}
EOF
sudo apt-get install portaudio19-dev libav-tools
pip3 install -r requirements.txt
- Copy file config_example.ini to config.ini
- Change USERNAME_CLYP & PASSWORD_CLYP with correct credential
- (Optional) Test application without automatic start at boot
sudo python3 app.py -d
- Copy file app_example.service to app.service
- Edit with correct paths to repository (app & config file)
- Copy file app.service in /lib/systemd/system/
sudo cp ./app.service /lib/systemd/system/
sudo chmod 644 /lib/systemd/system/app.service
chmod +x ./app.py
- Activate it:
sudo systemctl daemon-reload
sudo systemctl enable app.service
sudo systemctl start app.service
- (Optional) Show status of app:
sudo systemctl status app.service
- USB audio adapter : https://learn.adafruit.com/usb-audio-cards-with-a-raspberry-pi/updating-alsa-config
- Python app as service : http://www.diegoacuna.me/how-to-run-a-script-as-a-service-in-raspberry-pi-raspbian-jessie/