A modern, high-quality Text-to-Speech (TTS) interface powered by Kokoro ONNX. This project provides an elegant Gradio web interface for generating natural-sounding speech in multiple languages, and can be self-hosted online using Pinggy.
- High-quality neural speech generation
- Multi-language support (English, Japanese, Chinese, Spanish, etc.)
- Multiple natural-sounding voices
- Adjustable speech speed
- Clean, modern Gradio UI
- Instant audio preview + WAV export
- Free public hosting using Pinggy
- Runs on Google Colab, local machine, or any cloud server
Clone the official repository:
!git clone https://github.com/vpakarinen/kokoro-tts-webui.git
!cd kokoro-tts-webuiInstall all required dependencies:
!pip install -r requirements.txtor manually install:
!pip install gradio kokoro-onnx soundfile torch numpyPinggy allows you to expose your local Kokoro TTS WebUI publicly on the Internet.
Start the app normally:
if __name__ == "__main__":
app = build_ui()
app.launch(server_name="0.0.0.0", server_port=5000, share=False)The app runs at:
http://localhost:8000
Install Pinggy:
!pip install pinggy
Create the Pinggy Tunnel:
import pinggy
tunnel1 = pinggy.start_tunnel(
forwardto="localhost:8000",
)
print(f"Tunnel1 started - URLs: {tunnel1.urls}")Note: You can just change the port address according to what you need.
Pinggy will generate a public HTTPS URL like:
https://blue-cobra-1234.a.pinggy.link
Share this link with anyone - your TTS WebUI is now globally accessible!
├── app.py # Main Gradio WebUI script
├── README.md # Documentation
├── requirements.txt # Dependencies
├── assets/ # Screenshots/images
└── models/ # Kokoro model files (auto-downloaded)
- Enter the text you want to convert into speech
- Select a voice
- Select a language
- Adjust speaking speed
- Click Generate Speech
- Listen or download the audio
Simple and fast.
- Kokoro ONNX
- Gradio
- Python 3.9+
- NumPy
- SoundFile
- Torch
- Pinggy (self-hosting)
