Skip to content
ModelListedExternal
Download

Unit Hifigan Vocoder Euskara v2

This checkpoint contains a SpeechBrain Unit HiFi-GAN vocoder. It converts discrete speech units into waveform audio and uses the speechbrain.lobes.models.HifiGAN.UnitHifiganGenerator architecture together with a...

KindOtherVersionRevision 3ba7180

Model source

Kind
Other
File size
3 B–270 MB
Version
vRevision 3ba7180
Updated
Sep 21, 2026
Downloads
3
Tasks
Audio
Source
Hugging Face

Source description

Unit HiFi-GAN Model Card

Model Overview

This checkpoint contains a SpeechBrain Unit HiFi-GAN vocoder. It converts discrete speech units into waveform audio and uses the speechbrain.lobes.models.HifiGAN.UnitHifiganGenerator architecture together with a HiFi-GAN discriminator.

The saved hyperparameters indicate a multi-speaker discrete-unit setup with the following key settings:

  • vocab_size: 1001
  • embedding_dim: 1024
  • in_channels: 1216
  • out_channels: 1
  • resblock_type: 1
  • upsample_factors: [5, 4, 4, 2, 2]
  • upsample_kernel_sizes: [11, 8, 8, 4, 4]
  • duration_predictor: False
  • multi_speaker: True

The speaker encoder used for training and speaker conditioning was speechbrain/spkrec-ecapa-voxceleb-mel-spec. During inference, the vocoder is driven by precomputed speaker embeddings, with the provided script mapping speaker names such as miren, nerea, and jon to their corresponding embedding files. Following voices are supported with their indices being the speaker id. Find their respective speaker embedding vector in ./speaker_embeddings/{idx}_XXXXX.npy. For example, klara_eu speaker embedding is stored in ./speaker_embedding/9_*.npy.

["aintzane_eu", "alex", "amaia_eu", "andrea_eu", "inaki_eu", "jaione_eu", "jon", "karolina_eu", "kepa_eu", "kiko_eu", "klara_eu", "Maider", "miren", "monika_eu", "nerea", "pello2004_eu", "pello_eu", "xabier_eu"]

The discrete input tokens are extracted with the K-means model stored in the local kmeans/ folder for this experiment.

📣 Note

This model differs from riyadhrazzaq/unit-hifigan-vocoder-euskara in that it uses the Ansu/mHubert-basque-ASR model along with its associated kmeans.

In contrast, riyadhrazzaq/unit-hifigan-vocoder-euskara is based on the mHuBERT implementation from the utter-project/mHuBERT-147.

Intended Use

This model is intended for research and inference workflows that need waveform synthesis from discrete speech units. It is suitable for unit-based TTS or speech-to-speech pipelines when the unit extractor, tokenization, and sampling settings match the training setup.

Model Inputs and Outputs

Input:

  • A sequence of discrete speech units.
  • Optional speaker conditioning, when used by the surrounding pipeline.

Speaker conditioning is supplied through the speaker embedding extracted by the ECAPA-TDNN speaker encoder above, rather than by raw speaker IDs.

Output:

  • A generated waveform with one audio channel.

Training and Checkpoint Notes

This folder stores the checkpoint state at epoch 500, along with the generator, discriminator, optimizer, and scheduler states used during training.

The exact corpus used for this run is not documented in this README. Use the matching experiment configuration or recipe alongside this checkpoint if you need the original data provenance, preprocessing, or evaluation protocol.

Limitations

  • Output quality depends on using the same or compatible unit extractor and preprocessing pipeline used during training.
  • This checkpoint is not guaranteed to generalize well to out-of-domain speakers, recording conditions, or unit tokenizers.
  • The README does not report a formal benchmark table, so treat this as a model artifact description rather than an evaluation report.

Loading

In SpeechBrain, this checkpoint is typically loaded with speechbrain.inference.vocoders.UnitHIFIGAN using the checkpoint directory as the source.

Training command used by the recipe (examples only):

python ./recipes/Euskara/TTS/vocoder/hifigan_discrete/train_spk.py \
	./recipes/Euskara/TTS/vocoder/hifigan_discrete/hparams/train_spk_sonora_2.yaml \
	--data_folder=/data/aholab/tts/eu/hifigan_spk/

Inference command used by the recipe:

python ./recipes/Euskara/TTS/vocoder/hifigan_discrete/infer.py \
	--input_path /path/to/audio_or_folder \
	--hubert_repo utter-project/mHuBERT-147 \
	--vocoder_repo /path/to/this/checkpoint \
	--kmeans_path kmeans/basque_hubert_k1000_L9.pt \
	--spk miren nerea jon

Example kmeans code extraction:

    kmeans = joblib.load("/scratch/mriyadh/speechbrain/models/kmeans/kmeans__utter-project_mhubert-147__K1000__L9.pt")
	discreet_codes = np.array(kmeans.predict(features))

