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)

  • Ensure uv installs its dev dependencies with uv sync --extra dev.

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.47.tar.gz (50.0 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.47-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for subtitle_tool-0.1.47.tar.gz
Algorithm Hash digest
SHA256 0f72a0f67197f139d6fc6c82dc79985b248c8a8779b8756545d50546a5601b0f
MD5 1a423ac56d15b2b02f2bf0ecb3030b14
BLAKE2b-256 bcdf03013867f3fe3e0344a2940be03816e523d02fc6e8971b44b589e95c4b83

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for subtitle_tool-0.1.47-py3-none-any.whl
Algorithm Hash digest
SHA256 7b410efb0fbb2433139aa7ecef2d6c250fc53666e88da7c08a8587bfd7cb683a
MD5 286e10590c15c727e242235e6a215ce2
BLAKE2b-256 4a48c7e92a603634c19fd5817d58ca38ea408b081a9afcec7bd91b0d267ce57f

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