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 the tool
(Supports Python 3.10–3.13; Python 3.12 is recommended)
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:
# Set your multiple free-tier API keys in shell variables first:
export key1=AIzaSyA...
export key2=AIzaSyB...
# Then run any number of input files in one go:
uvx --python 3.12 --from gemini-transcribe-wrapper@latest gtw --gemini-api-keys $key1;...;$key10 *.mp4
For a persistent install (so you can run gtw directly without uvx ...):
export GEMINI_API_KEY=your_key_here
uv tool install --python 3.12 gemini-transcribe-wrapper@latest
gtw -v
Windows (Command Prompt) — persistent install:
set GEMINI_API_KEY=your_key_here
uv tool install --python 3.12 gemini-transcribe-wrapper@latest
gtw -v
Transcribe for free
# Recommended — multi-key (10 free-tier keys for active/cooldown pool):
uvx --python 3.12 --from gemini-transcribe-wrapper@latest gtw --gemini-api-keys $key1;...;$key10 *.mp4
# Single-key (if you only have one free-tier key or use a paid tier):
gtw sample.mp4 # with `GEMINI_API_KEY` set
# or
gtw --gemini-api-keys YOUR_API_KEY sample.mp4
Output (default: --no-diarize — no speaker labels, fewer API calls):
sample.transcript.json
sample.srt
sample.txt
For speaker-diarized output, opt in with --diarize:
gtw --diarize sample.mp4
Output (with --diarize):
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 (with--diarize).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 'spk:0=Host;spk:1=Guest') 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 (59-min logical units for
--no-diarize, 29-min chunks for--diarize) and transparently stitching timestamps together. - Rate Limit Throttling (Max 2 RPM): Applies a monotonic rate limiter (default 60s interval) 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)). - Free-Tier-Friendly Defaults:
--no-diarizeis the default to maximize audio duration per API call and minimize API consumption. - Multi-Key Round-Robin + Active/Cooldown Pool: Pass several keys with
--gemini-api-keys=KEY1;KEY2;.... The wrapper keeps a separate_active_pool(round-robin target) and_cooldown_pool(keys that hit 429). On a 429 the key is moved into the cooldown pool immediately — no same-key retry. When the active pool drains, the wrapper sleeps_COOLDOWN_SECS(10 min default) and reactivates every cooldown key in batch, then retries the chunk. 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 immediately (exit code
2) to prevent wasting quota. - 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. Up to 1000 words are accepted by the model; Google recommends ≤100 lines for best results. Missing file → warning + silently ignored. 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)
- Python API Examples
Relevant Repositories
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.0.65.tar.gz.
File metadata
- Download URL: gemini_transcribe_wrapper-0.0.65.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 |
81712d76a09881a680ae4ca658acf319e1a56521d6e699eb73805d9f31cfb65e
|
|
| MD5 |
1c40f921e895ea48808bceb6702ba776
|
|
| BLAKE2b-256 |
d23456957c703dab309cc5db989cd8a6e0b630e8cb2b2a4f3e7e90d4b2d1f881
|
Provenance
The following attestation bundles were made for gemini_transcribe_wrapper-0.0.65.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.0.65.tar.gz -
Subject digest:
81712d76a09881a680ae4ca658acf319e1a56521d6e699eb73805d9f31cfb65e - Sigstore transparency entry: 2681929817
- Sigstore integration time:
-
Permalink:
tayaee/gemini-transcribe-wrapper@77316dffbe398d5cdc87f8872bbc900d8d2c13e9 -
Branch / Tag:
refs/tags/v0.0.65 - Owner: https://github.com/tayaee
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@77316dffbe398d5cdc87f8872bbc900d8d2c13e9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file gemini_transcribe_wrapper-0.0.65-py3-none-any.whl.
File metadata
- Download URL: gemini_transcribe_wrapper-0.0.65-py3-none-any.whl
- Upload date:
- Size: 71.4 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 |
cf44da64b24230eea9ae7decdcf707adb062a427caec4347369ed6ccc3d23588
|
|
| MD5 |
7f75d632ddcb463b3e38cdd1f38b0ea0
|
|
| BLAKE2b-256 |
6b25dc472da2c6151773bf5285b9656ae829c78ad6e407b3feb6364db24c5b53
|
Provenance
The following attestation bundles were made for gemini_transcribe_wrapper-0.0.65-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.0.65-py3-none-any.whl -
Subject digest:
cf44da64b24230eea9ae7decdcf707adb062a427caec4347369ed6ccc3d23588 - Sigstore transparency entry: 2681929848
- Sigstore integration time:
-
Permalink:
tayaee/gemini-transcribe-wrapper@77316dffbe398d5cdc87f8872bbc900d8d2c13e9 -
Branch / Tag:
refs/tags/v0.0.65 - Owner: https://github.com/tayaee
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@77316dffbe398d5cdc87f8872bbc900d8d2c13e9 -
Trigger Event:
push
-
Statement type: