We use cookies to enhance your experience, provide personalised content, and analyse our traffic; see our Cookie Policy.
openai/tts-1TTS-1 — speech at 32 credits per 1,000 characters
OpenAI's TTS-1 turns text into natural speech fast enough to stream back to a caller. The standard-quality tier; TTS-1 HD costs twice as much for a warmer result.
Varied male and female voices
Streaming audio, instant playback
Works in French, English and 30+ languages
From 0.25x to 4x normal speed
Welcome to Ali Sandwiches! Our sandwiches are made with fresh ingredients every day.
Special promotion! 30% off all our menus this week.
Yes. Top up your Tchavi account with Orange Money, MTN MoMo, M-Pesa or another mobile money operator. No bank card is needed. Credits land as soon as the payment is confirmed and are deducted as you use them.
Yes. Keep your current OpenAI SDK, just change the base URL to Tchavi's (shown in the API tab) and use your Tchavi key. The rest of your code stays the same.
import Tchavi from '@tchavi/sdk';
import fs from 'fs';
const client = new Tchavi({ apiKey: 'API_KEY' });
const response = await client.audio.speech.create({
"model": "tts-1",
"input": "Hello, world!",
"voice": "alloy",
"response_format": "mp3"
});
const buffer = Buffer.from(await response.arrayBuffer());
fs.writeFileSync('speech.mp3', buffer);
console.log('X-Credits-Used:', response.headers.get('x-credits-used'));Every parameter this model accepts on the API. Check the SDK for full typings.
modelRequiredTTS model (e.g. `tts-1`).
inputRequiredThe text to synthesize.
voiceRequiredVoice timbre: `alloy`, `ash`, `ballad`, `cedar`, `coral`, `echo`, `fable`, `marin`, `nova`, `onyx`, `sage`, or `shimmer`.
response_format"mp3"Audio container format.
speed1.0Playback speed multiplier.