Brain

Party mode

The robot as one more speaker in a Downbeat room, in step with every phone.

Downbeat plays whatever a Mac is playing on every phone in the room at the same moment. In party mode the NAO joins the room as one more speaker. Party mode needs no ElevenLabs agent.

downbeat host                                        # on the Mac: shows a six-letter room code
cargo brain --robot <robot-address>:7700 --downbeat ABC123

The brain joins the room as an ordinary listener (no account), keeps the room's clock with the same probes as the browsers, decodes the live Opus stream and hands every 20 ms packet to the robot's speakers --downbeat-latency-ms before its play instant (default 250 ms). With 250 ms the NAO played in step with the host Mac by ear (2026-11-06, NAO6 on home Wi-Fi). If the robot sounds late against the phones, raise the value; if it is early, lower it.

Limits

  • Opus only. The robot's speaker path is 16 kHz mono, so a lossless stream would be thrown away on the Mac anyway. In a room that streams lossless (downbeat host lossless), the brain waits and plays once the host streams Opus again.
  • Only the live stream (downbeat host) is supported, not uploaded files.
  • 16 kHz mono suits the NAO's small speakers; it is not hi-fi.
  • No conversation meanwhile, and the microphones stay muted while the speakers play.
  • --downbeat-url or DOWNBEAT_URL picks another Downbeat server.

On this page