How to Play Audio Through Reachy 2023’s Speakers: A Practical Guide

No Audio Section? That’s Not a Search Problem

Reachy 2023 ships with a speaker. The official documentation does not mention it. If you’ve been working through the Reachy 2023 docs and can’t find an audio section, that’s not a gap in your reading — it simply isn’t there yet. The hardware exists; the documentation hasn’t caught up.

There are three practical paths forward depending on how much overhead you want.

The ReachyAudio Library

The most purpose-built option for the 2023 platform is RomainMaure’s ReachyAudio library. It wraps playback, recording, text-to-speech, and speech recognition into a single Python class. For speaker access you only need the playback side.

Install the core dependencies on the robot:

pip install pyaudio wave pyttsx3 gTTS SpeechRecognition numpy scipy pydub

Basic playback then looks like this:

from reachy_audio import ReachyAudio

audio = ReachyAudio()
audio.playAudio('your_sound_file.wav')

Two things worth knowing before you dive in. First, the library lists PyTorch as a dependency for its conversational AI component. On the Raspberry Pi inside Reachy, PyTorch requires wheel files — a standard pip install torch won’t work. If all you need is playback, you can skip that dependency entirely and just use PyAudio and Wave directly; the ReachyAudio source is a useful reference even if you don’t run the whole library. Second, microphone array access requires setting up udev rules manually — but that’s a separate problem from the speaker.

SSH and Linux Audio Tools

Reachy 2023 runs Linux. Standard audio utilities are right there.

SSH into the robot and use aplay for WAV files:

ssh reachy@<robot-ip>
aplay /path/to/sound.wav

For MP3s, mpg123 is a lightweight option if it’s available on the image:

mpg123 /path/to/track.mp3

This is the fastest sanity check before writing any Python. If aplay works over SSH, the speaker hardware path is clear and you can build on top of that confidence.

You can also trigger audio remotely from a script on your dev machine by shelling out over SSH — no need to touch the ROS2 stack at all. Run aplay -l on the robot first to list audio devices and confirm which one corresponds to the speaker; sometimes the default ALSA device isn’t the one you want.

Python Audio Libraries Without the Full ReachyAudio Stack

If you want programmatic control but not ReachyAudio’s full dependency tree, pygame.mixer works well when installed on the robot itself. Run a small script on the robot via SSH:

import pygame
pygame.mixer.init()
pygame.mixer.music.load('sound.ogg')
pygame.mixer.music.play()
while pygame.mixer.music.get_busy():
    pygame.time.wait(100)

One catch people hit: if the robot’s speaker isn’t the default ALSA device, the mixer won’t find it automatically. Set the SDL_AUDIODRIVER environment variable or pass the device index explicitly to pygame.mixer.init(). Again, aplay -l is your friend for identifying the right device number.

The Reachy 2 SDK Audio API (For Reference)

If you’re working with the newer Reachy 2 — not the 2023 model — Pollen Robotics added proper native audio support to the official reachy2_sdk. It’s useful context even for 2023 users, since it shows the direction the platform is heading and may influence how you structure your own audio layer.

from reachy2_sdk import ReachySDK

reachy = ReachySDK(host='your-reachy-ip')

# Upload a local file to the robot
reachy.audio.upload_audio_file('/local/path/sample.ogg')

# Play it through the speaker
reachy.audio.play_audio_file('sample.ogg')

# Stop playback
reachy.audio.stop_playing()

# List what's currently on the robot
reachy.audio.get_audio_files()

Supported formats on Reachy 2 are .wav, .mp3, and .ogg. The official docs flag one important caveat: audio files are stored in a temporary folder on the robot’s internal computer and wiped at every reboot. No persistent storage yet, so any startup routine you build needs to include the upload step.

For 2023 users, the upload_audio_file pattern is a reasonable model to replicate manually — copy your files to the robot with scp at startup, then trigger playback from a script. Same outcome, more manual wiring.

Sources

Related Articles

Similar Posts