News for hackers. Stuff that matters.

Show HN: Open a browser by clapping twice (inspired by Iron Man)

https://github.com/Yutarop/two_claps_open

Recently, I watched Iron Man and was inspired by the scene where Tony Stark claps twice to activate his computer. (https://www.youtube.com/watch?v=OT2b5KzMoC0&t=101s) I thought, “I want to try that!".

So I wrote a simple script that opens Google Chrome — and optionally a local file — when I clap twice.

Technically, I recorded sample clap sounds and analyzed their frequency content in MATLAB (most energy was around 1.4–1.8kHz). Then I built a real-time detection system in Python using a bandpass filter and peak detection to recognize claps and trigger an action.

Is it practical? Maybe not. But it’s fun. Imagine this: you're about to Netflix and chill and open Netflix with two claps. Or you're about to give a presentation and launch your slides like Tony Stark. Just clap twice.

GitHub: https://github.com/Yutarop/two_claps_open

( 5 comments | 4 points | on HN )
Re:Show HN: Open a browser by clapping twice (inspired by Ir... by 2Gkashmiri on Thursday June 05, 2025 @02:04PM (#44194111)
Re:Show HN: Open a browser by clapping twice (inspired by Ir... by ponta17 on Thursday June 05, 2025 @09:51PM (#44197179)
Thanks! I'll try that
Re:Show HN: Open a browser by clapping twice (inspired by Ir... by 2Gkashmiri on Friday June 06, 2025 @01:42AM (#44198096)
i remember using this software to listen to my UPS beeping which would indicate that the electricity had gone off and then using autohotkey to close open apps and shut down pc.

this was wonderful and it worked brilliantly

Re:Show HN: Open a browser by clapping twice (inspired by Ir... by ponta17 on Friday June 06, 2025 @05:10AM (#44199074)
Thanks for sharing! That's an awesome use case. I hadn’t thought of combining it that way, but it’s a great idea.
Re:Show HN: Open a browser by clapping twice (inspired by Ir... by Larrikin on Thursday June 05, 2025 @02:57PM (#44194684)
Could probably be enhanced by turning it into an automation in Home Assistant.