transcribe
它能做什么
这项技能把音频或视频文件中的录音转换为文字。适合需要书面笔记、文字稿,或带有说话人标注的访谈和会议记录的人。
适用场景
- ✓当你有一段会议或访谈录音,需要文字稿时。
- ✓当你需要知道多人对话中是谁说了什么时。
- ✓当你想从视频或音频文件中提取文字的时候。
技能链接
https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/media/transcribe/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请转录我的访谈录音,并在每段话旁标注是谁在说话。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体使用 OpenAI 模型运行随附的转录命令;当你要求带说话人标签的输出时,它会切换到该模式,然后检查结果并保存到文件夹中。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Audio Transcribe
Transcribe audio using OpenAI, with optional speaker diarization when requested. Prefer the bundled CLI for deterministic, repeatable runs.
Workflow
- Collect inputs: audio file path(s), desired response format (text/json/diarized_json), optional language hint, and any known speaker references.
- Verify
OPENAI_API_KEYis set. If missing, ask the user to set it locally (do not ask them to paste the key). - Run the bundled
transcribe_diarize.pyCLI with sensible defaults (fast text transcription). - Validate the output: transcription quality, speaker labels, and segment boundaries; iterate with a single targeted change if needed.
- Save outputs under
output/transcribe/when working in this repo.
Decision rules
- Default to
gpt-4o-mini-transcribewith--response-format textfor fast transcription. - If the user wants speaker labels or diarization, use
--model gpt-4o-transcribe-diarize --response-format diarized_json. - If audio is longer than ~30 seconds, keep
--chunking-strategy auto. - Prompting is not supported for
gpt-4o-transcribe-diarize.
Output conventions
- Use
output/transcribe/<job-id>/for evaluation runs. - Use
--out-dirfor multiple files to avoid overwriting.
Dependencies (install if missing)
Prefer uv for dependency management.
uv pip install openai
If uv is unavailable:
python3 -m pip install openai
Environment
OPENAI_API_KEYmust be set for live API calls.- If the key is missing, instruct the user to create one in the OpenAI platform UI and export it in their shell.
- Never ask the user to paste the full key in chat.
Skill path (set once)
export CODEX_HOME="${CODEX_HOME:-$HOME/.codex}"
export TRANSCRIBE_CLI="$CODEX_HOME/skills/transcribe/scripts/transcribe_diarize.py"
User-scoped skills install under $CODEX_HOME/skills (default: ~/.codex/skills).
CLI quick start
Single file (fast text default):
python3 "$TRANSCRIBE_CLI" \
path/to/audio.wav \
--out transcript.txt
Diarization with known speakers (up to 4):
python3 "$TRANSCRIBE_CLI" \
meeting.m4a \
--model gpt-4o-transcribe-diarize \
--known-speaker "Alice=refs/alice.wav" \
--known-speaker "Bob=refs/bob.wav" \
--response-format diarized_json \
--out-dir output/transcribe/meeting
Plain text output (explicit):
python3 "$TRANSCRIBE_CLI" \
interview.mp3 \
--response-format text \
--out interview.txt
Reference map
references/api.md: supported formats, limits, response formats, and known-speaker notes.
常见问题
我需要设置什么?
需要在环境中设置 OpenAI API 密钥。这项技能要求你自己设置,而不是把密钥粘贴到聊天中。
它能区分说话人吗?
能。要添加说话人标签,它会使用说话人区分模型,你还可以提供已知说话人的样本作为提示。
它能处理长录音吗?
能。对于超过约 30 秒的音频,它会保持自动分段。
详情
作者的原始描述
Transcribe audio files to text with optional diarization and known-speaker hints. Use when a user asks to transcribe speech from audio/video, extract text from recordings, or label speakers in interviews or meetings.
热度
- GitHub 星标
- 33k
- 排名
- #8861
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
owasp-security
33k教你的智能体掌握面向网页应用、API、移动端、容器和 AI 智能体的 OWASP 安全指南,以便发现常见弱点并提出修复建议。
agent-management
33k让你的智能体使用 AI Maestro 命令行工具创建、列出、休眠、唤醒、重命名和删除 AI 智能体,管理每个智能体的生命周期。
agent-messaging
33k让你的智能体使用智能体消息协议,在 AI 智能体之间发送、接收和回复带签名的消息,大部分在你自己的电脑上完成。
docs-search
33k让你的智能体搜索自动生成的代码文档,查找函数签名、类定义和注释,从而在修改代码之前核对真实的 API。