#is there any trick to control better the chunk creation? I want to create chunks based on "---"

1 messages · Page 1 of 1 (latest)

austere oakBOT
#
AI-generated Answer for jvini6832

Short answer: there’s no server-side option to chunk on a custom delimiter like "---". The docs only expose length-based chunking and explicit flush controls.

What you can do

  • WebSockets (input streaming):
    • Control when audio generation starts via generation_config.chunk_length_schedule (character thresholds). (elevenlabs.io)
    • Force a chunk boundary at your delimiter by sending the text up to '---' and then a message with "flush": true. This clears the buffer and generates immediately. (elevenlabs.io)
    • Optionally set auto_mode=true to bypass chunk scheduling/buffers when you’re sending complete phrases per delimiter. (elevenlabs.io)
  • HTTP TTS (non-WebSocket):
    • Split your input on '---' client-side and make one request per segment.
    • Use Request Stitching by passing previous_request_ids to keep prosody consistent across your delimiter-based chunks, then concatenate the audio. (elevenlabs.io)

If you actually want a pause at '---' (not a generation chunk), enable SSML parsing and insert <break time="Xs" /> at that point; this affects prosody but does not create streaming chunks. (elevenlabs.io)

References

  • Generate audio in real-time (WebSockets): chunk_length_schedule, flush. (elevenlabs.io)
  • WebSocket API reference: auto_mode, enable_ssml_parsing. (elevenlabs.io)
  • Stitching multiple requests (HTTP TTS): previous_request_ids. (elevenlabs.io)
  • Help Center: adding pauses with SSML <break>. (help.elevenlabs.io)

Sources:
Generate audio in real-time | ElevenLabs Documentation
Generate audio in real-time | ElevenLabs Documentation
WebSocket | ElevenLabs Documentation
Stitching multiple requests | ElevenLabs Documentation
WebSocket | ElevenLabs Documentation
Generate audio in real-time | ElevenLabs Documentation
WebSocket | ElevenLabs Documentation
Stitching multiple requests | ElevenLabs Documentation
How can I add pauses? – ElevenLabs

glossy fractal
#

but i want to control the chunk creation associated with the knowledge base in agetn platform