3 ms·
This was a little bit of a cheat. It just so happens that the computer being used for the Zoom calls is a Mac, so I just wrote a program that runs in the backg
by mewse 6y ago
This was a little bit of a cheat.
It just so happens that the computer being used for the Zoom calls is a Mac, so I just wrote a program that runs in the background on the Mac and asks the OS about whether any microphone devices are in use by any programs, and then sends a message to the Pi, which really is only turning a hat of LEDs on/off based on UDP packets it receives. It could be turning the indicator on/off for anything that somebody else told it to do it for.
(Originally, I was using an Arduino Nano and a USB serial interface for communication, but my flatmate rewrote it to go over UDP to a Pi Zero W, as he wanted to use a particular RPi hat as the indicator lights)
Detecting the microphone on/off status on OS X was shamelessly ripped off from the answer to this StackExchange question: https://stackoverflow.com/questions/37470201/how-can-i-tell-if-the-camera-is-in-use-by-another-process https://stackoverflow.com/questions/37470201/how-can-i-tell-.... I don’t know if there’s a similar approach that would work for Windows or other OSes.
- thedanbob 6y agoEh, I wouldn’t call that a cheat. Most of my home brew IoT devices are controlled by Home Assistant via MQTT which pretty much falls in the same category.
- nitrogen 6y agoOn Linux it should be possible to see if something is recording through PulseAudio using its command line tools, and ALSA/OSS use could be detected with lsof.
- darkarmani 6y agoAwesome! That's exactly what I've wanted for the last 5 years.
- dTal 6y agoIsn't a Pi Zero stupendous overkill for something like that? You could build that whole thing for under 10 dollars with an ESP8266.