Prompt Buddy logoPrompt Buddy

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.

Import to Prompt Buddy

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

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/text-to-speech-openai-api-workflow-guide.mdA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. 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