Speech
OpenAIOfficialPublished by OpenAI
- Skill
- Tool integration
- Automation and integrations
- Apache-2.0
- Low risk
- Has scripts
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured workflow for generating text-to-speech audio using the OpenAI Audio API. It utilizes a bundled CLI tool to handle both single-clip generation and batch processing of audio prompts. The skill includes guidelines for instruction augmentation to control voice affect, tone, pacing, and emphasis, ensuring consistent output for use cases such as narration, product demos, IVR prompts, and accessibility reads.
What it does
- Generates spoken audio clips from text input.
- Supports batch processing of multiple audio prompts via JSONL files.
- Provides instruction templates to refine voice delivery and style.
- Uses a bundled CLI tool for deterministic and reproducible audio generation.
- Offers guidance for specific use cases like accessibility and voiceovers.
- Enforces usage of built-in voices and standard OpenAI speech models.
When to use it
- When you need to generate narration or voiceover for a project.
- When creating IVR or phone system prompts.
- When generating accessibility reads for text content.
- When you need to process multiple audio generation tasks in a batch.
Advantages
- Provides a consistent interface for audio generation via a bundled CLI.
- Allows for fine-tuned control over voice delivery through structured instructions.
- Supports both single-clip and batch generation workflows.
- Includes predefined templates for common audio use cases.
Usage examples
- “Generate a narration clip for my product demo using a warm and composed voice.”
- The agent will use the bundled CLI to generate an audio file with instructions set for a warm, composed, friendly, and confident tone.
- “Create a batch of IVR prompts for my phone system.”
- The agent will create a temporary JSONL file with the provided text and voice settings, run the batch through the CLI, and output the resulting audio files.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/openai/speech/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip speech.zip -d .agents/skills
Documentation by OpenAI
Speech Generation Skill
Generate spoken audio for the current project (narration, product demo voiceover, IVR prompts, accessibility reads). Defaults to gpt-4o-mini-tts-2025-12-15 and built-in voices, and prefers the bundled CLI 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
Decide intent: single vs batch (see decision tree above).
Collect inputs up front: exact text (verbatim), desired voice, delivery style, format, and any constraints.
If batch: write a temporary JSONL under tmp/ (one job per line), run once, then delete the JSONL.
Augment instructions into a short labeled spec without rewriting the input text.
Run the bundled CLI (
scripts/text_to_speech.py) with sensible defaults (see references/cli.md).For important clips, validate: intelligibility, pacing, pronunciation, and adherence to constraints.
Iterate with a single targeted change (voice, speed, or instructions), then re-check.
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
--outor--out-dirto control output paths; keep filenames stable and descriptive.
Dependencies (install if missing)
Prefer uv for dependency management.
Python packages:
uv pip install openaiIf uv is unavailable:
python3 -m pip install openaiEnvironment
OPENAI_API_KEYmust be set for live API calls.
If the key is missing, give the user these steps:
Create an API key in the OpenAI platform UI: https://platform.openai.com/api-keys
Set
OPENAI_API_KEYas an environment variable in their system.Offer to guide them through setting the environment variable for their OS/shell if needed.
Never ask the user to paste the full key in chat. Ask them to set it 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
Use
gpt-4o-mini-tts-2025-12-15unless the user requests another model.Default voice:
cedar. If the user wants a brighter tone, prefermarin.Built-in voices only. Custom voices are out of scope for this skill.
instructionsare supported for GPT-4o mini TTS models, but not fortts-1ortts-1-hd.Input length must be <= 4096 characters per request. Split longer text into chunks.
Enforce 50 requests/minute. The CLI caps
--rpmat 50.Require
OPENAI_API_KEYbefore any live API call.Provide a clear disclosure to end users that the voice is AI-generated.
Use the OpenAI Python SDK (
openaipackage) for all API calls; do not use raw HTTP.Prefer the bundled CLI (
scripts/text_to_speech.py) over writing new one-off scripts.Never modify
scripts/text_to_speech.py. If something is missing, ask the user before doing anything else.
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 emphasize>
Pauses: <where to add intentional pauses>
Emphasis: <key words or phrases to stress>
Delivery: <cadence or rhythm notes>Augmentation rules:
Keep it short; add only details the user already implied or provided elsewhere.
Do not rewrite the input text.
If any critical detail is missing and blocks success, ask a question; otherwise proceed.
Examples
Single example (narration)
Input text: "Welcome to the demo. Today we'll show how it works."
Instructions:
Voice Affect: Warm and composed.
Tone: Friendly and confident.
Pacing: Steady and moderate.
Emphasis: Stress "demo" and "show".Batch example (IVR prompts)
{"input":"Thank you for calling. Please hold.","voice":"cedar","response_format":"mp3","out":"hold.mp3"}
{"input":"For sales, press 1. For support, press 2.","voice":"marin","instructions":"Tone: Clear and neutral. Pacing: Slow.","response_format":"wav"}Instructioning best practices (short list)
Structure directions as: affect -> tone -> pacing -> emotion -> pronunciation/pauses -> emphasis.
Keep 4 to 8 short lines; avoid conflicting guidance.
For names/acronyms, add pronunciation hints (e.g., "enunciate A-I") or supply a phonetic spelling in the text.
For edits/iterations, repeat invariants (e.g., "keep pacing steady") to reduce drift.
Iterate with single-change follow-ups.
More principles: references/prompting.md. Copy/paste specs: references/sample-prompts.md.
Guidance by use case
Use these modules when the request is for a specific delivery style. They provide targeted defaults and templates.
Narration / explainer:
references/narration.mdProduct demo / voiceover:
references/voiceover.mdIVR / phone prompts:
references/ivr.mdAccessibility reads:
references/accessibility.md
CLI + environment notes
CLI commands + examples:
references/cli.mdAPI parameter quick reference:
references/audio-api.mdInstruction patterns + examples:
references/voice-directions.mdIf network approvals / sandbox settings are getting in the way:
references/codex-network.md
Reference map
references/cli.md: how to run speech generation/batches viascripts/text_to_speech.py(commands, flags, recipes).references/audio-api.md: API parameters, limits, voice list.references/voice-directions.md: instruction patterns and examples.references/prompting.md: instruction best practices (structure, constraints, iteration patterns).references/sample-prompts.md: copy/paste instruction recipes (examples only; no extra theory).references/narration.md: templates + defaults for narration and explainers.references/voiceover.md: templates + defaults for product demo voiceovers.references/ivr.md: templates + defaults for IVR/phone prompts.references/accessibility.md: templates + defaults for accessibility reads.references/codex-network.md: environment/sandbox/network-approval troubleshooting.
Files
- ATTRIBUTION.mdAdded by AutoGineer850 B
- LICENSE.txt10.5 KiB
- SKILL.md7.1 KiB
- agents/openai.yaml299 B
- assets/speech-small.svg742 B
- assets/speech.png1.2 KiB
- references/accessibility.md696 B
- references/audio-api.md902 B
- references/cli.md3.2 KiB
- references/codex-network.md1.1 KiB
- references/ivr.md708 B
- references/narration.md671 B
- references/prompting.md1.5 KiB
- references/sample-prompts.md991 B
- references/voice-directions.md2.1 KiB
- references/voiceover.md790 B
- scripts/text_to_speech.pyScript15.2 KiB
Requirements and compatibility
Written for: OpenAI Codex
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs an API key, Needs Python
Security
What our scanner noticed· Low risk
- Instructions that use the network
- Scripts that your agent may run
This skill includes scripts that your agent may run. Read them before you use it.
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- OpenAI
- Publisher
- OpenAI (Official)
- Source
- openai/skills · skills/.curated/speech · commit 49f948f
- Licence
- Apache License 2.0 (redistribution allowed)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by OpenAI.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download speech.zip