This page covers common issues you might encounter when using AudioSeal and how to resolve them.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/facebookresearch/audioseal/llms.txt
Use this file to discover all available pages before exploring further.
Common Errors
ValueError: not enough values to unpack (expected 3, got 2)
ValueError: not enough values to unpack (expected 3, got 2)
Problem: This error occurs when passing audio tensors without the required batch dimension.Solution: AudioSeal expects a batch of audio tensors as input. Add a batch dimension to your input tensor:See the Getting Started notebook for complete examples.
KeyError: Environment variable 'USER' not found (Windows)
KeyError: Environment variable 'USER' not found (Windows)
Problem: On Windows machines, you may encounter this error due to an old checkpoint that’s not compatible with Windows.Solution: Invalidate the cache by removing the cached files and re-running:
- Navigate to
C:\Users\<USER>\.cache\audioseal - Delete all files in this directory
- Run your code again to re-download the checkpoint
This issue occurs with older checkpoint versions uploaded to the model hub. Clearing the cache will download the updated, Windows-compatible version.
Couldn't find appropriate backend to handle uri (torchaudio)
Couldn't find appropriate backend to handle uri (torchaudio)
Problem: Newer versions of torchaudio don’t handle the default audio backend properly.Solution: You have two options:Option 1: Downgrade torchaudioOption 2: Install soundfile as your audio backend
Installation Issues
Installation fails with dependency conflicts
Installation fails with dependency conflicts
Problem: Pip reports conflicts between package versions during installation.Solution: Ensure you have the minimum required versions:
- Python >= 3.8 (>= 3.10 for streaming support)
- PyTorch >= 1.13.0
CUDA/GPU not detected
CUDA/GPU not detected
Problem: AudioSeal doesn’t utilize your GPU for inference.Solution: Ensure you have the correct PyTorch version with CUDA support:Move your model and audio tensors to GPU:
Model Loading Issues
Model fails to download from Hugging Face
Model fails to download from Hugging Face
Problem: Connection errors or timeouts when downloading model checkpoints.Solution: Try the following approaches:
- Check your internet connection
- Set a longer timeout:
- Manually download from Hugging Face Hub and load locally:
Out of memory errors during inference
Out of memory errors during inference
Problem: CUDA out of memory errors when processing large audio files.Solution: Process audio in smaller chunks:
For streaming applications, consider using the streaming API available in AudioSeal 0.2+.
Detection Issues
Detector reports low confidence on watermarked audio
Detector reports low confidence on watermarked audio
Problem: The detector outputs low probabilities even for known watermarked audio.Possible causes and solutions:
-
Sample rate mismatch: Ensure the audio sample rate matches the model’s expected rate (16kHz by default)
- Audio has been heavily modified: The watermark may have been degraded by compression, noise, or other attacks
-
Using wrong detector: Ensure you’re using the matching detector for your generator model
Performance Issues
Slow inference speed
Slow inference speed
Problem: Watermarking or detection is slower than expected.Solutions:
- Use GPU: Move models to GPU for faster inference
- Disable gradient computation:
- Batch processing: Process multiple files in batches when possible
- Use streaming mode: For real-time applications, use the streaming API (AudioSeal 0.2+)
Streaming Support Issues
Streaming mode hangs in Jupyter notebooks
Streaming mode hangs in Jupyter notebooks
Problem: Running the streaming API in certain PyTorch versions causes hanging in Jupyter notebooks.Solution: Disable torch dynamo before starting Jupyter:Or set it in Python:
Getting Help
If you encounter issues not covered here:- Check the GitHub Issues page for similar problems
- Review the example notebooks for working code
- Open a new issue with:
- Your AudioSeal version
- Python and PyTorch versions
- Complete error message and stack trace
- Minimal code to reproduce the issue
When reporting issues, always include your environment details and a reproducible example to help maintainers diagnose the problem quickly.
