Speakr is a personal, self-hosted web application designed for transcribing audio recordings
Python
Add PyTorch 2.6 weights_only fix documentation for WhisperX ASR
Murtaza Nasir2b32a3dd2805
diff --git a/README.md b/README.mdindex 95cd617f..4922e18e 100644--- a/README.md+++ b/README.md@@ -131,6 +131,8 @@ docker compose up -d- **For voice profiles & speaker embeddings:** Use [WhisperX ASR Service](https://github.com/murtaza-nasir/whisperx-asr-service) (recommended)- **For basic speaker diarization:** Use [OpenAI Whisper ASR Webservice](https://github.com/ahmetoner/whisper-asr-webservice)+> **⚠️ PyTorch 2.6 Users:** If you encounter a "Weights only load failed" error with WhisperX, add `TORCH_FORCE_NO_WEIGHTS_ONLY_LOAD=true` to your ASR container's environment in docker-compose.yml. See [troubleshooting](https://murtaza-nasir.github.io/speakr/troubleshooting#pytorch-26-weights-loading-error-whisperx-asr-service) for details.+See [installation guide](https://murtaza-nasir.github.io/speakr/getting-started/installation#running-asr-service-for-speaker-diarization) for complete setup instructions.**[View Full Installation Guide →](https://murtaza-nasir.github.io/speakr/getting-started)**diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.mdindex 5b070bca..5406055f 100644--- a/docs/getting-started/installation.md+++ b/docs/getting-started/installation.md@@ -295,6 +295,9 @@ curl http://localhost:9000/healthSee the [WhisperX ASR Service README](https://github.com/murtaza-nasir/whisperx-asr-service#readme) for detailed configuration options, troubleshooting, and performance tuning.+!!! warning "PyTorch 2.6 Compatibility"+ If you encounter a "Weights only load failed" error, add `TORCH_FORCE_NO_WEIGHTS_ONLY_LOAD=true` to your ASR container's environment variables in docker-compose.yml. See [troubleshooting](../troubleshooting.md#pytorch-26-weights-loading-error-whisperx-asr-service) for details.+#### Option 2: OpenAI Whisper ASR Webservice (Basic Diarization Only)**Use this if you:**@@ -336,6 +339,7 @@ services:- COMPUTE_TYPE=float16- BATCH_SIZE=16- HF_TOKEN=your_huggingface_token_here+ - TORCH_FORCE_NO_WEIGHTS_ONLY_LOAD=true # Required for PyTorch 2.6+deploy:resources:reservations:@@ -411,6 +415,7 @@ services:- ASR_COMPUTE_TYPE=int8- ASR_ENGINE=whisperx- HF_TOKEN=your_huggingface_token_here+ - TORCH_FORCE_NO_WEIGHTS_ONLY_LOAD=true # Required for PyTorch 2.6+deploy:resources:reservations:@@ -473,6 +478,7 @@ services:- ASR_COMPUTE_TYPE=int8- ASR_ENGINE=whisperx- HF_TOKEN=your_huggingface_token_here+ - TORCH_FORCE_NO_WEIGHTS_ONLY_LOAD=true # Required for PyTorch 2.6+deploy:resources:reservations:diff --git a/docs/index.md b/docs/index.mdindex a44a63f3..c981deca 100644--- a/docs/index.md+++ b/docs/index.md@@ -147,6 +147,14 @@ Learn more about [audio synchronization features](user-guide/transcripts.md#audi## Latest Updates+!!! warning "PyTorch 2.6 Compatibility Issue with WhisperX ASR"+ If you're using the WhisperX ASR service and encounter a "Weights only load failed" error after a recent update, add this environment variable to your ASR container in docker-compose.yml:+ ```yaml+ environment:+ - TORCH_FORCE_NO_WEIGHTS_ONLY_LOAD=true+ ```+ This is caused by a PyTorch 2.6 change. See [troubleshooting](troubleshooting.md#pytorch-26-weights-loading-error-whisperx-asr-service) for details.+!!! info "Version 0.6.5 - Separate Chat Model Configuration"**New Feature** - Configure different AI models for chat vs background tasksdiff --git a/docs/troubleshooting.md b/docs/troubleshooting.mdindex e3db3e29..ef43fda8 100644--- a/docs/troubleshooting.md+++ b/docs/troubleshooting.md@@ -122,6 +122,38 @@ Even with ASR enabled, you must explicitly request diarization when uploading orAfter transcription, speakers appear as generic labels (SPEAKER_01, etc.). You must manually [identify speakers](user-guide/transcripts.md#speaker-identification) by clicking the labels and assigning names. Manage your [speaker library](user-guide/settings.md#speakers-management-tab) in account settings.+### PyTorch 2.6 Weights Loading Error (WhisperX ASR Service)++If you're getting an error like this when trying to transcribe:++```+Weights only load failed. This file can still be loaded...+WeightsUnpickler error: Unsupported global: GLOBAL omegaconf.listconfig.ListConfig was not an allowed global by default.+```++This is caused by a breaking change in PyTorch 2.6 where the default value of `weights_only` in `torch.load` changed from `False` to `True`. The pyannote models used for voice activity detection in WhisperX are affected.++**Solution**: Add this environment variable to your WhisperX ASR service container in your docker-compose.yml:++```yaml+whisper-asr:+ image: learnedmachine/whisperx-asr-service:latest+ environment:+ - TORCH_FORCE_NO_WEIGHTS_ONLY_LOAD=true+ # ... your other environment variables+```++!!! warning "Important"+ This environment variable must be set directly in the docker-compose.yml file under the `environment` section of the ASR service container. Setting it in a `.env` file may not work reliably.++After adding this variable, restart your ASR container:+```bash+docker compose down whisper-asr+docker compose up -d whisper-asr+```++For more details, see the [WhisperX issue discussion](https://github.com/m-bain/whisperX/issues/1304).+### WhisperX Shows UNKNOWN_SPEAKERIf WhisperX only shows "UNKNOWN_SPEAKER" instead of numbered speakers (SPEAKER_00, SPEAKER_01, etc.), check these common issues: