TigreGotico/voiceclonnx-bicodec
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
from vconnx import VoiceCloner
cloner = VoiceCloner(engine="bicodec")
out = cloner.clone_voice("source.wav", "reference.wav", "out.wav")
print(cloner.sample_rate) # 16000Install: pip install vconnx
Components
Output sample rate: 16 kHz.
Parity vs PyTorch
References
- Spark-TTS paper
- SparkAudio/Spark-TTS
- SparkAudio/Spark-TTS-0.5B (upstream weights)
- vconnx (inference library)
