trx: transcribe audio and video from the CLI
Agent-first CLI for audio and video transcription with local Whisper. Download, clean, and transcribe media from URLs or local files with machine-readable output.
trx downloads media with yt-dlp, cleans audio with ffmpeg, and transcribes it using a local Whisper model. It outputs .wav, .srt, .txt, and JSON, and it is designed for AI agents first: JSON output, dry-run validation, field filtering, and runtime schema introspection.
Install
bun add -g @crafter/trx
trx initQuick start
Transcribe a local file:
trx recording.mp4Transcribe from a URL (YouTube and anything yt-dlp supports):
trx "https://youtube.com/watch?v=..."Agent-friendly usage
Machine-readable output, designed to be called from scripts and AI agents:
# JSON output
trx transcribe video.mp4 --output json
# Only the text field
trx transcribe video.mp4 --fields text --output json
# Validate without executing
trx transcribe video.mp4 --dry-run --output json
# Inspect the command schema at runtime
trx schema transcribeLanguage support
trx transcribe video.mp4 --language esModel sizes
Whisper models range from tiny (75MB) to large (3GB). Pick the size that fits your accuracy and speed needs during trx init.
Links
Crafter Station Docs
Documentation for Crafter Station open source developer tools. CLIs and libraries built by the LatAm network of shippers.
Render Mermaid diagrams without a browser
Ultra-lightweight, zero-dependency Mermaid rendering engine. Parse, lay out, and render Mermaid diagrams in 30.5KB min+gzip, with no headless browser required.