Implementation of KittenTTS
Project description
KittenTTS Example
This project demonstrates how to use the KittenTTS text-to-speech model to convert text into a .wav audio file.
Features
- Convert any given text into natural-sounding speech.
- Choose a specific voice for the generated audio.
- Control the playback speed.
Requirements
Install the required Python packages:
pip install KittenTTS
Usage
Below is a minimal working example:
import soundfile as sf
from kittentts import KittenTTS
# Initialize the model
model = KittenTTS()
# Generate speech
audio_data = model.generate(
text="hi who are you",
voice="expr-voice-2-m",
speed=1.0
)
# Save output as a WAV file
sf.write("test.wav", audio_data, 24000)
Parameters
- text (str): The text you want to convert to speech.
- voice (str): The voice preset to use (e.g.,
"expr-voice-2-m"). - speed (float): Playback speed multiplier (1.0 = normal speed).
Reference
https://github.com/KittenML/KittenTTS
Implementation with GUI
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
kittentts-0.1.1.tar.gz
(2.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kittentts-0.1.1.tar.gz.
File metadata
- Download URL: kittentts-0.1.1.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9152fdecad60b2497da07a8c4a8b8d7023833b4262524ca3485aa2031234dc24
|
|
| MD5 |
cdf43cb398a1ba271470eaebf61668bf
|
|
| BLAKE2b-256 |
bf2c84fe339b5682cf1d62f74059bc72df3848c2db56e828106b60b091a7e91f
|
File details
Details for the file kittentts-0.1.1-py2.py3-none-any.whl.
File metadata
- Download URL: kittentts-0.1.1-py2.py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a78f3aa5060d8bfbdbed39866bf58370f28fea43e62553d7bb41e250635c42d5
|
|
| MD5 |
53b5d301c6f5596b17eb77c2107603fe
|
|
| BLAKE2b-256 |
7c864994a39367f0d4b4dfb8a280052804f058d8376f546291b04b5cb11f0ee6
|