labali-whisper-transcribe-media
Treat this skill as a deterministic local transcription runner.
Required Constraints
- Accept one local media input path (file or directory).
- Support both audio and video inputs.
- If input is video, extract audio with ffmpeg first.
- Run Whisper CLI for transcription.
- For directory input, scan media files recursively and process in deterministic script mode.
- Default to
--output_format allso plain text and timeline subtitles are generated together. - Default output directory to
<input_stem>_subtitlesunder the same parent directory when--output_textis not provided. - Skip media that already has
<input_stem>_subtitles/<input_stem>.txtby default in batch mode. - Pass
--languageonly when user explicitly asks for a language. - If language is not specified, omit
--languageand let Whisper auto-detect. - Keep execution script-driven after parameters are fixed; do not add extra reasoning loops.
- Monitor script output and wait until command completion.
NEVER
- Never pass a video file directly to Whisper — always extract audio with ffmpeg first.
- Never pass
--languageunless the user explicitly specified a language — omit it and let Whisper auto-detect. - Never fabricate a transcript result — surface command failures verbatim.
Runtime Inputs
Use skill.yaml as input schema source of truth.
Execution
Use wrapper:
npx tsx skills/private/labali-whisper-transcribe-media/scripts/run.ts \
--input_path "/path/to/media_or_directory" \
[--output_text "/path/to/output.txt"] \
[--language "Chinese"] \
[--model "medium"] \
[--task "transcribe"] \
[--output_format "all"] \
[--parallel 2] \
[--retry 1] \
[--dry_run] \
[--force]
Wrapper delegates to:
scripts/transcribe-media.sh
Dependencies
whisperCLI (openai-whisper)ffmpeg(required only for video input)
Success Criteria
A run is successful only when all conditions hold:
- Input media file exists.
- Audio input runs directly with Whisper.
- Video input extracts audio and then runs Whisper.
- For directory input, media files are discovered recursively and processed with optional concurrency.
- Output transcript files are produced (default includes
txt,srt, andvtt) in<input_stem>_subtitles/. - Existing results are skipped by default in batch mode unless
--forceis used. - Failed items are retried according to
--retryand surfaced in summary. --dry_runlists pending media without executing transcription.- Command exits with status code 0.