Reachy: the official head wobbler (speech tapper port) and silent emotion moves

#1
by RemiFabre - opened

Ports the official Reachy Mini head wobbler into the browser simulator and makes the Reachy emotion moves silent.

  • source/src/game/reachy/speechTapper.js: a line-for-line port of reachy_mini/motion/speech_tapper.py (SwayRollRT: 16 kHz PCM, 20 ms frames, 50 ms hops, the VAD with hysteresis and attack/release, the loudness curve, the six oscillators with the daemon's seeded phases).
  • source/src/game/reachy/headWobbler.js: runs the tapper offline on a decoded line (for wav lines) and, for the browser's speech synthesis (no samples), on a synthetic voice: voiced bursts at a natural syllable rate (~4 Hz, jittered) while the utterance plays, silence otherwise. Replaces the fixed sine sway.
  • reachyController.js: the tapper's offsets are composed on the head target in the world frame before the IK exactly as the daemon's backend does (compose_world_offset: R = R_off R_abs, t = t_abs + t_off).
  • emotionController.js: reachySay drives the wobbler while speaking; the Reachy emotion moves play SILENT (movement only, no .ogg), as the real robot player does with play_move(sound=False): only Reachy's spoken voice is heard. The .ogg files are still loaded harmlessly by nothing; they can stay.

Tested in RemiFabre/microduck-reachy-simulator (same code at the root src/ layout there); recorded videos of the conversation script and of a two-robot scene look right: small syllable-synchronous head motion while Reachy speaks, no wobble on the moves.

FormaLau changed pull request status to merged

Sign up or log in to comment