Skip to content

feat: reachy_voice on Reachy Mini SDK 1.8.0 becomes the app (replaces reachy_claw)#8

Merged
Love4yzp merged 8 commits into
masterfrom
feat/merge-reachy-voice
Jun 12, 2026
Merged

feat: reachy_voice on Reachy Mini SDK 1.8.0 becomes the app (replaces reachy_claw)#8
Love4yzp merged 8 commits into
masterfrom
feat/merge-reachy-voice

Conversation

@Love4yzp

Copy link
Copy Markdown
Collaborator

What

Establishes reachy_voice on reachy-mini SDK 1.8.0 as the new app baseline, replacing the old reachy_claw app.

  • src/reachy_claw/legacy/reachy_claw/ (kept for reference; not packaged/imported). Its high-value features (diary, skills, Home Assistant, voice-cloning, conversation modes, multi-LLM backends) will be ported onto the new base in follow-ups.
  • The reachy_voice app is now src/reachy_voice/ — the packaged app + entry-point + deploy.
  • pyproject: reachy-mini>=1.8.0, packages=["src/reachy_voice"], reachy_mini_apps → reachy_voice.main:ReachyVoiceApp; vendored openvoicestream-agent wheel kept.
  • Deploy: deploy/jetson/voice/ (Dockerfile/compose/entrypoint), builds FROM reachy-claw:slv-v7.

Why

The old reachy_claw app is pinned to an outdated SDK and monkey-patches internal SDK GStreamer/media classes — fragile across SDK upgrades. reachy_voice is a clean re-implementation on SDK 1.8.0 + ovs_agent that sidesteps that (no_media + vision-trt + stable motion APIs), and adds SDK-calibrated gaze + an engagement-gated attention tracker.

Also: Tier-A dashboard APIs

