Reachy: soft follow cam, audio lines for the wobbler, URL-driven scripted runs
Follow-up to #1 (the wobbler), three small things for scripted scenes, all opt-in:
- Slow orbit follow cam:
?camera=followon the URL, or a script action{"action":"camera","value":"follow"}. When the duck speaks or acts, the camera swings a little to the left around the pair and turns right, so we see almost the duck's face (about 29 degrees, a calm ~3 s move); for Reachy the mirror move; the orbit target also eases slightly toward the active robot with a small dolly. Both robots stay in frame. It replaces the chase cam while on; nothing changes without the flag. - Audio lines for the wobbler: a Reachy
sayaction may carry"audio": "assets/.../line.wav"(a wav underpublic/, optional"tail"seconds). The line plays through Web Audio and the official head wobbler taps its real samples (one offset per 50 ms hop, on the audio clock), exactly like the daemon. Withoutaudio, the browser voice keeps the synthetic taps from #1. (audio.jsgainsplayBufferTimed/setBusLeveland exportsbufferFor.) - URL-driven scripted runs:
?boot=1&script=<name>&autoplay=1loadspublic/scripts/<name>.jsonand runs it once the entrance is over;&record=1keeps the run (canvas + the audio monitor) inwindow.__recordingfor a Playwright recorder,&ambient=0mutes the hum.
A heads-up about recording Reachy's voice (you may have hit this too): the browser's speech synthesis (speechSynthesis.speak) never goes through Web Audio, so a MediaRecorder on the canvas + the audio monitor (your record-sim.mjs, our recorder) captures the duck's sounds but not Reachy's lines: the films come out with Reachy silent. What we did for our film of your reachy-microduck-conversation.json: render the three lines with the same macOS engine Chrome uses (AVSpeechSynthesizer, the voice Chrome picks with your regex, pitchMultiplier 1.28, rate 1.02 mapped as Chromium's tts_mac.mm does) and feed them with the new audio field, which is also what lets the wobbler tap real samples. A tiny Objective-C renderer for that is in our notes; happy to share it.
Line endings kept as in your files (CRLF).