CLIリファレンス

speechバイナリは、すべての音声処理タスクのメインエントリーポイントです。make buildでビルド後、.build/release/speechから実行します。

transcribe

音声ファイルをテキストに文字起こしします。

speech transcribe <file> [options]
オプションデフォルト説明
<file>文字起こしする音声ファイル(WAV、M4A、MP3、CAF)
--engineqwen3ASRエンジン: qwen3, qwen3-coreml, parakeet, nemotron, omnilingual, cohere, voxtral, moss, whisper
--model, -m0.6Bモデルバリアント: 0.6B1.7B、またはHuggingFace完全モデルID(qwen3のみ) [whisper]: default, turbo, or full CoreML HuggingFace repo ID.
[cohere/voxtral]: INT5(デフォルト)、INT8、FP16、Hugging Face モデル ID、またはローカルディレクトリ. [moss coreml]: int8(既定)または fp16[moss mlx]: int5(既定)または int8。互換性のある Hugging Face リポジトリ ID またはローカルディレクトリも指定できます。
--max-tokensCoreML: 512
MLX: 5120
[moss] が生成する文字起こしトークンの最大数。
--kv-cachefp16[moss mlx] 動的 KV キャッシュ精度:fp16 または int8
--language言語ヒント(オプション、omnilingualでは無視)
--window10[omnilingual] CoreMLウィンドウサイズ(秒): 5 または 10
--backendcoreml[omnilingual] バックエンド: coreml(Neural Engine)または mlx(Metal GPU)
[moss] CoreML は固定 1,024-token 状態、MLX は動的 131,072-token コンテキストを使用します。
--variant300M[omnilingual mlx] サイズ: 300M1B3B、または 7B
--bits4[omnilingual mlx] 量子化ビット: 4 または 8
--streamVAD付きストリーミング文字起こしを有効化
--max-segment10最大セグメント長(秒、streaming時)
--partial発話中に部分結果を出力(streaming時)

例:

# 基本的な文字起こし
speech transcribe recording.wav

# より大きなモデルを使用
speech transcribe recording.wav --model 1.7B

# CoreMLエンコーダー(Neural Engine + MLXデコーダー)
speech transcribe recording.wav --engine qwen3-coreml

# Parakeet(CoreML)エンジンを使用
speech transcribe recording.wav --engine parakeet

# Omnilingual(CoreML、1,672言語)
speech transcribe recording.wav --engine omnilingual                              # 10秒ウィンドウ
speech transcribe recording.wav --engine omnilingual --window 5                     # 5秒ウィンドウ

# Omnilingual(MLX、最大40秒まで任意の長さ)
speech transcribe recording.wav --engine omnilingual --backend mlx                              # 300M @ 4-bit
speech transcribe recording.wav --engine omnilingual --backend mlx --variant 1B                  # 1B @ 4-bit
speech transcribe recording.wav --engine omnilingual --backend mlx --variant 3B --bits 8         # 3B @ 8-bit
speech transcribe recording.wav --engine omnilingual --backend mlx --variant 7B                  # 7B @ 4-bit

# Cohere Transcribe 2B (MLX、デフォルトは INT5)
speech transcribe recording.wav --engine cohere
speech transcribe recording.wav --engine cohere --model int8 --language de

# Voxtral Mini 3B (MLX、デフォルトは INT5)
speech transcribe recording.wav --engine voxtral
speech transcribe recording.wav --engine voxtral --model int8 --language fr

# MOSS Transcribe Diarize(CoreML 短形式)
speech transcribe recording.wav --engine moss
speech transcribe recording.wav --engine moss --model fp16

# MOSS Transcribe Diarize(MLX 128K オフラインコンテキスト、INT5 が既定)
speech transcribe meeting.wav --engine moss --backend mlx
speech transcribe meeting.wav --engine moss --backend mlx --model int8 --kv-cache int8

# Whisper Large-v3 Turbo (CoreML)
speech transcribe recording.wav --engine whisper
speech transcribe recording.wav --engine whisper --model turbo --language de

# VAD付きストリーミング
speech transcribe recording.wav --stream --partial

align

単語レベルの強制整列 — すべての単語の正確なタイムスタンプを取得します。

