Open Chrome (or any file/app) by simply clapping twice — just like Tony Stark.
demo1.mp4 demo2.mp4To figure out what a clap "looks like" in terms of sound, I first recorded a sample clap and ran a Fourier transform on it to check the frequency content. From the analysis, most of the energy from the clap is concentrated around 1.4kHz to 1.8kHz. Based on this, I set up a bandpass filter to isolate only that range and ignore irrelevant noise. After filtering, I used peak detection to recognize when a clap happens in real time. (see figure below) Once two peaks (claps) are detected with some minimum spacing, the system launches Chrome (or any command you define).
numpy
pyaudio
scipy
pywin32
PyAudio
pygame
SpeechRecognition
dotenv
gTTS
langchain
langchain-core
langchain-google
scipy
💡 Don’t forget to set your Google API key in a .env file. Google offers a free tier for API usage.