Local audio and YouTube transcription CLI
Project description
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 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'
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
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 ytxt-0.2.2.tar.gz.
File metadata
- Download URL: ytxt-0.2.2.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
facc1219cd75e6b1dea0de5c9098639855331fc2d331e0e3eaea391d0453e2e4
|
|
| MD5 |
7d15edb74a979e4d37f018a413bbc58a
|
|
| BLAKE2b-256 |
725835046d6808ef4cd9ee819b9a85b0e79a3f76d57b3f51b8bd009cdd463569
|
Provenance
The following attestation bundles were made for ytxt-0.2.2.tar.gz:
Publisher:
publish.yml on RayanR000/ytxt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ytxt-0.2.2.tar.gz -
Subject digest:
facc1219cd75e6b1dea0de5c9098639855331fc2d331e0e3eaea391d0453e2e4 - Sigstore transparency entry: 1615945034
- Sigstore integration time:
-
Permalink:
RayanR000/ytxt@d7e93e782291a53f6932d553733573ac6b1aae4c -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/RayanR000
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d7e93e782291a53f6932d553733573ac6b1aae4c -
Trigger Event:
push
-
Statement type:
File details
Details for the file ytxt-0.2.2-py3-none-any.whl.
File metadata
- Download URL: ytxt-0.2.2-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18b93e48b4bf573c4b6404bc9058bf623555dc5c547a1618997bac1bc34869ad
|
|
| MD5 |
45977cf33569ded1416337122c0d539d
|
|
| BLAKE2b-256 |
7c311d1570de35dbcd788717a3eb52f9dd44b4f49ac09e6dc38eccbee4be7879
|
Provenance
The following attestation bundles were made for ytxt-0.2.2-py3-none-any.whl:
Publisher:
publish.yml on RayanR000/ytxt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ytxt-0.2.2-py3-none-any.whl -
Subject digest:
18b93e48b4bf573c4b6404bc9058bf623555dc5c547a1618997bac1bc34869ad - Sigstore transparency entry: 1615945043
- Sigstore integration time:
-
Permalink:
RayanR000/ytxt@d7e93e782291a53f6932d553733573ac6b1aae4c -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/RayanR000
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d7e93e782291a53f6932d553733573ac6b1aae4c -
Trigger Event:
push
-
Statement type: