![](/img/trans.png)
[英]Is it possible to detect whether or not something is plugged into the audio jack, in python?
[英]How can i detect that something is plugged in to the audio jack on linux with python?
我正在使用带有tornado.io的python tornado网络服务器。
我想证明我可以通过tornado.io异步发送事件。
我如何才能简单地检测到音频插孔中插入了某些东西,并在tornado.io中发送消息?
这个想法是找到什么是您的声卡,然后在Google上搜索“为您的audio_card_number感应插孔”,这很简单
import os
os.system("your_comand")
为了让您入门,这是一个针对ac97卡的python脚本 。 您的解决方案应该相似。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.