Skip to main content

Plot the spectrum of a pulseaudio mic live in the terminal

Project description

micpeek

Listen to a pulseaudio mic and plot a live spectrum in the terminal.

$ micpeek

Install

$ pipx install micpeek

or

$ pipx install micpeek@git+https://github.com/pteromys/micpeek.git

Use

Passed a fire truck going the other way and it's making you anxious? No problem—ssh into the laptop on your desk and just type micpeek to reassure yourself that the fire alarm is not sounding. The gif at the top of the page is a guy saying some words and whistling some scales, whereas this is a fire alarm being tested:

gif of micpeek output when fire alarms are audible

Test it out with your own lovely voice before you use it remotely, so that you can learn baselines for an empty room or open windows or kids playing video games. But if you have to, you could validate it remotely by turning up the volume in alsamixer and playing some music.

Acknowledgements

micpeek is built on the henrikschnor/pasimple pulseaudio python bindings.

Animations were recorded using asciinema in Comic Mono, converted to gif with asciinema/agg, and compressed with this ffmpeg filter:

split[s0][s1];[s0]palettegen=max_colors=256[p];[s1][p]paletteuse=dither=none

Stalking risk ecosystem impact

Low, I hope. While this example lowers the barrier to entry for hooking up a laptop mic to arbitrary code, it can't do speech recognition; and there's creepier stuff out there that's easier to install and use.

Please don't prove me wrong about that, but if you did, please let me know. :(

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

micpeek-1.0.1.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

micpeek-1.0.1-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file micpeek-1.0.1.tar.gz.

File metadata

  • Download URL: micpeek-1.0.1.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for micpeek-1.0.1.tar.gz
Algorithm Hash digest
SHA256 6aac6ddc27e28102b6d5fece82763f77432ce5bb51a4fe73d4dd17edc4eabac2
MD5 d43a1f97642fc2c80d5dddcc1f9c09be
BLAKE2b-256 b6f4631eb8128272710361733376a0150c8bb1128b3d744e2ecba9d609b98c0f

See more details on using hashes here.

File details

Details for the file micpeek-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: micpeek-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for micpeek-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 164dc4946efb758b05613a51cebe3be9249cd7059d2ccefa20bd31e9dede7d70
MD5 3f93546346c4b86ebaaf2354e5d71e5e
BLAKE2b-256 005eeb79cae5f9749f1bc5241d25d718d5eba6552e7f20cd054dd3ecd65b295a

See more details on using hashes here.

Supported by

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