Skip to main content

transcript-kit

AI-powered YouTube transcript processor - Clean, tag, and organize video transcripts automatically.

License: MIT Python 3.8+

Author: Kevin Callens


Features

  • 🎬 Download YouTube subtitles automatically
  • 🤖 AI-powered cleaning - Fixes speech-to-text errors, creates proper paragraphs
  • 🏷️ Smart tagging - Automatically tags transcripts with relevant topics
  • 📁 Organized storage - Clean file naming with dates and tags
  • 🔧 Configurable - Customize AI model, storage location, and processing options
  • 🌍 Cross-platform - Works on Linux, macOS, and Windows

Quick Start

Installation

pip3 install transcript-kit

Or using pipx (recommended):

pipx install transcript-kit

That's it! All dependencies (including yt-dlp) install automatically.

Setup

Run the interactive setup wizard:

transcript-kit setup

This will:

  • Prompt for your OpenRouter API key
  • Configure AI model preferences
  • Set up storage locations
  • Optionally add starter tags

Process a Video

transcript-kit process "https://www.youtube.com/watch?v=VIDEO_ID"

That's it! Your cleaned transcript will be saved to ~/Documents/transcript-kit/


Requirements

  • Python 3.8+
  • All other dependencies install automatically with pip3 install transcript-kit

Configuration

Getting an API Key

  1. Visit OpenRouter
  2. Sign up for an account
  3. Generate an API key
  4. Run transcript-kit setup and enter your key

Note: transcript-kit uses OpenRouter which provides access to various AI models. Some models are free, others are pay-per-use.

Configuration File

Config is stored at:

  • Linux/macOS: ~/.config/transcript-kit/config.yaml
  • Windows: %APPDATA%/transcript-kit/config.yaml

See examples/config.yaml.example for all available options.

Environment Variables

You can also configure via environment variables:

export OPENROUTER_API_KEY="your-key-here"
export TRANSCRIPT_KIT_AI_MODEL="openai/gpt-4o-mini"
export TRANSCRIPT_KIT_DATA_DIR="~/Documents/my-transcripts"

Usage

Commands

# Interactive setup wizard
transcript-kit setup

# Process a YouTube video
transcript-kit process "https://youtube.com/watch?v=xxx"

# Process with custom model
transcript-kit process "URL" --model anthropic/claude-3-haiku

# Process without tagging
transcript-kit process "URL" --no-tag

# Process to custom directory
transcript-kit process "URL" --output ~/custom/path

# Show current configuration
transcript-kit config

# Show configuration with API key visible
transcript-kit config --show-secrets

# Show version
transcript-kit --version

# Get help
transcript-kit --help

Output Format

Transcripts are saved as:

YYYY-MM-DD-video-title-[tag1,tag2].txt

Example:

2025-11-03-how-ai-works-[AI,Education].txt

File contents:

# How AI Works

**Date**: 2025-11-03
**Tags**: AI, Education
**Context**: This video explains the fundamentals of artificial intelligence...

---

[Cleaned transcript with proper paragraphs and fixed errors...]

How It Works

  1. Download - Uses yt-dlp to fetch YouTube subtitles (.srt format)
  2. Analyze - AI analyzes the video title and content to understand context
  3. Tag - Assigns 1-2 relevant tags (reuses existing tags when possible)
  4. Clean - Processes transcript in chunks to:
    • Fix speech-to-text errors
    • Add proper punctuation
    • Create readable paragraphs
    • Maintain original meaning
  5. Save - Organized file with metadata and cleaned content

Tag System

How Tags Work

  • Starts with empty tag database (or optional starter tags)
  • AI assigns 1-2 tags maximum per transcript
  • Prefers existing tags to maintain consistency
  • Creates new tags only when necessary
  • All tags saved to tags-database.txt

Example Tag Evolution

First video:  [AI]
Second video: [Marketing]
Third video:  [AI, Marketing]  ← Uses existing tags
Fourth video: [Tutorial]       ← Creates new tag when needed

Advanced Configuration

AI Models

Popular models (via OpenRouter):

  • openai/gpt-oss-20b - Fast, good quality (default)
  • openai/gpt-4o-mini - Higher quality, moderate cost
  • anthropic/claude-3-haiku - Fast Claude model

Processing Options

Edit ~/.config/transcript-kit/config.yaml:

ai:
  chunk_size: 8000          # Words per API call
  max_retries: 3            # Retry attempts on error

processing:
  analyze_context: true     # Context analysis before processing
  auto_tag: true            # Automatic tagging

tags:
  max_tags: 2               # Maximum tags per transcript
  starter_tags: []          # Optional starter tags

Troubleshooting

"yt-dlp not found"

This shouldn't happen since yt-dlp is automatically installed with transcript-kit.

If you see this error, try reinstalling:

pip3 install --force-reinstall transcript-kit

"API key not configured"

Run the setup wizard:

transcript-kit setup

Or set environment variable:

export OPENROUTER_API_KEY="your-key-here"

"No subtitles found"

The video may not have auto-generated subtitles. Try a different video or check if subtitles are available on YouTube.

"Configuration error"

Verify your config file:

transcript-kit config

Re-run setup if needed:

transcript-kit setup

Security

API Key Protection

  • NEVER commit your config.yaml to git
  • Config file permissions are set to 0600 (owner read/write only)
  • API keys are never logged or printed
  • Use .env files for additional security (also gitignored)

Example Files

Safe to commit:

  • ✅ examples/config.yaml.example
  • ✅ .env.example

NEVER commit:

  • ❌ ~/.config/transcript-kit/config.yaml
  • ❌ .env

Development

Local Installation

git clone https://github.com/kevincallens/transcript-kit.git
cd transcript-kit
pip3 install -e ".[dev]"

Running Tests

pytest

Code Formatting

black src/
ruff check src/

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

MIT License - see LICENSE file for details

Copyright (c) 2025 Kevin Callens


Acknowledgments

  • Uses yt-dlp for downloading subtitles
  • Powered by OpenRouter for AI processing
  • Built with Click for the CLI

Links

Metadata

Release files for transcript-kit 0.1.1

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

Source distribution (sdist)

Source distribution for transcript-kit 0.1.1
File Size Uploaded
transcript_kit-0.1.1.tar.gz 18.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for transcript-kit 0.1.1
File Interpreter ABI Platform
transcript_kit-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 36.5 kB

Release files / transcript_kit-0.1.1.tar.gz

Download URL transcript_kit-0.1.1.tar.gz
Size 18.6 kB
Tags Source
SHA-256 checksum
How to use checksums
914f22283f862a9fc6688a185da87c2ef5e05f8fd8cbef6be2cd5b404efd405b
BLAKE2b-256 checksum
How to use checksums
efe873f97520f8657238eef0125e8fcd4a54861532bc204fad26c89c7308d222
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / transcript_kit-0.1.1-py3-none-any.whl

Download URL transcript_kit-0.1.1-py3-none-any.whl
Size 18.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1347c892e5d3fb01a3b2bc28b6ac3b412d0375837bec706069aaa2230bfe172a
BLAKE2b-256 checksum
How to use checksums
d081f3821065cb533016fc7626e8d13e5c0e9edafc1c3dd1b834c1508cbe9d6f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

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