TTS-1 HD
TTS is a model that converts text to natural sounding spoken text. The tts-1-hd model is optimized for high quality text-to-speech use cases.
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);More models by OpenAI
| Model |
|---|