Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shubhamjain/earphone-event
Module to detect earphone button click and hold
https://github.com/shubhamjain/earphone-event
Last synced: about 1 month ago
JSON representation
Module to detect earphone button click and hold
- Host: GitHub
- URL: https://github.com/shubhamjain/earphone-event
- Owner: shubhamjain
- License: mit
- Created: 2014-03-27T14:46:23.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-04-25T08:00:59.000Z (over 7 years ago)
- Last Synced: 2023-04-05T17:49:40.971Z (over 1 year ago)
- Language: Python
- Size: 5.86 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Earphone Events
==============This is a small module which can be used to detect earphone button presses. I was aroused by curiousity on how [these buttons](http://i01.i.aliimg.com/img/pb/410/506/487/487506410_866.jpg) worked. I hacked around and found, they emit a certain noise like [this](http://i.imgur.com/CqIwRiv.png). So there went my afternoon to detect the clipping part and make the button presses meaningful. It is explained more succintly in my [blog post](https://shubhamjain.co/2014/03/30/making-earphone-presses-useful-with-pyaudio-and-vlc-http-api/)
How can this be used?
====================I originally made it to control VLC player from button presses but the module is of feeble use, as of now. For using this, you must have a way detect the noise, implying you have a machine with a combo jack [mic + headphone combined jack]. Secondly, I have only tried my pair of samsung earphones; I am not sure how the other pairs would work on this. The `example.py` shows an example on using the module.