From 79013d80b5073b004c154fa70546320f86566723 Mon Sep 17 00:00:00 2001 From: yanko Date: Mon, 16 Feb 2026 19:08:18 +0200 Subject: [PATCH 1/2] Fix voice installer: split pip commands and pin Pillow>=10 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 --- scripts/install-voice.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/install-voice.sh b/scripts/install-voice.sh index dd7e331d0..e08c12365 100755 --- a/scripts/install-voice.sh +++ b/scripts/install-voice.sh @@ -89,7 +89,11 @@ fi # ── Step 4: Install Kokoro TTS ─────────────────────────────────────────────── echo "[4/7] Installing Kokoro TTS..." -su - "$CLAWBOX_USER" -c "$PIP install --user 'numpy<2' 'transformers<5' kokoro soundfile Pillow" 2>&1 | tail -3 +# Install kokoro first, then force transformers<5 as a separate step. +# pip 22's resolver won't downgrade huggingface-hub (pulled in by faster-whisper) +# to satisfy transformers<5 in a single command, so it silently picks transformers 5.x. +su - "$CLAWBOX_USER" -c "$PIP install --user 'numpy<2' kokoro soundfile 'Pillow>=10'" 2>&1 | tail -3 +su - "$CLAWBOX_USER" -c "$PIP install --user 'transformers<5'" 2>&1 | tail -3 # ── Step 5: Pre-download models ───────────────────────────────────────────── From 128da7093bc9bda38f55a721177eed78897e788e Mon Sep 17 00:00:00 2001 From: yanko Date: Mon, 16 Feb 2026 19:21:07 +0200 Subject: [PATCH 2/2] Add cmake to voice deps and clear corrupt Whisper cache on install MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- install.sh | 2 +- scripts/install-voice.sh | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 07be64269..ca7de7387 100755 --- a/install.sh +++ b/install.sh @@ -322,7 +322,7 @@ step_polkit_rules() { } step_voice_install() { - apt-get install -y -qq espeak-ng libsndfile1 + apt-get install -y -qq espeak-ng libsndfile1 cmake build-essential bash "$PROJECT_DIR/scripts/install-voice.sh" echo " Voice pipeline installed" bash "$PROJECT_DIR/scripts/setup-optimizations.sh" diff --git a/scripts/install-voice.sh b/scripts/install-voice.sh index e08c12365..64387aa4d 100755 --- a/scripts/install-voice.sh +++ b/scripts/install-voice.sh @@ -98,6 +98,12 @@ su - "$CLAWBOX_USER" -c "$PIP install --user 'transformers<5'" 2>&1 | tail -3 # ── Step 5: Pre-download models ───────────────────────────────────────────── echo "[5/7] Pre-downloading Whisper model (base)..." +# Clear corrupted cache (0-byte blobs from failed/rate-limited HF downloads) +WHISPER_CACHE="$CLAWBOX_HOME/.cache/huggingface/hub/models--Systran--faster-whisper-base" +if [ -d "$WHISPER_CACHE/blobs" ] && find "$WHISPER_CACHE/blobs" -maxdepth 1 -type f -empty | grep -q .; then + echo " Clearing corrupted Whisper model cache..." + rm -rf "$WHISPER_CACHE" +fi DEVICE="cpu" COMPUTE="auto" if $HAS_CUDA; then