Skip to main content

Clean Transcriber

A command-line tool to turn any YouTube video, local audio or video file into a clean, readable text transcript. It uses the transcription model of your choice (local or API-based) for transcription and your preferred LLM to automatically clean and reformat the output.

Features

  1. Multiple input formats: Supports various audio and video formats for flexible usage (e.g., YouTube URL, .mp3, .wav, .m4a, .opus, .mp4, .mkv, .mov).
  2. Multiple output format: Generate clean transcripts in TXT, SRT, or VTT formats.
  3. Flexible transcription models: Choose from various local (Whisper, Voxtral) and API-based (OpenAI, Gemini, Mistral) models for different use cases.
  4. LLM-powered cleaning that removes filler words, fixes grammar, and organizes content into readable paragraphs.
  5. Wide LLM support - use Gemini, ChatGPT, Claude or any other (local) LLM for cleaning.

Quick Start

# Transcribe a YouTube video
clean-transcribe "https://www.youtube.com/watch?v=VIDEO_ID"

# Transcribe a local video file
clean-transcribe "/path/to/your/video.mp4"

# Transcribe a specific segment of a video
clean-transcribe "https://www.youtube.com/watch?v=VIDEO_ID" --start "1:30" --end "2:30"

# Create clean subtitles from a video
clean-transcribe "https://www.youtube.com/watch?v=VIDEO_ID" -f srt -o subtitles.srt

Installation

Option 1: use pip:

pip install clean-transcribe

Option 2: Install as package

git clone https://github.com/itsmevictor/clean-transcribe && cd clean-transcribe 
pip install -e .
clean-transcribe "https://www.youtube.com/watch?v=dQw4w9WgXcQ"   

Configuration

Key Options

  • --format, -f: Output format (txt, srt, vtt)
  • --model, -m: Transcription model (whisper-tiny, whisper-base, whisper-small, whisper-medium, whisper-large, whisper-turbo, whisper-1-api, gpt-4o-transcribe-api, gpt-4o-mini-transcribe-api, gemini-2.5-pro-api, gemini-2.5-flash-api, gemini-2.5-flash-lite-api, gemini-2.0-flash-api, voxtral-mini-api, voxtral-small-api, voxtral-mini-local, voxtral-small-local)
  • --start: Start time for transcription (e.g., "1:30")
  • --end: End time for transcription (e.g., "2:30")
  • --transcription-prompt: Custom prompt for Whisper to guide transcription
  • --llm-model: LLM for cleaning (gemini-2.0-flash-exp, gpt-4o-mini, etc.)
  • --cleaning-style: presentation, conversation, or lecture
  • --save-raw: Keep both raw and cleaned versions
  • --no-clean: Skip AI cleaning

LLM-Powered Cleaning Setup

# Install and configure Gemini (fast + cost-effective)
llm install llm-gemini
llm keys set gemini
# Enter your Gemini API key when prompted

# Or use any other LLM provider

# OpenAI
llm keys set openai

# Anthropic Claude  
llm install llm-claude-3
llm keys set claude

Uses Simon Willison's excellent llm package for provider flexibility.

Cleaning Process

What it does:

  • Removes filler words (um, uh, so, like, you know, etc.)
  • Fixes grammar and punctuation errors
  • Organizes content into logical paragraphs
  • Maintains original meaning and context

Cleaning styles:

  • presentation: Professional tone, organized paragraphs
  • conversation: Natural flow, minimal cleanup
  • lecture: Educational format, clear sections for notes

Note: SRT/VTT preserve timing while cleaning text content.

Feedback

I'd love to hear your feedback! If you encounter any issues, have suggestions for new features, or just want to share your experience, please don't hesitate to open an issue.

Metadata

Release files for clean-transcribe 1.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 clean-transcribe 1.1.1
File Size Uploaded Provenance Actions
clean_transcribe-1.1.1.tar.gz 20.8 kB Without provenance Details for clean_transcribe-1.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for clean-transcribe 1.1.1
File Interpreter ABI Platform Actions
clean_transcribe-1.1.1-py3-none-any.whl Python 3 none any Details for clean_transcribe-1.1.1-py3-none-any.whl

Total release size: 46.6 kB

Release files / clean_transcribe-1.1.1.tar.gz

Download URL clean_transcribe-1.1.1.tar.gz
Size 20.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e70abc3fadf1dda01cb8450b447af809a4e2a433632fd48279e56a6b47d3211f
BLAKE2b-256 checksum
How to use checksums
65f711037baf6c1cae0b55b0c277e06f6741924f96f4b06121c7662ecc34aed2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / clean_transcribe-1.1.1-py3-none-any.whl

Download URL clean_transcribe-1.1.1-py3-none-any.whl
Size 25.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
65d4b8b9095d300aa5711f7da6cbc16c9ee21a1960147cb1869ff6b21cdcb6b8
BLAKE2b-256 checksum
How to use checksums
07e91fbb880871c6975901f0c5045d833b240c221185553928a6508e42712041
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Security for clean-transcribe 1.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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