CoolFace
Modelpublic

mlr2000/vocoder-large

sourceHugging Facecc-by-4.0updated 2mo agoView on Hugging Face
0likes34downloads
Model Card

VocBulwark HiFi-GAN โ€” watermarking neural vocoder (inference export)

Speaker-conditioned BigVGAN / HiFi-GAN neural vocoder. It turns an input mel-spectrogram (what is said) into a 24 kHz waveform, conditioned on a precomputed 768-d speaker embedding (whose voice). Every clip it generates carries a fixed 50-bit provenance watermark that identifies this specific model instance, see Watermark.

This is the lean, inference-only vocoder: the frozen perceptual-loss base models (Whisper / WavLM / Wav2Vec2), the training discriminators, and the speaker encoder have all been stripped, you pass the speaker embedding in. Use the companion speaker-encoder repo to turn a reference clip into that embedding. The modeling code is bundled, so it loads with trust_remote_code=True without the training repo.

Model summary

ArchitectureHiFiGANArchitecture (BigVGAN generator, snakebeta activation)
Inputslog-mel spectrogram (96 mel channels) + speaker embedding (768-d)
Outputmono waveform, 24 kHz
Speaker conditioningprecomputed embedding (from the companion speaker encoder)
Generatorinitial channels 1536, upsample rates [4, 4, 2, 2, 2, 2]
Watermark50-bit fixed VocBulwark signature, always embedded
Framework๐Ÿค— Transformers, PyTorch, safetensors

Companion Models

This model is part of a set of 6 repositories:

RepoRole
mlr2000/vocoder-largeLarge vocoder (this repo)
mlr2000/vocoder-large-watermark-detectorWatermark detector for the large model
mlr2000/vocoder-large-speaker-encoderSpeaker encoder for the large model
mlr2000/vocoder-smallSmall vocoder
mlr2000/vocoder-small-watermark-detectorWatermark detector for the small model
mlr2000/vocoder-small-speaker-encoderSpeaker encoder for the small model

Usage

python
import torch
from transformers import AutoModel

model = AutoModel.from_pretrained("mlr2000/vocoder-large", trust_remote_code=True).eval()

mel = torch.randn(1, model.config.hifigan_in_channels, 200)      # [B, mel, T]
emb = torch.randn(1, model.config.speaker_embedding_size)        # [B, 768] from the speaker encoder
with torch.no_grad():
    audio = model(mel_spectrogram=mel, speaker_embedding=emb).audio
# audio: [B, 1, samples] @ model.config.target_sample_rate

See `example_roundtrip.ipynb` in this repo for the full pipeline (reference clip โ†’ speaker encoder โ†’ embedding โ†’ vocode โ†’ verify watermark).

Training

Training dataMultilingual LibriSpeech (8 languages, ~22,200h) and Common Voice (14 languages, ~3,000h)
Training steps1,000,000
Hardware2 ร— NVIDIA H200 GPUs
Training objectiveDiscriminator-free: mel spectrogram + WavLM + wav2vec 2.0 + Whisper encoder losses
Effective batch size32
Learning rate1e-4

Watermark

Every clip this model generates carries a fixed 50-bit provenance watermark (config.fixed_watermark) that identifies this specific model instance. It is embedded automatically inside forward and cannot be disabled or changed through this interface โ€” there is deliberately no watermark argument to override.

To verify whether a given audio clip was generated by this model, use the companion detector repo (mlr2000/vocoder-large-watermark-detector), which extracts the embedded bits and compares them to the known fixed code.

Notes

  • โ€”Inputs: log-mel spectrogram (config.hifigan_in_channels channels) and a [B, config.speaker_embedding_size] speaker embedding.
  • โ€”Output: mono waveform at config.target_sample_rate.
  • โ€”Use the embedding from the speaker encoder this vocoder was trained with, a mismatched encoder will not condition it correctly.
  • โ€”Not intended for voice cloning of real individuals without consent, or any deceptive / impersonation use.

Citation

If you use this model, please cite:

bibtex
@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}
}

License

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.