speech align <file> [options]
オプションデフォルト説明
<file>音声ファイル
--text, -t整列するテキスト(省略時は最初に文字起こし)
--model, -m0.6B文字起こし用ASRモデル: 0.6B1.7B、または完全ID
--aligner-model強制整列モデルID
--language言語ヒント

例:

# 自動文字起こし後に整列
speech align recording.wav

# 既知のテキストで整列
speech align recording.wav --text "Can you guarantee that the replacement part will be shipped tomorrow?"

speak

音声合成。

speech speak "<text>" [options]
オプションデフォルト説明
<text>合成するテキスト(--batch-file使用時はオプション)
--engineqwen3TTSエンジン: qwen3cosyvoicevoxcpm2indextts2indic-miomagpie、または magpie-coreml
--output, -ooutput.wav出力WAVファイルパス
--languageenglish言語。--speaker設定時は省略すると話者のネイティブ方言を使用します。
--streamストリーミング合成を有効化
--voice-sample音声クローン用の参照音声(qwen3cosyvoicevoxcpm2, f5, higgsindextts2 で動作)
--verbose詳細なタイミング情報を表示

Qwen3-TTSオプション

オプションデフォルト説明
--modelbaseモデルバリアント: basecustomVoice、またはHF完全モデルID
--speaker話者音声(--model customVoiceが必要)
--instructスタイル指示(CustomVoiceモデル)
--list-speakers利用可能な話者を一覧表示して終了
--temperature0.3サンプリング温度
--top-k50top-kサンプリング
--max-tokens500最大トークン数(500 = 約40秒の音声)
--batch-fileバッチ合成用の1行1テキストファイル
--batch-size4並列生成の最大バッチサイズ
--first-chunk-frames3ストリーム最初のchunkのコーデックフレーム数
--chunk-frames25ストリームchunkあたりのコーデックフレーム数

CosyVoice3オプション

オプションデフォルト説明
--speakersマルチ話者対話の話者マッピング: s1=alice.wav,s2=bob.wav
--cosy-instructスタイル指示(デフォルトを上書き)。CosyVoice3の音声スタイルを制御します。
--turn-gap0.2対話ターン間の無音ギャップ(秒)
--crossfade0.0ターン間のクロスフェードオーバーラップ(秒)
--model-idHuggingFaceモデルID

IndexTTS2 オプション

IndexTTS2 は拡張 MLX バンドルを使う zero-shot 音声クローンエンジンです。--voice-sample が必須で、現在はバッチ合成のみです。

オプションデフォルト説明
--indextts2-model-idaufklarer/IndexTTS2-MLX-fp16HuggingFace モデル ID。既定値は aufklarer/IndexTTS2-MLX-fp16
--indextts2-bundle-dirHugging Face からダウンロードせず、ローカルの拡張バンドルを読み込みます。
--indextts2-emotion-audio任意の感情/スタイル参照音声。既定では話者参照を使います。
--indextts2-emotion任意のプリセットまたは 8 値の感情ベクトル。eagerhappyexcitedcalm など。
--indextts2-emotion-weight1.0--indextts2-emotion をスケールします。話者同一性が重要な場合は控えめにします。
--indextts2-speaking-rate1.00.5 から 1.5 の話速倍率。1.0 より大きい値は高速です。
--indextts2-max-pause長い内部低エネルギーポーズの任意上限(秒)。
--indextts2-s2mel-steps15S2Mel フローステップ数(デフォルト 15・聴感検証済み、25 で上流と完全一致)

F5-TTS オプション

オプションデフォルト説明
--f5-reference-text参照書き起こし:--voice-sample の内容(必須)
--f5-steps16フローマッチングステップ数(デフォルト 16、最高忠実度は 32)
--f5-cfg-strength2.0クラシファイアフリーガイダンス強度
--f5-sway-1.0Sway サンプリング係数
--f5-speed1.0話速倍率
--f5-seed0再現可能な出力のためのシード
--f5-target-rms0.1参照音声の RMS 正規化ターゲット
--f5-model-idHugging Face モデル ID
--f5-bundle-dirローカルディレクトリからバンドルを読み込む

Higgs TTS 3 オプション

