Replace SpeechBrain and Lightning monkey-patches with upstream upgrades#96
Open
bobsummerwill-openclaw-bot[bot] wants to merge 1 commit intomainfrom
Open
Replace SpeechBrain and Lightning monkey-patches with upstream upgrades#96bobsummerwill-openclaw-bot[bot] wants to merge 1 commit intomainfrom
bobsummerwill-openclaw-bot[bot] wants to merge 1 commit intomainfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace fragile monkey-patches in
install_venv.shwith 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:
torch_audio_backend.pynow wrapslist_audio_backends()in try/except with fallback totorchaudio.utils.available_backends— fixes Workaround: SpeechBrain list_audio_backends() removed in torchaudio 2.9.x #38dataio.pynow wrapstorchaudio.info()in try/except with asoundfile.info()fallback — fixes Workaround: SpeechBrain torchaudio.info() removed in torchaudio 2.9.x #39Previously 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=Falseincloud_io.py, maintaining backward compatibility with PyTorch 2.6+ which changed thetorch.load()default toweights_only=True— fixes #40Previously we were using
sedto inject a compatibility patch intocloud_io.py.Issues
list_audio_backends()removed in torchaudio 2.9.xtorchaudio.info()removed in torchaudio 2.9.xweights_onlydefault change in PyTorch 2.6+Testing Required
This needs a full venv rebuild to verify:
Verify that WhisperX transcription with speaker diarization works end-to-end without errors.
Not Changed