Skip to main content

A python package for clap detection

Project description

pi-clap

Python package Latest Version Supported Python versions Dependencies Code Size Downloads License

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

  1. Download Raspbian OS
  2. Install Raspbian OS in RPi [4]
  3. Plugin the USB input audio device(Audio Card or Microphone)
  4. Configure OS after OS bootup [6] sudo raspi-config
  5. Update OS sudo apt-get update && sudo apt-get upgrade -y
  6. Reboot sudo reboot (This should enable the audio driver for the device connected)
  7. Install pip & portaudio module sudo apt-get install -y python3-pip portaudio19-dev
  8. Install pi-clap pip module pip3 install pi-clap
  9. 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

MIT 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

  1. https://learn.adafruit.com/usb-audio-cards-with-a-raspberry-pi/instructions
  2. http://computers.tutsplus.com/articles/using-a-usb-audio-device-with-a-raspberry-pi--mac-55876
  3. http://forum.kodi.tv/showthread.php?tid=172072
  4. http://www.raspberrypi.org/documentation/installation/installing-images/
  5. https://raspberrytips.com/add-microphone-raspberry-pi/
  6. https://www.raspberrypi.org/documentation/configuration/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pi-clap-1.3.1.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pi_clap-1.3.1-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file pi-clap-1.3.1.tar.gz.

File metadata

  • Download URL: pi-clap-1.3.1.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.3

File hashes

Hashes for pi-clap-1.3.1.tar.gz
Algorithm Hash digest
SHA256 2806dc54aefcd7bbf5e941d8a415f6d2fc99cd21b41d0bff93672092e05c0b79
MD5 7c2415d9546e34d45b1ff13aad8efdf1
BLAKE2b-256 be8cee0d18b1b6e4d973e32b58cdaa7566e850434f09b32e20df8bdd3431f085

See more details on using hashes here.

File details

Details for the file pi_clap-1.3.1-py3-none-any.whl.

File metadata

  • Download URL: pi_clap-1.3.1-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.3

File hashes

Hashes for pi_clap-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4037f47d71992559b5970b9eff254bfad15fe58db76037fae28ab8fa975b1df3
MD5 b842013ea47f42f32a4c23739d46f55f
BLAKE2b-256 5bf8bd4c9503fbf8aa69a2da0347260c08721391b2c56a4d518cba7c9f496b77

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page