Re-training Steps

  1. Organize speaker audio files into the following directory structure:
data/
	speaker1/
		audio1.wav
		audio2.wav
	speakerN/
		audio1.wav
		audio2.wav
  1. Configure hyperparameters by modifying the YAML files in recipes/Euskara/TTS/vocoder/hifigan_discrete/hparams/.

  2. Start training using the command shown in the Training section above.

Training K-means

To train the K-means model, refer to the kmeans/train.py script in the riyadhrazzaq/llama_omni_asr_tts repository.

Citation

If you use this checkpoint, please cite the relevant SpeechBrain and HiFi-GAN work, and the Unit HiFi-GAN variant if applicable to your experiment.

Suggested references:


Note: This README was generated using AI.

Sources

1 source
Hugging FacePrimaryVersion 3ba7180db2f836a6432d3685cc96ec83ec9e99e4
huggingface.co/riyadhrazzaq/unit-hifigan-vocoder-euskara-v2/tree/3ba7180db2f836a6432d3685cc96ec83ec9e99e4

Verified Sep 21

Model artifacts

5 artifacts

brain.ckpt

ckpt · 46 B · SHA-256 33809a026a2c…df5c · Hugging Face

Download

counter.ckpt

ckpt · 3 B · SHA-256 0604cd3138fe…1f0a · Hugging Face

Download

dataloader-TRAIN.ckpt

ckpt · 3 B · SHA-256 87acb1e183a2…b085 · Hugging Face

Download

discriminator.ckpt

ckpt · 270 MB · SHA-256 331a1d749a88…d487 · Hugging Face

Download

generator.ckpt

ckpt · 70.0 MB · SHA-256 ceaedb9d68b8…b161 · Hugging Face

Download

Source excerpts

2 excerpts

--- language: - en - eu license: apache-2.0 library_name: speechbrain tags: - text-to-speech - vocoder - hifigan - discrete-units - speech-synthesis model-index: - name: Unit HiFi-GAN Vocoder results: - task: name: Text-to-Speech type: text-to-speech dataset: name: Euskara TTS from Aholab type: custom metrics: - name: MCD type: mcd value: 4.85 --- # Unit HiFi-GAN Model Card ## Model Overview This checkpoint contains a SpeechBrain Unit HiFi-GAN vocoder. It converts discrete speech units into waveform audio and uses the `speechbrain.lobes.models.HifiGAN.UnitHifiganGenerator` architecture together with a HiFi-GAN discriminator. The saved hyperparameters indicate a multi-speaker discrete-unit setup with the following key settings: - `vocab_size`: 1001 - `embedding_dim`: 1024 - `in_channels`: 1216 - `out_channels`: 1 - `resblock_type`: `1` - `upsample_factors`: `[5, 4, 4, 2, 2]` - `upsample_kernel_sizes`: `[11, 8, 8, 4, 4]` - `duration_predictor`: `False` - `multi_speaker`: `True` The speaker encoder used for training and speaker conditioning was `speechbrain/spkrec-ecapa-voxceleb-mel-spec`. During inference, the vocoder is driven by precomputed speaker embeddings, with the provided script mapping speaker names such as `miren`, `nerea`, and `jon` to their corresponding embedding files. Following voices are supported with their indices being the speaker id. Find their respective speaker embedding vector in `./speaker_embeddings/{idx}_XXXXX.npy`. For example, `klara_eu` speaker embedding is stored in `./speaker_embedding/9_*.npy`. ``` ["aintzane_eu", "alex", "amaia_eu", "andrea_eu", "inaki_eu", "jaione_eu", "jon", "karolina_eu", "kepa_eu", "kiko_eu", "klara_eu", "Maider", "miren", "monika_eu", "nerea", "pello2004_eu", "pello_eu", "xabier_eu"] ``` The discrete input tokens are extracted with the K-means model stored in the local `kmeans/` folder for this experiment. ## 📣 Note This model differs from [riyadhrazzaq/unit-hifigan-vocoder-euskara](https://huggingface.co/riyadhrazzaq/unit-hifigan-vocoder-euskara) in that it uses the [Ansu/mHubert-basque-ASR](https://huggingface.co/Ansu/mHubert-basque-ASR) model along with its associated `kmeans`. In contrast, [riyadhrazzaq/unit-hifigan-vocoder-euskara](https://huggingface.co/riyadhrazzaq/unit-hifigan-vocoder-euskara) is based on the mHuBERT implementation from the [utter-project/mHuBERT-147...

Source context: 3 downloads · 0 likes · Pipeline text-to-speech · Library speechbrain · Repo riyadhrazzaq/unit-hifigan-vocoder-euskara-v2