Matrixio-kernel-modules broken

Hello same here, I tried. first with image: 2019-04-08-raspbian-stretch-lite.img
and after reading this post with: 2018-11-13-raspbian-stretch-lite.img
same problem with building the kernel modules after AND before update-all

Hi, @skunz56, @ehome, and @Philofive.

Please follow the instructions in this thread for a temporary workaround.

1 Like

Thanks, that worked fine

1 Like

Hi everybody,

in my case I’m afraid that didn’t help. I have already installed the older kernel from your workaround instructions. Does anybody have an idea what’s wrong here?
I have already installed snips and played with it for a while. After I finally received my Matrix Voice Standard today I tried to install the necessary software components. So it has of course never worked before.

pi@raspberrypi10:~ $ uname -a
Linux raspberrypi10 4.14.79-v7+ #1159 SMP Sun Nov 4 17:50:20 GMT 2018 armv7l GNU/Linux

pi@raspberrypi10:~ $ sudo apt install matrixio-kernel-modules -y
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following NEW packages will be installed:
matrixio-kernel-modules
0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
Need to get 0 B/17.6 kB of archives.
After this operation, 108 kB of additional disk space will be used.
Selecting previously unselected package matrixio-kernel-modules.
(Reading database … 78475 files and directories currently installed.)
Preparing to unpack …/matrixio-kernel-modules_0.1.7_armhf.deb …
Unpacking matrixio-kernel-modules (0.1.7) …
Setting up matrixio-kernel-modules (0.1.7) …
Enabling firmware loading at startup

Creating symlink /var/lib/dkms/matrixio/0.1/source ->
/usr/src/matrixio-0.1

DKMS: add completed.

Kernel preparation unnecessary for this kernel. Skipping…

Building module:
cleaning build area…
make -j4 KERNELRELEASE=4.14.79-v7+ -C /lib/modules/4.14.79-v7+/build M=/var/lib/dkms/matrixio/0.1/build…(bad exit status: 2)
Error! Bad return status for module build on kernel: 4.14.79-v7+ (armv7l)
Consult /var/lib/dkms/matrixio/0.1/build/make.log for more information.
dpkg: error processing package matrixio-kernel-modules (–configure):
subprocess installed post-installation script returned error exit status 10
Errors were encountered while processing:
matrixio-kernel-modules
E: Sub-process /usr/bin/dpkg returned an error code (1)

