resemble-perth is an audio watermarking and detection library developed by Resemble AI. It allows embedding and detecting imperceptible watermarks in audio signals, primarily designed for identifying AI-generated content. The current stable version is 1.0.1, with new releases typically occurring as features are added or bug fixes are made.
pip install resemble-perthVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize the Watermarker and Detector, embed a watermark into a dummy audio signal, and then detect its presence. It also shows a detection attempt on an unwatermarked signal.
For best results and accuracy, ensure input audio is resampled to 44.1 kHz or 24 kHz. Other sample rates might impact watermarking and detection performance. Use a library like `librosa.resample` for this.
The `watermark` and `detect` methods strictly expect audio data as a 1D `numpy.ndarray` (float32 or float64). Ensure your audio files are loaded and converted into this format. `librosa.load` is a recommended tool.
The library primarily uses CPU for processing. For very long audio files or large datasets, consider segmenting audio into smaller chunks for processing or optimizing your processing pipeline externally, as direct GPU acceleration is not currently offered.