Views
No views yet
bshall/knn-vc (the prematched
variant) for the
HiFiGANWavLMMLX
Swift package.This is not a generic mel-spectrogram HiFi-GAN. Input is WavLM-Large hidden states(B, T, 1024)— typicallylayer 6— and output is 16 kHz audio atT × 320samples. Companion togwenn-ha-dev/wavlm-large-mlx.
4e3b96fa86e9b18b0062959b72e83b2e247d43f27a8a5e673f8adf72f1b5ca09prematched (k=4 prematching), 16 kHz output| File | Purpose |
|---|---|
hifigan-wavlm.safetensors | Pretrained generator weights. |
fixtures/wavlm/*.safetensors | Reference forward outputs (sine / noise / mix) for parity testing — includes layer06 (WavLM input) and hifigan_audio (PyTorch reference output). |
fixtures/wavlm/*.wav | The corresponding test waveforms (16 kHz mono, optional). |
bshall/knn-vc.pt checkpoint
(prematch_g_02500000.pt). Every Conv1d and ConvTransposed1d uses
weight_norm, so each conv stores two tensors (weight_g, weight_v)
instead of a single weight..safetensors ships with all weight_norm materialized:weight = weight_g · weight_v / ‖weight_v‖Conv1d / ConvTransposed1d. State-dict entry
count drops from 234 (raw) to 158 (materialized).generator.remove_weight_norm()| Fixture | L1 (mean) | L_∞ (max) |
|---|---|---|
| sine_440_1s | 1.57e-3 | 9.48e-3 |
| noise_2s | 2.15e-3 | 1.82e-2 |
| mixed_3s | 1.98e-3 | 2.19e-2 |
1let arrays = try SafetensorsLoader.load(url: url)
2let hifigan = HiFiGAN()
3try hifigan.loadWeights(from: arrays)gwenn-ha-dev/wavlm-large-mlx:1let hidden = wavlm(waveform)[6] // (1, T, 1024)
2let audio = hifigan(hidden) // (1, T*320)1huggingface-cli download gwenn-ha-dev/hifigan-wavlm-mlx \
2 hifigan-wavlm.safetensors --local-dir ./weightsbshall/knn-vc
(MIT), itself
derived from the upstream HiFi-GAN reference by Kong et al.
(MIT).1@inproceedings{Kong2020HiFiGAN,
2 title={HiFi-GAN: Generative Adversarial Networks for Efficient and High Fidelity Speech Synthesis},
3 author={Kong, Jungil and Kim, Jaehyeon and Bae, Jaekyoung},
4 booktitle={Advances in Neural Information Processing Systems},
5 year={2020}
6}
7
8@inproceedings{Baas2023kNNVC,
9 title={Voice Conversion With Just Nearest Neighbors},
10 author={Baas, Matthew and van Niekerk, Benjamin and Kamper, Herman},
11 booktitle={Interspeech},
12 year={2023}
13}