pi@raspberrypi10:~ $ cat /var/lib/dkms/matrixio/0.1/build/make.log
DKMS make.log for matrixio-0.1 for kernel 4.14.79-v7+ (armv7l)
Fri 14 Jun 18:00:12 BST 2019
make: Entering directory ‘/usr/src/linux-headers-4.14.79-v7+’
AR /var/lib/dkms/matrixio/0.1/build/built-in.o
CC [M] /var/lib/dkms/matrixio/0.1/build/matrixio-core.o
CC [M] /var/lib/dkms/matrixio/0.1/build/matrixio-everloop.o
CC [M] /var/lib/dkms/matrixio/0.1/build/matrixio-codec.o
CC [M] /var/lib/dkms/matrixio/0.1/build/matrixio-uart.o
CC [M] /var/lib/dkms/matrixio/0.1/build/matrixio-mic.o
CC [M] /var/lib/dkms/matrixio/0.1/build/matrixio-gpio.o
CC [M] /var/lib/dkms/matrixio/0.1/build/matrixio-playback.o
/var/lib/dkms/matrixio/0.1/build/matrixio-mic.c:224:5: error: unknown field âopsâ specified in initializer
.ops = &matrixio_pcm_ops, .pcm_new = matrixio_pcm_new,
^
/var/lib/dkms/matrixio/0.1/build/matrixio-mic.c:224:12: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.ops = &matrixio_pcm_ops, .pcm_new = matrixio_pcm_new,
^
/var/lib/dkms/matrixio/0.1/build/matrixio-mic.c:224:12: note: (near initialization for âmatrixio_soc_platform.nameâ)
/var/lib/dkms/matrixio/0.1/build/matrixio-mic.c:224:31: error: unknown field âpcm_newâ specified in initializer
.ops = &matrixio_pcm_ops, .pcm_new = matrixio_pcm_new,
^
/var/lib/dkms/matrixio/0.1/build/matrixio-mic.c:224:42: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.ops = &matrixio_pcm_ops, .pcm_new = matrixio_pcm_new,
^~~~~~~~~~~~~~~~
/var/lib/dkms/matrixio/0.1/build/matrixio-mic.c:224:42: note: (near initialization for âmatrixio_soc_platform.controlsâ)
cc1: some warnings being treated as errors
scripts/Makefile.build:334: recipe for target ‘/var/lib/dkms/matrixio/0.1/build/matrixio-mic.o’ failed
make[1]: *** [/var/lib/dkms/matrixio/0.1/build/matrixio-mic.o] Error 1
make[1]: *** Waiting for unfinished jobs…
/var/lib/dkms/matrixio/0.1/build/matrixio-playback.c:343:5: error: unknown field âopsâ specified in initializer
.ops = &matrixio_playback_ops,
^
/var/lib/dkms/matrixio/0.1/build/matrixio-playback.c:343:12: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.ops = &matrixio_playback_ops,
^
/var/lib/dkms/matrixio/0.1/build/matrixio-playback.c:343:12: note: (near initialization for âmatrixio_soc_platform.nameâ)
/var/lib/dkms/matrixio/0.1/build/matrixio-playback.c:344:5: error: unknown field âpcm_newâ specified in initializer
.pcm_new = matrixio_playback_new,
^
/var/lib/dkms/matrixio/0.1/build/matrixio-playback.c:344:16: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.pcm_new = matrixio_playback_new,
^~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/matrixio/0.1/build/matrixio-playback.c:344:16: note: (near initialization for âmatrixio_soc_platform.controlsâ)
cc1: some warnings being treated as errors
scripts/Makefile.build:334: recipe for target ‘/var/lib/dkms/matrixio/0.1/build/matrixio-playback.o’ failed
make[1]: *** [/var/lib/dkms/matrixio/0.1/build/matrixio-playback.o] Error 1
Makefile:1527: recipe for target ‘module/var/lib/dkms/matrixio/0.1/build’ failed
make: *** [module/var/lib/dkms/matrixio/0.1/build] Error 2
make: Leaving directory ‘/usr/src/linux-headers-4.14.79-v7+’

@jarvis,

The reason this didn’t work for you is because just yesterday we updated our kernel modules to work with the latest Raspbian release with Linux kernels 4.19!

We haven’t made the announcement yet, as even though recording and playing audio now works with the latest Raspbian, we are carrying out more testing with Snips as we have run into some issues there.

Since you installed the matrixio-kernel-modules from package, it installed the latest version which is incompatible with the downgraded kernel :sweat_smile:

For now, I would recommend uninstalling the matrixio-kernel-modules

sudo apt purge matrixio-kernel-modules

Then reboot

sudo reboot

Then installing the previous version

sudo apt install matrixio-kernel-modules=0.1.6

Then reboot

sudo reboot

Sorry about the confusion, we hope to solve the latest Raspbian & MATRIX kernel module compatibility issue with Snips soon!

Let me know how it goes

Best,
Samreen

Hi Samreen,

I’m afraid I couldn’t install the specific version.

pi@raspberrypi10:~ $ sudo apt purge matrixio-kernel-modules
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following package was automatically installed and is no longer required:
dkms
Use ‘sudo apt autoremove’ to remove it.
The following packages will be REMOVED:
matrixio-kernel-modules*
0 upgraded, 0 newly installed, 1 to remove and 4 not upgraded.
1 not fully installed or removed.
After this operation, 108 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database … 78498 files and directories currently installed.)
Removing matrixio-kernel-modules (0.1.7) …
Remove kernel modules for MATRIX devices


