Back to all models
GPT-4o mini TTS - In-Depth Overview
OpenAI · GPT-4o mini
Current
Latest in family
Model ID: gpt-4o-mini-tts
Get all the details on GPT-4o mini TTS, an AI model from OpenAI. This page covers its token limits, pricing structure, key capabilities such as text_to_speech, available API code samples, and performance strengths.
Key Metrics
Input Limit
2K tokens
Output Limit
No data tokens
Input Cost
$0.60/1M
Output Cost
$12.00/1M
Sample API Code
from openai import OpenAI
client = OpenAI()
speech_file_path = Path(__file__).parent / "speech.mp3"
response = client.audio.speech.create(
model="gpt-4o-mini-tts",
voice="alloy",
input="The quick brown fox jumped over the lazy dog."
)
response.stream_to_file(speech_file_path)
Required Libraries
openai
openai
Notes
GPT-4o mini TTS is a text-to-speech model built on GPT-4o mini, a fast and powerful language model. Use it to convert text to natural sounding spoken text.
Capabilities
Supported Data Types
Input Types
text
Output Types
audio
Strengths & Weaknesses
Exceptional at
natural sounding speech generation
Good at
fast conversion
Additional Information
Latest Update
Jul 18, 2024
Knowledge Cutoff
No data