Pi & Speaker Bonnet Setup
Raspberry Pi OS Setup
First get the latest release of Raspberry Pi OS installed on your Pi and update all of the built-in software with apt. If you are comfortable with the Raspberry Pi imaging and setup process, you can follow the steps listed here under the quick start prerequisites. If you'd like more details, a more thorough guide page can be found here.
Python Venv
If you are new to python or don't have experience with python virtual environments see this guide for a good introduction.
I used the Python virtual environment ~/venvs/translator_venv throughout this guide to install various Python dependencies into. You can do the same or choose a different name or location for it, but you must be sure to always activate your environment before installing dependencies or using the project scripts.
These commands will create and activate the virtual environment.
python -m venv ~/venvs/translator_venv source ~/venvs/translator_venv/bin/activate
Blinka Setup
1. Install Blinka by following the automated install section on this guide page.
2. Install the proper gpio library based on whether you are using a Raspberry Pi 4, or 5.
Activate the same virtual environment created in step 1 if it is not already active.
Install Speaker Bonnet Software
To install the driver for the Adafruit Speaker Bonnet, follow the instructions on this setup page. Remember to use the same virtual environment you created and activated in the above step rather than the more generic one mentioned on the setup page. Once the installation is complete and you've rebooted the Pi, return here to continue.
Voice Bonnet Option
The Adafruit Voice Bonnet is now discontinued, but if you have one it can be used for this project instead of the Speaker Bonnet. To install the driver for the Adafruit Voice Bonnet, follow the instruction this setup page. Remember to use the same virtual environment you created and activated in the above step rather than the more generic one mentioned.
Reboot the Pi to apply the settings set in the last step.
Checking for the Card
After the Pi comes back up from the reboot, check for the card by running the command below. You should see a card named sndrpigooglevoi for the Speaker Bonnet or seeed2micvoicec for the Voice Bonnet.
aplay -l
Take note of what card number the device has. You may need to use the card number to output audio from the device. In the picture above, the voicecard is card number 3, yours may be a different number.
You can use alsamixer to adjust the volume, don't forget to select the card with F6 or 's' key.
A gain of about 60% is plenty loud! The sliders marked speaker near the center control volume of output from the JST speaker connections. If you're using the Voice Bonnet, the slider marked headphone on the far left controls the volume of output from the 3.5mm jack.
Headphone/Speaker Test
If you're using the Voice Bonnet Make sure the Audio On/Off switch is set to ON
With speakers attached to the JST speaker port, run
speaker-test -c2
You should hear white noise coming from speakers connected to the voice bonnet 3.5mm jack or JST speaker connection(s). If you do not hear anything, then you need to direct the audio output to the correct sound card by using the -D or --device argument. This is where you need the sound card number for the voice card that you can find with aplay -l. To specify the device use plughw:#,0 as the argument value, replacing the # with your card number. For example when the voicecard is device number 3:
speaker-test -c2 -D plughw:3,0
Page last edited November 03, 2025
Text editor powered by tinymce.