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:
apt install espeak
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.2.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.2.tar.gz.
File metadata
- Download URL: kittentts-0.1.2.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 |
fe9daa514fff667098d279b19477315269138a3f77a8b4a17920118a008d9608
|
|
| MD5 |
37cea5eba421af3b319d2fac8ca46e10
|
|
| BLAKE2b-256 |
9bc41acaad48ce6f50f9f508990bfa188f4d3434e01828b4d4228502726fba5f
|
File details
Details for the file kittentts-0.1.2-py2.py3-none-any.whl.
File metadata
- Download URL: kittentts-0.1.2-py2.py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
822a6d8b36aef0f902763c18a5a3e2b95533916acaae5f68b51ad0f457c18a68
|
|
| MD5 |
29d60cc30719c6e01a9ee6aa3d45f3d2
|
|
| BLAKE2b-256 |
b3387080722fa438126854104c07e59a41c09979a309d6ff745867c955119ad4
|