Skip to content

Replace SpeechBrain and Lightning monkey-patches with upstream upgrades#96

Open
bobsummerwill-openclaw-bot[bot] wants to merge 1 commit intomainfrom
fix/upgrade-speechbrain-lightning
Open

Replace SpeechBrain and Lightning monkey-patches with upstream upgrades#96
bobsummerwill-openclaw-bot[bot] wants to merge 1 commit intomainfrom
fix/upgrade-speechbrain-lightning

Conversation

@bobsummerwill-openclaw-bot
Copy link
Copy Markdown

Summary

Replace fragile monkey-patches in install_venv.sh with upstream dependency upgrades. This removes ~160 lines of patching code from Steps 7 and 8.

Changes

Step 7: SpeechBrain (was: monkey-patch, now: upgrade)

SpeechBrain >= 1.0.3 (released March 12, 2025) includes native fixes for torchaudio 2.9.x compatibility:

Previously we were patching these files post-install with ~120 lines of inline Python scripts.

Step 8: Lightning (was: monkey-patch, now: upgrade)

Lightning >= 2.4.0 (released mid-2024) explicitly defaults weights_only=False in cloud_io.py, maintaining backward compatibility with PyTorch 2.6+ which changed the torch.load() default to weights_only=Truefixes #40

Previously we were using sed to inject a compatibility patch into cloud_io.py.

Issues

Testing Required

This needs a full venv rebuild to verify:

rm -rf venv-nvidia
./scripts/install_venv.sh --nvidia
source setup_env.sh
source venv-nvidia/bin/activate
./scripts/process_single.sh <test-audio> --transcribers whisperx --processors opus

Verify that WhisperX transcription with speaker diarization works end-to-end without errors.

Not Changed

SpeechBrain >= 1.0.3 (March 2025) natively handles:
- list_audio_backends() removal in torchaudio 2.9.x (fixes #38)
- torchaudio.info() removal in torchaudio 2.9.x (fixes #39)

Lightning >= 2.4.0 natively handles:
- weights_only=True default change in PyTorch 2.6+ (fixes #40)

This removes ~160 lines of fragile monkey-patching code from
install_venv.sh Steps 7 and 8, replacing them with simple
pip upgrade commands and version verification.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant