curl \
--request POST \
--url "https://api.breeze.blue/v1/text-to-speech/voc_xeh3w54cqvnp/with-timestamps" \
--header "xi-api-key: $BREEZE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"text": "Hello world.",
"model_id": "breeze-tts-2-multilingual",
"language_code": "en"
}'import base64
from pathlib import Path
from breeze_blue import BreezeBlue
client = BreezeBlue()
result = client.text_to_speech.convert_with_timestamps("voc_example", text="Hello world.", model_id="breeze-tts-2-multilingual", output_format="wav")
Path("speech.wav").write_bytes(base64.b64decode(result["audio_base64"]))
print(result["word_timestamps"])import { writeFile } from "node:fs/promises";
import { BreezeBlueClient } from "@breeze.blue/sdk";
const client = new BreezeBlueClient();
const result = await client.textToSpeech.convertWithTimestamps("voc_example", { text: "Hello world.", modelId: "breeze-tts-2-multilingual" }, { outputFormat: "wav" });
await writeFile("speech.wav", Buffer.from(result.audioBase64, "base64"));
console.log(result.wordTimestamps);{
"audio_base64": "<string>",
"content_type": "<string>",
"word_timestamps": [
{
"index": 1,
"word": "<string>",
"start": 1,
"end": 1
}
]
}{
"generation_job_id": "<string>",
"history_item_id": "<string>",
"status": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}Convert with timestamps
Generate speech with word timestamps. Returns one complete JSON response, or a background job with delivery=async.
curl \
--request POST \
--url "https://api.breeze.blue/v1/text-to-speech/voc_xeh3w54cqvnp/with-timestamps" \
--header "xi-api-key: $BREEZE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"text": "Hello world.",
"model_id": "breeze-tts-2-multilingual",
"language_code": "en"
}'import base64
from pathlib import Path
from breeze_blue import BreezeBlue
client = BreezeBlue()
result = client.text_to_speech.convert_with_timestamps("voc_example", text="Hello world.", model_id="breeze-tts-2-multilingual", output_format="wav")
Path("speech.wav").write_bytes(base64.b64decode(result["audio_base64"]))
print(result["word_timestamps"])import { writeFile } from "node:fs/promises";
import { BreezeBlueClient } from "@breeze.blue/sdk";
const client = new BreezeBlueClient();
const result = await client.textToSpeech.convertWithTimestamps("voc_example", { text: "Hello world.", modelId: "breeze-tts-2-multilingual" }, { outputFormat: "wav" });
await writeFile("speech.wav", Buffer.from(result.audioBase64, "base64"));
console.log(result.wordTimestamps);{
"audio_base64": "<string>",
"content_type": "<string>",
"word_timestamps": [
{
"index": 1,
"word": "<string>",
"start": 1,
"end": 1
}
]
}{
"generation_job_id": "<string>",
"history_item_id": "<string>",
"status": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}{
"code": "<string>",
"detail": "<string>",
"error": "<string>",
"ok": false,
"meta": {}
}Continue building
Write instructions
Speech timing
Convert text to speech
Streaming timestamps
Authorizations
Breeze Developer API key.
Path Parameters
Voice ID to use for speech generation. See List voices.
Query Parameters
Audio encoding: mp3, wav, flac, pcm, aac, or opus. Optional sample rate and bitrate profiles follow ordinary synchronous TTS, e.g. wav_48000. Default: mp3. See Output formats.
sync (default) returns audio_base64 and word_timestamps. async returns a job ID immediately; poll Get generation job for the result. See Async jobs.
^(sync|async)$Body
Speech with complete word timing; ordinary TTS fields only.
Text to synthesize. Up to 1000 characters by default; accounts with an approved higher limit may send up to their configured limit, at most 2000 characters. See Audio tags.
1Model ID for speech generation. Selected automatically when omitted. See List models.
1 - 120ISO 639-1 two-letter language code supported by the selected model. See supported language codes.
2^[A-Za-z]{2}$Performance instructions, written in the same language as the input text. See Expressive controls, Voice instruction prompting.
Optional per-request voice settings override. See Voice settings.
Show child attributes
Show child attributes
Response
Complete audio and word timestamps. The history-item-id header identifies the saved audio.
Complete audio encoded as base64. Decode before saving or playback. See Decode audio and timing.
MIME type of the decoded audio, matching output_format.
Complete word/token list, relative to the delivered audio in seconds. See Speech timing.
Show child attributes
Show child attributes

