gemini-transcribe-wrapper
Transcribe hours of audio for free with Google AI model gemini-3.5-transcribe — auto-chunked, rate-limit aware, and exported straight to SRT and TXT (with optional speaker diarization).
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)
Linux / macOS:
export GEMINI_API_KEY=your_key_here
uv tool install --python 3.12 gemini-transcribe-wrapper@latest
gtw -v
Windows (Command Prompt):
set GEMINI_API_KEY=your_key_here
uv tool install --python 3.12 gemini-transcribe-wrapper@latest
gtw -v
Transcribe for free
gtw sample.mp4 # with `GEMINI_API_KEY` set
# or
gtw --gemini-api-key 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 calls today 2026-08-30 (PST-08:00) with key 'AIza****abcd': attempted 3 (free tier limit: ~5)). - Free-Tier-Friendly Defaults:
--no-diarizeis the default to maximize audio duration per API call and minimize API consumption. - Graceful 429 Abort: On HTTP 429 (rate limit or quota exhausted), calculates the exact sleep seconds until the Pacific midnight reset and aborts the batch immediately (exit code
2) to prevent wasting quota.
Documentation & Guides
- On Quota / Rate-Limit (HTTP 429)
- 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.35.tar.gz.
File metadata
- Download URL: gemini_transcribe_wrapper-0.0.35.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 |
d1d6a83edb59974c70f26cd3620033cf273dbd49b65eaf31b33ca2545fd912b9
|
|
| MD5 |
9324dbfe55fa9f21c754195061927d42
|
|
| BLAKE2b-256 |
51784337014e855fc7518b74dc7ab0263368d2c2e37fae6137d8bb82ce633d2f
|
Provenance
The following attestation bundles were made for gemini_transcribe_wrapper-0.0.35.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.35.tar.gz -
Subject digest:
d1d6a83edb59974c70f26cd3620033cf273dbd49b65eaf31b33ca2545fd912b9 - Sigstore transparency entry: 2655457691
- Sigstore integration time:
-
Permalink:
tayaee/gemini-transcribe-wrapper@945051249b9c89fe9ce3c2400c57c6e46b1a46d2 -
Branch / Tag:
refs/tags/v0.0.35 - Owner: https://github.com/tayaee
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@945051249b9c89fe9ce3c2400c57c6e46b1a46d2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file gemini_transcribe_wrapper-0.0.35-py3-none-any.whl.
File metadata
- Download URL: gemini_transcribe_wrapper-0.0.35-py3-none-any.whl
- Upload date:
- Size: 41.3 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 |
27710f7acf02dd6054d917b56157a1f9e99916e4087b53e94fa447403c40fa7b
|
|
| MD5 |
b73bdc45d17c6b7b1120ded9f1bbace0
|
|
| BLAKE2b-256 |
962b22524c231a63ed6e458bcc15061b25e9665ffae87d25c480e24cbff8f548
|
Provenance
The following attestation bundles were made for gemini_transcribe_wrapper-0.0.35-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.35-py3-none-any.whl -
Subject digest:
27710f7acf02dd6054d917b56157a1f9e99916e4087b53e94fa447403c40fa7b - Sigstore transparency entry: 2655457703
- Sigstore integration time:
-
Permalink:
tayaee/gemini-transcribe-wrapper@945051249b9c89fe9ce3c2400c57c6e46b1a46d2 -
Branch / Tag:
refs/tags/v0.0.35 - Owner: https://github.com/tayaee
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@945051249b9c89fe9ce3c2400c57c6e46b1a46d2 -
Trigger Event:
push
-
Statement type: