SWHear.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:Python-GUI-examples 作者: swharden 项目源码 文件源码
def valid_input_devices(self):
        """
        See which devices can be opened for microphone input.
        call this when no PyAudio object is loaded.
        """
        mics=[]
        for device in range(self.p.get_device_count()):
            if self.valid_test(device):
                mics.append(device)
        if len(mics)==0:
            print("no microphone devices found!")
        else:
            print("found %d microphone devices: %s"%(len(mics),mics))
        return mics

    ### SETUP AND SHUTDOWN
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号