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
Metadata
Release files for kittentts 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kittentts-0.1.3.tar.gz | 2.3 kB | Without provenance | Details for kittentts-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kittentts-0.1.3-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for kittentts-0.1.3-py2.py3-none-any.whl |
Total release size: 4.9 kB
Release files / kittentts-0.1.3.tar.gz
| Download URL | kittentts-0.1.3.tar.gz |
|---|---|
| Size | 2.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e48cc069f84c09817a38c77920e9567cf0b65ab980deb46ff94a61669364cf1a
|
|
BLAKE2b-256 checksum How to use checksums |
34a0205826d5d3b962f1fa9ec10f860630454f196dda5259bd10485a7ca1cae3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.17
|
Release files / kittentts-0.1.3-py2.py3-none-any.whl
| Download URL | kittentts-0.1.3-py2.py3-none-any.whl |
|---|---|
| Size | 2.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
da41beef7e5a13201f849d5e688a978fabd8cdd196250816e7a07972d6aacf43
|
|
BLAKE2b-256 checksum How to use checksums |
0bbc3d24d68f666dcd853b38eda1a44e722ea3ddcfc9b415f18d9024bd477ef4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.17
|
Security for kittentts 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.