Deleting module version: 0.1
completely from the DKMS tree.

Done.
(Reading database … 78475 files and directories currently installed.)
Purging configuration files for matrixio-kernel-modules (0.1.7) …
pi@raspberrypi10:~ sudo apt install matrixio-kernel-modules=0.1.6 Reading package lists... Done Building dependency tree Reading state information... Done E: Version '0.1.6' for 'matrixio-kernel-modules' was not found pi@raspberrypi10:~ sudo apt install matrixio-kernel-modules=0.1.6apt list -a ^C
pi@raspberrypi10:~ $ apt list -a matrixio-kernel-modules
Listing… Done
matrixio-kernel-modules/unknown 0.1.7 armhf

However I reinstalled the up-to-date kernel again followed by your guys’ kernel module. My system isn’t productive anyway, yet so I can live with some bugs :slight_smile:
In case I have further problems they will be different ones then qualifying for a seperate post.

Sounds good! We found our latest kernel with the latest Raspbian actually works as expected! The issue it is having with Snips is a widespread issue Snips services are having with the latest Raspbian kernel. We will provide a fix for that, but it’s not on our side specifically!

@jarvis,

Posted a workaround for the Snips issue with the latest Raspbian. You can check it out here, and get it working nicely with MATRIX devices. Hope this helps!

Best,
Samreen

Sorry, didn’t find much time yesterday to test the new package and settings.

BTW: Very minor thing: the quotes in your latest workaround post are not regular double quotes (Environment=“PA_ALSA_PLUGHW=1”), but other characters.

I’m afraid the snips audio server isn’t willing to start in my case. In sam test microphone everything is fine.

[snips-audio-server]

frame = 256

bind = “default@mqtt”

mike = “MATRIXIO SOUND: - (hw:2,0)”
Environment=“PA_ALSA_PLUGHW=1”

When I start the audio server from my prompt with verbose I get this:

