Skip to main content

gemini-transcribe-wrapper

A free video transcription CLI using gemini-3.5-transcribe that outputs .diarized.srt, .srt, and .txt files.

Quick Start

Prerequisites

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 .txt paragraphs, and (with --diarize) .diarized.srt files 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-diarize is 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 (default ko-KR,en-US) to Gemini as language_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

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

gemini_transcribe_wrapper-0.0.63.tar.gz (93.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gemini_transcribe_wrapper-0.0.63-py3-none-any.whl (57.6 kB view details)

Uploaded Python 3

File details

Details for the file gemini_transcribe_wrapper-0.0.63.tar.gz.

File metadata

File hashes

Hashes for gemini_transcribe_wrapper-0.0.63.tar.gz
Algorithm Hash digest
SHA256 716785d514af56a535a3cc48821bf520e5f333b52058343cdb35bcba63b8a7a8
MD5 a2b2a08baf274b4529a2927645bdffca
BLAKE2b-256 900e044aa9751e27805c5141fa4c529bbb8be364339b71aa1861939471566b23

See more details on using hashes here.

Provenance

The following attestation bundles were made for gemini_transcribe_wrapper-0.0.63.tar.gz:

Publisher: publish.yml on tayaee/gemini-transcribe-wrapper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gemini_transcribe_wrapper-0.0.63-py3-none-any.whl.

File metadata

File hashes

Hashes for gemini_transcribe_wrapper-0.0.63-py3-none-any.whl
Algorithm Hash digest
SHA256 2627bd47029907c283075195192a8dadaa30cf604d2e16e68ace4b9d062ab38a
MD5 c237bcc8b3da304cded26a9d5a3e28ac
BLAKE2b-256 8d1b41bca6b22b5872806e069de4e6fb5a61dfd27dfde250c77a8ac6c2b4aa4a

See more details on using hashes here.

Provenance

The following attestation bundles were made for gemini_transcribe_wrapper-0.0.63-py3-none-any.whl:

Publisher: publish.yml on tayaee/gemini-transcribe-wrapper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

0.0.69

2 files

0.0.68

2 files

0.0.67

2 files

0.0.66

2 files

0.0.65

2 files

0.0.64

2 files

This release

0.0.63 This release

2 files

0.0.62

2 files

0.0.61

2 files

0.0.60

2 files

0.0.59

2 files

0.0.58

2 files

0.0.57

2 files

0.0.56

2 files

0.0.55

2 files

0.0.54

2 files

0.0.53

2 files

0.0.52

2 files

0.0.51

2 files

0.0.50

2 files

0.0.49

2 files

0.0.48

2 files

0.0.47

2 files

0.0.46

2 files

0.0.45

2 files

0.0.44

2 files

0.0.43

2 files

0.0.42

2 files

0.0.41

2 files

0.0.40

2 files

0.0.39

2 files

0.0.38

2 files

0.0.37

2 files

0.0.35

2 files

0.0.34

2 files

0.0.32

2 files

0.0.31

2 files

0.0.30

2 files

0.0.29

2 files

0.0.28

2 files

0.0.27

2 files

0.0.26

2 files

0.0.25

2 files

0.0.24

2 files

0.0.23

2 files

0.0.22

2 files

0.0.21

2 files

0.0.20

2 files

0.0.19

2 files

0.0.18

2 files

0.0.17

2 files

0.0.16

2 files

0.0.15

2 files

0.0.14

2 files

0.0.13

2 files

0.0.12

2 files

0.0.11

2 files

0.0.10

2 files

0.0.9

2 files

0.0.8

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page