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.3.tar.gz
(2.3 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.3.tar.gz.
File metadata
- Download URL: kittentts-0.1.3.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e48cc069f84c09817a38c77920e9567cf0b65ab980deb46ff94a61669364cf1a
|
|
| MD5 |
55f11db59b80ca69f75e4f687886daeb
|
|
| BLAKE2b-256 |
34a0205826d5d3b962f1fa9ec10f860630454f196dda5259bd10485a7ca1cae3
|
File details
Details for the file kittentts-0.1.3-py2.py3-none-any.whl.
File metadata
- Download URL: kittentts-0.1.3-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 |
da41beef7e5a13201f849d5e688a978fabd8cdd196250816e7a07972d6aacf43
|
|
| MD5 |
d6bb920053f509bba84d31dd2d066486
|
|
| BLAKE2b-256 |
0bbc3d24d68f666dcd853b38eda1a44e722ea3ddcfc9b415f18d9024bd477ef4
|