Convert .srt subtitle files into high-quality speech audio using ElevenLabs API.
- 🎯 Supports
.srtsubtitle input - 🗣️ Uses ElevenLabs TTS, gTTS for natural-sounding voices
- 💾 Resume progress if the process is interrupted
- Python 3.12
- ElevenLabs API key (Get it here) 10k credits/month
- ffmpeg installed on your system
git clone https://github.com/lulueve3/srt-to-audio-elevenlabs
cd srt-to-audio-elevenlabs
pip install -r requirements.txt
-
Prepare an
.srtsubtitle file. -
Run the program: python srt_to_audio.py
-
In the GUI:
- Select your
.srtfile.
-For gTTS (Google Text-to-Speech):
-
Enter Language code (e.g., en for English)
-
Enter Accent (optional, e.g., com, com.au, co.uk) (Read here for more information)
ElevenLabs
- Enter your ElevenLabs API Key.
- Enter your Voice ID (from ElevenLabs voice settings).
- Enter Model ID (default:
eleven_flash_v2_5). - Adjust Max Speed if needed.
- Click Start Conversion.
- Select your
-
Output audio file will be saved as: output_audio.mp3 in the same folder as the
.srt.
note:
*Max Speed This controls the maximum playback speed for the generated speech. The program automatically adjusts speed based on subtitle duration ( default 1.0 ~ 1.5)
- 1.0 = normal speed.
- '>1.0 = speed up speech to fit shorter subtitles.
- Recommended: 1.5 for most cases.
If the process stops unexpectedly:
- Click start again to continue from the last process..
