Crafter Station Docs
ガイド

コマンドラインで YouTube 動画を文字起こしする

ローカルの Whisper モデルを使い、コマンド 1 つで任意の YouTube 動画(またはローカルの音声・動画ファイル)をテキスト、SRT 字幕、JSON に文字起こし。無料、プライベート、API キー不要。

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

このコマンドは、yt-dlp で動画の音声をダウンロードし、ffmpeg でクリーンアップし、ローカルの Whisper モデルで文字起こしします。.txt.srt.wav、JSON の出力が得られます。すべてローカルマシン上で動作します。無料、プライベート、API キー不要です。

初めて実行する場合は、最初に一度だけ初期化して Whisper モデルのサイズ(tiny 75MB から large 3GB まで)を選択します:

npx @crafter/trx init

trx はランタイムとして Bun を必要とします。

ローカルファイルも同じ方法で

npx @crafter/trx recording.mp4

テキストだけを JSON で取得する

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

他の言語

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

スクリプトと AI エージェント向け

trx はエージェントファーストです。JSON 出力、dry-run 検証、実行時のスキーマイントロスペクションを備えています。

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

完全なリファレンス:trx ドキュメント

このページの内容