How can I use matrix voice speaker as standard audio output on Raspberry?

I can play music through speakers connected to the Matrix Voice board. I would like to use this interface as standard output for audio. How can I do that?

Thanks for your support!

Note: Edited the position of rate 44100 to be correct. Tested and found that the rate change in /etc/asound.conf does not actually work for Snips audio output to the MATRIX Voice speaker out.

Hi @kmbach,

If you type the command aplay -l, you should be able to see the list of playback devices. The MATRIX Voice audio outputs are generally hw:2,1. You can edit the file /etc/asound.conf and change the default playback device to be hw:2,1 as shown below.

Type the command below to edit the file

sudo nano /etc/asound.conf

Change the speaker part of the file to look like the following:

pcm.speaker {
  type plug
  slave {
    pcm "hw:2,1"
  }
}

Then save your changes by pressing Ctrl+X, then Y.

Once you have selected the MATRIX Voice outputs as the default playback device, you can set the default as “speaker” (DF13 connectors) or “headphone” (3.5mm audio out jack) by following this method.

Keep in mind that the MATRIX Voice audio outputs currently only support 44100 Hz 16 bit stereo audio, so you may not be able to play all audio files through it. If you are using it with Snips, you may have to configure the Snips audio playback rate. I believe this is possible by editing the /etc/asound.conf file speaker portion to look like the following, but I have not tried this myself.

pcm.speaker {
  type plug
  slave {
    pcm "hw:2,1"
    rate 44100
  }
}

Hope this helps!

Best,
Samreen