Downloads · 30 days
8
47% of all-time downloads
mlr2000/vocoder-small-speaker-encoder
vocoder-small-speaker-encoder is a feature extraction model from mlr2000. Use it when you need embeddings to search or compare text. It is set up for transformers. The card lists the license as cc-by-4.0.
Standalone speaker encoder: turns a raw waveform into a fixed 768-dimensional speaker embedding. It is the conditioning front-end for the companion VocBulwark vocoder — compute an embedding once from a reference clip…
Downloads · 30 days
8
47% of all-time downloads
All-time downloads
17
Public
Parameters
18.7M
74.7 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors74.7 MB · 100%
From the Hugging Face model README
Standalone speaker encoder: turns a raw waveform into a fixed 768-dimensional speaker embedding. It is the conditioning front-end for the companion VocBulwark vocoder — compute an embedding once from a reference clip of a speaker, then pass it to the vocoder to synthesize in that voice. The embedding is also usable on its own for speaker verification / similarity.
Wav2Vec2-based encoder with attentive statistics pooling, trained with a GE2E objective. Self-contained: loads with trust_remote_code=True, no training repo required.
This speaker encoder is part of a set of 6 repositories:
| Repo | Role |
|---|---|
mlr2000/vocoder-large | Large vocoder |
mlr2000/vocoder-large-watermark-detector | Watermark detector for the large model |
mlr2000/vocoder-large-speaker-encoder | Speaker encoder for the large model |
mlr2000/vocoder-small | Small vocoder (generates the watermarked audio) |
mlr2000/vocoder-small-watermark-detector | Watermark detector for the small model |
mlr2000/vocoder-small-speaker-encoder | Speaker encoder (this repo) |
import torchaudio, torchaudio.functional as AF
from transformers import AutoModel
enc = AutoModel.from_pretrained("mlr2000/vocoder-small-speaker-encoder", trust_remote_code=True).eval()
wav, sr = torchaudio.load("reference.wav") # [C, T]
wav = wav.mean(0, keepdim=True) # mono [1, T]
if sr != enc.config.raw_sample_rate: # encoder expects 22.05 kHz
wav = AF.resample(wav, sr, enc.config.raw_sample_rate)
emb = enc.embed(wav) # [1, 768] — feed as speaker_embedding to the vocoder
See example_roundtrip.ipynb in this repo for the full pipeline (reference clip → embedding → vocode → detect watermark).
config.raw_sample_rate). Resample first if your audio differs.[B, 768] L2-comparable speaker embeddings.mlr2000/vocoder-small. For the large vocoder (mlr2000/vocoder-large) use the companion large speaker encoder (mlr2000/vocoder-large-speaker-encoder).If you use this model, please cite:
@misc{muletta2026,
title = {Training a Discriminator-Free Foundation Vocoder
with Integrated Audio Watermarking},
author = {Muletta, Romolo and Deriu, Jan},
year = {2026},
note = {VT2 Project Report, ZHAW School of Engineering}
}
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.