オプションデフォルト説明
--higgs-ref-text参照書き起こし:--voice-sample の内容(クローン品質が向上)
--higgs-temperature0.8サンプリング温度(デフォルト 0.8)
--higgs-top-pNucleus サンプリングしきい値(デフォルト無効)
--higgs-top-kTop-k サンプリング上限(デフォルト無効)
--higgs-max-new-tokens2048生成する音声フレームの上限(毎秒 25 フレーム)
--higgs-seed0再現可能な出力のためのシード
--higgs-model-idHugging Face モデル ID
--higgs-bundle-dirローカルディレクトリからバンドルを読み込む

例:

# 基本的なTTS
speech speak "Hello, world!" --output hello.wav

# 音声クローン(Qwen3-TTS)
speech speak "Hello in your voice" --voice-sample reference.wav -o cloned.wav

# 音声クローン(CosyVoice)
speech speak "Hello in your voice" --engine cosyvoice --voice-sample reference.wav -o cloned.wav

# CosyVoice多言語
speech speak "Hallo Welt" --engine cosyvoice --language german -o hallo.wav

# マルチ話者対話
speech speak "[S1] Hello there! [S2] Hey, how are you?" \
    --engine cosyvoice --speakers s1=alice.wav,s2=bob.wav -o dialogue.wav

# インライン感情/スタイルタグ
speech speak "(excited) Wow, amazing! (sad) But I have to go..." \
    --engine cosyvoice -o emotion.wav

# 組み合わせ: 対話 + 感情 + 音声クローン
speech speak "[S1] (happy) Great news! [S2] (surprised) Really?" \
    --engine cosyvoice --speakers s1=alice.wav,s2=bob.wav -o combined.wav

# カスタムスタイル指示
speech speak "Hello world" --engine cosyvoice --cosy-instruct "Speak cheerfully" -o cheerful.wav

# ストリーミング合成
speech speak "Long text here..." --stream

# ファイルからバッチ合成
speech speak --batch-file texts.txt --batch-size 4

kokoro

Neural Engine(CoreML)上でKokoro-82Mを使用する軽量音声合成。非自己回帰型 — 単一のforward pass、約45msのレイテンシ。

speech kokoro "<text>" [options]
オプションデフォルト説明
<text>合成するテキスト
--voiceaf_heartボイスプリセット(10言語にわたる50種類が利用可能)
--languageen言語コード: en、es、fr、hi、it、ja、pt、zh、ko、de
--output, -okokoro_output.wav出力WAVファイルパス
--list-voices利用可能なすべてのボイスを一覧表示して終了
--model, -mHuggingFaceモデルID

例:

# 基本的なKokoro TTS
speech kokoro "Hello, world!" --voice af_heart -o hello.wav

# フランス語のボイス
speech kokoro "Bonjour le monde" --voice ff_siwis --language fr -o bonjour.wav

# 全50ボイスを一覧表示
speech kokoro --list-voices

respond

PersonaPlex 7Bを使用したfull-duplex音声間対話。

speech respond [options]
オプションデフォルト説明
--input, -i入力音声WAVファイル(24kHzモノラル)(必須)
--output, -oresponse.wav出力レスポンスWAVファイル
--voiceNATM0ボイスプリセット(例: NATM0、NATF1、VARF0)
--system-promptassistantプリセット: assistantfocusedcustomer-serviceteacher
--system-prompt-textカスタムシステムプロンプトテキスト(プリセットを上書き)
--max-steps20012.5Hzでの最大生成ステップ(約16秒)
--stream生成中に音声chunksを出力
--compileコンパイル済みtransformerを有効化(ウォームアップ + カーネル融合)
--list-voices利用可能なボイスプリセットを一覧表示
--list-prompts利用可能なシステムプロンプトプリセットを一覧表示
--transcriptモデルの内部モノローグテキストを出力
--jsonJSON形式で出力(transcript、レイテンシ、音声パス)
--verbose詳細なタイミング情報を表示

サンプリングの上書き

オプションデフォルト説明
--audio-temp0.8音声サンプリング温度
--text-temp0.7テキストサンプリング温度
--audio-top-k250音声top-k候補
--repetition-penalty1.2音声反復ペナルティ(1.0 = 無効)
--text-repetition-penalty1.2テキスト反復ペナルティ(1.0 = 無効)
--repetition-window30反復ペナルティウィンドウ(フレーム)
--silence-early-stop15早期停止前の無音フレーム(0 = 無効)
--entropy-threshold0早期停止用のテキストエントロピー閾値(0 = 無効)
--entropy-window10早期停止前の連続低エントロピーステップ数

