Skip to main content

An automated translator of WebVTT (Web Video Text Tracks) from one language to another using generative AI.

Project description

WebVTT Translator

WebVTT Translator is a Python package for translating WebVTT subtitle files into different languages using various translation APIs.

Features

  • Translate WebVTT subtitle files to multiple languages.
  • Support for various translation APIs (e.g., Google Translate, Microsoft Translator).
  • Easy-to-use command-line interface.

Prerequisites

Before using WebVTT Translator, you need to have an OpenAI API Key. Set the API key as an environment variable:

On Linux/macOS:

export OPENAI_API_KEY='your_openai_api_key'

On Windows (Command Prompt):

set OPENAI_API_KEY=your_openai_api_key

On Windows (PowerShell):

$env:OPENAI_API_KEY='your_openai_api_key'

Installation

You can install the package using pip:

pip install webvtt-translator

Usage

Command Line Interface

To translate a WebVTT file, use the following command:

webvtt-translator translate -i input.vtt -o output.vtt -l Portuguese

You can also run the module via python:

python -m webvtt_translator -i input.vtt -o output.vtt -l Portuguese

The command line arguments are:

  • -i or --input: Path to the input WebVTT file.
  • -o or --output: Path to the output translated WebVTT file.
  • -l or --language: Target language (e.g., Spanish, English, Portuguese).

Contact

For any questions or suggestions, please open an issue on GitHub.

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

webvtt_translator-0.1.0.tar.gz (3.1 kB view details)

Uploaded Source

File details

Details for the file webvtt_translator-0.1.0.tar.gz.

File metadata

  • Download URL: webvtt_translator-0.1.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.11

File hashes

Hashes for webvtt_translator-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5815a791b5ab8f644cffd1bc1f03ee76e1702071ab778363c77bd1207ed76f6a
MD5 edb276adf9ff6f64c9d0cf7ecbc53136
BLAKE2b-256 f44e110809c5f809af640d79b0c71c81266895cb581617835ed13e8debfc0454

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