# Integrated SRT Subtitle Generator
A tool that uses Whisper speech recognition and OpenAI GPT to generate Korean SRT subtitles.
## β οΈ Requirements (read first)
- Python >= 3.10
- OpenAI API key set to `OPENAI_API_KEY`
- FFmpeg installed and available on PATH (for transcription/whisper features)
- Optional: install extras for whisper/torch
### FFmpeg installation (per OS)
- Windows (one of)
- Chocolatey: `choco install ffmpeg`
- Scoop: `scoop install ffmpeg`
- Winget: `winget install --id=Gyan.FFmpeg -e`
- macOS: `brew install ffmpeg`
- Ubuntu/Debian: `sudo apt update && sudo apt install -y ffmpeg`
- Fedora: `sudo dnf install -y ffmpeg`
- Arch: `sudo pacman -S ffmpeg`
Verify: `ffmpeg -version` should print version info.
## π 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: pip installλ‘ μ€μΉ
```bash
# κΈ°λ³Έ μ€μΉ (whisper ν¬ν¨)
pip install ch_srtgen
# λλ κ°λ° λͺ¨λλ‘ μ€μΉ
pip install -e .
# κ°λ°μ© λꡬ ν¬ν¨
pip install -e .[dev]
```
#### λ°©λ² 1-1: Python μ€ν¬λ¦½νΈλ‘ μλ μ€μΉ
```bash
python quick_install.py
```
#### λ°©λ² 2: μ€μΉ μ€ν¬λ¦½νΈ μ¬μ©
```bash
# Windows
install_all.bat
# Linux/macOS
./install_all.sh
```
### Install from PyPI (μλ μ’
μμ± μ€μΉ ν¬ν¨)
```bash
pip install ch-srtgen
```
**π― μ€μΉ μλ£ λ©μμ§:**
```
============================================================
π― SRT Generator μ€μΉ μλ£!
============================================================
β
λͺ¨λ μ’
μμ±μ΄ μ€μΉλμμ΅λλ€!
π SRT Generatorλ₯Ό λ°λ‘ μ¬μ©ν μ μμ΅λλ€.
π μ¬μ©λ²:
ch-srtgen-gui # GUI μ€ν
ch-srtgen # CLI μ€ν
π νλ‘μ νΈ κ΅¬μ‘°:
input/ - μ
λ ₯ νμΌ (λΉλμ€/μ€λμ€)
output/ - μΆλ ₯ νμΌ (SRT μλ§)
```
### 1. Run the integrated GUI (recommended)
```bash
ch-srtgen-gui
```
### 2. Run CLI
```bash
# Help
ch-srtgen --help
# Process video file
ch-srtgen input.mp4
```
## π 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
```bash
# 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.
Raw data
{
"_id": null,
"home_page": "https://github.com/your-username/srt-generator",
"name": "ch-srtgen",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "whisper, openai, translation, subtitle, srt, ai, speech-to-text",
"author": "SRT Generator Team",
"author_email": "srt-generator@example.com",
"download_url": "https://files.pythonhosted.org/packages/23/54/806a2121a6f99cfbec834825c62c9a106962adee9f55d8d465855e2a67e2/ch_srtgen-1.0.9.tar.gz",
"platform": null,
"description": "# Integrated SRT Subtitle Generator\r\n\r\nA tool that uses Whisper speech recognition and OpenAI GPT to generate Korean SRT subtitles.\r\n\r\n## \u26a0\ufe0f Requirements (read first)\r\n\r\n- Python >= 3.10\r\n- OpenAI API key set to `OPENAI_API_KEY`\r\n- FFmpeg installed and available on PATH (for transcription/whisper features)\r\n- Optional: install extras for whisper/torch\r\n\r\n### FFmpeg installation (per OS)\r\n\r\n- Windows (one of)\r\n - Chocolatey: `choco install ffmpeg`\r\n - Scoop: `scoop install ffmpeg`\r\n - Winget: `winget install --id=Gyan.FFmpeg -e`\r\n- macOS: `brew install ffmpeg`\r\n- Ubuntu/Debian: `sudo apt update && sudo apt install -y ffmpeg`\r\n- Fedora: `sudo dnf install -y ffmpeg`\r\n- Arch: `sudo pacman -S ffmpeg`\r\n\r\nVerify: `ffmpeg -version` should print version info.\r\n\r\n## \ud83d\ude80 Features\r\n\r\n- **Integrated workflow**: Speech-to-text \u2192 Korean translation \u2192 SRT generation\r\n- **Flexible execution**: Run full process or individual steps\r\n- **User-friendly GUI**: Intuitive interface\r\n- **Simplified structure**: Minimal dependencies\r\n\r\n## \ud83d\udcc1 Project Structure\r\n\r\n```\r\nSRT_Generator/\r\n\u251c\u2500\u2500 src/ # Integrated GUI\r\n\u2502 \u251c\u2500\u2500 integrated_srt_generator.py\r\n\u2502 \u251c\u2500\u2500 requirements.txt\r\n\u2502 \u2514\u2500\u2500 run_integrated.bat\r\n\u251c\u2500\u2500 translator/ # Translation tools\r\n\u2502 \u2514\u2500\u2500 src/local_whisper_korean_subtitle_generator/\r\n\u2502 \u2514\u2500\u2500 tools/\r\n\u2502 \u251c\u2500\u2500 korean_translation_tool.py\r\n\u2502 \u2514\u2500\u2500 srt_formatter_tool.py\r\n\u251c\u2500\u2500 input/ # Input files\r\n\u251c\u2500\u2500 output/ # Output files\r\n\u2514\u2500\u2500 README.md\r\n```\r\n\r\n## \ud83d\udee0\ufe0f Installation and Run\r\n\r\n### \ube60\ub978 \uc124\uce58 (\ubaa8\ub4e0 \uae30\ub2a5 \ud3ec\ud568)\r\n\r\n#### \ubc29\ubc95 1: pip install\ub85c \uc124\uce58\r\n```bash\r\n# \uae30\ubcf8 \uc124\uce58 (whisper \ud3ec\ud568)\r\npip install ch_srtgen\r\n\r\n# \ub610\ub294 \uac1c\ubc1c \ubaa8\ub4dc\ub85c \uc124\uce58\r\npip install -e .\r\n\r\n# \uac1c\ubc1c\uc6a9 \ub3c4\uad6c \ud3ec\ud568\r\npip install -e .[dev]\r\n```\r\n\r\n#### \ubc29\ubc95 1-1: Python \uc2a4\ud06c\ub9bd\ud2b8\ub85c \uc790\ub3d9 \uc124\uce58\r\n```bash\r\npython quick_install.py\r\n```\r\n\r\n#### \ubc29\ubc95 2: \uc124\uce58 \uc2a4\ud06c\ub9bd\ud2b8 \uc0ac\uc6a9\r\n```bash\r\n# Windows\r\ninstall_all.bat\r\n\r\n# Linux/macOS\r\n./install_all.sh\r\n```\r\n\r\n\r\n### Install from PyPI (\uc790\ub3d9 \uc885\uc18d\uc131 \uc124\uce58 \ud3ec\ud568)\r\n```bash\r\npip install ch-srtgen\r\n```\r\n\r\n**\ud83c\udfaf \uc124\uce58 \uc644\ub8cc \uba54\uc2dc\uc9c0:**\r\n```\r\n============================================================\r\n\ud83c\udfaf SRT Generator \uc124\uce58 \uc644\ub8cc!\r\n============================================================\r\n\r\n\u2705 \ubaa8\ub4e0 \uc885\uc18d\uc131\uc774 \uc124\uce58\ub418\uc5c8\uc2b5\ub2c8\ub2e4!\r\n\ud83c\udf89 SRT Generator\ub97c \ubc14\ub85c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\r\n\r\n\ud83d\udcd6 \uc0ac\uc6a9\ubc95:\r\n ch-srtgen-gui # GUI \uc2e4\ud589\r\n ch-srtgen # CLI \uc2e4\ud589\r\n\r\n\ud83d\udcc1 \ud504\ub85c\uc81d\ud2b8 \uad6c\uc870:\r\n input/ - \uc785\ub825 \ud30c\uc77c (\ube44\ub514\uc624/\uc624\ub514\uc624)\r\n output/ - \ucd9c\ub825 \ud30c\uc77c (SRT \uc790\ub9c9)\r\n```\r\n\r\n### 1. Run the integrated GUI (recommended)\r\n```bash\r\nch-srtgen-gui\r\n```\r\n\r\n### 2. Run CLI\r\n```bash\r\n# Help\r\nch-srtgen --help\r\n\r\n# Process video file\r\nch-srtgen input.mp4\r\n```\r\n\r\n## \ud83d\udccb Usage\r\n\r\n### Using the integrated GUI\r\n\r\n1. **Settings**\r\n - Select Whisper model (tiny ~ large-v3)\r\n - Select language (auto, ko, en, ja, etc.)\r\n - Enter OpenAI API key\r\n\r\n2. **File selection**\r\n - Input file: target video/audio file\r\n - Output folder: where to save result files\r\n\r\n3. **Actions**\r\n - **Start full process**: Transcription \u2192 Translation \u2192 SRT generation\r\n - **Transcription only**: Generate JSON file\r\n - **Translation only**: Convert existing JSON to Korean SRT\r\n\r\n### Workflow\r\n\r\n1. **Transcription** (Whisper)\r\n - Video/Audio \u2192 JSON (timestamp + text)\r\n\r\n2. **Korean translation** (OpenAI GPT)\r\n - English text \u2192 Korean translation\r\n\r\n3. **SRT generation** (Formatter)\r\n - Translated text \u2192 SRT subtitle file\r\n\r\n## \ud83d\udd27 Configuration\r\n\r\n### API key setup\r\n\r\n#### Method 1: Environment file (.env) [recommended]\r\n1. Copy `env.template` to `.env`\r\n2. Put your real API key in `.env`:\r\n ```\r\n OPENAI_API_KEY=your_actual_api_key_here\r\n ```\r\n\r\n#### Method 2: Enter via GUI\r\n- Enter the API key in the GUI after launching the app\r\n\r\n#### Method 3: System environment variable\r\n```bash\r\n# Windows\r\nset OPENAI_API_KEY=your_actual_api_key_here\r\n\r\n# Linux/Mac\r\nexport OPENAI_API_KEY=your_actual_api_key_here\r\n```\r\n\r\n**\u26a0\ufe0f Security notes:**\r\n- Never commit `.env` to Git\r\n- Do not hardcode API keys in code\r\n- Do not upload API keys to public repos\r\n\r\n### Model selection\r\n- **tiny**: Fastest, lower accuracy\r\n- **base**: Balanced (recommended)\r\n- **small**: Good accuracy\r\n- **medium**: Higher accuracy\r\n- **large**: Highest accuracy, slowest\r\n\r\n## \ud83d\udcdd Output files\r\n\r\n- **JSON file**: `filename.json` (Whisper result)\r\n- **SRT file**: `filename.srt` (final subtitles)\r\n\r\n## \ud83d\udc1b Troubleshooting\r\n\r\n### Common issues\r\n1. **FFmpeg error**: Install FFmpeg\r\n2. **API key error**: Check OpenAI API key\r\n3. **Out of memory**: Use a smaller Whisper model\r\n\r\n### Logs\r\nYou can check detailed progress and errors in the GUI log panel.\r\n\r\n## \ud83d\udcc4 License\r\n\r\nThis project is distributed under the MIT License.\r\n",
"bugtrack_url": null,
"license": null,
"summary": "AI-powered SRT subtitle generator with Whisper and OpenAI translation",
"version": "1.0.9",
"project_urls": {
"Bug Reports": "https://github.com/your-username/srt-generator/issues",
"Documentation": "https://github.com/your-username/srt-generator#readme",
"Homepage": "https://github.com/your-username/srt-generator",
"Source": "https://github.com/your-username/srt-generator"
},
"split_keywords": [
"whisper",
" openai",
" translation",
" subtitle",
" srt",
" ai",
" speech-to-text"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "70be43f6ae954a8c73984ee353dc56f9c40657b34102408fcb4a570e7ea4a8e9",
"md5": "d539e4383e8259e10d56548bcf066c2b",
"sha256": "780a77677ea9f99ed9f261a75acc84216aeb49cc582759e5c551e23129859572"
},
"downloads": -1,
"filename": "ch_srtgen-1.0.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d539e4383e8259e10d56548bcf066c2b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 23648,
"upload_time": "2025-10-08T04:49:34",
"upload_time_iso_8601": "2025-10-08T04:49:34.862605Z",
"url": "https://files.pythonhosted.org/packages/70/be/43f6ae954a8c73984ee353dc56f9c40657b34102408fcb4a570e7ea4a8e9/ch_srtgen-1.0.9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "2354806a2121a6f99cfbec834825c62c9a106962adee9f55d8d465855e2a67e2",
"md5": "f02743f2f1a4ea2b7411b530bbf87a6a",
"sha256": "bd2057b9359d07dcd2e7496163a3f4d25e86d55471bb64f68470e01e8c3fe038"
},
"downloads": -1,
"filename": "ch_srtgen-1.0.9.tar.gz",
"has_sig": false,
"md5_digest": "f02743f2f1a4ea2b7411b530bbf87a6a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 22305,
"upload_time": "2025-10-08T04:49:36",
"upload_time_iso_8601": "2025-10-08T04:49:36.305959Z",
"url": "https://files.pythonhosted.org/packages/23/54/806a2121a6f99cfbec834825c62c9a106962adee9f55d8d465855e2a67e2/ch_srtgen-1.0.9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-08 04:49:36",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "your-username",
"github_project": "srt-generator",
"github_not_found": true,
"lcname": "ch-srtgen"
}