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

# Leaving it possible to change the local code
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.21.tar.gz (48.3 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.21-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for subtitle_tool-0.1.21.tar.gz
Algorithm Hash digest
SHA256 72e8742ad66eeb0c8b81e6c11bdb43458674df9870f3ec15af7e87d66b06ea4f
MD5 d1ac9e176b5d8ff1c3452f75f61b5ba3
BLAKE2b-256 6ff6eba3b0b5848e7f5b70072fa30d3cae128ead1aef9d9aef95ce22a432e047

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for subtitle_tool-0.1.21-py3-none-any.whl
Algorithm Hash digest
SHA256 cf9e9d45744663e5a8d31322544dbf4885212b3976af0f4897b116586aa2bfb0
MD5 1eb71ab8a3f6bad23f694bd9bbb3a48a
BLAKE2b-256 20a8d242ccdc9f6d272fd8abc1bbf39ed367384466b34acd6e2f1f6ddf9b98d8

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