Skip to content

Repository files navigation

YouTube Transcriber

Transcribe or translate YouTube clips and local video/audio files with faster-whisper (OpenAI Whisper models, optimized). Optionally speak the result with OpenAI TTS or NovelAI TTS.

Requirements

  • Python 3.11+ (3.10 is not supported; runme prefers 3.11, then 3.12+)
  • ffmpeg on your PATH (needed for yt-dlp audio extraction and chunked TTS)
  • Optional GPU: CUDA for much faster Whisper (auto-detected)

Quick start (Windows)

Double-click or run:

runme.bat

That creates a virtual environment, installs dependencies, and launches the app.

Quick start (macOS / Linux)

chmod +x runme.sh
./runme.sh

Manual setup

Use Python 3.11 or newer (not 3.10):

# Windows (prefer 3.11 via the py launcher):
py -3.11 -m venv youtube_transcriber_env
youtube_transcriber_env\Scripts\activate

# macOS/Linux:
python3.11 -m venv youtube_transcriber_env
source youtube_transcriber_env/bin/activate

pip install -r requirements.txt
python main.py
# or: python -m youtube_transcriber

runme.bat / runme.sh will pick 3.11 when available, fall back to 3.12+, and recreate an existing venv if it was built with Python older than 3.11.

Usage

  1. Paste a YouTube URL, or Browse… to a local media file.
  2. Pick a Whisper model (tinylarge-v3 / turbo / distil-large-v3).
  3. Choose transcribe (same language) or translate (to English).
  4. Optionally set API keys and a TTS engine to hear the result.
  5. Click Download & Transcribe.

API keys are stored in the OS settings store (Qt QSettings), not in a project file. Use the menu action Clear saved API keys to remove them.

Whisper models

Model Notes
tiny / base / small Fast, good for drafts
medium Better accuracy
large-v2 / large-v3 Best quality (slower, more RAM/VRAM)
turbo Optimized large-v3 speed/quality tradeoff
distil-large-v3 Distilled large model, faster

First use of a model downloads its weights automatically.

Text-to-speech (optional)

Engine Needs
None Transcript only (default)
OpenAI OpenAI API key; voices like alloy, nova, shimmer; models tts-1, tts-1-hd, gpt-4o-mini-tts
NovelAI Persistent API token; NovelAI TTS voices
Chatterbox Flash Local ResembleAI/chatterbox-flash (PyTorch); a ~5–10s reference voice clip for zero-shot cloning

Leave keys blank if you only want text.

Local Chatterbox Flash TTS

Not installed with the core requirements (torch stack is large). After the main venv is set up:

pip install -r requirements-chatterbox.txt

# Then force a modern CUDA torch (required for Blackwell: 2.7+)
pip install --upgrade torch torchaudio --index-url https://download.pytorch.org/whl/cu128

Notes for NVIDIA / Blackwell

  • chatterbox-tts (pulled in by chatterbox-flash) still declares torch==2.6.0. Pip will warn that 2.11+cu128 “conflicts”. That is expected — keep the newer torch; Chatterbox Flash was designed around overriding that pin.
  • You do not need torchcodec for this app. Speech is written with the stdlib wave module so recent torchaudio.save() → TorchCodec requirements are avoided.
  • Device is auto-selected (cudampscpu).

Then choose Chatterbox Flash as the TTS engine and browse to a ~5–10s reference audio file. First run downloads weights from Hugging Face.

What’s new in v2

  • yt-dlp instead of broken/outdated pytube
  • faster-whisper instead of stock openai-whisper (faster, less memory)
  • Proper background workers (UI no longer freezes)
  • Transcribe vs translate option
  • Modern models: large-v3, turbo, distil-large-v3
  • Updated OpenAI voices and TTS models
  • Save / copy transcript, file browser, status + progress
  • Dark UI, settings persistence, clean package layout
  • Cross-platform runme.sh + improved runme.bat

Project layout

main.py                      # launcher
youtube_transcriber/
  app.py                     # Qt UI
  workers.py                 # background jobs
  config.py                  # settings + constants
  services/
    download.py              # yt-dlp / local files
    transcribe.py            # faster-whisper
    tts.py                   # OpenAI + NovelAI speech

License

See LICENSE.

About

A small application to transcribe/translate a youtube clip or a local video or audio file. It uses the free to use OpenAI whisper, and if keys are provided, can also speak the transcription.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages