Matrix Voice as input device

#1

The Matrix Voice (https://www.matrix.one/) is also compatible with Snips.

You should be able to select the device as input during setup of Snips via sam

Alternative, there is a standaline audioserver available (created by me).
This does not produce audio output yet.

1 Like
#2

Thanks @Romkabouter !!

#3

Do you have a problem with snips-audio-server service that can start? i have to create a small script to launch it

su -c "/usr/bin/snips-audio-server --nomike --hijack 0.0.0.0:8080 &" -s /bin/sh pi
sleep 2
su -c "/usr/bin/arecord -r 16000 -c 1 -f S16_LE | nc localhost 8080 &" -s /bin/sh pi 

Do you have to do the some thing ?

#4

Last time I tried, when installing the Kernel Modules, the Voice becomes an alsa input.
So no need to do the --nomike stuff.

#5

So strange i got the last kernel and that doesn’t work for me :frowning:

as you can see

image

#6

Problem drivers ?
look at : arecord -l and aplay -l

#7

I got this :
**** List of CAPTURE Hardware Devices ****
card 1: SOUND [MATRIXIO SOUND], device 0: matrixio.mic.0 snd-soc-dummy-dai-0 []
Subdevices: 0/1
Subdevice #0: subdevice #0

#8

check your /etc/asound.conf, can you post it here?

#9

This is my asound.conf

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

Looks ok, what is there error the audioserver gives?

#11

This si what i got in the syslog

Nov 12 10:41:40 jarvis systemd[1]: snips-audio-server.service: Service hold-off time over, scheduling restart.
Nov 12 10:41:40 jarvis systemd[1]: Stopped Snips Audio Server.
Nov 12 10:41:40 jarvis systemd[1]: Started Snips Audio Server.
Nov 12 10:41:40 jarvis snips-audio-server[4243]: INFO:snips_broadcast_mqtt_server: Starting broadcasting audio on hermes as site "default"
Nov 12 10:41:40 jarvis snips-audio-server[4243]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
Nov 12 10:41:40 jarvis snips-audio-server[4243]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
Nov 12 10:41:40 jarvis snips-audio-server[4243]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
Nov 12 10:41:40 jarvis snips-audio-server[4243]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
Nov 12 10:41:40 jarvis snips-audio-server[4243]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
Nov 12 10:41:40 jarvis snips-audio-server[4243]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
Nov 12 10:41:40 jarvis snips-audio-server[4243]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
Nov 12 10:41:40 jarvis snips-audio-server[4243]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
Nov 12 10:41:40 jarvis snips-audio-server[4243]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
Nov 12 10:41:40 jarvis snips-audio-server[4243]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
Nov 12 10:41:40 jarvis snips-audio-server[4243]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
Nov 12 10:41:40 jarvis snips-audio-server[4243]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
Nov 12 10:41:40 jarvis snips-audio-server[4243]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
Nov 12 10:41:40 jarvis snips-audio-server[4243]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
Nov 12 10:41:40 jarvis snips-audio-server[4243]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
Nov 12 10:41:40 jarvis snips-audio-server[4243]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
Nov 12 10:41:40 jarvis snips-audio-server[4243]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
Nov 12 10:41:40 jarvis snips-audio-server[4243]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
Nov 12 10:41:40 jarvis snips-audio-server[4243]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
Nov 12 10:41:40 jarvis snips-audio-server[4243]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
Nov 12 10:41:40 jarvis snips-audio-server[4243]: ERROR:snips_audio_server         : Could not find required input device
Nov 12 10:41:40 jarvis systemd[1]: snips-audio-server.service: Main process exited, code=exited, status=1/FAILURE
Nov 12 10:41:40 jarvis systemd[1]: snips-audio-server.service: Unit entered failed state.
Nov 12 10:41:40 jarvis systemd[1]: snips-audio-server.service: Failed with result 'exit-code'.
Nov 12 10:41:45 jarvis systemd[1]: snips-audio-server.service: Service hold-off time over, scheduling restart.
Nov 12 10:41:45 jarvis systemd[1]: Stopped Snips Audio Server.
Nov 12 10:41:45 jarvis systemd[1]: Started Snips Audio Server.

It loop again and again, and snips doesn’t ear me

#12

I’ll check my conf as well, I have tinkering too much to have a clean check now :slight_smile:

1 Like
#13

Today installed fresh Raspbian Stretch Lite on my Pi3+
Then followed:

I followed it to the letter, but in step 5 do not do “sam install demo”, that does not seem to work anymore.
Instead continue here:
https://snips.gitbook.io/getting-started/install-an-assistant

I got it working without any issues

#14

Can you list the /etc/snips.toml?
I think the solution might be the mike setting, try:

[snips-audio-server]
# frame = 256
# bind = "default@mqtt"
# mike = "Built-in Microphone"
mike = "MATRIXIO SOUND: - (hw:1,0)"
# disable_playback = false
#15

I got this in my snips.toml

mike = "MATRIXIO SOUND: - (hw:2,0)"

I’m going to made a fresh install this week end to see if it’s ok, i notice this morning that because of my problem i can’t record my own hotword

#16

You say here:

But earlier you state:

I got this :
**** List of CAPTURE Hardware Devices ****
card 1: SOUND [MATRIXIO SOUND], device 0: matrixio.mic.0 snd-soc-dummy-dai-0 []
Subdevices: 0/1
Subdevice #0: subdevice #0

So I think you should have:
mike = "MATRIXIO SOUND: - (hw:1,0)"

Thus a 1, not a 2 for the hardware

#17

What an idiot I am !!! thanks @Romkabouter !!! it’s seems work well now

1 Like
#18

Hello
Thx @Romkabouter
I have 2 question

  1. The quality of the mic is very bad whith the matrix voice , if my tv is on i must yell if i want snip’s detect the wakeword.
    Do you have the same problem ?why the render of micarray_recorder is a way better ?
  2. I use your package for turn on the led of the matrix voice when the wakeword is detect.
    It is possible to use everloop function during the query ?
    Thanks
#19

Hi Speke,

I use my matrix voice as a standalone, so not attached to a Pi. Mine is the esp32 version.
Maybe the problem is the input gain or hotword sensitivity? In my code there is somewhere a mics.setGain, you could try that.

You can program the everloop however you need it, I’m not sure what you mean by “the query”

#20

I was so happy to find the article here.
Same behaviour, but with me the assignments to the device in the configs are apparently correct.
My problem still exists. so sad!

Here is my log:

15 11:54:24 blacki systemd[1]: snips-audio-server.service: Service hold-off time over, scheduling restart.
May 15 11:54:24 blacki systemd[1]: Stopped Snips Audio Server.
May 15 11:54:24 blacki systemd[1]: Started Snips Audio Server.
May 15 11:54:24 blacki snips-audio-server[1142]: INFO:snips_audio_server_cli: Starting audio server on mqtt for site default
May 15 11:54:24 blacki snips-audio-server[1142]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
May 15 11:54:24 blacki snips-audio-server[1142]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
May 15 11:54:24 blacki snips-audio-server[1142]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
May 15 11:54:24 blacki snips-audio-server[1142]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
May 15 11:54:24 blacki snips-audio-server[1142]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
May 15 11:54:24 blacki snips-audio-server[1142]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
May 15 11:54:24 blacki snips-audio-server[1142]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
May 15 11:54:24 blacki snips-audio-server[1142]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
May 15 11:54:24 blacki snips-audio-server[1142]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
May 15 11:54:24 blacki snips-audio-server[1142]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
May 15 11:54:24 blacki snips-audio-server[1142]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
May 15 11:54:24 blacki snips-audio-server[1142]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
May 15 11:54:24 blacki snips-audio-server[1142]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
May 15 11:54:24 blacki snips-audio-server[1142]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
May 15 11:54:24 blacki snips-audio-server[1142]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
May 15 11:54:24 blacki snips-audio-server[1142]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
May 15 11:54:24 blacki snips-audio-server[1142]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
May 15 11:54:24 blacki snips-audio-server[1142]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
May 15 11:54:24 blacki snips-audio-server[1142]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
May 15 11:54:24 blacki snips-audio-server[1142]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
May 15 11:54:24 blacki snips-audio-server[1142]: ERROR:snips_audio_server : Could not find required input device
May 15 11:54:24 blacki snips-audio-server[1142]: ERROR:rumqtt::client : snips-audio-server|1142-blacki-1 Disconnected: (Error(SyncMpsc(Disconnected), State { next_error: None, backtrace: None }))
May 15 11:54:24 blacki snips-audio-server[1142]: ERROR:snips_common_cli::cli : Unable to reconnect to the mqtt broker, ending the program.
May 15 11:54:24 blacki systemd[1]: snips-audio-server.service: Main process exited, code=exited, status=1/FAILURE
May 15 11:54:24 blacki systemd[1]: snips-audio-server.service: Unit entered failed state.
May 15 11:54:24 blacki systemd[1]: snips-audio-server.service: Failed with result ‘exit-code’.

Here are my settings

arecord -l
*** List of CAPTURE Hardware Devices ***
card 1: MATRIXIOSOUND [MATRIXIO-SOUND], device 0: matrixio.mic.0 snd-soc-dummy-dai-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0

/etc/snips.toml
[snips-audio-server]
# frame = 256
# bind = “default@mqtt”
# mike = “MATRIXIO SOUND: - (hw:1,0)”
mike = “MATRIXIO SOUND: - (hw:1,0)”
# disable_playback = false
# disable_capture = false

/etc/asound.conf

pcm.!default {

  • type asym*
  • playback.pcm {*
  •    type plug*
    
  •    slave.pcm "hw:1,1"*
    
  • }*
  • capture.pcm {*
  •    type plug*
    
  •    slave.pcm "hw:1,0"*
    
  • }*
    }

Sam Status

OS version … Raspbian GNU/Linux 9 (stretch)
Installed assistant … SnipsDemoWeatherAssistant
Language … en
Hotword … hey_snips
ASR engine … snips
Status … Live
Service status:
snips-analytics … (not running)
snips-asr … 0.63.2 (running)
snips-audio-server … 0.63.2 (not running)
snips-dialogue … 0.63.2 (running)
snips-hotword … 0.63.2 (running)
snips-nlu … 0.63.2 (running)
snips-skill-server … 0.63.2 (running)
snips-tts … 0.63.2 (running)

Every tip is welcome! :slight_smile: