Skip to content

h43lb1t0/KokoroTtsTexGernerationWebui

Repository files navigation

Kokoro-Based TTS Extension for Oobabooga Text Generation WebUI

Enhance your text generation experience with the Kokoro TTS extension, seamlessly integrating with the Oobabooga Text Generation WebUI.

License

Features

Current Version: Kokoro v1 Supported Languages: English

Kokoro TTS is limited to inputs up to 510 tokens. Note that Kokoro tokens differ from LLM tokens. This extension allows you to generate longer audio outputs by splitting the input text into segments and concatenating the resulting audio.

Text Splitting Methods

  • Split by Sentence: Divides the text into chunks of complete sentences, each chunk containing fewer than or 510 tokens.
  • Split by Word: Divides the text into chunks of individual words, each chunk containing fewer than or 510 tokens.

I recommend using the "Split by Sentence" method to maintain context and ensure higher quality audio output.

Installation

Prerequisites

Before installing the extension, ensure you have the following dependencies installed:

Python Dependencies

Install the required Python packages using the appropriate script for your operating system.

Windows

  1. Run the Windows setup script:
    .\cmd_windows.bat
  2. Install the Python dependencies:
    pip install -r extensions\KokoroTtsTextGenerationWebUI\requirements.txt

Linux

  1. Run the Linux setup script:
    ./cmd_linux.sh
  2. Install the Python dependencies:
    pip install -r extensions/KokoroTtsTextGenerationWebUI/requirements.txt

Multiple GPU Support

By default, the extension utilizes the first available GPU. To specify a different GPU, modify the device variable in src/generate.py to your desired GPU identifier.

Roadmap

  • Implement the extension
  • Kokoro v0.19
  • Kokoro v1
  • Support for all operating systems
  • Voice selection feature
  • Support for other languages than English
  • Support for future versions of Kokoro

Contributing

I welcome contributions to improve this project! If you'd like to contribute, please create a pull request or open an issue. Your improvements and suggestions are highly appreciated.