Text-to-Speech
Transformers
Safetensors
lfm2
text-generation

Logo

KaniTTS Pretrain v0.3

License

A high-speed, high-fidelity Text-to-Speech model optimized for real-time conversational AI applications.

Overview

KaniTTS uses a two-stage pipeline combining a large language model with an efficient audio codec for exceptional speed and audio quality. The architecture generates compressed token representations through a backbone LLM, then rapidly synthesizes waveforms via neural audio codec, achieving extremely low latency.

Key Specifications:

  • Model Size: 400M parameters
  • Sample Rate: 22kHz
  • Language: English, Chinese, Korean, Spanish, German, Japanese, German, Kyrgyz
  • License: Apache 2.0

Quickstart: Install from PyPI & Run Inference

It’s a lightweight so you can install, load a model, and speak in minutes. Designed for quick starts and simple workflows—no heavy setup, just pip install and run. More detailes...

Install

pip install kani-tts
pip install -U "transformers==4.57.1" # for LFM2 !!!

Quick Start

from kani_tts import KaniTTS

model = KaniTTS('nineninesix/kani-tts-400m-0.3-pt')

# Generate audio from text
audio, text = model("Your text here")

# Save to file (requires soundfile)
model.save_audio(audio, "output.wav")

Working with Multi-Speaker Models

This model NOT support multiple speakers. But You can check if Your model supports speakers and select a specific voice:

from kani_tts import KaniTTS

model = KaniTTS('your_mode_repo/name')

# Check if model supports multiple speakers
print(f"Model type: {model.status}")  # 'singlspeaker' or 'multispeaker'

# Display available speakers (pretty formatted)
model.show_speakers()

# Or access the speaker list directly
print(model.speaker_list)

# Generate audio with a specific speaker
audio, text = model("Your text here", speaker_id="speaker_n")

Custom Configuration

from kani_tts import KaniTTS

model = KaniTTS(
    'nineninesix/kani-tts-400m-0.3-pt',
    temperature=0.7,           # Control randomness (default: 1.0)
    top_p=0.9,                 # Nucleus sampling (default: 0.95)
    max_new_tokens=2000,       # Max audio length (default: 1200)
    repetition_penalty=1.2,    # Prevent repetition (default: 1.1)
    suppress_logs=True,        # Suppress library logs (default: True)
    show_info=True,            # Show model info on init (default: True)
)

audio, text = model("Your text here")

Playing Audio in Jupyter Notebooks

You can listen to generated audio directly in Jupyter notebooks or IPython:

from kani_tts import KaniTTS
from IPython.display import Audio as aplay

model = KaniTTS('nineninesix/kani-tts-400m-0.3-pt')
audio, text = model("Your text here")

# Play audio in notebook
aplay(audio, rate=model.sample_rate)

Performance

On NovitaAI RTX 5090 using vLLM:

GPU Benchmark Results

GPU Model VRAM Cost ($/hr) RTF
RTX 5090 32GB $0.423 0.190
RTX 4080 16GB $0.220 0.200
RTX 5060 Ti 16GB $0.138 0.529
RTX 4060 Ti 16GB $0.122 0.537
RTX 3060 12GB $0.093 0.600

Datasets

Use Cases

  • Conversational AI: Real-time speech for chatbots and virtual assistants
  • Edge/Server Deployment: Resource-efficient inference on affordable hardware
  • Accessibility: Screen readers and language learning applications
  • Research: Fine-tuning for specific voices, accents, or emotions

Limitations

  • Performance degrades with inputs exceeding 15 seconds (need to use sliding window chunking)
  • Limited expressivity without fine-tuning for specific emotions
  • May inherit biases from training data in prosody or pronunciation
  • Optimized primarily for English; other languages may require additional training

Optimization Tips

  • Multilingual Performance: Continually pretrain on target language datasets and fine-tune NanoCodec
  • Batch Processing: Use batches of 8-16 for high-throughput scenarios
  • Hardware: Optimized for NVIDIA Blackwell architecture GPUs

Resources

Models:

Examples:

Links:

Acknowledgments

Built on top of LiquidAI LFM2 350M as the backbone and Nvidia NanoCodec for audio processing.

Responsible Use

Prohibited activities include:

  • Illegal content or harmful, threatening, defamatory, or obscene material
  • Hate speech, harassment, or incitement of violence
  • Generating false or misleading information
  • Impersonating individuals without consent
  • Malicious activities such as spamming, phishing, or fraud

By using this model, you agree to comply with these restrictions and all applicable laws.

Contact

Have a question, feedback, or need support? Please fill out our contact form and we'll get back to you as soon as possible.

Citation

@inproceedings{emilialarge,
  author={He, Haorui and Shang, Zengqiang and Wang, Chaoren and Li, Xuyuan and Gu, Yicheng and Hua, Hua and Liu, Liwei and Yang, Chen and Li, Jiaqi and Shi, Peiyang and Wang, Yuancheng and Chen, Kai and Zhang, Pengyuan and Wu, Zhizheng},
  title={Emilia: A Large-Scale, Extensive, Multilingual, and Diverse Dataset for Speech Generation},
  booktitle={arXiv:2501.15907},
  year={2025}
}
@article{emonet_voice_2025,
  author={Schuhmann, Christoph and Kaczmarczyk, Robert and Rabby, Gollam and Friedrich, Felix and Kraus, Maurice and Nadi, Kourosh and Nguyen, Huu and Kersting, Kristian and Auer, Sören},
  title={EmoNet-Voice: A Fine-Grained, Expert-Verified Benchmark for Speech Emotion Detection},
  journal={arXiv preprint arXiv:2506.09827},
  year={2025}
}
@dataset{masrispeech_full,
  author       = {Yahya Muhammad Alnwsany},
  title        = {MasriSpeech-Full: Large-Scale Egyptian Arabic Speech Corpus},
  year         = {2025},
  publisher    = {Hugging Face},
  url          = {https://huggingface.co/collections/NightPrince/masrispeech-dataset-68594e59e46fd12c723f1544}
}
Downloads last month
738
Safetensors
Model size
0.4B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for nineninesix/kani-tts-400m-0.3-pt

Finetunes
11 models
Quantizations
2 models

Datasets used to train nineninesix/kani-tts-400m-0.3-pt

Spaces using nineninesix/kani-tts-400m-0.3-pt 3