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

speech

它能做什么

这项技能把文字生成为语音,例如演示视频的旁白或配音。适合需要为视频、应用或无障碍功能制作语音的创作者和团队。

适用场景

  • ✓当你需要根据脚本生成配音或旁白时。
  • ✓当你想把许多音频提示或台词一次性转换为语音时。
  • ✓当你需要为无障碍功能朗读文字的时候。

技能链接

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

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“请把我的产品演示脚本转换为温暖、清晰的配音,并保存为音频文件。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会把你的原文发送给文字转语音服务,使用你选择的声音和风格,然后保存音频。它也可以根据台词列表运行批量任务。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Speech Generation Skill

Generate spoken audio for the current project (narration, product demo voiceover, IVR prompts, accessibility reads). OpenAI remains the default with gpt-4o-mini-tts-2025-12-15; Atlas Cloud is available only when the user explicitly selects it. Prefer the bundled CLIs for deterministic, reproducible runs.

When to use

  • Generate a single spoken clip from text
  • Generate a batch of prompts (many lines, many files)

Decision tree (single vs batch)

  • If the user provides multiple lines/prompts or wants many outputs -> batch
  • Else -> single

Workflow

  1. Decide intent: single vs batch (see decision tree above).
  2. Collect inputs up front: exact text (verbatim), desired voice, delivery style, format, and any constraints.
  3. If batch: write a temporary JSONL under tmp/ (one job per line), run once, then delete the JSONL.
  4. Augment instructions into a short labeled spec without rewriting the input text.
  5. Run scripts/text_to_speech.py for the default OpenAI path, or scripts/atlas_text_to_speech.py only when Atlas Cloud was selected (see references/cli.md).
  6. For important clips, validate: intelligibility, pacing, pronunciation, and adherence to constraints.
  7. Iterate with a single targeted change (voice, speed, or instructions), then re-check.
  8. Save/return final outputs and note the final text + instructions + flags used.

Temp and output conventions

  • Use tmp/speech/ for intermediate files (for example JSONL batches); delete when done.
  • Write final artifacts under output/speech/ when working in this repo.
  • Use --out or --out-dir to control output paths; keep filenames stable and descriptive.

Dependencies (install if missing)

Prefer uv for dependency management.

OpenAI backend package:

uv pip install openai

If uv is unavailable:

python3 -m pip install openai

The Atlas Cloud backend uses only the Python standard library.

Environment

  • Default OpenAI calls require OPENAI_API_KEY.
  • Optional Atlas Cloud calls require ATLASCLOUD_API_KEY.

If the selected provider key is missing, give the user these steps:

  1. Create an API key in that provider's console.
  2. Set OPENAI_API_KEY or ATLASCLOUD_API_KEY as an environment variable in their system.
  3. Offer to guide them through setting the environment variable for their OS/shell if needed.
  • Keep provider credentials out of chat. Direct the user to set the selected key locally and confirm when ready.

If installation isn't possible in this environment, tell the user which dependency is missing and how to install it locally.

Defaults & rules

  • Keep OpenAI as the default provider. Do not switch to Atlas Cloud unless the user requests it.
  • Use gpt-4o-mini-tts-2025-12-15 unless the user requests another model.
  • Default voice: cedar. If the user wants a brighter tone, prefer marin.
  • Built-in voices only. Custom voices are out of scope for this skill.
  • instructions are supported for GPT-4o mini TTS models, but not for tts-1 or tts-1-hd.
  • Input length must be <= 4096 characters per request. Split longer text into chunks.
  • Enforce 50 requests/minute. The CLI caps --rpm at 50.
  • Require OPENAI_API_KEY before any live API call.
  • For Atlas Cloud, default to xai/tts-v1, voice eve, language auto, and require ATLASCLOUD_API_KEY.
  • Atlas generation submits exactly one POST. Only prediction GET requests may retry, and polling must stay finite.
  • Download Atlas outputs without an Authorization header and reject non-HTTPS or private-network targets.
  • Provide a clear disclosure to end users that the voice is AI-generated.
  • Use the OpenAI Python SDK (openai package) for default OpenAI calls; the dedicated Atlas CLI uses its asynchronous HTTP contract.
  • Prefer the matching bundled CLI over writing new one-off scripts.

Instruction augmentation

Reformat user direction into a short, labeled spec. Only make implicit details explicit; do not invent new requirements.

Quick clarification (augmentation vs invention):

  • If the user says "narration for a demo", you may add implied delivery constraints (clear, steady pacing, friendly tone).
  • Do not introduce a new persona, accent, or emotional style the user did not request.

Template (include only relevant lines):

Voice Affect: <overall character and texture of the voice>
Tone: <attitude, formality, warmth>
Pacing: <slow, steady, brisk>
Emotion: <key emotions to convey>
Pronunciation: <words to enunciate or emp
常见问题

它使用哪种服务?

默认使用 OpenAI。只有在你明确选择时,才会使用 Atlas Cloud。

我能创建自定义声音吗?

不能。这项技能说明创建自定义声音不在其范围之内。

它会检查结果吗?

会。对于重要的片段,它会检查清晰度、语速和发音,并在需要时做一次针对性的修改。

详情

作者的原始描述

Use when the user asks for text-to-speech narration or voiceover, accessibility reads, audio prompts, or batch speech generation. OpenAI remains the default; Atlas Cloud is an explicit optional backend for asynchronous multilingual speech. Custom voice creation is out of scope.

repo: davila7/claude-code-templates

热度

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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能