I have connected an USB microphone (ReSpeaker 4 Mic Array (UAC1.0)) to my Gentoo linux machine.
I would like to use that usb microphone for recording with pyaudio.
Pyaudio detects the USB device but does not detect its Input Channels.
This is the relevant part of the output from:
</s> import pyaudio
p = pyaudio.PyAudio()
for i in range(p.get_device_count()):
print p.get_device_info_by_index(i)<e>
[code]> […]
‘maxOutputChannels’: 2L, ‘name’: u’HDA Intel PCH: AD198x Analog
(hw:0,0)’, ‘defaultHighInputLatency’: -1.0}{‘defaultSampleRate’: 16000.0, ‘defaultLowOutputLatency’: 0.024,
‘defaultLowInputLatency’: -1.0, ‘maxInputChannels’: 0L,
‘structVersion’: 2L, ‘hostApi’: 0L, ‘index’: 1,
‘defaultHighOutputLatency’: 0.096, ‘maxOutputChannels’: 2L, ‘name’:
u’ReSpeaker 4 Mic Array (UAC1.0): USB Audio (hw:1,0)’,
‘defaultHighInputLatency’: -1.0}{‘defaultSampleRate’: 44100.0, ‘defaultLowOutputLatency’: -1.0,
‘defaultLowInputLatency’: 0.008707482993197279, ‘maxInputChannels’:
2L, ‘structVersion’: 2L, ‘hostApi’: 0L, ‘index’: 2,
‘defaultHighOutputLatency’: -1.0, ‘maxOutputChannels’: 0L, ‘name’:
u’PrimeSense Device: USB Audio (hw:2,0)’, ‘defaultHighInputLatency’:
0.034829931972789115}
[…][/code]
wheras
</s> $ arecord -l<e>
Succesfully detected the mic as input device.
</s><i>
</i> **** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: AD198x Analog [AD198x Analog]
Subdevices: 0/2
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
card 1: ArrayUAC10 [ReSpeaker 4 Mic Array (UAC1.0)], device 0: USB Audio [USB Audio]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 2: Device [PrimeSense Device], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 3: Phone [MT65xx Android Phone], device 0: USB Audio [USB Audio]
Subdevices: 0/1
Subdevice #0: subdevice #0<e>
I Suppose arecord and pyaudio are indepenedent from each other, but
what can i do to have the Microphone recognized by Pyaudio as Mcrophone?
Is there some configuration file that has to be adapted?
Any help very much appreciated.