The shared dashboard frontend is unchanged, but the reachy_voice backend was missing several endpoints. This wires up the pure-port ones (no SDK / no conversation-core dependency), in src/reachy_voice/tier_a.py: GET /api/ollama/models, restart_services (Docker socket), capture proxies (get_capture_info/clear_captures//api/captures/*).

Testing

  • tests/voice/: 95 passed, 7 skipped (skips are SDK/GStreamer conditional, off-Jetson). ruff check . clean. CI scoped to tests/voice (legacy reachy_claw tests kept under tests/ root as reference, not run).
  • Smoke-deployed on the Jetson (Mac can't import the app — needs GStreamer/gi): built reachy-voice:0.2.0 from this branch, swapped it in, verified live — motion compositor (100 moves), vision, audio, edge-LLM, daemon/SDK control, and the new /api/ollama/models all working. reachy-voice:v0.1 kept for rollback.

Self-review fixes included

  • compose: mount /var/run/docker.sock (restart-services was a silent no-op) + image tag 0.2.0
  • restart_services: broadcast error when all restarts fail (not done); get_running_loop()
  • CI/pyproject: scope tests to tests/voice (legacy tests broke collection)
  • .gitignore: hf-hub/

Not in this PR (follow-up)

  • Tier B/C dashboard APIs (config handlers, send_message, motor, emotion broadcast)
  • Conversation modes (monologue/interpreter) + LLM-backend switching
  • vision-trt camera-race self-heal
  • Migrating legacy reachy_claw features onto the new base

🤖 Generated with Claude Code

Love4yzp and others added 8 commits June 12, 2026 15:58
Bring the reachy_voice app from the separate reachy-voice repo into this
repo as the packaged app, replacing the old reachy_claw package.

- src/reachy_voice: full working tree (incl. untracked static/app.js,
  profiles/, all .py); main.py gains a main() console entry point
  (byte-equivalent to the existing __main__ block).
- tests/voice: migrated reachy-voice tests (imports unchanged — already
  absolute `from reachy_voice...`).
- legacy/reachy_claw: old package moved here for later feature ports;
  not packaged, not imported by the new app.
- tests/conftest.py: defer reachy_claw imports into fixtures so the moved
  package no longer breaks collection of the tests/voice tree.
- deploy/jetson/voice: add the reachy-voice APP image (Dockerfile/compose/
  entrypoint, COPY src/reachy_voice, build context = repo root, FROM
  reachy-claw:slv-v7, hf-hub + entrypoint preserved). The pre-existing SLV
  speech-backend compose is preserved as docker-compose.slv-backend.yml.
- pyproject.toml: name reachy-voice, deps reconciled to reachy-voice's
  (reachy-mini>=1.8.0 + voice deps), hatch wheel packages=[src/reachy_voice],
  scripts + reachy_mini_apps entry point -> reachy_voice.main:ReachyVoiceApp,
  vendored openvoicestream-agent source kept pointing at the in-repo wheel.

Tests: tests/voice -> 66 passed, 7 skipped (intrinsic SDK/gi importorskip).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…res)

Port the self-contained dashboard endpoints the shared frontend
(static/app.js) calls but the reachy_voice backend lacked. All are
HTTP reverse-proxy / Docker Engine socket calls — no reachy-mini SDK,
no conversation core, no deferred feature.

New module reachy_voice/tier_a.py holds the logic (decoupled from
FastAPI/websocket plumbing so it's unit-testable with a mocked httpx
transport):

  - GET /api/ollama/models?url=  -> proxy {url}/api/tags, return model
    names, fall back to a default list on error.
  - WS restart_services -> restart docker containers in order via
    /var/run/docker.sock, poll health before advancing, broadcast
    restart_status. Default order uses reachy-voice (NOT reachy-claw):
    vision-trt -> reachy-daemon -> reachy-voice; remote vision-trt is
    skipped.
  - WS get_capture_info -> capture_info {path,count}; WS clear_captures
    -> capture_reset; GET /api/captures/list + /api/captures/image/{f}
    reverse-proxy vision-trt :8630. Vision host derived from
    config.vision_mjpeg.

main.py wires these into the settings app's HTTP routes and /ws loop;
all existing handlers (get/set_volume, /stream, /debug/*, /language)
untouched.

Tests under tests/voice (29 new, all green; mock httpx + docker socket
+ vision-trt, no hardware).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…il handling

Self-review fixes before the SDK 1.8.0 baseline:
- compose: mount /var/run/docker.sock (dashboard "restart services" was a silent
  no-op without it) + align image tag to 0.2.0
- pyproject + ci.yml: scope tests to tests/voice (44 legacy reachy_claw tests under
  tests/ root import the moved-away package and broke CI collection)
- tier_a.py: broadcast restart "error" when all restarts fail (not "done");
  asyncio.get_running_loop() instead of deprecated get_event_loop()
- .gitignore: hf-hub/ (never commit the 107MB pre-staged HF cache)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ail-fast off

The voice test suite imports the audio stack (sounddevice), which dlopens
PortAudio at import time; the runner lacked libportaudio2, breaking collection
of tests/voice/test_conversation.py. Also drop the 3.10 matrix entry (uv ignores
it under requires-python>=3.11) and disable fail-fast for clean per-version signal.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The two GStreamer-backed import checks guarded only on `gi`, but CI has `gi`
without the `Gst` typelib, so they raised ValueError instead of skipping. Guard
on `gi.require_version("Gst","1.0")` so they skip on dev/CI and run on the robot.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Architecture (5-container runtime + data flow), repo layout, build/test/deploy,
SDK 1.8.0 conventions (no_media, set_target_*, play_move, daemon :38001), and
hard constraints. Deliberately excludes the upstream JS/Web/scaffolding "golden
path" — this is an on-robot Python app.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ction)

master's branch protection requires the "test (3.10)" status check; dropping it
from the matrix left PR checks incomplete (mergeStateStatus BLOCKED). uv runs the
3.10 job on 3.12 (requires-python>=3.11) so it passes under that job name.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Love4yzp Love4yzp merged commit f8b1a79 into master Jun 12, 2026
4 checks passed
@Love4yzp Love4yzp deleted the feat/merge-reachy-voice branch June 12, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant