Instructions to use KittenML/kitten-tts-2-pico with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- KittenTTS
How to use KittenML/kitten-tts-2-pico with KittenTTS:
from kittentts import KittenTTS m = KittenTTS("KittenML/kitten-tts-2-pico") audio = m.generate("This high quality TTS model works without a GPU") # Save the audio import soundfile as sf sf.write('output.wav', audio, 24000) - Notebooks
- Google Colab
- Kaggle
Kitten TTS 2 Pico
7.2M parameters per language model, 8 languages, 30 voices, 24 kHz. ONNX with int8 weights (8.0 MB; runs on CPU, no PyTorch needed), and the float32 PyTorch weights.
Usage
pip install kittenml
from kittenml import KittenTTS
import soundfile as sf
m = KittenTTS("KittenML/kitten-tts-2-pico") # or the path of this directory
print(m.available_voices) # {"en": ["Eleanor", ...], "de": ["Anna", ...], ...}
for v in m.voices("de"): # name and description of each voice
print(v["name"], v["description"])
audio = m.generate("Hello there, this is Kitten TTS 2 Pico.", voice="Eleanor")
audio = m.generate("Guten Morgen! Wie geht es dir?", voice="Paul", speed=1.1) # the voice sets the language
audio = m.generate("Guten Morgen! Wie geht es dir?", language="de") # the language's first voice (Anna)
sf.write("out.wav", audio, 24000)
m = KittenTTS("KittenML/kitten-tts-2-pico", backend="torch") # PyTorch, float32 weights
m = KittenTTS("KittenML/kitten-tts-2-pico", backend="torch", device="cuda") # on a GPU
audio = m.generate("Hello there, this is Kitten TTS 2 Pico.", voice="Eleanor")
backend="onnx" (the default) runs the int8 ONNX graph with ONNX Runtime; backend="torch" runs the float32
weights in PyTorch. Only the files the selected backend needs are downloaded.
voice takes a name from the tables below (any case: "Paul" or "paul") or its description.
Without voice, a language's first voice speaks.
Voices
Each voice is a first name; its voice pack is stored under the lowercase name in voices_<lang>.npz. The English
voices carry the names of the same characters in KittenTTS 2.
English (en)
| voice | description |
|---|---|
| Eleanor | Somber historian (female) |
| Edith | Elderly grandmother soft (female) |
| Otis | Rumbling blues musician (male) |
| Frank | Grizzled war veteran gravelly (male) |
German (de)
| voice | description |
|---|---|
| Anna | Female 1 |
| Mia | Female 2 |
| Lukas | Male 1 |
| Paul | Male 2 |
Spanish (es)
| voice | description |
|---|---|
| Sofia | Female 1 |
| Elena | Female 2 |
| Pablo | Male 1 |
| Mateo | Male 2 |
Italian (it)
| voice | description |
|---|---|
| Francesca | Female 1 |
| Alessandro | Male 1 |
| Giorgio | Male 2 |
| Davide | Male 3 |
Portuguese (Brazil) (pt)
| voice | description |
|---|---|
| Juliana | Female 1 |
| Larissa | Female 2 |
| Gustavo | Male 1 |
| Caio | Male 2 |
Russian (ru)
| voice | description |
|---|---|
| Olga | Female 1 |
| Tatiana | Female 2 |
| Sergei | Male 1 |
| Alexei | Male 2 |
Hindi (hi)
| voice | description |
|---|---|
| Priya | Female 1 |
| Arjun | Male 1 |
French (fr)
| voice | description |
|---|---|
| Amelie | Female 1 |
| Lea | Female 2 |
| Theo | Male 1 |
| Baptiste | Male 2 |
License
Apache-2.0 (the models, voice packs and the bundled G2P files).
- Downloads last month
- 168