Advanced Settings
In real-time generation, input text often arrives in chunks. These advanced settings let you fine-tune text buffering to balance audio quality and Time to First Byte (TTFB).
Default Behavior
By default, our system waits until a sentence is complete—determined by punctuation—before sending it for voice generation.
min_buffer_size, max_buffer_delay_in_ms and predictive_chunking are
top-level siblings of text, not members of voice_config. Nesting them
inside voice_config fails silently. All three also accept camelCase
aliases (minBufferSize, maxBufferDelayInMs, predictiveChunking).
min_buffer_size
When a sentence isn’t complete and no punctuation is detected, the system uses min_buffer_size to decide when to send the text. This parameter sets the minimum number of characters required before sending input for audio generation. A larger buffer provides better context for the model, leading to higher audio quality. Reducing this value can lower TTFB by enabling quicker responses.
- Range: integer 0 to 1000 characters
- Default: 100
Setting min_buffer_size: 0 means “do not wait on volume”: whatever is buffered is sent immediately, even a partial fragment. This gives the lowest TTFB at some cost to prosody, because each request is synthesized independently — a partial sentence is rendered as its own utterance, and rejoined fragments can sound abruptly paused.
max_buffer_delay_in_ms
If a sentence is incomplete and text hasn’t reached min_buffer_size as well, max_buffer_delay_in_ms sets the maximum time (in milliseconds) the system will wait before processing the input. Once this delay is reached, the available text is sent—even if it’s below the buffer threshold.
- Range: integer 0 to 1000 milliseconds
- Default: 300
max_buffer_delay_in_ms: 0 is the same “do not wait” contract on the time axis. Setting both knobs to 0 is the most aggressive configuration and synthesizes nearly every delta on arrival.
predictive_chunking
Controls how eagerly the segmenter decides a sentence has ended when the ending is ambiguous, such as 2 p.m., the U.S. or Dr..
- Values:
strict(default) orlenient strictwaits for one more character when the boundary is genuinely uncertain.lenienttakes its best guess and starts sooner.
Unambiguous sentence endings are never delayed in either mode, so strict does not add latency across the board — only on genuinely ambiguous endings.
A non-numeric value for either buffer knob is rejected with a warning
(INVALID_BUFFER_SIZE or INVALID_BUFFER_DELAY) and the previous value is
kept. Numeric strings such as "100" are still accepted. See
Errors & Warnings.
Example
Let’s say the first chunk of text received is: “I just wanted to say that”
- This sentence is incomplete and has no punctuation, so the system doesn’t immediately send it for audio generation.
- The current length is 24 characters, which is below the default
min_buffer_sizeof 100 characters. - The system waits for more input. If no additional text arrives within the time set by
max_buffer_delay_in_ms(e.g., 500 ms), the system sends whatever text it has.
Result: After 500 ms, “I just wanted to say that” is sent for audio generation to avoid further delay. This mechanism ensures fast responses (good TTFB) without compromising too much on naturalness or context.