openai · OpenAI Platform Docs
Text to speech | OpenAI API
Explains how to use the OpenAI Text-to-Speech API to convert text into spoken audio using various voice models and parameters.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Text to speech | OpenAI API
Explains how to use the OpenAI Text-to-Speech API to convert text into spoken audio using various voice models and parameters.
When To Use
Use when you need to implement a workflow that converts written text into spoken audio files using OpenAI's speech synthesis models.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/text-to-speech-openai-api-workflow-guide.md | A guide covering OpenAI text-to-speech models, voice options, and streaming realtime audio implementation. | Questions about a guide covering OpenAI text-to-speech models, voice options, and streaming realtime audio implementation. |
examples/text-to-speech-openai-api-openai-text-to-speech-nodejs-audio-generation.text | A Node.js code example demonstrating how to use the OpenAI client to generate speech from text using the gpt-4o-mini-tts model. | Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to use the OpenAI client to generate speech from text using the gpt-4o-mini-... |
examples/text-to-speech-openai-api-openai-text-to-speech-python-streaming-respons.text | A Python script using the OpenAI client to generate speech with a streaming response using the gpt-4o-mini-tts model. | Exact payloads, commands, or snippets shown in A Python script using the OpenAI client to generate speech with a streaming response using the gpt-4o-mini-tts model. |
examples/text-to-speech-openai-api-openai-text-to-speech-curl-request.text | A curl command demonstrating how to send a POST request to the OpenAI text-to-speech endpoint with model, input, voice, and instructions parameters. | Exact payloads, commands, or snippets shown in A curl command demonstrating how to send a POST request to the OpenAI text-to-speech endpoint with model, input, voic... |
examples/text-to-speech-openai-api-openai-text-to-speech-cli-gpt-4o-mini-tts.text | A CLI command demonstrating how to use the gpt-4o-mini-tts model with specific voice and instruction parameters to generate an mp3 file. | Exact payloads, commands, or snippets shown in A CLI command demonstrating how to use the gpt-4o-mini-tts model with specific voice and instruction parameters to ge... |
examples/text-to-speech-openai-api-openai-text-to-speech-nodejs-audio-creation.text | A Node.js code example demonstrating how to use the OpenAI client to generate speech from text using the gpt-4o-mini-tts model. | Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to use the OpenAI client to generate speech from text using the gpt-4o-mini-... |
examples/text-to-speech-openai-api-openai-text-to-speech-python-streaming.text | A Python script using the AsyncOpenAI client to generate and stream audio responses using the gpt-4o-mini-tts model. | Exact payloads, commands, or snippets shown in A Python script using the AsyncOpenAI client to generate and stream audio responses using the gpt-4o-mini-tts model. |
examples/text-to-speech-openai-api-openai-text-to-speech-curl-request-2.text | A curl command demonstrating how to send a POST request to the OpenAI text-to-speech endpoint with model, input, voice, and response format parameters. | Exact payloads, commands, or snippets shown in A curl command demonstrating how to send a POST request to the OpenAI text-to-speech endpoint with model, input, voic... |
examples/text-to-speech-openai-api-openai-text-to-speech-curl-voice-consent-reque.text | A curl command demonstrating how to send a POST request to the OpenAI API to manage voice consent settings. | Exact payloads, commands, or snippets shown in A curl command demonstrating how to send a POST request to the OpenAI API to manage voice consent settings. |
examples/text-to-speech-openai-api-openai-text-to-speech-voice-creation-curl.text | A curl command demonstrating how to create a new voice using the OpenAI Text to Speech API. | Exact payloads, commands, or snippets shown in A curl command demonstrating how to create a new voice using the OpenAI Text to Speech API. |
examples/text-to-speech-openai-api-openai-text-to-speech-curl-request-3.text | A curl command demonstrating a POST request to the OpenAI text-to-speech API endpoint using a JSON payload. | Exact payloads, commands, or snippets shown in A curl command demonstrating a POST request to the OpenAI text-to-speech API endpoint using a JSON payload. |
examples/text-to-speech-openai-api-openai-text-to-speech-api-realtime-session-con.text | A JSON configuration object defining a realtime session with a specific model and voice ID for the OpenAI text-to-speech API. | Exact payloads, commands, or snippets shown in A JSON configuration object defining a realtime session with a specific model and voice ID for the OpenAI text-to-spe... |
What This Skill Covers
- The Audio API provides a speech endpoint based on our GPT-4o mini TTS (text-to-speech) model. It comes with 11 built-in voices and can be used to:
- Main sections:
Quickstart,Text-to-speech models,Voice options,Streaming realtime audio,Supported output formats.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://developers.openai.com/api/docs/guides/text-to-speech
