Instructions to use synath/audioseal-onnx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- AudioSeal
How to use synath/audioseal-onnx with AudioSeal:
# Watermark Generator from audioseal import AudioSeal model = AudioSeal.load_generator("synath/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("synath/audioseal-onnx") result, message = detector.detect_watermark(watermarked_audio, sr) - Notebooks
- Google Colab
- Kaggle
AudioSeal 16-bit โ ONNX export
ONNX exports of Meta's AudioSeal 16-bit generator and detector, for inference with onnxruntime (Node / web / Python) without a PyTorch dependency.
| File | Role |
|---|---|
audioseal_generator_16bits.onnx |
Embeds a 16-bit watermark into mono audio. |
audioseal_detector_16bits.onnx |
Detects the watermark and recovers the 16-bit payload. |
Usage notes (important)
- Inputs are float32 mono PCM in
[-1, 1]. Pad the audio length up to a multiple of HOP = 320 before running each model, then trim the output back to the original length. - Generator: inputs
audio [1, 1, T](float32) +message [1, 16](int32 bits); output is the watermarked audio. - Detector: input
audio [1, 1, T](float32); outputs per-sample detection probabilities + the recovered 16-bit message. - Sample-rate-agnostic and length-dynamic โ one generator + one detector file covers any sample rate and clip length.
Provenance
Exported from the audioseal PyPI package's PyTorch checkpoints via
torch.onnx (opset 17), with NO_TORCH_COMPILE=1 and a host-side
pad-to-320 / trim convention. Bit-exact 16-bit payload parity and matching
detection probabilities versus the PyTorch reference were verified.
License
MIT โ the same license as upstream AudioSeal (code and model weights,
which Meta relicensed to MIT in April 2024). These ONNX files are a derivative of
those MIT-licensed weights, redistributed under MIT. ยฉ Meta Platforms, Inc. and
affiliates. See LICENSE.
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐ Ask for provider support