Hi, I am working on a project that require me to use a microphone with the chromium browser. I have a matrix voice and I am being able to record with arecord.
pi@raspberrypi:~ $ arecord -D mic_channel8 -r 16000 -f S16_LE test2.wav
Recording WAVE 'test2.wav' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono
^CAborted by signal Interrupt...
I can playback the recorded wav file with aplay.
I have 2 problems here:
aplay only works with the analog output. (headphone jack on the pi), It doesn’t play on connected USB speakers. I tried multiple speakers. I could play a sample wav file I download with the USB speakers using aplay.
pi@raspberrypi:~ $ aplay -D hw:0,0 test2.wav
Playing WAVE ‘test2.wav’ : Signed 16 bit Little Endian, Rate 16000 Hz, Mono
pi@raspberrypi:~ $ aplay -D hw:2,0 test2.wav
Playing WAVE ‘test2.wav’ : Signed 16 bit Little Endian, Rate 16000 Hz, Mono
aplay: set_params:1305: Channels count non available
I would like to use the matrix voice as an input device on chromium browser (SIPJS - uses webrtc)
My chromium browser app is working fine when I set a USB microphone as default mic. But it when I set one of the 8 channels from Matrix Voice as the input device, it doesn’t work. Sometime I hear a static voice, and sometimes just quite.
@kevindpatino mentioned it could be because I was using the beamformed mic_channel8 and suggested me to use one of the 8 physical mics. I tried that and I see same results. Have anyone tried using Matrix Voice / Creator on a browser? Thank you in advance.
Ok, I got around the 1st issue “aplay: set_params:1305: Channels count non available” by modifying /etc/asound.conf file end with
pcm.!default
{
type asym
playback.pcm {
type plug
slave.pcm "hw:2,0"
}
capture.pcm {
type plug
slave.pcm "mic_channel1"
}
}
ctl.!default {
type hw
card 2
}
This uses my usb speaker for output and matrix voice channel1 as input.
I am still struggling to figure out how to use matrix mic in browser though. The issue is that, navigator.mediaDevices.enumerateDevices() returns the dummy matrix device and all I get is a static voice when using that.
Hi @kevindpatino, I tried setting up matrixio-kernel-modules and could get the google assistant to work. I did this on a fresh raspbian image. But that did not help me using Matrix Voice as a mic in the chrome browser. Its crashing browser every time it try getUserMedia(), it crashes browser.
Well, am glad that I am not the only one. Sadly, no update on this. I couldn’t get it working on chromium yet. When you get your board and if you manage to get it working, please let me know.