Set the WebSocket text buffer size
min_buffer_size sets how many characters the server collects from your text messages before it starts synthesis. Text below the threshold waits for more text or a flush message.
WebSocket only. min_buffer_size is a field of the WebSocket config message. REST and HTTP streaming do not use it (they receive the whole text in one request).
How it works
In a live test, with min_buffer_size set to 100, sending "Hi there." without a flush returned no audio, and a 62-character sentence with min_buffer_size set to 30 and no flush returned audio. Lower values start audio sooner when you stream text token by token. Higher values give the model more context per synthesis call. Always send flush at the end of an utterance.
Example
In the SDK, configure() takes target_language_code. On the raw wire, the config message field is language_code:
send_completion_event="true" is a connection option (query parameter). It makes the server send {"type": "event", "data": {"event_type": "final"}} after the last audio message, which is the signal to stop reading.
Common errors
Related: max_chunk_length controls how buffered text is split into sentences.