pi@raspberrypi10:~ $ snips-audio-server -v
[14:38:28.186839] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.bus -> Ok(None)
[14:38:28.187194] DEBUG:snips_common_cli::cli: conf lookup: snips-common.bus -> Ok(None)
[14:38:28.187284] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.mqtt -> Ok(None)
[14:38:28.187361] DEBUG:snips_common_cli::cli: conf lookup: snips-common.mqtt -> Ok(Some(“valid-hostname-in-my-network:1883”))
[14:38:28.191682] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.mqtt_username -> Ok(None)
[14:38:28.191797] DEBUG:snips_common_cli::cli: conf lookup: snips-common.mqtt_username -> Ok(None)
[14:38:28.191887] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.mqtt_password -> Ok(None)
[14:38:28.191969] DEBUG:snips_common_cli::cli: conf lookup: snips-common.mqtt_password -> Ok(None)
[14:38:28.192054] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.mqtt_tls_hostname -> Ok(None)
[14:38:28.192136] DEBUG:snips_common_cli::cli: conf lookup: snips-common.mqtt_tls_hostname -> Ok(None)
[14:38:28.203940] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.alsa_playback -> Ok(None)
[14:38:28.204107] DEBUG:snips_common_cli::cli: conf lookup: snips-common.alsa_playback -> Ok(None)
[14:38:28.204204] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.disable_playback -> Ok(None)
[14:38:28.204286] DEBUG:snips_common_cli::cli: conf lookup: snips-common.disable_playback -> Ok(None)
[14:38:28.204371] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.output -> Ok(None)
[14:38:28.204444] DEBUG:snips_common_cli::cli: conf lookup: snips-common.output -> Ok(None)
[14:38:28.204527] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.frame -> Ok(None)
[14:38:28.204602] DEBUG:snips_common_cli::cli: conf lookup: snips-common.frame -> Ok(None)
[14:38:28.204685] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.nomike -> Ok(None)
[14:38:28.204761] DEBUG:snips_common_cli::cli: conf lookup: snips-common.nomike -> Ok(None)
[14:38:28.204845] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.mike -> Ok(Some(“MATRIXIO SOUND: - (hw:2,0)”))
[14:38:28.204948] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.disable_capture -> Ok(None)
[14:38:28.205035] DEBUG:snips_common_cli::cli: conf lookup: snips-common.disable_capture -> Ok(None)
[14:38:28.205117] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.alsa_capture -> Ok(None)
[14:38:28.205196] DEBUG:snips_common_cli::cli: conf lookup: snips-common.alsa_capture -> Ok(None)
[14:38:28.205279] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.hijack -> Ok(None)
[14:38:28.205358] DEBUG:snips_common_cli::cli: conf lookup: snips-common.hijack -> Ok(None)
[14:38:28.205442] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.bind -> Ok(None)
[14:38:28.205517] DEBUG:snips_common_cli::cli: conf lookup: snips-common.bind -> Ok(None)
[14:38:28.205605] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.bind -> Ok(None)
[14:38:28.205680] DEBUG:snips_common_cli::cli: conf lookup: snips-common.bind -> Ok(None)
[14:38:28.205790] INFO :snips_audio_server_cli: Starting audio server on mqtt for site default
[14:38:28.206062] DEBUG:snips_audio_portaudio : Attempt 0
[14:38:28.206243] DEBUG:snips_audio_portaudio : Mike source capture started
Expression ‘alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )’ failed in ‘src/hostapi/alsa/pa_linux_alsa.c’, line: 923
Expression ‘alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )’ failed in ‘src/hostapi/alsa/pa_linux_alsa.c’, line: 923
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm_plug.c:1263:(_snd_pcm_plug_open) Unknown field rate
[14:38:28.258524] DEBUG:snips_audio_portaudio : Portaudio: Ok(“PortAudio V19-devel (built May 9 2019 13:17:19)”)
[14:38:28.258667] DEBUG:snips_audio_portaudio : Looking for input device called MATRIXIO SOUND: - (hw:2,0)
[14:38:28.258729] DEBUG:snips_audio_portaudio : Consider: bcm2835 ALSA: IEC958/HDMI (hw:0,1)
[14:38:28.258780] DEBUG:snips_audio_portaudio : Consider: Dummy: PCM (hw:1,0)
[14:38:28.258838] DEBUG:snips_audio_portaudio : Consider: MATRIXIO-SOUND: - (hw:2,0)
[14:38:28.258887] DEBUG:snips_audio_portaudio : Consider: MATRIXIO-SOUND: - (hw:2,1)
[14:38:28.258938] DEBUG:snips_audio_portaudio : Consider: dmix
[14:38:28.258986] DEBUG:snips_audio_portaudio : Consider: default
[14:38:28.259866] DEBUG:snips_audio_portaudio : Mike source capture ended
[14:38:28.306202] DEBUG:snips_audio_portaudio : Attempt 1
[14:38:28.306376] ERROR:snips_audio_server : Could not find required input device

[14:38:28.306419] ERROR:rumqtt::client : snips-audio-server|1152-raspberrypi10-1 Disconnected: (Error(SyncMpsc(Disconnected), State { next_error: None, backtrace: None }))
[14:38:28.306502] ERROR:snips_common_cli::cli : Unable to reconnect to the mqtt broker, ending the program.
pi@raspberrypi10:~ $

