Last active
April 5, 2017 01:26
-
-
Save G10DRAS/cf7b06148e3bb8ffe56c43991dcaa20b to your computer and use it in GitHub Desktop.
Find ALSA Device Index
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyaudio | |
po = pyaudio.PyAudio() | |
for index in range(po.get_device_count()): | |
desc = po.get_device_info_by_index(index) | |
print ("DEVICE: {0} \t INDEX: {1} \t RATE: {2}".format(desc["name"],index,int(desc["defaultSampleRate"]))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment