WavMark: Audio Watermarking Tool
2 min read
WavMark is a PyTorch-based tool for embedding hidden digital watermarks into audio files. The output is an audio file containing an embedded payload that resists distortion and remains inaudible to the human ear. Built on an AI model approach using Python, the tool supports both watermarking embedding and extraction. It helps developers and researchers protect copyright and label audio content.
Key features
- High robustness: the watermark withstands up to 10 types of attacks, including noise, MP3 compression, and filters.
- Invisibility: audio quality remains above 38dB SNR and 4.3 PESQ, making the mark imperceptible to the ear.
- Easy extension: the project is written entirely in Python and adapts easily to custom tasks.
What you can do
- Protect audio files by embedding a hidden digital signature.
- Check audio for a watermark using simple decoding.
- Integrate the tool into Python scripts or audio processing services.
Example
import numpy as np
import soundfile
import torch
import wavmark
device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')
model = wavmark.load_model().to(device)
payload = np.random.choice([0, 1], size=16)
signal, sample_rate = soundfile.read("example.wav")
watermarked_signal, _ = wavmark.encode_watermark(model, signal, payload, show_progress=True)
payload_decoded, _ = wavmark.decode_watermark(model, watermarked_signal, show_progress=True)
Read more
DetailsRobustness: outperforms traditional methods by 29x
Quality metrics: SNR > 38dB, PESQ 4.3
Requirements: Python, PyTorch, CUDA support (optional)










Comments