Views
No views yet
trust_remote_code=True, no training repo required.| Repo | Role |
|---|---|
mlr2000/vocoder-large | Large vocoder (generates the watermarked audio) |
mlr2000/vocoder-large-watermark-detector | Watermark detector (this repo) |
mlr2000/vocoder-large-speaker-encoder | Speaker encoder for the large model |
mlr2000/vocoder-small | Small vocoder |
mlr2000/vocoder-small-watermark-detector | Watermark detector for the small model |
mlr2000/vocoder-small-speaker-encoder | Speaker encoder for the small model |
1import torchaudio
2from transformers import AutoModel
3
4det = AutoModel.from_pretrained("mlr2000/vocoder-large-watermark-detector", trust_remote_code=True).eval()
5
6wav, sr = torchaudio.load("clip.wav") # [C, T]
7res = det.detect(wav, input_sample_rate=sr) # resampled to 24 kHz internally
8print(res)
9# {'matches': 50, 'n_bits': 50, 'p_value': 8.9e-16}example_roundtrip.ipynb in this repo for an end-to-end example
(generate with the vocoder → detect here).detect() returns a dict with:matches: how many of the 50 extracted bits equal the fixed code.n_bits: 50.p_value: the probability an unrelated clip matches at least this well under
Binomial(50, 0.5).p_value ~ 0). An unrelated clip matches about half of them (p_value ~ 1). There is no built-in yes/no threshold, read matches / p_value and pick whatever operating point you need. Requiring all 50 bits gives an astronomically small false-positive rate. Allowing a few mismatches trades that for robustness to lossy channels.input_sample_rate, and multi-channel audio is downmixed to mono.mlr2000/vocoder-large. It will not correctly verify audio generated by the small vocoder (mlr2000/vocoder-small), which uses a different fixed watermark.1@misc{muletta2026,
2 title = {Training a Discriminator-Free Foundation Vocoder
3 with Integrated Audio Watermarking},
4 author = {Muletta, Romolo and Deriu, Jan},
5 year = {2026},
6 note = {VT2 Project Report, ZHAW School of Engineering}
7}cc-by-4.0. Trained on MLS (CC-BY-4.0) and Common Voice (CC0). Builds
on BigVGAN (MIT) and wav2vec 2.0 (Apache-2.0). Please retain attribution
when redistributing or building on this model.