Sound Playback
This example demonstrates two ways to play audio through Reachy Mini's speaker:
--wav: Play a WAV file 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 wav file
python sound_play.py --wav /path/to/file.wav --backend webrtc
# Push a continuous sine tone (Ctrl+C to stop)
python sound_play.py --live --backend webrtc --tone-hz 440
Options:
--wav <path>: Path to a WAV file to play.--live: Push a continuous sine tone.--tone-hz <freq>: Sine wave frequency in Hz (--livemode only, default: 440).--backend: Media backend to use (default_no_video,gstreamer_no_video, orwebrtc).
See the full example at: sound_play.py