Batch Text-to-Speech
Generate spoken audio from text in a single synchronous request using VALSEA voice aliases. For low-latency streaming playback, use Real-time Voice.
This endpoint is OpenAI SDK compatible. Set the OpenAI client baseURL to
https://api.valsea.ai/v1 and use client.audio.speech.create(...).
Voices
VALSEA exposes stable voice aliases. The same alias maps to the appropriate voice for the requested language.
The three aliases above apply to every supported language except Arabic. Arabic uses one of these dedicated voice presets:
Each Arabic preset has tuned default speed and stability values. Omit either field or pass "default" to use the preset default.
Batch vs. Real-time TTS
Batch and real-time TTS generate speech from text, but they are separate delivery modes:
Both modes use the same stable VALSEA voice names, including the dedicated Arabic presets. Language availability differs slightly by mode.
Supported Languages
Batch TTS accepts vietnamese, english, english-in, hindi, bengali-in, kannada, malayalam, marathi, odia (also accepted as oriya), punjabi, tamil, telugu, gujarati, sinhala, and arabic.
Audio samples
Vietnamese sample
English sample
Request body
Code examples
import fs from 'fs/promises';
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: 'YOUR_API_KEY',
baseURL: 'https://api.valsea.ai/v1',
});
const response = await client.audio.speech.create({
model: 'valsea-tts',
voice: 'valsea-neutral',
input: 'Xin chao, day la giong noi VALSEA.',
response_format: 'mp3',
extra_body: { language: 'vietnamese' },
});
const buffer = Buffer.from(await response.arrayBuffer());
await fs.writeFile('speech.mp3', buffer);
Billing
TTS is billed by generated audio duration, rounded up to the next whole minute. The response includes normal credit headers such as X-Credits-Used.