Skip to content

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

SRT to Audio (ElevenLabs - gTTS)

Convert .srt subtitle files into high-quality speech audio using ElevenLabs API.

w4exgFQHEt

Watch the Tutorial Video

Watch the tutorial on YouTube

Features

  • 🎯 Supports .srt subtitle input
  • 🗣️ Uses ElevenLabs TTS, gTTS for natural-sounding voices
  • 💾 Resume progress if the process is interrupted

Requirements

  • Python 3.12
  • ElevenLabs API key (Get it here) 10k credits/month
  • ffmpeg installed on your system

Installation

Clone the repository

git clone https://github.com/lulueve3/srt-to-audio-elevenlabs

cd srt-to-audio-elevenlabs

Install dependencies

pip install -r requirements.txt

Usage

  1. Prepare an .srt subtitle file.

  2. Run the program: python srt_to_audio.py

  3. In the GUI:

    • Select your .srt file.

    -For gTTS (Google Text-to-Speech):

    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.
  4. Output audio file will be saved as: output_audio.mp3 in the same folder as the .srt.

note:

hCgu92sWwH

*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.

Resume Feature

If the process stops unexpectedly:

  • Click start again to continue from the last process..

About

Convert SRT subtitles to speech audio using ElevenLabs API

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages