# Subtitle tool
[](https://codecov.io/gh/jeduardo/subtitle-tool)
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
```shell
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:
```shell
uv tool install -e .
uv tool update-shell
```
## Usage
```shell
subtitle-tool --video myvideo.avi
```
Raw data
{
"_id": null,
"home_page": null,
"name": "subtitle-tool",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.13",
"maintainer_email": null,
"keywords": "ai, audio, cli, gemini, google-gemini, srt, subtitles, video",
"author": null,
"author_email": "\"J. Eduardo\" <contact@jeduardo.com>",
"download_url": "https://files.pythonhosted.org/packages/fd/f0/bc1f23be252adf3f701f2a4a221647d19468296d413ec3b79b0e93e15386/subtitle_tool-0.1.36.tar.gz",
"platform": null,
"description": "# Subtitle tool\n\n[](https://codecov.io/gh/jeduardo/subtitle-tool)\n\nThis utility uses Google Gemini to generate subtitles to audio and video files.\n\n## Dependencies\n\n`ffmpeg` needs to be installed for audio extraction.\n\n## Process\n\n1. Extract the audio from the video\n2. Send the audio to Gemini for transcription\n3. Backup the existing subtitle\n4. Save the new subtitle\n\n## Dependencies\n\n- Export the API key for Gemini to the environment variable `GEMINI_API_KEY`\n **or** specify it in the command line with the flag `--api-key`.\n\n- `ffmpeg` needs to be installed (`brew install ffmpeg`, `apt-get install ffmpeg` or `dnf install ffmpeg`)\n\n- Ensure `uv` installs its dev dependencies with `uv sync --extra dev`.\n\n## Installation\n\n```shell\npip install subtitle-tool\n```\n\n## Developing\n\nFor local development it is useful to install the binary from the development\nlocation into the user's `PATH`. For this, run the following commands:\n\n```shell\nuv tool install -e .\nuv tool update-shell\n```\n\n## Usage\n\n```shell\nsubtitle-tool --video myvideo.avi\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "A tool for generating subtitles using Google Gemini models.",
"version": "0.1.36",
"project_urls": {
"Homepage": "https://github.com/jeduardo/subtitle-tool",
"Issues": "https://github.com/jeduardo/subtitle-tool/issues",
"Repository": "https://github.com/jeduardo/subtitle-tool.git"
},
"split_keywords": [
"ai",
" audio",
" cli",
" gemini",
" google-gemini",
" srt",
" subtitles",
" video"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "451e54409c296b2f392d43c6c0c4475d822ac49f5d038088bacdfbe74e5cfd3a",
"md5": "7faa7e98c47e0c1b71b4b707cf717a06",
"sha256": "b75c19132fc3a7cee113612dc5ae52a354a726b011c0d72dd55a0ab19604cbe5"
},
"downloads": -1,
"filename": "subtitle_tool-0.1.36-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7faa7e98c47e0c1b71b4b707cf717a06",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.13",
"size": 17392,
"upload_time": "2025-07-26T17:37:17",
"upload_time_iso_8601": "2025-07-26T17:37:17.047434Z",
"url": "https://files.pythonhosted.org/packages/45/1e/54409c296b2f392d43c6c0c4475d822ac49f5d038088bacdfbe74e5cfd3a/subtitle_tool-0.1.36-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "fdf0bc1f23be252adf3f701f2a4a221647d19468296d413ec3b79b0e93e15386",
"md5": "cc6ba0bafc038ff1abf7fd8e1d653c0b",
"sha256": "927c9e107e3f74465dd99a7fed47e21e6b56891c1a43ad9e343c919a0b81324a"
},
"downloads": -1,
"filename": "subtitle_tool-0.1.36.tar.gz",
"has_sig": false,
"md5_digest": "cc6ba0bafc038ff1abf7fd8e1d653c0b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.13",
"size": 49923,
"upload_time": "2025-07-26T17:37:18",
"upload_time_iso_8601": "2025-07-26T17:37:18.127785Z",
"url": "https://files.pythonhosted.org/packages/fd/f0/bc1f23be252adf3f701f2a4a221647d19468296d413ec3b79b0e93e15386/subtitle_tool-0.1.36.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-26 17:37:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jeduardo",
"github_project": "subtitle-tool",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "subtitle-tool"
}