When I change the input device in snips.toml to 2,1 instead of 2,0 I get this output:
ALSA lib pcm_plug.c:1263:(_snd_pcm_plug_open) Unknown field rate
[14:47:42.233242] DEBUG:snips_audio_portaudio : Portaudio: Ok(“PortAudio V19-devel (built May 9 2019 13:17:19)”)
[14:47:42.233443] DEBUG:snips_audio_portaudio : Looking for input device called MATRIXIO-SOUND: - (hw:2,1)
[14:47:42.233552] DEBUG:snips_audio_portaudio : Consider: bcm2835 ALSA: IEC958/HDMI (hw:0,1)
[14:47:42.233773] DEBUG:snips_audio_portaudio : Consider: Dummy: PCM (hw:1,0)
[14:47:42.234003] DEBUG:snips_audio_portaudio : Consider: MATRIXIO-SOUND: - (hw:2,0)
[14:47:42.234134] DEBUG:snips_audio_portaudio : Consider: MATRIXIO-SOUND: - (hw:2,1)
[14:47:42.234276] INFO :snips_audio_portaudio : Use input device: “MATRIXIO-SOUND: - (hw:2,1)”
[14:47:42.234434] DEBUG:snips_audio_portaudio : Start capture: InputSettings { params: Parameters { device: Index(DeviceIndex(3)), channel_count: 1, suggested_latency: -1.0, is_interleaved: true, sample_format: PhantomData }, sample_rate: 16000.0, frames_per_buffer: 256, flags: }
Expression ‘parameters->channelCount <= maxChans’ failed in ‘src/hostapi/alsa/pa_linux_alsa.c’, line: 1513
Expression ‘ValidateParameters( inputParameters, hostApi, StreamDirection_In )’ failed in ‘src/hostapi/alsa/pa_linux_alsa.c’, line: 2813
[14:47:42.241155] DEBUG:snips_audio_portaudio : Mike source capture ended
[14:47:42.280337] DEBUG:snips_audio_portaudio : Attempt 1
[14:47:42.280639] ERROR:snips_audio_server : InvalidChannelCount

[14:47:42.280725] ERROR:rumqtt::client : snips-audio-server|1852-raspberrypi10-1 Disconnected: (Error(SyncMpsc(Disconnected), State { next_error: None, backtrace: None }))
[14:47:42.280821] ERROR:snips_common_cli::cli : Unable to reconnect to the mqtt broker, ending the program.

I do not have the speaker part you mentioned in asound.conf. I added it in the playback section.

pcm.!default {
type asym
playback.pcm {
type plug
slave.pcm “hw:0,0”
rate 16000
}
capture.pcm {
type plug
slave.pcm “hw:2,0”
}
}

Thank you for pointing out the quote thing!

Try changing the following line in /etc/snips.toml

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

To

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

And see if that helps.

Best,
Samreen

Sorry again for the long delay in response. The additional dash helps, thank you!

The audio-service is now running. First it still didn’t work, but after a reboot it seems to be:

pi@raspberrypi10:~ $ sam watch
[01:38:08] Watching on raspberrypi1.domain:1883 (MQTT)
[01:38:16] [Hotword] detected on site default, for model Jarvis
[01:38:16] [Asr] was asked to stop listening on site default
[01:38:16] [Hotword] was asked to toggle itself 'off' on site default
[01:38:16] [Dialogue] session with id 'a2965a7a-eb19-45d8-9b2b-5f5eaa22933e' was started on site default
[01:38:16] [AudioServer] was asked to play a wav of 41.1 kB with id '8ef124af-b89c-4e04-ad1e-a6852327c049' on site default
[01:38:31] [Dialogue] session with id 'a2965a7a-eb19-45d8-9b2b-5f5eaa22933e' was ended on site default. The session was ended because one of the component didn't respond in a timely manner
[01:38:31] [Asr] was asked to stop listening on site default
[01:38:31] [Hotword] was asked to toggle itself 'on' on site default

Unfortunately I still have a weird problem, but that was the same when I still had the USB headset AND an additional speaker (3.5mm) connected. It looks like snips isn’t able to play the sound that indicates it has heard the keyword. But I guess that’s not a fault of the matrix voice, but instead the snips software.

@jarvis,

That could be an issue in your ALSA config and how you have configured the playback device.

