A simple application that converts text files to audiobooks using Kokoro TTS and voice conversion technology. This tool combines advanced text-to-speech capabilities with voice conversion to create natural-sounding audiobooks with customizable voices.
- Load and process text files (supports various formats (tested for .txt and .epub))
- Intelligent text splitting for optimal processing
- High-quality text-to-speech conversion using Kokoro TTS
- Voice conversion using RVC (Retrieval-based Voice Conversion)
- Python 3.10 (highly recommended use such python version)
- CUDA-compatible GPU (recommended for faster processing)
- NVIDIA drivers installed
- CUDA Toolkit 11.8 installed on your system
- FFmpeg installed on your system (required for audio concatenation)
FFmpeg is required for concatenating audio files into a complete audiobook:
-
Windows
winget install ffmpeg
or download from FFmpeg Official Website
-
Linux
sudo apt update sudo apt install ffmpeg
-
macOS
brew install ffmpeg
For GPU acceleration to work properly, you need to install CUDA Toolkit 11.8:
-
Check GPU Compatibility
- Visit NVIDIA CUDA GPUs to verify if your GPU supports CUDA
- Ensure your GPU has at least 4GB VRAM for optimal performance
-
Install NVIDIA Drivers
- Download and install the latest NVIDIA drivers from NVIDIA Driver Downloads
- Restart your computer after installation
-
Install CUDA Toolkit 11.8
- Download CUDA Toolkit 11.8 from NVIDIA CUDA Downloads
- Follow the installation instructions for your operating system
- Add CUDA to your system PATH if not done automatically
Note: If you don't have a CUDA-compatible GPU or prefer not to install CUDA, the application will still work using CPU, but processing will be significantly slower.
The easiest way to get started is to use our automated setup scripts:
Simply run:
start.batThis will:
- Create a virtual environment
- Install all required dependencies
- Set up CUDA support
- Create necessary directories
First, make the script executable:
chmod +x start.shThen run:
./start.shIf you prefer to set up manually, follow these steps:
# Create virtual environment
python -m venv .venv
# Activate virtual environment
# Windows:
.venv\Scripts\activate
# Linux/Mac:
source .venv/bin/activateFor Windows:
pip install torch==2.1.1+cu118 torchaudio==2.1.1+cu118 --index-url https://download.pytorch.org/whl/cu118For Linux:
pip install torch==2.1.1+cu118 torchaudio==2.1.1+cu118 --index-url https://download.pytorch.org/whl/cu118pip install -r requirements.txt- Place your text file in the input directory
- Configure voice settings (optional)
- Run the application:
python main.pyThe application supports voice conversion using RVC (Retrieval-based Voice Conversion) models. To use voice conversion:
-
Model Placement
- Place your RVC model files (
.pthfiles) in thervc_modelsdirectory - Each model should be in its own subdirectory within
rvc_models
- Place your RVC model files (
-
Model Structure
rvc_models/ ├── model_name_1/ │ ├── model_name.pth │ └── model_name.index ├── model_name_2/ │ ├── model_name.pth │ └── model_name.index
Note: You can obtain RVC models from various sources or train your own using the RVC framework.
Contributions are welcome! Feel free to submit pull requests or open issues for bugs and feature requests.