AI-powered YouTube transcript processor
Project description
transcript-kit
AI-powered YouTube transcript processor - Clean, tag, and organize video transcripts automatically.
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
- Visit OpenRouter
- Sign up for an account
- Generate an API key
- Run
transcript-kit setupand 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
- Download - Uses yt-dlp to fetch YouTube subtitles (.srt format)
- Analyze - AI analyzes the video title and content to understand context
- Tag - Assigns 1-2 relevant tags (reuses existing tags when possible)
- Clean - Processes transcript in chunks to:
- Fix speech-to-text errors
- Add proper punctuation
- Create readable paragraphs
- Maintain original meaning
- 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 costanthropic/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.yamlto git - Config file permissions are set to
0600(owner read/write only) - API keys are never logged or printed
- Use
.envfiles 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:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- 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
- Repository: https://github.com/kevincallens/transcript-kit
- Issues: https://github.com/kevincallens/transcript-kit/issues
- OpenRouter: https://openrouter.ai
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file transcript_kit-0.1.1.tar.gz.
File metadata
- Download URL: transcript_kit-0.1.1.tar.gz
- Upload date:
- Size: 18.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
914f22283f862a9fc6688a185da87c2ef5e05f8fd8cbef6be2cd5b404efd405b
|
|
| MD5 |
5189127d0b3706eee8d4b16df7c11106
|
|
| BLAKE2b-256 |
efe873f97520f8657238eef0125e8fcd4a54861532bc204fad26c89c7308d222
|
File details
Details for the file transcript_kit-0.1.1-py3-none-any.whl.
File metadata
- Download URL: transcript_kit-0.1.1-py3-none-any.whl
- Upload date:
- Size: 18.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1347c892e5d3fb01a3b2bc28b6ac3b412d0375837bec706069aaa2230bfe172a
|
|
| MD5 |
2f966d5ae0724547f7c63d1cb11c1283
|
|
| BLAKE2b-256 |
d081f3821065cb533016fc7626e8d13e5c0e9edafc1c3dd1b834c1508cbe9d6f
|