sirtea

Crates.iosirtea
lib.rssirtea
version0.1.0
created_at2026-01-02 18:51:18.476213+00
updated_at2026-01-02 18:51:18.476213+00
descriptionGenerate SRT subtitle files from video using the Gladia speech-to-text API
homepage
repositoryhttps://github.com/jonhoo/sirtea
max_upload_size
id2019049
size129,707
Jon Gjengset (jonhoo)

documentation

README

caption

Generate SRT subtitle files from video using the Gladia speech-to-text API.

This tool uses a paid service. Gladia charges ~$0.50-0.61/hour depending on your plan, with a free tier offering 10 hours/month. Use --dry-run to estimate costs before transcribing.

Why this tool?

Gladia (like most transcription APIs) has a 135-minute limit per request. This tool handles arbitrarily long videos by:

  1. Splitting audio into segments (~90 minutes by default)
  2. Finding natural sentence boundaries for clean splits
  3. Stitching captions back together with correct timestamps

It also allows transcribing multiple videos concurrently, while ensuring that your total Gladia use cost does not exceed a set threshold.

For the full story, see the blog post.

Installation

Pre-built binaries

Download from the releases page.

From source

cargo install sirtea

Requirements

Usage

sirtea video.mkv                   # Transcribe a single video
sirtea lecture1.mp4 lecture2.mp4   # Transcribe multiple videos
sirtea --dry-run *.mkv             # Estimate cost without transcribing
sirtea -q video.mp4                # Quiet mode (errors only)

Output SRT files are created alongside the input videos (e.g., video.mkvvideo.srt). Videos with existing .srt files are skipped.

Configuration

API Key

Set your Gladia API key via environment variable or config file:

export GLADIA_API_KEY="your-key-here"

Or create a config file:

  • Linux: ~/.config/sirtea/config.toml
  • macOS: ~/Library/Application Support/sirtea/config.toml
  • Windows: %APPDATA%\sirtea\config.toml
gladia_api_key = "your-key-here"

See config.example.toml for other options you can set in your configuration file.

Options

These can be set in the config file or overridden via CLI flags:

Option CLI flag Default Description
max_cost --max-cost 10.0 Stop when estimated cost exceeds this (dollars)
parallel --parallel 3 Concurrent transcriptions (free plan limit; paid plans allow 25)
segment_length --segment-length 5400 Max segment length in seconds (1h30m is the default, though Gladia allows up to 2h15m)

CLI Reference

sirtea [OPTIONS] <PATH>...

Run sirtea --help for full usage information.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Commit count: 0

cargo fmt