CoolFace
Modelpublic

theoracleguy/pocket-tts-onnx

sourceHugging Facecc-by-4.0updated 6d agoView on Hugging Face
0likes
Model Card

Pocket TTS ONNX (Complete Multilingual & 24L Export)

Optimized ONNX exports of Pocket TTS for high-speed, memory-efficient text-to-speech and zero-shot voice cloning on CPU, mobile, and edge runtimes.

Mirrored and validated from KevinAHM/pocket-tts-onnx at commit 58a6d00cf13d239b6748cb0769f35c580a8f606c.

Available Language Bundles

This repository provides comprehensive support for both compact 6-layer models and high-capacity 24-layer models:

  • —6-Layer Compact Models: english_2026-04, german, italian, portuguese, spanish
  • —Ideal for lightweight CPU inference, mobile devices, and low-latency streaming.
  • —~302 MB FP32 / ~76 MB INT8 Flow LM.
  • —24-Layer Capacity Models: french_24l, german_24l, italian_24l, portuguese_24l, spanish_24l
  • —High-fidelity modeling for complex prosody, including full French language support.
  • —~1.21 GB FP32 / ~305 MB INT8 Flow LM.

Artifacts Per Language Bundle

Each bundle directory in onnx/<language>/ provides complete standalone inference:

  • —flow_lm_main.onnx & flow_lm_main_int8.onnx: Dual-split conditioning transformer
  • —flow_lm_flow.onnx & flow_lm_flow_int8.onnx: Flow matching ODE step model
  • —mimi_decoder.onnx & mimi_decoder_int8.onnx: Neural audio codec decoder
  • —mimi_encoder.onnx & mimi_encoder_int8.onnx: Voice prompt audio encoder
  • —text_conditioner.onnx & text_conditioner_int8.onnx: Text embedding conditioner
  • —bos_before_voice.npy: Beginning-of-sequence voice prompt vector (4,224 bytes)
  • —tokenizer.model: Language-specific SentencePiece model
  • —bundle.json: Bundle configuration and predefined voice registry
  • —download_manifest.json: Per-bundle verification manifest with byte sizes and SHA-256 checksums

Root-level convenience models under onnx/ are retained for backward compatibility with flat loaders.

Quickstart

Installation

bash
pip install -r requirements.txt

Python Inference

python
from pocket_tts_onnx import PocketTTSOnnx

# Load English 6L bundle (INT8 quantization by default)
tts_en = PocketTTSOnnx(models_dir="onnx", language="english_2026-04", precision="int8")
audio = tts_en.generate("Hello world, this is a test of Pocket TTS ONNX.", voice="alba")
tts_en.save_audio(audio, "output_en.wav")

# Load French 24L bundle
tts_fr = PocketTTSOnnx(models_dir="onnx", language="french_24l", precision="int8")
audio_fr = tts_fr.generate("Bonjour tout le monde, ceci est un test.", voice="alba")
tts_fr.save_audio(audio_fr, "output_fr.wav")

CLI Synthesis

bash
python generate.py "Hello from Pocket TTS ONNX." alba output.wav --language english_2026-04
python generate.py "Bonjour le monde." alba output_fr.wav --language french_24l

Integrity & Verification

A root repository_manifest.json lists every published artifact with its precise byte size and SHA-256 checksum for automated verification.

License & Attribution

The Pocket TTS model weights and architecture are developed by Kyutai and licensed under Creative Commons Attribution 4.0 International (CC BY 4.0). Upstream ONNX conversions by KevinAHM.