[Solved] Matrix Creator and Google Assistant

This worked for me as well (using the raspi audio jack) however the sound from Google Assistant is very low and choppy/static. Using aplay to play an mp3 on the other hand sounds loud and clear. I’ve also noticed after following the steps at https://github.com/matrix-io/matrixio-kernel-modules that my raspi is frequently freezing. Any trouble shooting steps or ideas would be appreciated.

I haven’t tested the volume, but I think it can be adjusted with the alsamixer.

I also had several crashes with the pushbutton example. At first I thought it was because of the memory card, but I guess it’s still a bug in the driver. I’ll post a photo of the trace here, unfortunately the message is a bit too short.

Strangely enough, the Alexa example works stable.

But let’s wait until the drivers are officially released. :slight_smile:

with this config, i’m still getting errors:

aplay info

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  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 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
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

arecord:

$ 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: SOUND [MATRIXIO SOUND], device 0: matrixio.mic.0 snd-soc-dummy-dai-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

.asoundrc:

pcm.!default {
  type asym
  capture.pcm "mic"
  playback.pcm "speaker"
}
pcm.mic {
   type softvol
   slave {
     pcm "array"
   }
   control {
     name "MicArray Master"
        card 0
   }
}
pcm.speaker {
  type plug
  slave {
    pcm "hw:0,0"
  }
}
pcm.array {
  type plug
  slave {
    pcm "hw:2,0"
  }
}

lsmod | grep matrix

$ lsmod | grep matrix
matrixio_codec          5030  1
matrixio_pcm          267079  1
snd_soc_core          180471  2 matrixio_pcm,matrixio_codec
matrixio_uart           5939  0
matrixio_core           4415  1 matrixio_pcm
snd_pcm                98501  5 matrixio_pcm,snd_pcm_dmaengine,snd_bcm2835,snd_soc_core,snd_dummy

google-assistant-demo:

$ google-assistant-demo --device_model_id trident
device_model_id: trident
device_id: 157C61F22D63BCBFBFE45609C38F5921

[5716:5738:ERROR:audio_input_processor.cc(748)] Input error
ON_MUTED_CHANGED:
  {'is_muted': False}
ON_START_FINISHED
[5716:5744:ERROR:audio_input_processor.cc(748)] Input error

googlesamples-assistant-hotword also:

$ googlesamples-assistant-hotword --device_model_id trident
device_model_id: trident
device_id: 157C61F22D63BCBFBFE45609C38F5921

ON_MUTED_CHANGED:
  {'is_muted': False}
[5760:5782:ERROR:audio_input_processor.cc(748)] Input error
ON_START_FINISHED
[5760:5790:ERROR:audio_input_processor.cc(748)] Input error

alsamixer to adjust audio crashes if i try to select matrixio sound device

 $ alsamixer
cannot load mixer controls: Input/output error

should I just do a fresh install and only do matrixio kmods and then see if it works?

@OrsonAround,

Same happened to me. Fixed it by just asking Google to increase the volume at 100% … using my voice :slight_smile:

The kernel module are incompatible with the latest HAL/MALOS packages, so maybe is related to that. Please remove/stop using MALOS/HAL while using the kernel modules. We are working on a release where this won’t be a problem.

@vizir,

I will suggest to try it again from scratch.
We are working on a guide for this in Hackster that will be out soon :

Will post here!

Thanks for the patience.

I have read the Hackster guide and had a problem. Here is the thread of that conversation so far…
So the assistant works, but the ever loop is just flashing randomly. any help with this would be awesome.
Yoel Castillo
Yoel Castillo
2 days ago
Hi Jared,

Can you share the output of sudo dpkg --list | grep matrix?

Also, we recommend to post this question in the community, this way is easier to follow the topic and others can get help from it too.

Thank you.


Here’s the output:

ii libswresample2:armhf 7:3.2.10-1~deb9u1+rpt1 armhf FFmpeg library for audio resampling, rematrixing etc. - runtime files
ii matrixio-creator-init 0.4.5 armhf Install scripts that can program the MATRIX Creator FPGA and SAM3 IMU.
ii matrixio-openocd 1.0.1 armhf Open on-chip JTAG debug solution for ARM and MIPS systems
ii matrixio-xc3sprog 1.1.1 armhf Spartan3, XCF and CPLD JTAG programmer and other utilities.

Hi @jaredpotter,

Can you share a short video of the LEDs flashing?

Thanks,

so, I finally got time to revisit this problem. fresh install and the tutorial on hackster.io made it trivial to get the mic and everloops working. and google assistant appears to be listening. but, i can’t get the sound out working. i am using a dac/amp board with the pi. so it has 2 hats installed: the creator and the justboom amp hat.

running stock raspbian i can get the dac/amp to work perfectly. but after adding the matrix creator and following the tutorial, the matrix creator works and the dac/amp stops. could it be something to do with the $HOME/.asoundrc file which is created? tried modifying it for the pcm.speaker section with the hw id’s but no luck.

how did you wired up this setup. can you post a photo and some more details. i don’t know if this will work, as the matrix is using a lot of the default pins. how is the pi communicating with this thing, i did not find any detailed information.

Hi @vizir,

Interesting. We do not support others hats connected at the same time with the MATRIX Voice but we could definitely help you and advise you on your project. I would suggest opening a new post for this conversation.

I will need more information in other to be able to help you. For example, what pins does the dac/amp hat uses? Maybe some photo or sketch of the connections.

Thanks

Hey @vizir how is it going ?

Did you get it to work?
Did you tried just using the 3.5mm audio jack as output?

Let me know if we can close this thread about the Google Assistant and we can follow up on the issue with the audio output to the hat.

-Yoel

Unfortunately, I’ve had no time to work on this at all. It still doesn’t work. I am going to try and find some time soon to get back to this project. I was hoping someone else would try something similar and we could share experiences.

Ok great let us know when you test again.

I will close this long post about the first issue you had and you can open a new one specific for the audio hat.

Let me know if that’s OK for you.

-Yoel

Yes, that works. Thanks