gemini-transcribe-wrapper
A free video transcription CLI using gemini-3.5-transcribe that outputs .diarized.srt, .srt, and .txt files.
Quick Start
Prerequisites
- Get an API key from https://aistudio.google.com/api-keys/ for free.
- Install uv (https://docs.astral.sh/uv/getting-started/installation/).
Install or upgrade the tool
(Supports Python 3.10–3.13; Python 3.12 is recommended)
Method 1: The wrapper is best run via uvx (one-shot, no install step — recommended for free-tier multi-key usage where each run spreads load differently):
Linux / macOS / Windows:
uvx --python 3.12 --from gemini-transcribe-wrapper@latest gtw --gemini-api-keys "<api keys separated by comma or semicolon>" -h
Method 2: For a persistent install (so you can run gtw directly without uvx ...):
Linux / macOS / Windows:
uv tool install --python 3.12 gemini-transcribe-wrapper@latest
gtw --gemini-api-keys "<api keys separated by comma or semicolon>" -h
Transcribe for free
gtw --gemini-api-keys "<api keys separated by comma or semicolon>" /path/to/sample.mp4
Output (default: --diarized-srt-file auto — with speaker diarization):
sample.diarized.transcript.json
sample.diarized.srt
sample.srt
sample.txt
What are improved by this project?
1. Transcription Quality & Usability
- Raw AI Output to Ready-to-Use Subtitles: Converts JSON transcription output directly into formatted
.srt(with natural timestamp alignment and line breaking), readable.txtparagraphs, and.diarized.srtfiles in a single run. - Korean Transcription Error Correction: Automatically post-processes common Gemini Korean misrecognitions (e.g. correcting erroneous romanized
"su"into"수"in patterns like"~할 su 있다/없다","~할 su밖에","~할 su도","~할 su가"with proper Korean spacing and particle attachment). - Fast Speaker Labeling: Allows iterative speaker renaming (
--speakers-txt-file, automatically picking up.speakers.txt) instantly without re-calling the API by reusing saved transcripts.
2. Overcoming Free-Tier Limits & Constraints
- Audio Length Limit Bypass: Handles audio files of any length by auto-splitting into safe units (30-min chunks by default for diarization and word timestamps, 60-min chunks when both are disabled via
--diarized-srt-file=off --no-word-level-timestamps) and transparently stitching timestamps together. - Rate Limit Throttling (Max 2 RPM): Applies a monotonic rate limiter (default 120s interval on free tier) across all chunks and multi-file batches to prevent 429 rate-limit errors.
- Daily Quota Tracking: Tracks daily Pacific-time API usage locally (
~/.cache/gemini-transcribe-wrapper/usage-<sha256(key)[:12]>.json) with masked key logging (e.g.API call attempts today 2026-08-30 (PT) with key 'AIza****abcd': attempted 3 (free tier limit: ~25)). - Multi-Key Round-Robin + Active/Cooldown Pool: Pass multiple keys with
--gemini-api-keys=KEY1,KEY2,.... The wrapper tracks active keys and keys in cooldown upon 429 errors. When all keys hit 429, it waits 600s before reloading keys into the live pool and retrying. Key usage state is persisted across runs in~/.cache/gemini-transcribe-wrapper/last-used-api-key.jsonto rotate evenly. With 16–20 free-tier keys (2 Gmail accounts × 10 projects each) you can run continuously even when most keys have hit the daily cap. See Multi-Key Strategy for sizing guidance. - Graceful 429 Abort (single key): On HTTP 429 (rate limit or quota exhausted) when running with a single key, calculates the exact sleep seconds until the Pacific midnight reset and aborts the batch gracefully.
- Custom Vocabulary File (
--custom-vocabulary-file): Register company-internal / frequently-misrecognized terms in a plain text file (one per line) and the wrapper biases the transcript toward those terms as a post-recognition step. Defaults toautowhich automatically picks up.vocab.txt(or<stem>.vocab.txt) when present. Up to 1000 words are accepted by the model; Google recommends ≤100 lines for best results. See Custom Vocabulary for details. - Multi-Language Hint (
--language-codes): Forward a comma-separated list of BCP-47 codes (defaultko-KR;en-US) to Gemini aslanguage_codes. Pass an empty string (--language-codes="") to enable Gemini's auto language detection for mixed-language content. See Language Hints for details.
Documentation & Guides
- On Quota / Rate-Limit (HTTP 429)
- Multi-Key Strategy (active/cooldown pool)
- Custom Vocabulary File
- Language Hints (
--language-codes) - Batch Bulk Transcribing Tip
- Diarizing Tip (Speaker Labels)
Relevant Repositories
- https://github.com/tayaee/gemini-transcribe-wrapper
- https://pypi.org/project/gemini-transcribe-wrapper
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gemini_transcribe_wrapper-0.1.5.tar.gz.
File metadata
- Download URL: gemini_transcribe_wrapper-0.1.5.tar.gz
- Upload date:
- Size: 93.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1d03b6502882c4cc4607e1f3a05988fb501324545a0cbf87db07e7e45eac6d2
|
|
| MD5 |
3ad8359c7e53375676787663e0721ab0
|
|
| BLAKE2b-256 |
048acaa02e0f1a8c01d8438576d50cd9e31d36b37db64e83daf043b6d16f6c6b
|
Provenance
The following attestation bundles were made for gemini_transcribe_wrapper-0.1.5.tar.gz:
Publisher:
publish.yml on tayaee/gemini-transcribe-wrapper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gemini_transcribe_wrapper-0.1.5.tar.gz -
Subject digest:
a1d03b6502882c4cc4607e1f3a05988fb501324545a0cbf87db07e7e45eac6d2 - Sigstore transparency entry: 2691243171
- Sigstore integration time:
-
Permalink:
tayaee/gemini-transcribe-wrapper@2f0725eb6f36f9249d711321ac20fceb55b528bb -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/tayaee
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2f0725eb6f36f9249d711321ac20fceb55b528bb -
Trigger Event:
push
-
Statement type:
File details
Details for the file gemini_transcribe_wrapper-0.1.5-py3-none-any.whl.
File metadata
- Download URL: gemini_transcribe_wrapper-0.1.5-py3-none-any.whl
- Upload date:
- Size: 73.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb018a34330baff1fbfbf059c36bdcacfb6e6c41a4ba301ade32cfe4bd599af4
|
|
| MD5 |
306a29f8bf81237c8f55073531e7f40d
|
|
| BLAKE2b-256 |
b611fe707ca6aaa24bf2fa7d418c7adaa7853f1318dc19aae53d8938d22b980b
|
Provenance
The following attestation bundles were made for gemini_transcribe_wrapper-0.1.5-py3-none-any.whl:
Publisher:
publish.yml on tayaee/gemini-transcribe-wrapper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gemini_transcribe_wrapper-0.1.5-py3-none-any.whl -
Subject digest:
cb018a34330baff1fbfbf059c36bdcacfb6e6c41a4ba301ade32cfe4bd599af4 - Sigstore transparency entry: 2691243199
- Sigstore integration time:
-
Permalink:
tayaee/gemini-transcribe-wrapper@2f0725eb6f36f9249d711321ac20fceb55b528bb -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/tayaee
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2f0725eb6f36f9249d711321ac20fceb55b528bb -
Trigger Event:
push
-
Statement type: