Instructions to use PatiPix/AudioSeal-ONNX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- AudioSeal
How to use PatiPix/AudioSeal-ONNX with AudioSeal:
# Watermark Generator from audioseal import AudioSeal model = AudioSeal.load_generator("PatiPix/AudioSeal-ONNX") # pass a tensor (tensor_wav) of shape (batch, channels, samples) and a sample rate wav, sr = tensor_wav, 16000 watermark = model.get_watermark(wav, sr) watermarked_audio = wav + watermark# Watermark Detector from audioseal import AudioSeal detector = AudioSeal.load_detector("PatiPix/AudioSeal-ONNX") result, message = detector.detect_watermark(watermarked_audio, sr) - Notebooks
- Google Colab
- Kaggle
AudioSeal generator (16 bits) β ONNX
ONNX export of the AudioSeal watermark generator audioseal_wm_16bits
(facebook/audioseal, revision 3c19eba53390776cf2cc9ed5f6c9ac67ce72ecba,
file generator_base.pth), made with the official AudioSeal 0.2.0 code.
PatiPix Studio adds this invisible watermark to every voice-over it creates, to mark it as AI-generated (EU AI Act, article 50), together with a signed C2PA manifest.
Inputs and outputs
| Name | Shape | Type | Meaning |
|---|---|---|---|
son (input) |
[1, 1, T] | float32 | audio at 16 kHz; T must be a multiple of 320 |
message (input) |
[1, 16] | int64 | the 16-bit message (0 or 1) |
filigrane (output) |
[1, 1, T] | float32 | the watermark, to add to the audio |
How it was made
torch 2.10.0, TorchScript export (dynamo=False), opset 17, weights unchanged. AudioSeal's small padding steps
(useless when T is a multiple of 320) were replaced by their value (zero) for the export.
Checked on 12 voice clips: difference between ONNX and PyTorch below 2e-6; the official detector finds the watermark on 100 % of the audio and reads the message back.
File
| File | Size (bytes) | SHA-256 |
|---|---|---|
audioseal_generator_16bits.onnx |
58,814,395 | 622ce07fdac2cf2faa83be25ba2ed3f830da27026746755a66859bd8ba2410ed |
License and credits
MIT License, like AudioSeal (see LICENSE). Copyright (c) Meta Platforms, Inc. and affiliates.
AudioSeal: San Roman et al., Β« Proactive Detection of Voice Cloning with Localized Watermarking Β», ICML 2024.
- Downloads last month
- -
Model tree for PatiPix/AudioSeal-ONNX
Base model
facebook/audioseal