media-to-transcript
Skill147 starsChanged 4 months agoMITView on GitHub
Convert audio/video URLs or local media into corrected Markdown transcripts through Volcengine recording-file ASR 2.0. Reuses the existing video-transcript downloader for Bilibili, Douyin, Xiaohongshu, YouTube, extracts audio when input is video, uploads local audio to R2, splits media longer than 3 minutes into parallel AUC tasks, submits volc.seedasr.auc with compact source context, then performs AI correction with topic/context/glossary. Use when the user asks for "逐字稿", "提取逐字稿", "视频转文字", "音频转文字", "转写", "听写视频", "提取视频文案", or wants a polished transcript.
- Reads credentials
In this repository12 other files it gives its agents.
- audio-to-subtitlesSkill
- content-remixSkill
- douyin-coverSkill
- hook-writingSkill
- hyperframes-scene-animatorSkill
- minimax-voice-directorSkill
- musicSkill
- obsidian-basesSkill
- talking-head-hyperframesSkill
- video-scriptSkill
- video-transcriptSkill
- viral-video-benchmarkSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 5 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this skill to turn audio or video into a final Markdown transcript.
- Distinctive: line 14
Do not use another ASR backend for this skill.
- Distinctive: line 18
Run the doctor if this is the first run, after environment changes, or after an error:
- Distinctive: line 25
Run the pipeline from the notes vault root:
- Very specific: line 36
Read the generated correction-prompt.md and raw-transcript.md.
- Very specific: line 116
If --doctor does not find this API key, use this setup path:
- Very specific: line 120
Put the key into your workspace .env.r2 as VOLCENGINE_SPEECH_API_KEY=..., or export it in the shell before running the script.
- Very specific: line 130
Do not print API keys or copy .env.r2 values into chat.
- Very specific: line 134
Before writing transcript.md, read references/correction-guidelines.md.
- Distinctive: line 138
Do not summarize, rewrite into article prose, invent missing content, or remove substantive speech.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Media To Transcript
Use this skill to turn audio or video into a final Markdown transcript. The only ASR backend for this skill is Volcengine recording-file recognition 2.0:
- submit endpoint:
https://openspeech.bytedance.com/api/v3/auc/bigmodel/submit - query endpoint:
https://openspeech.bytedance.com/api/v3/auc/bigmodel/query - resource id:
volc.seedasr.auc
Do not use another ASR backend for this skill.
Workflow
- Run the doctor if this is the first run, after environment changes, or after an error:
SKILL_DIR="<SKILL_ROOT>/media-to-transcript"
rtk python3 "$SKILL_DIR/scripts/media_to_transcript.py" --doctor- Run the pipeline from the notes vault root:
SKILL_DIR="<SKILL_ROOT>/media-to-transcript"
rtk python3 "$SKILL_DIR/scripts/media_to_transcript.py" "<URL或本地媒体路径>" --topic "视频主题或关键词" --language zh-CNThe script automatically builds AUC context from available media metadata such as title, platform, author, duration, description, and short source URL. It keeps this ASR context under 500 Chinese characters. User-provided --topic, --context, and --context-file are also included in the same 500-character AUC context budget.
For downloaded or local media longer than 180 seconds, the script splits audio into 3-minute chunks, uploads each chunk, submits AUC tasks in parallel, and merges the returned utterances back onto the original timeline.
- Read the generated
correction-prompt.mdandraw-transcript.md. - Apply the AI correction rules in
references/correction-guidelines.md. - Save the corrected transcript to the
finalTranscriptTargetpath printed by the script, and show the full transcript to the user unless they explicitly only asked for a file.
CLI
SKILL_DIR="<SKILL_ROOT>/media-to-transcript"
# Video URL: download video, extract mp3, upload to R2, then run AUC ASR
rtk python3 "$SKILL_DIR/scripts/media_to_transcript.py" "https://www.bilibili.com/video/BVxxx" --topic "AI 编程工具评测"
# Local audio/video
rtk python3 "$SKILL_DIR/scripts/media_to_transcript.py" "/path/to/audio.mp3" --media-kind audio --topic "访谈"
# Add context or terminology hints for ASR and correction
rtk python3 "$SKILL_DIR/scripts/media_to_transcript.py" video.mp4 \
--topic "Claude Code 和 Codex 使用经验" \
--context "技术词: Codex, Claude Code, MCP, HyperFrames, R2" \
--context-file "AI Wiki/raw/some-material.md"
# Enable Volcengine utterance emotion labels when explicitly useful
rtk python3 "$SKILL_DIR/scripts/media_to_transcript.py" video.mp4 --emotion --topic "访谈"
# Convert an existing AUC result JSON into raw transcript + correction prompt
rtk python3 "$SKILL_DIR/scripts/media_to_transcript.py" --from-asr-json asr/auc-result.json --title "视频标题"Outputs
Each run writes a timestamped directory under outputs/ unless --out-dir is provided:
audio/: extracted/converted mp3 when the input is video or unsupported audioaudio/chunks/: 3-minute mp3 chunks when media exceeds 180 secondsasr/auc-submit.jsonorasr/auc-submit-001.json: submitted request metadata, with the API key omittedasr/auc-result.jsonorasr/auc-result-001.json: raw Volcengine recording-file recognition resultasr/auc-result-combined.json: merged AUC result for multi-chunk runsraw-transcript.md: transcript-shaped draft generated from AUC utterancescorrection-prompt.md: prompt for the AI correction passtranscript.md: target path for the final corrected transcriptrun-summary.json: machine-readable paths and metadata
The final user-facing artifact is transcript.md. Do not treat auc-result.json as final copy; it is ASR evidence for correction.
Options
| Option | Description | ||
--title <title> | Override detected title. | ||
--topic <text> | Topic/theme used during ASR context and correction. Can be repeated. | ||
--context <text> | Extra terminology or context for ASR/correction. Can be repeated. | ||
--context-file <path> | Read extra context from a local file. Can be repeated. | ||
--language <lang> | ASR language. Default: zh-CN. | ||
--speaker | Request speaker clustering when useful for interviews. | ||
--emotion | Enable AUC utterance emotion detection. Default: off. | ||
--chunk-seconds <seconds> | Split downloaded/local audio longer than this. Default: 180. | ||
--concurrency <n> | Parallel AUC chunk tasks. Default: 3. | ||
| `--media-kind <auto | audio | video>` | Force media kind. Default: auto. |
| `--download <auto | always | never>` | Download URL before ASR. Default: auto; direct public mp3/wav/ogg URLs may skip download. |
--out-dir <path> | Output directory. Default: skill outputs/<timestamp>-<title>. | ||
--r2-prefix <prefix> | R2 object prefix for uploaded local audio. | ||
--from-asr-json <path> | Skip download/ASR and build transcript artifacts from an existing AUC result JSON. | ||
--json | Print machine-readable summary to stdout. | ||
--doctor | Check dependencies and required env vars. |
API Setup
Preferred key location is your current workspace .env.r2, or any environment file loaded by the script:
VOLCENGINE_SPEECH_API_KEY=你的新版控制台APIKeyAccepted key names:
VOLCENGINE_SPEECH_API_KEY(preferred)VOLCENGINE_AUC_API_KEYSEEDASR_API_KEYAUC_API_KEY
If --doctor does not find this API key, use this setup path:
- Open 录音文件识别服务开通 and enable “录音文件识别 2.0”.
- Open API Key 管理 and create an API Key.
- Put the key into your workspace
.env.r2asVOLCENGINE_SPEECH_API_KEY=..., or export it in the shell before running the script.
Local files still need R2 because AUC requires a public audio URL:
R2_ACCESS_KEY_IDR2_SECRET_ACCESS_KEYR2_ACCOUNT_IDR2_BUCKETR2_PUBLIC_BASE_URLorR2_PUBLIC_URL
Do not print API keys or copy .env.r2 values into chat.
Correction Rules
Before writing transcript.md, read references/correction-guidelines.md. Core constraints:
- Correct ASR mistakes using topic/context/glossary and the surrounding transcript.
- Preserve spoken meaning, order,口语词, repeated words, and uncertainty.
- Do not summarize, rewrite into article prose, invent missing content, or remove substantive speech.
- Convert ASR utterance fragments into readable transcript paragraphs with section-level timestamps.
- Mark unresolved audio as
[听不清]instead of guessing.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

