Reachy 2023 Speaker Audio Playback: SSH, Python, and the ReachyAudio Library

What is actually inside Reachy 2023’s audio chain

The speaker hardware in the Reachy 2023 torso is a Visaton VS-FRS7/8 driven by a PAM8620 Class-D stereo amplifier. Compact and efficient. The robot’s embedded Intel NUC feeds audio to that amp directly, and the NUC runs Ubuntu with ROS2 Humble pre-installed. That means you have a full Linux audio stack available the moment you SSH in. No custom firmware required just to get a sound out.

The fastest path: direct Linux audio over SSH

Because the NUC is a standard Ubuntu box, the simplest approach is also the most reliable. SSH into Reachy and use the system’s audio tools directly. You can find the robot’s IP address in your local network settings or on its OLED display if fitted.

For a quick sanity check, aplay handles WAV files without any extra packages:

aplay /path/to/your/sound.wav

If nothing comes out, run aplay -l to list available audio cards. The speaker may not be the default device, so you will need to target it explicitly with the -D flag.

For Python-based playback, sounddevice paired with soundfile is a practical combination that avoids pulling in a full game engine:

import sounddevice as sd
import soundfile as sf

data, samplerate = sf.read('sound.wav')
sd.play(data, samplerate)
sd.wait()

PulseAudio is typically running on the NUC, so if you want to verify the speaker is set as the active sink, pactl list sinks gives you the full picture. Volume is OS-controlled: use amixer or pactl set-sink-volume to adjust it before assuming the hardware is at fault.

Sample rate matters more than people expect. The PAM8620 amp is flexible, but a mismatch between your file and the output device can produce pitched or garbled audio. Sticking to 44100 Hz or 48000 Hz keeps things predictable.

The ReachyAudio library: useful features, older target

The ReachyAudio library was written for the Reachy 2021 hardware stack. It is still worth knowing about because it bundles features well beyond simple playback: TTS with a robotic voice filter, voice activity detection, direction-of-arrival estimation, microphone LED control, and a simple Q-and-A mode. All of it lives under a single ReachyAudio class that you instantiate once.

On a Reachy 2023 unit you will likely hit dependency issues. The underlying Reachy SDK version the library targets has moved on, and some ROS package names changed with the jump to ROS2 Humble. That said, the core playback portions of the library ultimately shell out to system audio commands, so they are worth adapting if you want the speech synthesis features. Clone it into a virtual environment rather than installing system-wide:

git clone https://github.com/RomainMaure/ReachyAudio
cd ReachyAudio
pip install -e .

Work through the dependency failures one at a time. The higher-level speech features will need the most patching; basic audio file playback is much closer to working out of the box.

The ROS2 route

Reachy 2023 exposes its full hardware over ROS2 Humble topics. Audio playback is not baked into the default Reachy 2023 packages the way it later became in the Reachy 2 SDK, but you can wire it up using the audio_common ROS2 package. Install it via apt and configure an audio player node to subscribe to your topic. This makes sense if your audio logic already lives inside a ROS2 node. Otherwise the overhead is not worth it, and the direct Linux approach is faster to set up and debug.

What the Reachy 2 SDK added

For context, Pollen Robotics’ newer Reachy 2 robot ships with a Python SDK that has a dedicated reachy.audio namespace with clean, high-level methods:

reachy.audio.upload_audio_file('/path/to/sound.ogg')
reachy.audio.play_sound('sound.ogg')
reachy.audio.record_audio('output.ogg', duration_secs=5)

It supports .wav, .mp3, and .ogg files. One caveat worth knowing: audio files land in a temporary folder on the robot’s internal computer and are wiped at every reboot. No persistent storage layer yet. If you are on a Reachy 2 unit this is the right API. If you are on a 2023 unit, keep an eye on whether future SDK updates bring backward-compatible support.

A few things to check before you start

  • Run aplay -l over SSH first and confirm the Visaton speaker appears as an output device. If it does not show up, the audio service may need a restart.
  • If you are generating speech dynamically rather than playing files, espeak or pyttsx3 are both available via apt and pipe directly to ALSA without needing an intermediate file write.
  • Do not copy audio files to the robot over a slow connection mid-demo. Pre-load them during setup, bearing in mind the temp folder gets cleared on reboot.
  • The PAM8620 has built-in overcurrent and thermal protection, so if you hear cutouts under load, the amp may be throttling. Check system temperature before assuming a software bug.

Sources


Related Articles

Similar Posts