In honor of Expo Osaka 2025 and its motto 'Designing Future Society for Our Lives,' we humbly present this gift from the people of the Kyrgyz Republic to the people of Japan - heart to heart.
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: 370M parameters
Sample Rate: 22kHz
Languages: Japanese
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
bash
1pip install kani-tts
2pip install -U "transformers==4.57.1"# for LFM2 !!!
Quick Start
python
1from kani_tts import KaniTTS
23model = KaniTTS('nineninesix/kani-tts-400m-kuroyukihime-ja')45# Generate audio from text6audio, text = model("Your text here")78# Save to file (requires soundfile)9model.save_audio(audio,"output.wav")
Custom Configuration
python
1from kani_tts import KaniTTS
23model = KaniTTS(4'nineninesix/kani-tts-400m-kuroyukihime-ja',5 temperature=1,# Control randomness (default: 1.0)6 top_p=0.9,# Nucleus sampling (default: 0.95)7 max_new_tokens=2000,# Max audio length (default: 1200)8 repetition_penalty=1.2,# Prevent repetition (default: 1.1)9 suppress_logs=True,# Suppress library logs (default: True)10 show_info=True,# Show model info on init (default: True)11)1213audio, text = model("Your text here")
Playing Audio in Jupyter Notebooks
You can listen to generated audio directly in Jupyter notebooks or IPython:
python
1from kani_tts import KaniTTS
2from IPython.display import Audio as aplay
34model = KaniTTS('nineninesix/kani-tts-400m-kuroyukihime-ja')5audio, text = model("Your text here")67# Play audio in notebook8aplay(audio, rate=model.sample_rate)
Performance
Nvidia RTX 5090 Benchmarks:
Latency: ~1 second to generate 15 seconds of audio
Memory: 2GB GPU VRAM
Quality Metrics: MOS 4.3/5 (naturalness), WER <5% (accuracy)
Pretraining:
Dataset: ~80k hours from LibriTTS, Common Voice, and Emilia
Hardware: 8x H100 GPUs, 45 hours training time on Lambda AI