![](/img/trans.png)
[英]Is there a way my program can detect if my microphone is being used by any programs? (Windows 10)
[英]How to know if my connected microphone is being used by any user? (Python OR Linux x84-64)
我正在编写一个程序,如果任何程序使用连接到我的系统的麦克风,我需要得到通知。 有没有办法在 Linux 或 Python 中做到这一点?
顺便说一句,我的麦克风是通过 USB 电缆连接的,它基本上是一个带有麦克风的网络摄像头。
如果您的麦克风是 Linux 上的某个/dev/media0
,您可以使用https://github.com/lsof-org/lsof中的lsof
来查找使用它的进程。 另见proc(5)和lsusb(8)
在 Debian 上,另请参见hwinfo 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.