Inworld TTS 2
Expressive speech synthesis by Inworld: 95 voices, delivery steered with tags in the text — whisper, excitement, laughter, pauses. Russian is among the best-quality languages. Up to 2,000 characters per request, MP3, Opus, WAV or FLAC, billed per character.
Հատկություններ
Նկարագրություն
What it does
- Speech from text, up to 2,000 characters per request. The model detects the language itself; Russian, English, Chinese, Spanish, German, French and 9 more are top quality, and over 90 are supported.
- 95 voices (voice field, Dennis by default). Any voice speaks any language and keeps its own timbre and accent.
- Steering: an English instruction in square brackets before the text: [whisper], [say excitedly], [speak slowly with a trembling voice], [very loud]. It lasts until the next instruction or [reset].
- Sounds in the text: [laugh], [sigh], [breathe], [cough], [clear throat], [gasp] and more play where you put them.
- Pauses: <break time="1s" /> (up to 20 per request, each up to 10 seconds). Language of part of the text: <lang lang="en">…</lang>. Emphasis: write a word in CAPITALS.
- Text normalization (apply_text_normalization: true) reads dates, times, phone numbers and abbreviations as words. Turn it on for text with numbers.
- Format (response_format): mp3 (default, 48 kHz, 128 kbps), opus, wav or flac. Sample rate (sample_rate): 16000–48000 for mp3; 8000, 12000, 16000, 24000, 48000 for opus; 8000–48000 for wav and flac. Bit rate (bit_rate): 32000–320000 in standard steps for mp3, 6000–320000 for opus.
- Speed (speed): 0.5 to 1.5, preferably not below 0.8. Expressiveness (temperature): 0.01 to 2, 1 by default; higher is livelier, lower is steadier.
- Audio comes as a whole file. Timestamps, streaming and custom (cloned) voices are not available for this model here.
How to call
POST /v1/audio/speech with a JSON body; the response is the audio file:
curl https://api.neuralbridge.ru/v1/audio/speech -H "Authorization: Bearer $API_KEY" -H "Content-Type: application/json" -d '{"model": "inworld/tts-2-08130", "input": "[whisper] This is a secret just between us.", "voice": "Dennis", "response_format": "mp3"}' -o speech.mp3Model fields in the same body: voice_id instead of voice, output_format instead of response_format, speaking_rate instead of speed, plus sample_rate, bit_rate, temperature and apply_text_normalization.
{"model": "inworld/tts-2-08130", "input": "The meeting is at 3:30 PM on Jan 15th.", "voice": "Olivia", "response_format": "opus", "sample_rate": 24000, "bit_rate": 64000, "apply_text_normalization": true}A short phrase takes 2–3 seconds, 2,000 characters about 30 seconds.
Errors
- 400: invalid input; the error text names the field (for example, an unknown voice, a sample rate the format does not support, or text over 2,000 characters). Empty text and text made only of tags are rejected too. Rejected requests are not billed.
- 402: not enough funds on the balance. 429: the model is overloaded. 502: the audio was not received; nothing is charged.
Price
Billed per character of text (rate on this page). All characters count, including spaces, punctuation and tags ([whisper], <break … />); an emoji counts as two.
Պարամետրեր
Ենդպոինտներ
Կոդի օրինակներ
/v1 base_url-ում։ Anthropic SDK-ի համար — առանց /v1.