Fix CSP for blob URLs + fix pyannote AudioDecoder with torchaudio patch
All checks were successful
Build Sidecars / Bump sidecar version and tag (push) Successful in 4s
Release / Bump version and tag (push) Successful in 3s
Build Sidecars / Build Sidecar (macOS) (push) Successful in 3m25s
Release / Build App (macOS) (push) Successful in 1m26s
Build Sidecars / Build Sidecar (Linux) (push) Successful in 14m31s
Release / Build App (Linux) (push) Successful in 3m50s
Build Sidecars / Build Sidecar (Windows) (push) Successful in 27m7s
Release / Build App (Windows) (push) Successful in 3m26s
All checks were successful
Build Sidecars / Bump sidecar version and tag (push) Successful in 4s
Release / Bump version and tag (push) Successful in 3s
Build Sidecars / Build Sidecar (macOS) (push) Successful in 3m25s
Release / Build App (macOS) (push) Successful in 1m26s
Build Sidecars / Build Sidecar (Linux) (push) Successful in 14m31s
Release / Build App (Linux) (push) Successful in 3m50s
Build Sidecars / Build Sidecar (Windows) (push) Successful in 27m7s
Release / Build App (Windows) (push) Successful in 3m26s
CSP: Add blob: to connect-src/img-src/media-src for wavesurfer.js audio playback. Add http://tauri.localhost to default-src for devtools. pyannote: sys.modules block didn't work — pyannote still uses AudioDecoder unconditionally. New approach: monkey-patch Audio.__call__ in diarize.py to use torchaudio.load() directly, bypassing the broken torchcodec path. Patch runs once before pipeline loading. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,12 +5,6 @@ from __future__ import annotations
|
||||
import signal
|
||||
import sys
|
||||
|
||||
# Block torchcodec before anything imports it. pyannote.audio has a bug where
|
||||
# it conditionally imports AudioDecoder from torchcodec but uses it
|
||||
# unconditionally. Making torchcodec fully unimportable forces the torchaudio
|
||||
# fallback path.
|
||||
sys.modules["torchcodec"] = None # type: ignore[assignment]
|
||||
sys.modules["torchcodec.decoders"] = None # type: ignore[assignment]
|
||||
|
||||
# CRITICAL: Capture real stdout for IPC *before* importing any ML libraries
|
||||
# that might print to stdout and corrupt the JSON-line protocol.
|
||||
|
||||
Reference in New Issue
Block a user