Use CreateSpeechBuff to generate speech for long strings by chunking the text into 32-character segments. This method downloads all segments, concatenates them into a single buffer, saves the result to the configured Folder, and returns an io.Reader containing the full audio data.
Note: This is useful for handling text that exceeds the standard TTS character limits.
// Returns an io.Reader of the combined audio and an error
reader, err := speech.CreateSpeechBuff("This is a very long string that needs chunking", "long_speech")
if err != nil {
// handle error
}
// You can now read from 'reader' (e.g., stream it or write to another buffer)