Skip to content
Dashboard

TTS-1

TTS-1 is OpenAI's text-to-speech model optimized for real-time use, converting text into natural-sounding audio across built-in voices and multiple output formats at low latency.

Speech
index.ts
import { experimental_generateSpeech as generateSpeech } from 'ai';
import { gateway } from '@ai-sdk/gateway';
import { writeFile } from 'node:fs/promises';
const result = await generateSpeech({
model: gateway.speechModel('openai/tts-1'),
text: 'Hello from the Vercel AI Gateway!',
voice: 'alloy',
});
await writeFile('speech.mp3', result.audio.uint8Array);

Providers

Route requests across multiple providers. Copy a provider slug to set your preference. Visit the docs for more info. Using a provider means you agree to their terms, listed under Legal.

Provider
Input
Capabilities
ZDR
No Training
Release Date
OpenAI
Legal:Terms
Privacy
$15/M chars
11/06/2023