This utility uses Google Gemini to generate subtitles to audio and video files.
ffmpeg
needs to be installed for audio extraction.
- Extract the audio from the video
- Send the audio to Gemini for transcription
- Backup the existing subtitle
- Save the new subtitle
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
)
# Leaving it possible to change the local code
uv tool install -e .
uv tool update-shell
subtitle-tool --video myvideo.avi