matrix-io / matrix-creator-hal

Hardware Abstraction Layer for MATRIX Creator & MATRIX Voice
https://matrix-io.github.io/matrix-documentation/matrix-hal/overview/
GNU General Public License v3.0
70 stars 50 forks source link

Passing Matrix Voice audio to Snowboy #77

Closed ajitam closed 6 years ago

ajitam commented 6 years ago

Hello,

(I apologize if I'm writing this in wrong project)

I have a Matrix Voice (connected to Raspberry Pi 3). I setup device and run micarray_recorder_direct. I got recording so I can confirm that I have connection

Question: as a result I got 8 files, I'm guessing that eight file is result of 7 mic inputs?

This is my arecord -l

**** List of CAPTURE Hardware Devices ****
card 1: Dummy [Dummy], device 0: Dummy PCM [Dummy PCM]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 2: Device [USB PnP Sound Device], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

As you can see I have Matrix and USB microphone.

I installed Snowboy and run nodejs script which listens to default capture device and if I use my USB microphone it works. cat ~/.asoundrc

pcm.!default {
  type asym
   playback.pcm {
     type plug
     slave.pcm "hw:0,0"
   }
   capture.pcm {
     type plug
     slave.pcm "hw:2,0"
   }
}

Questions: How do I setup ~/.asoundrc to set Matrix Voice as my default capture?

yoelrc88 commented 6 years ago

as a result I got 8 files, I'm guessing that eight file is result of 7 mic inputs?

Yes, this is correct.

How do I setup ~/.asoundrc to set Matrix Voice as my default capture?

For using the microphone array with Sensory we recommend using the kernel modules package installation. After the package installation the device you should use is the hw:2,0. There is an example asound.conf file here

ajitam commented 6 years ago

Totally forgot about this question. Yes I installed HAL modules and matrix was detected.