Skip to main content

A tool for generating subtitles using Google Gemini models.

Project description

Subtitle tool

codecov

This utility uses Google Gemini to generate subtitles to audio and video files.

Dependencies

ffmpeg needs to be installed for audio extraction.

Process

  1. Extract the audio from the video
  2. Send the audio to Gemini for transcription
  3. Backup the existing subtitle
  4. Save the new subtitle

Dependencies

Export the API key for Gemini to the environment variable GEMINI_API_KEY or specify it in the command line with the flag --api-key.

ffmpeg needs to be installed (brew install ffmpeg, apt-get install ffmpeg or dnf install ffmpeg)

Installation

pip install subtitle-tool

Developing

For local development it is useful to install the binary from the development location into the user's PATH. For this, run the following commands:

uv tool install -e .
uv tool update-shell

Usage

subtitle-tool --video myvideo.avi

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

subtitle_tool-0.1.28.tar.gz (48.7 kB view details)

Uploaded Source

Built Distribution

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

subtitle_tool-0.1.28-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file subtitle_tool-0.1.28.tar.gz.

File metadata

  • Download URL: subtitle_tool-0.1.28.tar.gz
  • Upload date:
  • Size: 48.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.2

File hashes

Hashes for subtitle_tool-0.1.28.tar.gz
Algorithm Hash digest
SHA256 48a10c5f982fb0bfff43ba316467ab9fde8cbec78db0ca2f2283df13a12cf881
MD5 1277ea990f8285442ddfa73ed8c56215
BLAKE2b-256 f9011b42ef87c1b5ed5d36bcaf391772ac141bfa79a8bae37740b5f7594114aa

See more details on using hashes here.

File details

Details for the file subtitle_tool-0.1.28-py3-none-any.whl.

File metadata

File hashes

Hashes for subtitle_tool-0.1.28-py3-none-any.whl
Algorithm Hash digest
SHA256 b38cfddd1cda69cda805635957a08c193e3117d2c4f2819ac9077e099ae1519e
MD5 a2e0278ee49603adfbd3d3bfa23103cf
BLAKE2b-256 a482520f959c839b1881a425a5fdd8f259e920ead13f48e94e3091a9a29ff4be

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