Skip to content

Instantly share code, notes, and snippets.

@G10DRAS
Last active April 5, 2017 01:26
Show Gist options
  • Save G10DRAS/cf7b06148e3bb8ffe56c43991dcaa20b to your computer and use it in GitHub Desktop.
Save G10DRAS/cf7b06148e3bb8ffe56c43991dcaa20b to your computer and use it in GitHub Desktop.
Find ALSA Device Index
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