跳到正文
Skillpedia
音频与语音33k · #8861

transcribe

它能做什么

这项技能把音频或视频文件中的录音转换为文字。适合需要书面笔记、文字稿,或带有说话人标注的访谈和会议记录的人。

适用场景

  • ✓当你有一段会议或访谈录音,需要文字稿时。
  • ✓当你需要知道多人对话中是谁说了什么时。
  • ✓当你想从视频或音频文件中提取文字的时候。

技能链接

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/media/transcribe/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/media/transcribe/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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

  1. Collect inputs: audio file path(s), desired response format (text/json/diarized_json), optional language hint, and any known speaker references.
  2. Verify OPENAI_API_KEY is set. If missing, ask the user to set it locally (do not ask them to paste the key).
  3. Run the bundled transcribe_diarize.py CLI with sensible defaults (fast text transcription).
  4. Validate the output: transcription quality, speaker labels, and segment boundaries; iterate with a single targeted change if needed.
  5. Save outputs under output/transcribe/ when working in this repo.

Decision rules

  • Default to gpt-4o-mini-transcribe with --response-format text for 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-dir for 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_KEY must 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.

repo: davila7/claude-code-templates

热度

GitHub 星标
33k
排名
#8861
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能