Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
A

audioseal

> 编程语言
Open source

Localized watermarking for AI-generated speech audios, with SOTA on robustness and very fast detector

762 stars0 likes0 views
WebsiteGitHub

About

Localized watermarking for AI-generated speech audios, with SOTA on robustness and very fast detector

:loud_sound: AudioSeal: Efficient Localized Audio Watermarking

This repo contains the official implementation for AudioSeal, a method for efficient audio watermarking, with state-of-the-art robustness and detector speed.

:rocket: Quick Links:

[arXiv] [Hugging Face] [Colab Notebook] [Webpage] [Blog] [Press]

:sparkles: Key Updates:

  • 2024-12-12: AudioSeal 0.2 is out, with streaming support and other improvement
  • 2024-06-17: Training code is now available. Check the instruction!!!
  • 2024-05-31: Our paper gets accepted at ICML'24 :)
  • 2024-04-02: We have updated our license to full MIT license (including the license for the model weights) ! Now you can use AudioSeal in commercial application too!
  • 2024-02-29: AudioSeal 0.1.2 is out, with more bug fixes for resampled audios and updated notebooks

:book: Abstract

AudioSeal introduces a novel audio watermarking using ocalized watermarking and a novel perceptual loss. It jointly trains two components: a generator that embeds an imperceptible watermark into audio and a detector that identifies watermark fragments in long or edited audio files.

  • Key Features:
    • Localized watermarking at the sample level (1/16,000 of a second). AudioSeal works well with other sampling rates as well (24 khZ, 44.5 kHz, 48 kHz)
    • Minimal impact on audio quality.
    • Robust against various audio edits like compression, re-encoding, and noise addition.
    • Fast, single-pass detection designed to surpass existing models significantly in speed — achieving detection up to two orders of magnitude faster, making it ideal for large-scale and real-time applications.

:mate: Installation

Requirements:

  • Python >= 3.8 (>= 3.10 for streaming support)
  • Pytorch >= 1.13.0
  • Omegaconf
  • Numpy
  • einops (for streaming support)

Install from PyPI:

bash
pip install audioseal

To install from source: Clone this repo and install in editable mode:

bash
git clone https://github.com/facebookresearch/audioseal
cd audioseal
pip install -e .

:gear: Models

You can find all the model checkpoints on the Hugging Face Hub. We provide the checkpoints for the following models:

  • AudioSeal Generator: Takes an audio signal (as a waveform) and outputs a watermark of the same size as the input, which can be added to the input to watermark it. Optionally, it can also take a secret 16-bit message to embed in the watermark.
  • AudioSeal Detector: Takes an audio signal (as a waveform) and outputs the probability that the input contains a watermark at each sample (every 1/16k second). Optionally, it may also output the secret message encoded in the watermark.

Note that the message is optional and has no influence on the detection output. It may be used to identify a model version for instance (up to $2**16=65536$ possible choices).

:abacus: Usage

Here’s a quick example of how you can use AudioSeal’s API to embed and detect watermarks:

…

:abacus: Streaming support

Starting AudioSeal 0.2, you can run the watermarking over the stream of audio signals. The API is `model.streaming(batch_size), which will enable the convolutional cache during the watermark generation. Ensure to put this within context, so the cache is safely cleaned after the session:

…

See example notebook for full details.

:brain: Train your own watermarking model

See here for details on how to train your own Watermarking model.

See Also

The team also develops other open-source watermarking solutions:

  • WMAR: Autoregressive watermarking models for images
  • Video Seal: Open and efficient video watermarking
  • WAM: Watermark Any Images with Localization

Troubleshooting

  • If you encounter the error ValueError: not enough values to unpack (expected 3, got 2), this is because we expect a batch of audio tensors as inputs. Add one dummy batch dimension to your input (e.g. wav.unsqueeze(0), see example notebook for getting started).

  • In Windows machines, if you encounter the error KeyError raised while resolving interpolation: "Environmen variable 'USER' not found": This is due to an old checkpoint uploaded to the model hub, which is not compatible in Windows. Try to invalidate the cache by removing the files in C:\Users\\.cache\audioseal and re-run again.

  • If you use torchaudio to handle your audios and encounter the error Couldn't find appropriate backend to handle uri ..., this is due to newer version of torchaudio does not handle the default backend well. Either downgrade your torchaudio to 2.1.0 or earlier, or install soundfile as your audio backend.

:heart: Acknowledgements

We borrow the code with some adaptations from the following repos:

  • AudioCraft in libs/audiocraft/.
  • Moshi in libs/moshi/.

:handshake: Contributions

We welcome Pull Requests with improvements or suggestions. If you want to flag an issue or propose an improvement, but don't know how to realize it, create a GitHub Issue.

License

  • The code in this repository is released under the MIT license as found in the LICENSE file.

✍️ Citation

If you find this repository useful, please consider giving a star :star: and please cite as:

@article{sanroman2024proactive,
  title={Proactive Detection of Voice Cloning with Localized Watermarking},
  author={San Roman, Robin and Fernandez, Pierre and Elsahar, Hady and D´efossez, Alexandre and Furon, Teddy and Tran, Tuan},
  journal={ICML},
  year={2024}
}

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Python

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言