HipcallTts.TextSplitter (hipcall_tts v0.5.0)

View Source

Splits text into chunks that fit within a provider max length, preferring sentence boundaries when possible.

Summary

Functions

split(text, max_length, telemetry_meta \\ [])

@spec split(String.t(), pos_integer(), keyword()) ::
  {:ok, [String.t()]} | {:error, String.t()}