Skip to main content

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

https://huggingface.co/spaces/shethjenil/KittenTTS

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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kittentts-0.1.3-py2.py3-none-any.whl (2.6 kB view details)

Uploaded Python 2Python 3

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

Hashes for kittentts-0.1.3.tar.gz
Algorithm Hash digest
SHA256 e48cc069f84c09817a38c77920e9567cf0b65ab980deb46ff94a61669364cf1a
MD5 55f11db59b80ca69f75e4f687886daeb
BLAKE2b-256 34a0205826d5d3b962f1fa9ec10f860630454f196dda5259bd10485a7ca1cae3

See more details on using hashes here.

File details

Details for the file kittentts-0.1.3-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for kittentts-0.1.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 da41beef7e5a13201f849d5e688a978fabd8cdd196250816e7a07972d6aacf43
MD5 d6bb920053f509bba84d31dd2d066486
BLAKE2b-256 0bbc3d24d68f666dcd853b38eda1a44e722ea3ddcfc9b415f18d9024bd477ef4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page