speech

Generate spoken audio from text using the OpenAI Audio API with built-in voices.

Updated Feb 4, 2026
One-click install
npx skills add https://github.com/pchemguy/AISandbox --skill speech-pchemguy
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: speech
Source: https://github.com/pchemguy/AISandbox/tree/main/docs/AgentSkills/openai/skills/skills/.curated/speech
Command: npx skills add https://github.com/pchemguy/AISandbox --skill speech-pchemguy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires openai, and includes scripts (resource) and references (resource) components.

What problem does it solve? This Skill removes the manual effort of producing voiceover, narration, IVR prompts, and accessibility audio by generating speech files directly from text through the OpenAI Audio API. ## Core Features & Use Cases - Single and Batch Generation: Create one audio clip from text or run many jobs from a JSONL file with per-job voice, format, and instruction overrides. - Voice Direction Templates: Apply structured instruction specs (affect, tone, pacing, emphasis) and use-case defaults for narration, voiceover, IVR, and accessibility reads. - Deterministic CLI Workflow: Use the bundled scripts/text_to_speech.py CLI with dry-run mode, rate limiting capped at 50 requests per minute, and retry handling for transient errors. - Use Case: A product team needs IVR phone prompts in WAV format. Write a JSONL batch file with each prompt, run the CLI once, and receive consistent audio files with clear, slow delivery. ## Quick Start Ask the AI to generate an mp3 narration of your text using the cedar voice with a warm, steady tone via the speech skill.

Frequently Asked Questions about speech

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate speech audio from text with the OpenAI API?▼

Run the bundled CLI with the speak subcommand, passing --input text, a voice such as cedar, and an output path. Set OPENAI_API_KEY first, and use --dry-run to preview the request payload without making an API call.

How do I batch generate multiple text-to-speech audio files?▼

Write a JSONL file with one job per line containing input text and optional voice, format, and instruction overrides, then run the speak-batch subcommand with an output directory. The CLI enforces a 50 requests-per-minute rate limit automatically.

Which voices and models does OpenAI text-to-speech support?▼

The skill defaults to gpt-4o-mini-tts-2025-12-15 and supports built-in voices including alloy, cedar, marin, nova, onyx, and others. Custom voice creation is out of scope, and instructions are ignored by tts-1 and tts-1-hd models.

What is the maximum input length for OpenAI speech generation?▼

Each request accepts up to 4096 characters of input text. Longer scripts must be split into smaller chunks, either manually or by distributing them across multiple jobs in a batch JSONL file.

Why does the speech CLI fail with an API key error?▼

The CLI requires the OPENAI_API_KEY environment variable for live calls and exits with an error if it is missing. Create a key in the OpenAI platform UI, export it in your shell, and confirm it is set before rerunning.