CoolFace
Modelpublic

TigreGotico/voiceclonnx-bicodec

sourceHugging Facecc-by-nc-sa-4.0updated 3mo agoView on Hugging Face
0likes7downloads
Model Card

vconnx-bicodec

ONNX artifacts for the bicodec engine of vconnx — a pure-ONNX multi-engine voice-cloning library.

BiCodec (SparkAudio/Spark-TTS, 2025) achieves zero-shot any-to-any voice conversion via explicit factorization of speech into two complementary token streams:

  • Semantic tokens (content): Wav2Vec2-XLSR-53 (hidden layers 11, 14, 16 averaged) → convolutional encoder → FactorizedVQ → (1, T) int64
  • Global tokens (speaker): 128-bin Slaney mel spectrogram → ECAPA-TDNN + Perceiver + FSQ → (1, 1, 32) int32 (32 fixed tokens per utterance)

Voice conversion: source semantic tokens + reference global tokens → decoder → waveform. No auto-regressive language model; single forward pass per chunk.

License

Upstream weights: CC BY-NC-SA 4.0 — non-commercial use only.

These ONNX artifacts are derived from SparkAudio/Spark-TTS-0.5B weights which are licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

  • You may not use these artifacts for commercial purposes.
  • You must give appropriate credit to SparkAudio.
  • Derivative works must carry the same CC BY-NC-SA 4.0 license.

Upstream code (SparkAudio/Spark-TTS): Apache-2.0.

Usage

python
from vconnx import VoiceCloner

cloner = VoiceCloner(engine="bicodec")
out = cloner.clone_voice("source.wav", "reference.wav", "out.wav")
print(cloner.sample_rate)   # 16000

Install: pip install vconnx

Components

FileDescriptionSize (fp32)Size (INT8)
wav2vec2_encoder.onnxWav2Vec2-XLSR-53 encoder (layers 11/14/16 avg)819 MB206 MB
semantic_encoder.onnxConv encoder + FactorizedVQ → semantic tokens116 MB30 MB
global_encoder.onnxECAPA-TDNN + Perceiver + FSQ → global tokens22 MB6 MB
decoder.onnxToken decoder → waveform368 MB158 MB
mel_filterbank.npy128-bin Slaney mel filterbank (numpy, 128×513)256 KB
mel_config.jsonSTFT parameters (n_fft=1024, hop=320, win=640)~1 KB

Output sample rate: 16 kHz.

Parity vs PyTorch

ComponentMetricValueResult
wav2vec2_encodermax_abs6.71e-4PASS
semantic_encoderexact int matchTruePASS
global_encoderexact int matchTruePASS
mel numpy vs torchaudiomax_abs0.00e+0PASS
decodermax_abs2.53e-6PASS

References