subtitle-translator  by gnehs

CLI tool for subtitle translation using ChatGPT

created 2 years ago
362 stars

Top 78.7% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a tool to translate subtitle files using the ChatGPT API, targeting users who need to localize video content. It offers multi-language support and context-aware translation by considering surrounding sentences.

How It Works

The tool leverages the gpt-3.5-turbo model for translation. It processes subtitle files (SRT, VTT) by sending segments to the ChatGPT API, incorporating context from preceding and succeeding lines to improve translation accuracy.

Quick Start & Requirements

  • Install dependencies: npm install
  • Run translation: node index.js
  • Prerequisites: Node.js, OpenAI API key.
  • Configuration: Rename config.example.json to config.json and add API key and target language.
  • Input/Output: Place subtitle files in the src folder; translated files appear in res.

Highlighted Details

  • Supports .srt and .vtt subtitle formats.
  • Utilizes gpt-3.5-turbo for translation.
  • Translates based on preceding and following sentences for context.

Maintenance & Community

Pull requests are welcome; major changes require opening an issue first.

Licensing & Compatibility

The license is not specified in the README.

Limitations & Caveats

The project relies on an external OpenAI API key, incurring costs. The README does not specify the license, which may impact commercial use.

Health Check
Last commit

1 year ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
5 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.