Instantly share code, notes, and snippets.

@forslund forslund/list_inputs.py
Last active Jan 25, 2019

Embed
What would you like to do?
import pyaudio
pa = pyaudio.PyAudio()
print('\n\n\n==========================================\nFound devices:')
for device_index in range(pa.get_device_count()):
dev = pa.get_device_info_by_index(device_index)
if dev['maxInputChannels'] > 0:
print('{}: Samplerate {} Channels {}'.format(dev['name'],
dev['defaultSampleRate'],
dev['maxInputChannels']))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment