transcription
Use faster-whisper transcription APIs for ASR, batched inference, timestamps, VAD, language detection, audio decoding, and CPU or CUDA runtime choices.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- transcription
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Use faster-whisper transcription APIs for ASR, batched inference, timestamps, VAD, language detection, audio decoding, and CPU or CUDA runtime choices.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/api-reference.md7.9 KB
- 参考文档references/troubleshooting.md6.7 KB
- 参考文档references/workflows.md6.2 KB
- 脚本scripts/transcribe_audio.py5.7 KB
03 SKILL.md 正文
faster-whisper Transcription
Use this sub-skill when the task is to transcribe, translate, segment, timestamp,
or inspect audio with the faster-whisper Python package. It covers the public
WhisperModel, BatchedInferencePipeline, decode_audio, and VAD/timestamp
surfaces. Use the root skill for installation, backend setup, and model
management decisions that are not specific to one transcription call.
Read first when
- The user mentions
WhisperModel,BatchedInferencePipeline,decode_audio, VAD, word-level timestamps, hotwords, clip timestamps, language detection, translation,compute_type, or CPU/CUDA transcription. - The user has an audio path, file-like object, or NumPy waveform and wants text segments, word timestamps, language probabilities, or batched throughput.
- The user reports confusing behavior such as an empty result because the
segment generator was not consumed, CUDA compute-type errors, audio decode
failures, VAD needing
onnxruntime, or mismatched batched defaults.
Route map
- Read references/api-reference.md for verified signatures, return objects, option defaults, model aliases, and utility APIs.
- Read references/workflows.md for copyable recipes: standard transcription, batched transcription, VAD, word timestamps, hotwords, multilingual/translation, clip timestamps, stereo decoding, logging, and local model paths.
- Read references/troubleshooting.md for symptoms, likely causes, and recovery steps for model downloads, generator consumption, audio/PyAV, VAD/ONNX, CUDA/cuDNN/compute types, language/task choices, batching defaults, and long-audio handling.
- Run or adapt scripts/transcribe_audio.py when a
future task needs a bundled command-line transcription helper instead of a
prose-only recipe. The helper is safe to inspect with
--help; real transcription may download or load a model. - For install and backend setup, read ../../references/installation-and-backends.md.
- For model aliases, download/cache behavior, local CTranslate2 model paths, and conversion recipes, read ../../references/model-management.md.
Quick workflow
- Choose a model source:
- A public alias such as
tiny,base,small,medium,large-v3,turbo, ordistil-large-v3. - A Hugging Face repository id for a CTranslate2-converted Whisper model.
- A local CTranslate2 model directory.
- A public alias such as
- Choose runtime:
- CPU:
device="cpu", usuallycompute_type="int8"or"float32". - CUDA:
device="cuda", usuallycompute_type="float16","int8_float16", or another CTranslate2-supported type when NVIDIA CUDA/cuDNN libraries are available. device="auto"is convenient for exploratory code, but use an explicit device in reproducible instructions or when troubleshooting.
- CPU:
- Instantiate
WhisperModelfor ordinary transcription or wrap it inBatchedInferencePipelinefor chunked batched inference. - Call
transcribe(...)and always consume the returned segment generator withlist(segments)or aforloop. The actual transcription starts when the generator is iterated. - Validate
TranscriptionInfo(language,language_probability,duration,duration_after_vad) and the segment fields (start,end,text, optionalwords).
Minimal API pattern:
from faster_whisper import WhisperModel
model = WhisperModel("tiny", device="cpu", compute_type="int8")
segments, info = model.transcribe("audio.mp3", beam_size=5, language="en")
segments = list(segments) # transcription runs here
print(info.language, info.language_probability)
for segment in segments:
print(f"[{segment.start:.2f} -> {segment.end:.2f}] {segment.text}")
Important decisions
- Use
word_timestamps=Truewhen word-level timing is required; then inspectsegment.wordsand validate monotonic times. - Use
vad_filter=TrueonWhisperModel.transcribeonly when silence removal is desired;BatchedInferencePipeline.transcribedefaults tovad_filter=True. - Use
without_timestamps=Falsefor timestamped output.WhisperModeldefaults to timestamped behavior;BatchedInferencePipelinedefaults towithout_timestamps=True. - Set
languagewhen known to avoid language-detection uncertainty; usetask="translate"only when English translation is desired. - Prefer
clip_timestampsfor explicit audio windows:WhisperModelaccepts a comma-separated string such as"0,30,45,60"; batched transcription accepts a list of dictionaries like[{"start": 0.0, "end": 30.0}]. - For stereo diarization-like workflows, call
decode_audio(path, split_stereo=True), transcribe left and right arrays separately, and keep the channel labels outsidefaster-whisper.
Boundaries and omissions
This sub-skill does not cover heavy speed, memory, or WER benchmarking as a runtime workflow. Those scripts require large model downloads, benchmark data, GPU telemetry, or external datasets. Treat benchmark numbers as context, not as required behavior for normal transcription tasks.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).