Type aplay -l in your terminal to see the card and device number of your speaker, then ensure that the playback.pcm hw number matches that.

I’d say that’s just fine, isn’t it?

pi@raspberrypi10:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 7/7
  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
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 IEC958/HDMI [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
card 2: MATRIXIOSOUND [MATRIXIO-SOUND], device 1: matrixio.pcm-out.0 snd-soc-dummy-dai-1 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
pi@raspberrypi10:~ $ cat /etc/asound.conf
pcm.!default {
    type asym
    playback.pcm {
    type plug
    slave.pcm "hw:0,0"
}
capture.pcm {
    type plug
    slave.pcm "hw:2,0"
}
}pi@raspberrypi10:~ $

Simply running
aplay filesystemPathToSomeWavFile
works just fine without explicit specification of the target device.

@jarvis,

Yup, looks just fine. Not sure then. Other audio except the hotword audio is working? That is odd.

@Samreen

I am also facing issues with snips on the latest raspbian stretch. Since I didnt get it to work, I decided to install an older raspbian image with 4.14. kernel. However, now, I cannot get the matrix voice kernel modules to compile.

I tried to install an older version as advised above however it cannot be found:

pi@snipsbase:~ $ sudo apt install matrixio-kernel-modules=0.1.6
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '0.1.6' for 'matrixio-kernel-modules' was not found

Trying to install the regular package of course fails (compilation will fail).

What should I do?

Hi @s710,

Welcome to the community!

The downgrade is no longer necessary. We can troubleshoot Snips with Raspbian Stretch on Linux kernel 4.19.

I recommend undoing the downgrade and installing the kernel modules using the steps below.

sudo apt-mark unhold raspberrypi-kernel

sudo apt-mark unhold raspberrypi-kernel-headers

sudo apt purge matrixio-kernel-modules

sudo apt purge raspberrypi-kernel-headers

sudo apt update && sudo apt upgrade

sudo reboot

sudo apt install matrixio-kernel-modules

sudo reboot

Then, type arecord -l and show me the output, along with the output of the mike= line in your /etc/snips.toml file.

If the microphone name is accurate in the snips.toml configuration file, we can continue troubleshooting from there.

Best,
Samreen

I already had a working installation, both mic and speakers working as per arecord recording.wav -f S16_LE -r 16000 -d 5 && aplay recording.wav, however I had issues with snips:

  • TTS playback would randomly stop before end of speech
  • feedback sounds were blocking the audio server, so I had to disable them otherwise snips would not process queries beyond hotword detection
  • it is not possible to record a personal hotword with their script, as it continues to complain about too much background noise, even with a perfectly silent room and a distance to the mic of about 10cm

I thus wanted to get a clean installation with 4.14 to see if that gets the problems solved.

@s710,

The feedback sounds blocking the audio server was an issue I experienced with Snips when the Linux 4.19 kernels had come out. Since then, the issue was solved by Snips, but it is possible it is back or some configuration you have is causing it.

At the time, this Snips workaround helped me solve the issue. I would recommend trying it and let me know what happens.

In the meantime, I will check on how you can install the older MATRIX kernel modules with 4.14 since the command I mentioned before with installing matrixio-kernel-modules=0.1.6 doesn’t seem to work.

Best,
Samreen

Thanks for your feedback :slight_smile: Finally someone who is willing friendly and to help :slight_smile:

Feeling pretty lost with all those snips issues, tho I thought I really should have a standard setup and everything should be straight forward :anguished:

Hi @s710,

I tested Snips with a fresh install of Raspbian Stretch 4.19 using our Snips guide. I had to implement the rate 16000 part of the workaround (the full workaround works too) to get it working since the portaudio issue seems to be back.

Did it work for you?

Regarding the MATRIX kernel module downgrade, if that is still of interest to you, the best way seems to be to compile the older version from source. So, after cloning the repo, checkout the commit of the version you want.

Let us know if you have any questions!

Best,
Samreen