Skip to content
Dashboard

TTS-1 HD

TTS-1 HD is the quality-optimized variant of OpenAI's text-to-speech family, generating more polished, natural-sounding audio than tts-1 for narration and produced content.

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-hd'),
text: 'Hello from the Vercel AI Gateway!',
voice: 'alloy',
});
await writeFile('speech.mp3', result.audio.uint8Array);

Frequently Asked Questions

  • How do I generate speech with TTS-1 HD through AI Gateway?

    Use the AI SDK's generateSpeech function from the ai package with this model's slug, your text, and a voice. Audio support on AI Gateway is in beta. Authenticate with an AI Gateway API key or OIDC token.

  • How does TTS-1 HD differ from tts-1?

    TTS-1 HD is optimized for audio quality and produces more human-like speech, at the cost of slower generation. TTS-1 is optimized for real-time use. Voices, formats, and the API surface are the same.

  • What voices and formats does TTS-1 HD support?

    Voices include alloy, echo, fable, onyx, nova, and shimmer. Output formats cover MP3, Opus, AAC, and FLAC, and playback speed is adjustable from 0.25x to 4x.

  • Is TTS-1 HD suitable for interactive voice responses?

    Usually not. Interactive features feel better with tts-1, which generates faster. Choose TTS-1 HD when users will listen to the audio more than once and quality is audible.

  • How is TTS-1 HD priced?

    Speech generation is billed by characters of input text. Current rates are listed on this page and update when providers change list prices.

  • Does TTS-1 HD support zero data retention through AI Gateway?

    Zero Data Retention is not currently available for this model. Zero Data Retention is offered on a per-provider basis. See https://vercel.com/docs/ai-gateway/capabilities/zdr for details.

  • What are typical latency characteristics?

    This page shows live performance metrics measured across real AI Gateway traffic.