curl \
--request POST \
--url "https://api.breeze.blue/v1/text-to-speech/voc_xeh3w54cqvnp/stream" \
--header "xi-api-key: $BREEZE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"text": "I can’t believe you brought him here!",
"model_id": "breeze-tts-2",
"instructions": "Say it softly and emotionally, with a hurt, disappointed tone, as if bringing him here broke your trust.",
"voice_settings": {
"guidance_scale": 4.0
}
}'from breeze_blue import stream
import os
from breeze_blue import BreezeBlue
client = BreezeBlue(api_key=os.environ["BREEZE_API_KEY"])
audio = client.text_to_speech.stream(
voice_id="voc_xeh3w54cqvnp",
text="I can’t believe you brought him here!",
instructions="Say it softly and emotionally, with a hurt, disappointed tone, as if bringing him here broke your trust.",
model_id="breeze-tts-2",
voice_settings={"guidance_scale": 4.0},
)
stream(audio)import { stream } from "@breeze.blue/sdk/node";
import { BreezeBlueClient } from "@breeze.blue/sdk";
const client = new BreezeBlueClient({
apiKey: process.env.BREEZE_API_KEY!,
});
const audio = await client.textToSpeech.stream(
"voc_xeh3w54cqvnp",
{
text: "I can’t believe you brought him here!",
instructions: "Say it softly and emotionally, with a hurt, disappointed tone, as if bringing him here broke your trust.",
modelId: "breeze-tts-2",
voiceSettings: { guidanceScale: 4.0 },
},
);
await stream(audio);"<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": {}
}Stream text to speech
Stream synthesized audio as it is generated. For timing, see Speech timing; for one complete JSON response, use Convert with timestamps.
curl \
--request POST \
--url "https://api.breeze.blue/v1/text-to-speech/voc_xeh3w54cqvnp/stream" \
--header "xi-api-key: $BREEZE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"text": "I can’t believe you brought him here!",
"model_id": "breeze-tts-2",
"instructions": "Say it softly and emotionally, with a hurt, disappointed tone, as if bringing him here broke your trust.",
"voice_settings": {
"guidance_scale": 4.0
}
}'from breeze_blue import stream
import os
from breeze_blue import BreezeBlue
client = BreezeBlue(api_key=os.environ["BREEZE_API_KEY"])
audio = client.text_to_speech.stream(
voice_id="voc_xeh3w54cqvnp",
text="I can’t believe you brought him here!",
instructions="Say it softly and emotionally, with a hurt, disappointed tone, as if bringing him here broke your trust.",
model_id="breeze-tts-2",
voice_settings={"guidance_scale": 4.0},
)
stream(audio)import { stream } from "@breeze.blue/sdk/node";
import { BreezeBlueClient } from "@breeze.blue/sdk";
const client = new BreezeBlueClient({
apiKey: process.env.BREEZE_API_KEY!,
});
const audio = await client.textToSpeech.stream(
"voc_xeh3w54cqvnp",
{
text: "I can’t believe you brought him here!",
instructions: "Say it softly and emotionally, with a hurt, disappointed tone, as if bringing him here broke your trust.",
modelId: "breeze-tts-2",
voiceSettings: { guidanceScale: 4.0 },
},
);
await stream(audio);"<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": {}
}Continue building
Write instructions
Convert text to speech
Streaming timestamps
Text to speech
Authorizations
Breeze Developer API key.
Path Parameters
Voice ID to use for speech generation. See List voices.
Query Parameters
Streaming audio encoding: pcm, mp3, or wav. Default: pcm. See Output formats.
Body
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
Streaming audio bytes. The history-item-id header identifies the persisted generation.
The response is of type file.

