Turn text into natural-sounding speech in seconds. A lightweight web app built with Python, Gradio and gTTS.
Features | Quick Start | How It Works | Project Structure | Roadmap
| Feature | Description |
|---|---|
| Multi-language voices | English (US, UK, Australia), Spanish, French, German and Japanese |
| Slow mode | Slower speech, useful for language learning |
| Instant playback | Generated audio plays directly in the browser |
| Input validation | Friendly error messages instead of crashes |
| One-click launch | Windows launcher scripts, no terminal needed |
| Easy to extend | Add a new voice by adding one line to a dictionary |
- Python 3.9 or newer (3.12 recommended)
- An internet connection (gTTS uses Google's speech service)
# 1. Clone the repository
git clone https://github.com/d3f4ult-cvi/TTS-studio.git
cd TTS-studio
# 2. (Optional) Create a virtual environment
python -m venv .venv
.venv\Scripts\activate # Windows
# source .venv/bin/activate # macOS / Linux
# 3. Install dependencies
pip install -r requirements.txt
# 4. Run the app
python TTS_app.pyThe app opens automatically in your browser at http://127.0.0.1:7860.
Double-click run_app.bat to start the app without opening a terminal.
flowchart LR
A[User types text] --> B[Gradio UI]
B --> C[text_to_speech function]
C --> D[gTTS / Google TTS]
D --> E[Temporary MP3 file]
E --> F[Audio player in browser]
- The user enters text, picks a voice and clicks Generate Speech.
- Gradio passes the inputs to the
text_to_speech()function. - gTTS sends the text to Google's TTS service and receives audio.
- The MP3 is saved to a temporary file and returned to the Gradio audio player.
| Layer | Technology |
|---|---|
| Language | Python |
| Web UI | Gradio |
| Speech engine | gTTS |
TTS-studio/
├── TTS_app.py # Main application (logic + UI)
├── requirements.txt # Python dependencies
├── run_app.bat # Windows launcher
├── run_hidden.vbs # Windows launcher without console window
├── screenshot.png # README preview image
├── LICENSE
├── .gitignore
└── README.md
Open TTS_app.py and add an entry to the VOICES dictionary:
VOICES = {
...
"Italian": ("it", "it"), # (language code, accent domain)
}Restart the app and the new voice appears in the dropdown.
- Text-to-speech generation
- Multiple languages and accents
- Slow speech mode
- Download button for generated audio
- More languages
- Offline TTS engine option
- Docker support
- gTTS requires an internet connection.
- Very long texts may take longer to process.
Distributed under the MIT License. See LICENSE for details.
Built with Python and Gradio.
If you like this project, give it a star.
