ytxt
Local-first, privacy-focused transcription CLI.
ytxt is a developer-centric tool for transcribing audio from YouTube, web URLs, or local files. It bridges the gap between yt-dlp and faster-whisper, providing a seamless, automated pipeline that runs entirely on your machine.
Why ytxt?
- Zero-Cloud Privacy: No data leaves your machine. Perfect for sensitive meetings or private research.
- High Performance: Powered by
faster-whisper(CTranslate2), which is up to 4x faster than OpenAI's original implementation. - Battery Included: Handles downloading, audio extraction (
ffmpeg), and transcription in one command. - Smart Caching: Avoid redundant computations.
ytxthashes inputs to skip re-transcribing files you've already processed. - Universal: Supports 1,000+ sites including YouTube, Spotify (Podcasts), and SoundCloud via
yt-dlp.
Installation
Requires ffmpeg installed on your system.
# Using pip
pip install ytxt
# Using uv (recommended for speed)
uv tool install ytxt
Quick Start (CLI)
Transcribe any YouTube video to Markdown with timestamps:
ytxt "https://www.youtube.com/watch?v=dQw4w9WgXcQ" --format markdown --timestamps --output transcript.md
Power User Tricks
Pipe to an LLM for summarization:
ytxt <url> | llm "Summarize this transcript for a technical audience"
Extract metadata with jq:
ytxt <url> --format json | jq '.[].text'
Data Pipelines & Automation
ytxt is designed to be a "high-signal" component in your data infrastructure. Because status logs are routed to stderr, the stdout remains clean for programmatic use.
- RAG Pipelines: Use
ytxtas an ingestion layer to feed YouTube transcripts directly into vector databases like Pinecone or Chroma. - AI Agents: Pipe transcripts directly into LLMs for summarization, sentiment analysis, or entity extraction.
- Subtitles: Generate industry-standard
.srtfiles for video editing workflows. - Scheduled Jobs: Run
ytxtin a cron job or GitHub Action to monitor and transcribe new videos from a playlist.
Library Usage
ytxt is designed to be imported into your own Python automation scripts.
from ytxt import download_audio, transcribe_audio
# 1. Download & Extract
audio_path = download_audio("https://youtube.com/...")
# 2. Transcribe Locally
transcript = transcribe_audio(audio_path, model_size="medium")
# 3. Use the result (list of dicts with 'start', 'end', 'text')
for segment in transcript:
print(f"[{segment['start']}] {segment['text']}")
Configuration
| Option | Description | Default |
|---|---|---|
--model |
Whisper model size (tiny, base, small, medium, large-v3) |
base |
--format |
Output format (text, markdown, srt, json) |
text |
--timestamps |
Include timestamps in text/markdown output | False |
--no-cache |
Force re-transcription by ignoring cache | False |
Development
git clone https://github.com/rayanrane/ytxt.git
cd ytxt
pip install -e .
License
MIT
Metadata
Release files for ytxt 0.2.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ytxt-0.2.5.tar.gz | 7.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ytxt-0.2.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.3 kB
Release files / ytxt-0.2.5.tar.gz
| Download URL | ytxt-0.2.5.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
65e803d00f0e39df7a4e1be62e824122964daf8a1df4d5135c5dc5d8fd8b7fc4
|
|
BLAKE2b-256 checksum How to use checksums |
5af7fcd5f240781da86e95a17576bb2c8f54edf1324ecc879687c75007fa7b61
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 23, 2026.
Transparency logRelease files / ytxt-0.2.5-py3-none-any.whl
| Download URL | ytxt-0.2.5-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a70bbe1918fa694a6b6c7bbe3da13e85839ae945e6a4aa0f257f23e348daffbf
|
|
BLAKE2b-256 checksum How to use checksums |
f78bf362c6be9f56536910a89480e9d3765c5e2af6ca5e24d29b739d49156da1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 23, 2026.
Transparency log