Crafter Station Docs
Guides

Transcribe a YouTube video from the command line

Download and transcribe any YouTube video (or local audio/video file) to text, SRT subtitles, and JSON with one command, using a local Whisper model. Free, private, no API key.

npx @crafter/trx "https://youtube.com/watch?v=dQw4w9WgXcQ"

That downloads the video's audio with yt-dlp, cleans it with ffmpeg, and transcribes it with a local Whisper model. You get .txt, .srt, .wav, and JSON outputs. Everything runs on your machine: free, private, no API key.

First run? Initialize once to pick a Whisper model size (tiny 75MB to large 3GB):

npx @crafter/trx init

trx requires Bun as its runtime.

Local files work the same way

npx @crafter/trx recording.mp4

Get just the text, as JSON

npx @crafter/trx transcribe video.mp4 --fields text --output json

Other languages

npx @crafter/trx transcribe video.mp4 --language es

For scripts and AI agents

trx is agent-first: JSON output, dry-run validation, and runtime schema introspection.

npx @crafter/trx transcribe video.mp4 --dry-run --output json   # validate without executing
npx @crafter/trx schema transcribe                              # inspect the command schema

Full reference: trx docs.

On this page