Skip to content

Fix voice pipeline installer issues - #6

Closed
yalexx wants to merge 2 commits into
mainfrom
voice-installer-fixes
Closed

yalexx wants to merge 2 commits into
mainfrom
voice-installer-fixes

Conversation

@yalexx

@yalexx yalexx commented Feb 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Split pip install into two commands — pip 22's resolver won't downgrade huggingface-hub (pulled by faster-whisper) to satisfy transformers<5 in a single command, silently installing transformers 5.x which breaks Kokoro's AlbertModel import
  • Pin Pillow>=10 — Ubuntu 22.04's system Pillow 9.0.1 is missing PIL.Image.Resampling, causing transformers import failures
  • Add cmake build-essential to system deps — required for CTranslate2 CUDA build
  • Clear corrupt Whisper model cache — detect and remove 0-byte HuggingFace blobs from failed/rate-limited downloads before re-downloading

Test plan

  • Run sudo bash install.sh on a fresh Jetson with JetPack 6
  • Verify Kokoro TTS model loads (python3 -c "from kokoro import KPipeline; KPipeline(lang_code='a')")
  • Verify Whisper STT model loads (python3 -c "from faster_whisper import WhisperModel; WhisperModel('base')")

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Enhanced voice module installation with additional system dependencies for better compatibility
    • Improved installation stability through automated cache cleanup to prevent corrupted files and dependency conflicts
    • Reorganized voice package installation steps for more reliable builds

yalexx and others added 2 commits February 16, 2026 19:21
pip 22's resolver won't downgrade huggingface-hub (installed by
faster-whisper) to satisfy transformers<5 in a single command, so it
silently picks transformers 5.x. Split into two pip calls so the
downgrade happens reliably.

Also pin Pillow>=10 because Ubuntu 22.04's system Pillow 9.0.1 is
missing PIL.Image.Resampling, which transformers 4.x needs at import.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CTranslate2 CUDA build requires cmake and build-essential — add them
to the apt-get in step_voice_install().

Also detect and clear 0-byte HuggingFace cache blobs before the
Whisper model download step, preventing "failed to read a value"
errors from corrupted/incomplete prior downloads.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Feb 16, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

The voice installation process is enhanced by adding system dependencies (cmake and build-essential) and restructuring the installation script to split pip commands and implement cache cleanup for the Whisper model before downloading.

Changes

Cohort / File(s) Summary
System Dependencies
install.sh
Added cmake and build-essential packages to system package installation for voice setup.
Voice Installation Pipeline
scripts/install-voice.sh
Split Kokoro TTS and transformers pip installations into separate commands to prevent huggingface-hub downgrade; added Whisper cache cleanup logic to remove corrupted 0-byte blobs before model pre-download.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A voice so clear, now shall it be,
With cmake built and dependencies free!
The cache we scrub, the models prepared,
Installation smooth, no conflicts to fear!
Whisper downloads pure, transformers aligned,
A voice installation refined! 🎵

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Fix voice pipeline installer issues' accurately reflects the main changes: fixing installer problems with pip dependency resolution, system packages, and cache handling for the voice pipeline components.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch voice-installer-fixes

Comment @coderabbitai help to get the list of available commands and usage tips.

@yalexx yalexx closed this Feb 19, 2026
@yalexx
yalexx deleted the voice-installer-fixes branch March 5, 2026 09:04
yalexx added a commit that referenced this pull request Sep 6, 2026
…740)

* security: close the CodeRabbit deep-scan findings that still hold on beta

The 2026-09-05 scan of main reported 23 findings; each was re-verified against
beta before anything changed. Five were already fixed on beta (#1 #2 #5 #8
#18), three are the appliance's documented design (#3 #13 #15), two need a
design decision rather than a patch (#12 the self-updating root steps, #16
system_power via the bearer) and are deferred with their designs written up.
This closes the rest:

- #21/#8: root units (clawbox-ap, ap-watchdog, the NM failover hook,
  first-boot VNC, recover) run the root-owned /usr/local/libexec/clawbox
  copies and load /etc/clawbox/network.env, never the clawbox-owned tree;
  clawbox-heartbeat runs as User=clawbox; a class-wide test pins the rule.
- #11: the Files API refuses to rename or delete a protected container
  (data/, the checkout, ~/.config, the browse root) — protected_container.
- #19: the MCP path guard judges the canonical path (nearest existing
  ancestor) as well as the typed one, and the file tools open the vetted
  target with O_NOFOLLOW.
- #17: the webapp document carries a sandbox CSP wherever it is opened
  (shipped through next.config.ts, since a route header is dropped in
  production), and installed_* preference writes are owner-only.
- #20/#22: clawkeep restore derives every destination on the box and refuses
  the manifest's before anything moves; link members must resolve inside the
  staging root; restore/unpair/snapshot/encryption/reset-state are owner-only
  and same-origin.
- #7: CF-Connecting-IP and its siblings are stripped unless the socket peer is
  loopback (cloudflared's), so a LAN client cannot pick its lockout bucket.
- #4: regex code search is gone (400 regex_unsupported).
- #6: uploads are bounded by a free-space reserve with busboy limits and
  partials unlinked; the attachments route gets the same teardown deferral.
- #14: the Kokoro/Whisper sockets are 0600 with SO_PEERCRED, and Kokoro's
  output path is confined to a .wav regular file under /tmp.
- #9 (part): the MCP server scrubs CLAWBOX_MCP_TOKEN from its environment at
  startup; allow_dangerous is documented as a typo override, not consent.
- #10: issue-triage/pr-review validate the model's JSON on both transports,
  derive labels from fixed tables and sanitise comment text.
- #23: e2e-install writes repository secrets only off pull_request events.
- #1/#5 residuals: setup/complete checks the session in-handler; the
  middleware matcher no longer skips /fonts/ and /images/.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SuyrrYnKgrUkBXECWqW1gb

* fix: vouch for the path at the two sinks CodeQL flagged

The multipart cleanup unlinked paths whose containment check governed the
write inside the promise, not the catch block; and the dangling-link resolver
lstat/readlink'd a name straight off the caller's path. Both now resolve and
prefix-check right before the call, the shape safePath already uses
(js/path-injection alerts 519-521).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SuyrrYnKgrUkBXECWqW1gb

* fix: address CodeRabbit's review of the security sweep

- e2e-install: the one job names its Environment by event (e2e-credentials
  off pull_request, an empty e2e-pull-request on one), documented for the
  owner; the schema strip for the SDK transport is schema-aware and covers
  Anthropic's whole unsupported set, and the local validator refuses any
  constraint it cannot check so no cap is silently unenforced.
- clawkeep: a Hermes sessions asset that omits sqlite still retires the
  sidecars (the box's own flag wins); OPENCLAW_STATE_DIR placeholders count as
  unset; the no-state fallback matches both CLI message forms, with one shared
  recorded-CLI fixture.
- install.sh: a libexec copy that did not land is never a success —
  collected, recorded as root_libexec, and the units that name the copies are
  not written over it.
- root-unit tests parse User= (User=root is root) and refuse /home/clawbox
  anywhere in a directive value; the code search route refuses a non-string
  pattern; notebook_edit has its symlink regression case.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SuyrrYnKgrUkBXECWqW1gb

* test: give the libexec test in root-steps both ceilings

It runs install_root_libexec under a real bash, and the timeout-hygiene rule
(test-timeout-hygiene.test.ts) asks every spawning suite for a declared
testTimeout and hookTimeout — the one CI failure on the previous commit.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SuyrrYnKgrUkBXECWqW1gb

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
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