A python package for clap detection
Project description
pi-clap
A python package for clap detection
Platforms Supported: Raspberry Pi, Linux, MacOS
Hardware Requirements
- Raspberry Pi
- Microphone [5]
- Audio Card [5]
- Bread Board (optional)
Dependencies
Python 3
- gpiozero
- pyaudio ( PortAudio is needed )
- munch
Other
- Rasbian OS [3]
- Audio Driver [1],[2],[3]
Setting up Raspberry Pi
- Download Raspbian OS
- Install Raspbian OS in RPi [4]
- Plugin the USB input audio device(Audio Card or Microphone)
- Configure OS after OS bootup [6]
sudo raspi-config
- Update OS
sudo apt-get update && sudo apt-get upgrade -y
- Reboot
sudo reboot
(This should enable the audio driver for the device connected) - Install pip & portaudio module
sudo apt-get install -y python3-pip portaudio19-dev
- Install pi-clap pip module
pip3 install pi-clap
- Connect the output line to BCM #4 & #6 Pin on Raspberry Pi.
( Try 2 claps to activate the output line for 1 sec and 3 claps to toggle ON/OFF state of given PIN. Note: Use 4 claps to exit from the system )
Visit Official documentation @ pi-clap.nikz.in
License
Copyright (c) 2020 Nikhil John
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
References
- https://learn.adafruit.com/usb-audio-cards-with-a-raspberry-pi/instructions
- http://computers.tutsplus.com/articles/using-a-usb-audio-device-with-a-raspberry-pi--mac-55876
- http://forum.kodi.tv/showthread.php?tid=172072
- http://www.raspberrypi.org/documentation/installation/installing-images/
- https://raspberrytips.com/add-microphone-raspberry-pi/
- https://www.raspberrypi.org/documentation/configuration/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.