例:

# 基本的な音声間変換
speech respond --input question.wav

# コンパイル済みtransformerで女性ボイスを使用
speech respond -i question.wav --voice NATF1 --compile

# レスポンスをstreamingし、transcriptを表示
speech respond -i question.wav --stream --transcript --verbose

vad

Pyannoteセグメンテーションを使用したオフラインの音声区間検出。

speech vad <file> [options]
オプション説明
<file>解析する音声ファイル
--model, -mHuggingFaceモデルID
--onset開始閾値(発話開始)
--offset終了閾値(発話終了)
--min-speech最小発話時間(秒)
--min-silence最小無音時間(秒)
--jsonJSON形式で出力

vad-stream

Silero VAD v5を使用したストリーミング音声区間検出。32msチャンクで音声を処理します。

speech vad-stream <file> [options]
オプション説明
<file>解析する音声ファイル
--engineVADエンジン: mlx(デフォルト)または coreml
--model, -mHuggingFaceモデルID(エンジンに基づいて自動選択)
--onset開始閾値
--offset終了閾値
--min-speech最小発話時間(秒)
--min-silence最小無音時間(秒)
--jsonJSON形式で出力

wake

KWS Zipformer を使用したオンデバイスのキーワード検出(3.49Mパラメータ、CoreML INT8、リアルタイムの26倍、英語のみ)。

speech wake <file> [options]
オプション説明
<file>解析する音声ファイル
--keywords1つ以上のキーワード。フォーマット:"hey soniqo""hey soniqo:0.15:0.5"、または "LIGHT UP|▁ L IGHT ▁UP:0.25:2.0"(sherpa-onnx形式の明示的なBPEピース)
--keywords-fileキーワードファイル、1行1エントリ
--model, -mHuggingFaceモデルID。デフォルト:aufklarer/KWS-Zipformer-3M-CoreML-INT8
--jsonJSON形式で出力

diarize

話者ダイアライゼーション — 誰がいつ話したかを識別します。

speech diarize <file> [options]
オプションデフォルト説明
<file>解析する音声ファイル
--enginepyannoteダイアライゼーションエンジン: pyannotecommunity1(CoreML + ネイティブPLDA/VBx)、またはsortformer
--community1-compute-unitsaneCommunity-1 CoreMLの計算ユニット: anecpugpuall
--num-speakersCommunity-1の既知の正確な話者数
--min-speakers1Community-1の最小話者数
--max-speakersCommunity-1の最大話者数
--target-speaker対象話者抽出用の登録音声(pyannoteのみ)
--embedding-enginemlx話者embeddingエンジン: mlx または coreml(pyannoteのみ)
--vad-filterSilero VADで事前フィルタ(pyannoteのみ)
--rttmRTTM形式で出力
--jsonJSON形式で出力
--score-againstDER計算用のリファレンスRTTMファイル

例:

# 基本的なダイアライゼーション(pyannote、デフォルト)
speech diarize meeting.wav

# エンドツーエンドSortformer(CoreML、Neural Engine)
speech diarize meeting.wav --engine sortformer

# 評価用のRTTM出力
speech diarize meeting.wav --rttm

# 対象話者抽出(pyannoteのみ)
speech diarize meeting.wav --target-speaker enrollment.wav

# リファレンスに対してスコアリング
speech diarize meeting.wav --score-against reference.rttm

embed-speaker

音声から話者embeddingベクトルを抽出します。

speech embed-speaker <file> [options]
オプション説明
<file>話者の声を含む音声ファイル
--engineWeSpeaker 256次元は mlx(デフォルト)または coreml、永続的な話者識別 CoreML 192次元は redimnet2、CAM++ CoreML 192次元は camplusplus
--jsonJSON形式で出力

denoise

Neural Engine上のDeepFilterNet3を使用して背景ノイズを除去します。

speech denoise <file> [options]
オプションデフォルト説明
<file>入力音声ファイル
--output, -oinput_clean.wav出力ファイルパス
--model, -mHuggingFaceモデルID

例:

speech denoise noisy-recording.wav -o clean.wav

compose

Generate 30 s of music from a text prompt using MAGNeT on MLX.

