Chevren watches a YouTube video or local file, transcribes the audio locally with Whisper, translates each segment to Turkish via the Gemini API, and overlays the subtitles in real time — no cloud STT, no mandatory accounts beyond a free Gemini key.
- 🎤 Local transcription via faster-whisper (GPU-accelerated with CUDA)
- 🌍 Translation via Gemini API (streaming, chunk-by-chunk)
- 📺 Playback in MPV with live subtitle injection
- 狐 Firefox extension — one-click subtitle generation on YouTube, with an inline status strip and overlay renderer built into the page
- 🌐 Multilingual support — TR/EN language toggle; transcript and translation cached separately
YouTube URL / Local File
│
▼
yt-dlp ──► ffmpeg ──► faster-whisper (local STT, CUDA)
│
segments (generator, lazy)
│
Gemini API ←─ multi-key pool
(chunked translation, streaming)
│
SRT written incrementally
(en.srt transcript, tr.srt translation)
│
┌────────────┴────────────┐
▼ ▼
MPV (sub-file) Firefox Extension
live sub-reload glassmorphism overlay
│ language toggle (TR/EN)
chevren-server (Rust/Axum)
HTTP :7373 — pipeline status,
subtitle reload, MPV IPC bridge,
cancel endpoint
The Rust server is a lightweight local HTTP daemon. The Python pipeline reports its progress to the server via POST /pipeline/status; the extension polls GET /status to drive the UI.
paru -S chevren
# or
yay -S chevrengit clone https://github.com/yeggis/chevren.git
cd chevren
python install.pyThe install script supports Debian/Ubuntu, Fedora, and openSUSE. It auto-detects your distribution and uses the appropriate package manager.
python install.py --dry-run # preview without making changes
python install.py --skip-deps # Python deps only, skip system packages
python install.py --help
install.shalso remains available for shell-only environments.
| Package | Purpose |
|---|---|
python ≥ 3.10 |
Runtime |
python-pytorch-cuda |
GPU-accelerated Whisper |
ffmpeg |
Audio extraction |
yt-dlp |
YouTube download |
mpv |
Video playback |
Python dependencies (faster-whisper, google-genai, prompt-toolkit, …) are listed in requirements.txt and managed through pyproject.toml.
chevren setupAn interactive TUI wizard (arrow-key navigation) walks you through:
- Gemini API keys — add one or more keys; Chevren rotates between them automatically when a quota limit is hit. Free keys available at Google AI Studio.
- Whisper model — auto-recommended based on detected VRAM. Options range from
tinytolarge-v3-turbo. - Primary Gemini model — defaults to
gemini-2.5-flash-lite; fallback chain is configurable. - Player — MPV is the default and the only fully supported option.
- Cookie setup — optional, needed for age-restricted or login-gated YouTube videos.
You can also set individual values directly:
chevren config gemini_api_key YOUR_KEY
chevren config whisper_model large-v3-turboNeeded for age-restricted or members-only videos. Chevren checks for cookies in this order:
~/.config/chevren/cookies.txt(Netscape format) — exported manually via a browser extensionbrowserconfig key — e.g.chevren config browser firefox- Zen Browser auto-detection (largest profile by cookies.sqlite size)
- Firefox / Librewolf auto-detection
Supported for auto-detection: Firefox, Zen Browser, Librewolf.
⚠️ Chrome/Edge on Linux: keyring encryption (kwallet/gnome-keyring) prevents automatic cookie extraction. Export manually and place the file at~/.config/chevren/cookies.txt.
chevren https://www.youtube.com/watch?v=VIDEO_ID # YouTube
chevren /path/to/file.mp4 # local file
chevren --no-play https://... # generate SRT only
chevren cache list # show cached subtitles
chevren cache clear # clear cache
chevren --helpSubtitles are cached under ~/.cache/chevren/<video_id>/ as en.srt (transcript) and tr.srt (translation). Re-running the same URL serves from cache instantly.
Adds a status strip below the YouTube video title and an ▶ button in the player controls to open the video in MPV.
Firefox (recommended) — Install via AMO:
- Visit the Releases page and download
chevren.xpi - Open
about:addonsin Firefox - Gear icon → "Install Add-on From File" → select
chevren.xpi
Chromium-based browsers (Chrome, Edge, Brave, Helium) — manual install:
- Download
chevren-extension-chrome.zipfrom the Releases page and unzip it - Open
chrome://extensions→ enable "Developer mode" - "Load unpacked" → select the unzipped folder
⚠️ Chromium-based browsers do not receive automatic updates — manual reinstall required on each update.
What the strip does:
- Idle → click to start subtitle generation
- Downloading / Transcribing / Translating → animated progress bar with stage label
- Ready → click to toggle the in-page overlay; subtitles render over the YouTube player in sync with playback
- The overlay updates live as new translation chunks arrive
- Settings panel (⚙ Ayarlar): language toggle (TR/EN), open in MPV, cancel active pipeline, delete cached subtitles
- Overlay controls: drag to reposition, scroll to resize text, double-click to reset position, Alt+C to toggle
- The overlay uses a glassmorphism design and adjusts position automatically when YouTube controls appear or hide
The extension popup shows server status, active pipeline stage, and a scrollable log. A restart button (↺) sends POST /restart to the local server, which exits with code 1 and is restarted by systemd (Restart=on-failure).
Chevren supports multiple Gemini API keys. When a 429 RESOURCE_EXHAUSTED response is received, it rotates to the next available key for the same model. If all keys for that model are exhausted, it falls back through this chain:
gemini-2.5-flash → gemini-2.5-flash-lite → gemini-3.1-flash-lite-preview → gemini-3-flash-preview
No chunk is ever silently dropped; if every key and model is exhausted, the chunk is left in English.
- OS: Linux (Arch-based, Debian/Ubuntu, Fedora, openSUSE)
- GPU: NVIDIA with CUDA — CPU mode works but is significantly slower
- Python: 3.10+
- Display: Wayland or X11
Pull requests are welcome. For significant changes, please open an issue first.
git clone https://github.com/yeggis/chevren.git
cd chevren
# make your changes
git commit -m "feat: description"
git pull --rebase origin main
git pushMIT © 2026 yeggis
