Skip to main content

AI-powered SRT subtitle generator with Whisper and OpenAI translation

Project description

Integrated SRT Subtitle Generator

A tool that uses Whisper speech recognition and OpenAI GPT to generate Korean SRT subtitles.

๐Ÿš€ Features

  • Integrated workflow: Speech-to-text โ†’ Korean translation โ†’ SRT generation
  • Flexible execution: Run full process or individual steps
  • User-friendly GUI: Intuitive interface
  • Simplified structure: Minimal dependencies

๐Ÿ“ Project Structure

SRT_Generator/
โ”œโ”€โ”€ src/                           # Integrated GUI
โ”‚   โ”œโ”€โ”€ integrated_srt_generator.py
โ”‚   โ”œโ”€โ”€ requirements.txt
โ”‚   โ””โ”€โ”€ run_integrated.bat
โ”œโ”€โ”€ translator/                    # Translation tools
โ”‚   โ””โ”€โ”€ src/local_whisper_korean_subtitle_generator/
โ”‚       โ””โ”€โ”€ tools/
โ”‚           โ”œโ”€โ”€ korean_translation_tool.py
โ”‚           โ””โ”€โ”€ srt_formatter_tool.py
โ”œโ”€โ”€ input/                         # Input files
โ”œโ”€โ”€ output/                        # Output files
โ””โ”€โ”€ README.md

๐Ÿ› ๏ธ Installation and Run

1. Run the integrated GUI (recommended)

cd src
run_integrated.bat

2. Run individual steps

# Transcription only
cd src
python integrated_srt_generator.py

# Translation only (when JSON file already exists)
cd src
python integrated_srt_generator.py

๐Ÿ“‹ Usage

Using the integrated GUI

  1. Settings

    • Select Whisper model (tiny ~ large-v3)
    • Select language (auto, ko, en, ja, etc.)
    • Enter OpenAI API key
  2. File selection

    • Input file: target video/audio file
    • Output folder: where to save result files
  3. Actions

    • Start full process: Transcription โ†’ Translation โ†’ SRT generation
    • Transcription only: Generate JSON file
    • Translation only: Convert existing JSON to Korean SRT

Workflow

  1. Transcription (Whisper)

    • Video/Audio โ†’ JSON (timestamp + text)
  2. Korean translation (OpenAI GPT)

    • English text โ†’ Korean translation
  3. SRT generation (Formatter)

    • Translated text โ†’ SRT subtitle file

๐Ÿ”ง Configuration

API key setup

Method 1: Environment file (.env) [recommended]

  1. Copy env.template to .env
  2. Put your real API key in .env:
    OPENAI_API_KEY=your_actual_api_key_here
    

Method 2: Enter via GUI

  • Enter the API key in the GUI after launching the app

Method 3: System environment variable

# Windows
set OPENAI_API_KEY=your_actual_api_key_here

# Linux/Mac
export OPENAI_API_KEY=your_actual_api_key_here

โš ๏ธ Security notes:

  • Never commit .env to Git
  • Do not hardcode API keys in code
  • Do not upload API keys to public repos

Model selection

  • tiny: Fastest, lower accuracy
  • base: Balanced (recommended)
  • small: Good accuracy
  • medium: Higher accuracy
  • large: Highest accuracy, slowest

๐Ÿ“ Output files

  • JSON file: filename.json (Whisper result)
  • SRT file: filename.srt (final subtitles)

๐Ÿ› Troubleshooting

Common issues

  1. FFmpeg error: Install FFmpeg
  2. API key error: Check OpenAI API key
  3. Out of memory: Use a smaller Whisper model

Logs

You can check detailed progress and errors in the GUI log panel.

๐Ÿ“„ License

This project is distributed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ch_srtgen-1.0.7.tar.gz (21.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ch_srtgen-1.0.7-py3-none-any.whl (23.0 kB view details)

Uploaded Python 3

File details

Details for the file ch_srtgen-1.0.7.tar.gz.

File metadata

  • Download URL: ch_srtgen-1.0.7.tar.gz
  • Upload date:
  • Size: 21.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for ch_srtgen-1.0.7.tar.gz
Algorithm Hash digest
SHA256 76ee0f544f81776de01051f24a981f74387251e1dc48fe9c146101cddeff5246
MD5 97370b614ab856d057530fd66717c9e8
BLAKE2b-256 59b4d6dd669489470e2f20da8882505c2155f862547a47f2ab6a3911d4a49b98

See more details on using hashes here.

File details

Details for the file ch_srtgen-1.0.7-py3-none-any.whl.

File metadata

  • Download URL: ch_srtgen-1.0.7-py3-none-any.whl
  • Upload date:
  • Size: 23.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for ch_srtgen-1.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 1bca186abc3ff5ac25b56de3e88a241701d1bc60cddc1eab3a08b432713e961a
MD5 75559ff11f4f40ce7fd1de951dd69267
BLAKE2b-256 bdd192e0ae1405391d13e802c5a69554070a8bcc9285648c19edeefc8c6796d4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page