Transcribe media

From jmagly/aiwg · View interactive version

Transcribe media is an AI agent skill from the GitHub repository jmagly/aiwg. Produce timestamped transcript sidecars for acquired audio/video with hashes, source metadata, speaker labels when available, and explicit degraded plans when STT tooling is missing

How to use this skill

Skill file

Transcribe Media

Create a research-grade transcript sidecar for a local acquired audio or video file. This primitive supports media-curator to research handoff. It does not claim transcription support unless an actual local STT tool, approved service adapter, human transcript, or diarization sidecar is available.

Inputs

Required:

Optional:

--min-speakers, --max-speakers, --diarize, --no-diarize.

--credential-provider env:HF_TOKEN or another environment variable name

supplied by an operator/vault wrapper. Never pass token values on argv.

Executable Adapter

Run local transcription with:

aiwg run skill transcribe-media -- run \
  --media /path/to/acquired-media.wav \
  --output .aiwg/media/transcripts/acquired-media.transcript.json \
  --source-url "https://example.invalid/source" \
  --adapter whisperx \
  --language en

Run diarized transcription when Hugging Face gated-model access is already

available through the environment:

HF_TOKEN="$TOKEN_FROM_OPERATOR_OR_VAULT" \
aiwg run skill transcribe-media -- run \
  --media /path/to/interview.wav \
  --output .aiwg/media/transcripts/interview.transcript.json \
  --adapter whisperx \
  --diarize \
  --credential-provider env:HF_TOKEN \
  --min-speakers 2 \
  --max-speakers 2

The adapter never accepts token literals as CLI arguments and never writes token

values to sidecars, degraded plans, logs, or provenance. It only records the

credential provider type and variable name.

Useful subcommands:

aiwg run skill transcribe-media -- preflight --media file.wav --output out.json --diarize
aiwg run skill transcribe-media -- convert-whisperx --input native.json --media file.wav --output out.json
aiwg run skill transcribe-media -- run --media file.wav --output out.json --diarize

Output

Write transcript sidecars under .aiwg/media/transcripts/ or beside the acquired media when the collection already stores sidecars locally.

Recommended filename: <media-basename>.transcript.json

Required fields:

Segment IDs MUST be stable. Use zero-padded sequential IDs such as seg-000001 unless the upstream transcript already has durable IDs.

Hashing

Speaker Labels

Preserve speaker labels when STT output, a diarization sidecar, or a human transcript provides them. If no diarization is available, emit the documented single-speaker fallback SPEAKER_00 and record the limitation in transcript.quality.limitations.

Do not invent speaker names. Replace SPEAKER_00 with real names only when metadata or human verification proves them.

Tooling Detection

Check for an available transcription path before generating text:

command -v whisperx || command -v whisper-cpp || command -v whisper || command -v vosk-transcriber || true
command -v ffmpeg || true

If no STT tool or approved transcript source is available, do not fabricate transcript text. Write or report an actionable plan with:

For WhisperX diarization, preflight MUST check gated-model authorization before

starting transcription. Missing env:<name> credentials produce a

blocked-credential-missing transcript plan before any expensive STT pass.

Verification Limits

A generated transcript is evidence of tool output, not proof of exact speech content. Handoff notes MUST state:

SPEAKER_00 and SPEAKER_01; it does not verify personal identity.

only after explicit metadata or human evidence supports the mapping.

Research Handoff

Include the transcript sidecar path, source media hash, transcript hash, source URL, acquisition metadata, quality status, and known limitations.

Fixture Example

See examples/sample.transcript.json for a minimal transcript sidecar with timestamps, speaker fallback, source URL, source hash, transcript hash, and provenance fields.

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.