Source hops: Cannot open audio device hw:1,0: No such file or directory
LePtitMetalleux opened this issue · 1 comments
LePtitMetalleux commented
Hi, it's me again.
I'm using the ReSpeaker 4-Mic Array for Raspberry Pi and I tried to get informations in a file or the terminal.
So i started odas live using this command : ./odaslive -c ../config/odaslive/respeaker_4_mic_array.cfg
but I got an error :
pi@raspberrypi:~/odas/build $ ./odaslive -c ../config/odaslive/respeaker_4_mic_array.cfg
Source hops: Cannot open audio device hw:1,0: No such file or directory
pi@raspberrypi:~/odas/build $
Here is my config file :
respeaker_4_mic_array.txt
If you have any idea of what my problem is, please tell me.
Thanks
LePtitMetalleux commented
Fixed using this script :
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')
The script gives me this :
Input Device id 5 - seeed-4mic-voicecard: bcm2835-i2s-ac10x-codec0 ac10x-codec0-0 (hw:4,0)
So I changed the config file with :
raw:
{
fS = 16000;
hopSize = 128;
nBits = 32;
nChannels = 4;
# Input with raw signal from microphones
interface: {
type = "soundcard";
card = 4;
device = 0;
}
}