Skip to main content

A package to make kokoro simpler to work with

Project description

Simpler_Kokoro

Simpler_Kokoro is a Python package that makes it easy to use the Kokoro voice synthesis library.

Features

  • Simple interface for generating speech audio and subtitles
  • Supports all Kokoro voices
  • Outputs valid SRT subtitles
  • No need to manage model files manually

Installation

Install from PyPI (coming soon) or clone the repo and install locally:

git clone https://github.com/WilleIshere/SimplerKokoro.git
cd SimplerKokoro
pip install .

Requirements

  • Python 3.10+
  • torch
  • kokoro
  • soundfile

All dependencies are installed automatically.

Usage

Basic Example

from Simpler_Kokoro import SimplerKokoro

# Create an instance
sk = SimplerKokoro()

# List available voices
voices = sk.list_voices()
print("Available voices:", [v['name'] for v in voices])

# Generate speech
sk.generate(
    text="Hello, this is a test of the Simpler Kokoro voice synthesis.",
    voice=voices[0]['name'],
    output_path="output.wav"
)

Generate Speech with Subtitles

sk.generate(
    text="Hello, this is a test. This is another sentence.",
    voice=voices[0]['name'],
    output_path="output.wav",
    write_subtitles=True,
    subtitles_path="output.srt",
    subtititles_word_level=True
)

Generate Speech with Custom Speed

sk.generate(
    text="This is spoken faster than normal.",
    voice=voices[1]['name'],
    output_path="fast_output.wav",
    speed=1.5
)

Example Output Files

  • output.wav: The synthesized speech audio file.
  • output.srt: Subtitles in SRT format (if write_subtitles=True).

Sample SRT output:

1
00:00:00,000 --> 00:00:01,200
Hello,

2
00:00:01,200 --> 00:00:02,500
this is a test.

3
00:00:02,500 --> 00:00:04,000
This is another sentence.

API

SimplerKokoro

Methods

  • list_voices(): Returns a list of available voices with metadata.
  • generate(text, voice, output_path, speed=1.0, write_subtitles=False, subtitles_path='subtitles.srt', subtititles_word_level=False): Generates speech audio and optional subtitles.

License

MIT

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

simpler_kokoro-1.0.0.tar.gz (17.2 kB view details)

Uploaded Source

Built Distribution

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

simpler_kokoro-1.0.0-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file simpler_kokoro-1.0.0.tar.gz.

File metadata

  • Download URL: simpler_kokoro-1.0.0.tar.gz
  • Upload date:
  • Size: 17.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for simpler_kokoro-1.0.0.tar.gz
Algorithm Hash digest
SHA256 889b52751fadf54375578132a882f0b41f39141bd2754c564fd1a70ed888576d
MD5 0254a6a3384c0eca530e22e21daa6d27
BLAKE2b-256 19bed340e289dd4b26fb6c353931caf7b4f588fa3ebd4a1b508d415a78814474

See more details on using hashes here.

File details

Details for the file simpler_kokoro-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: simpler_kokoro-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for simpler_kokoro-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3ba191e931b18943bdb8c616a3259c2c9dbad553bd93087b2a63ed472e7338ba
MD5 6ebe16c99918b2a7a2a2b4a1e6fafe59
BLAKE2b-256 dc86a3aa880765dc714b2171041f77365d0e3827f9f5b7eadc59e33285e29922

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