![](/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.