speech compose <prompt> [options]
OptionDefaultDescription
<prompt>Text prompt describing the music to generate (e.g. "happy rock")
--output, -omagnet.wavOutput WAV path (32 kHz mono)
--variantsmall-int4Model variant: small-int4, small-int8, medium-int4, or medium-int8. Resolves to aufklarer/MAGNeT-{Small,Medium}-30secs-MLX-{4,8}bit.
--temperature3.0Sampling temperature, annealed linearly per stage.
--top-p0.9Nucleus sampling threshold.
--cfg-max10.0Max classifier-free guidance coefficient.
--cfg-min1.0Min CFG coefficient (annealed alongside the mask schedule).
--steps20,10,10,10Comma-separated decoding iterations per codebook (4 values).
--seedRandom seed for reproducible output.

Examples:

# Default: small-int4, ~10 s wall on M-series for a 30 s clip
speech compose "happy rock" -o happy_rock.wav

# Larger model — better prompt following, slower
speech compose "lo-fi hip hop with mellow piano" --variant medium-int4 -o lofi.wav

# Reproducible
speech compose "energetic EDM with synth lead" --seed 42 -o edm.wav

transcribe-batch

音声ディレクトリを一括で文字起こし。モデルの読み込みは 1 回だけです。

speech transcribe-batch <input-dir> [options]
オプションデフォルト説明
<input-dir>文字起こし対象の音声ファイルディレクトリ(WAV、FLAC など)
--output-dir書き起こしの出力ディレクトリ
--engineqwen3ASR エンジン(transcribe と同じ値)
--jsonl結果を JSON lines で出力(1 ファイル 1 行)

restore

Sidon で音声を復元(ノイズ除去+残響除去)— CoreML、48 kHz 出力。

speech restore <audio-file> [options]
オプションデフォルト説明
--output, -oinput_restored.wav出力 WAV ファイルパス(48 kHz)
--variantfp16精度 / バンドルのバリアント

separate

楽曲をステムに分離(vocals、drums、bass、other)。

speech separate <input> [options]
オプションデフォルト説明
--stemsvocals,drums,bass,other抽出するステム:vocals、drums、bass、other
--engineumxエンジン:umx(デフォルト)または htdemucs(高品質)
--output-dir書き起こしの出力ディレクトリ

upsample

FlashSR による音声超解像 — 1 ステップ蒸留 AudioSR、48 kHz 出力。

speech upsample <audio-file> [options]
オプションデフォルト説明
--output, -ohr.wav出力 WAV ファイルパス(48 kHz)
--variantint4精度 / バンドルのバリアント
--seed再現可能な出力のためのシード

qwen3-tts-coreml

CoreML 上の Qwen3-TTS でテキスト読み上げ(Neural Engine)。

speech qwen3-tts-coreml "<text>" [options]
オプションデフォルト説明
--output, -ooutput.wav出力 WAV ファイルパス
--languageenglish出力言語
--modelHugging Face モデル ID

vibevoice

Microsoft VibeVoice でテキスト読み上げ(MLX)。

speech vibevoice "<text>" --voice-cache <cache> [options]
オプションデフォルト説明
--voice-cache, -vvibevoice-encode-voice で作成したボイスキャッシュ(必須)
--stepsDPM-Solver の推論ステップ数(多いほど高品質)
--cfg1.3クラシファイアフリーガイダンス強度
--long-form長文向けのチャンク分割ロングフォーム合成

vibevoice-encode-voice

参照録音と書き起こしから VibeVoice ボイスキャッシュを作成。

speech vibevoice-encode-voice <input> "<transcript>" [options]
オプションデフォルト説明
<input>参照音声ファイル
<transcript>参照音声の書き起こし(英語のみ)
--output, -o出力ボイスキャッシュ(.safetensors)

translate

MADLAD-400 でテキストをターゲット言語へ翻訳(MLX)。

speech translate "<text>" --to <lang> [options]
オプションデフォルト説明
--to, -tターゲット言語コード(ISO 639-1、例:es、zh、ja)
--streamデコードしながらストリーミング出力
--modelHugging Face モデル ID

avatar-motion

音声から NVIDIA Audio2Face-3D のアバターモーション係数フレームを生成。

speech avatar-motion <input> [options]
オプションデフォルト説明
--output, -oavatar-motion.jsonl出力 JSONL ファイルパス
--model…James-MLXアバターのアイデンティティバンドル(デフォルト James、他に Claire と Mark)
--verboseタイミングとフレーム数を表示