Clap detection using your microphone and portaudio.
Project description
A clapper based around the PyAudio frontend for PortAudio.
Status: working
Installing
You need portaudio installed, then you can install the latest version pip:
sudo pip install slowclap
It will pull in pyaudio and numpy depenencies.
Usage
Command-line
With default settings, run a shell command of your choosing each time a clap is detected:
slowclap --exec='echo Clap'
You might need to tune the threshold to your mic with the -t option.
Python API
Set up a simple detection loop:
import slowclap as sc
feed = sc.MicrophoneFeed()
detector = sc.AmplitudeDetector(feed, threshold=17000000)
for clap in detector:
# do something
print(clap.time)
Changelog
v0.1.0
Working amplitude clapper
Supports command-execution and rate-limiting
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.
Source Distribution
slowclap-0.1.0.tar.gz
(3.5 kB
view details)
File details
Details for the file slowclap-0.1.0.tar.gz.
File metadata
- Download URL: slowclap-0.1.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e89af34e444eada5edde2bdb252bfe9d36bbc27888868955de882d8b51cb6ac4
|
|
| MD5 |
2f4a9f440cb5452642a826bb752abfbb
|
|
| BLAKE2b-256 |
6ac9e1d3c20d407df3330adc2becd435a49a4f2a254cd7fa24778abaa4295197
|