EDIT: Using mic array with sox


#1

so to be honest I have no clue WHERE to start looking on how to accomplish this. I wanted to use the matrix light (python or JS) to make my matrix voice function with a custom Lex bot using a custom wake word (snowboy preferred) if someone could point me in the right direction I’d be grateful.

EDIT: figured (most of it) out i got the lex bot to load but now i have another issue the bot uses Sox to record the input but i keep getting this error:

ALSA lib pcm_hw.c:1789:(_snd_pcm_hw_open) Unknown field playback
sox FAIL formats: can’t open input `default’: snd_pcm_open error: Invalid argument

I know it works when I record with the Mic function and playback is fine, the input I’ve set with mic matches the needed sample rates, channels etc as well. so how do you force an input device in Sox?

This is my .asoundrc file:

pcm.!default
{
type asym
playback.pcm {
type hw
card 0
device 0
}
capture.pcm {
type file
file “/tmp/matrix_micarray_channel_0”
infile “/tmp/matrix_micarray_channel_0”
format “raw”
slave {
pcm sc
}
}
}

as I couldn’t get the array to work at all otherwise