This example demonstrates two ways to play audio through Reachy Mini's speaker:
Sound Playback
This example demonstrates two ways to play audio through Reachy Mini's speaker:
--file: Play a sound file (WAV, OGG, MP3, FLAC, ...) using theplay_sound()API.--live: Push a continuous sine tone using the low-levelpush_audio_sample()API, useful for real-time audio sources such as text-to-speech engines or microphone input.
Usage:
# Play a sound file
python sound_play.py --file /path/to/file.ogg --backend webrtc
# Push a continuous sine tone (Ctrl+C to stop)
python sound_play.py --live --backend webrtc --tone-hz 440
Options:
--file <path>: Path to a sound file to play (WAV, OGG, MP3, FLAC, ...).--live: Push a continuous sine tone.--tone-hz <freq>: Sine wave frequency in Hz (--livemode only, default: 440).--backend: Media backend to use (default,local, orwebrtc).
Source and license
Source: Reachy Mini documentation, adapted for this site. Licensing and attribution follow the terms of the upstream project.