Learn how to play sound on your Raspberry Pi Zero with this simple guide!

Raspberry Pi Zero is a powerful mini computer that can be used for many purposes. One of them is playing audio files. In this article, we will learn how to configure and use the Raspberry Pi Zero to p …


Updated August 8, 2023

Need help with your Raspberry Pi?
Contact Me!

Do you love silly Raspberry Pi Projects?
Check out my this YouTube Channel!


Raspberry Pi Zero is a powerful mini computer that can be used for many purposes. One of them is playing audio files. In this article, we will learn how to configure and use the Raspberry Pi Zero to play audio files.

Raspberry Pi Zero has built-in support for audio output through its 3.5mm headphone jack. To play sound on your Raspberry Pi Zero, you can follow these steps:

  1. Connect speakers or a headset with a 3.5mm audio jack to the Raspberry Pi Zero’s headphone jack.
  2. Update and upgrade your Raspberry Pi Zero by running the following commands in the terminal:
sudo apt-get update
sudo apt-get upgrade
  1. Install mpg123, a lightweight command-line audio player that supports various audio formats, by running the following command:
sudo apt-get install mpg123
  1. Transfer an audio file to your Raspberry Pi Zero using a micro SD card or other storage method. You can use any format supported by mpg123 such as MP3, WAV, or OGG. For this example, let’s assume you have transferred a file called audio_file.mp3 to the /home/pi/ directory.
  2. Play the audio file using mpg123 by running:
mpg123 /home/pi/audio_file.mp3

The sound should now play through your speakers or headset. You can also use other command-line audio players like aplay or sox, or install a graphical audio player like vlc.

Note: If you are using Raspberry Pi OS Lite (without desktop environment), you may need to enable the audio output by adding dtparam=audio=on to your /boot/config.txt file and rebooting your device.

That’s it! You can now play sound on your Raspberry Pi Zero with ease. Experiment with different audio files and audio players to find the one that works best for you.