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 or upgrade the tool

(Supports Python 3.10–3.13; Python 3.12 is recommended)

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 .txt paragraphs, and .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-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 subtitles, 60-min chunks when only .txt is output via --diarized-srt-file=off --srt-file=off) 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.json to 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.
  • Key File with Hot Reload: --gemini-api-keys-file PATH reads one key per line (defaults to ./gemini-api-keys.txt, falling back to ~/.config/gemini-transcribe-wrapper/gemini-api-keys.txt). On Linux/macOS the file must be chmod 600 or the run aborts with the exact fix command. The file is watched during the run — edit it to add or retire keys and the rotation reloads every key before the next pick, resuming at the key that follows the last used one in the new file order.
  • 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 (--vocab-txt-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 to auto which 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 (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

Metadata

Release files for gemini-transcribe-wrapper 0.1.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gemini-transcribe-wrapper 0.1.13
File Size Uploaded
gemini_transcribe_wrapper-0.1.13.tar.gz 93.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for gemini-transcribe-wrapper 0.1.13
File Interpreter ABI Platform
gemini_transcribe_wrapper-0.1.13-py3-none-any.whl Python 3 none any Details

Total release size: 93.6 MB

Release files / gemini_transcribe_wrapper-0.1.13.tar.gz

Download URL gemini_transcribe_wrapper-0.1.13.tar.gz
Size 93.6 MB
Tags Source
SHA-256 checksum
How to use checksums
a66b7995bddb87cb1fdc4d43940695a44d87269f87e76921bb2f4596e87be8e1
BLAKE2b-256 checksum
How to use checksums
b20adc8a189538bd9f13b92de98367a967790970d2506c4d3cb3ec25cd3a5b72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.

Transparency log

Release files / gemini_transcribe_wrapper-0.1.13-py3-none-any.whl

Download URL gemini_transcribe_wrapper-0.1.13-py3-none-any.whl
Size 82.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4fe7ffa4c109f2c399f12f1e63976404290b4b24c2334eb00e42a18932ec37a8
BLAKE2b-256 checksum
How to use checksums
9980bfa36fe6b818076ca57070bc44c80e3aedf4694ab52ae1619ccec3037dc6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.16

2 release files

0.1.15

2 release files

0.1.14

2 release files

This release

0.1.13 This release

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.54

2 release files

0.0.53

2 release files

0.0.52

2 release files

0.0.51

2 release files

0.0.50

2 release files

0.0.49

2 release files

0.0.48

2 release files

0.0.47

2 release files

0.0.46

2 release files

0.0.45

2 release files

0.0.44

2 release files

0.0.43

2 release files

0.0.42

2 release files

0.0.41

2 release files

0.0.40

2 release files

0.0.39

2 release files

0.0.38

2 release files

0.0.37

2 release files

0.0.35

2 release files

0.0.34

2 release files

0.0.32

2 release files

0.0.31

2 release files

0.0.30

2 release files

0.0.29

2 release files

0.0.28

2 release files

0.0.27

2 release files

0.0.26

2 release files

0.0.25

2 release files

0.0.24

2 release files

0.0.23

2 release files

0.0.22

2 release files

0.0.21

2 release files

0.0.20

2 release files

0.0.19

2 release files

0.0.18

2 release files

0.0.17

2 release files

0.0.16

2 release files

0.0.15

2 release files

0.0.14

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release 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