mycroft-precise icon indicating copy to clipboard operation
mycroft-precise copied to clipboard

Index Device on Open PyAudi

Open Symfomany opened this issue 6 years ago • 1 comments

On Record and collect, precise please in args of open PyAdio input_device_index = XX,

Because for example, my respeaker has need precise device -D ac108 in record by example :)

Symfomany avatar Feb 16 '19 04:02 Symfomany

you can run the following python code to see your exact device index

import pyaudio

p = pyaudio.PyAudio()
info = p.get_host_api_info_by_index(0)
numdevices = info.get('deviceCount')
for i in range(0, numdevices):
    if (p.get_device_info_by_host_api_device_index(0, i).get('maxInputChannels')) > 0:
        print("Input Device id ", i, " - ",
              p.get_device_info_by_host_api_device_index(0, i).get('name'))

varungujjar avatar Feb 21 '20 14:02 varungujjar