• Default sentence tokenizer for a provider's streamed TTS input.

    The provider's hard max chunk length caps every emitted token. When expressive is set, it also raises the minimum to EXPRESSIVE_BATCH_LEN so a couple of consecutive sentences ride one request, keeping prosody continuous across the turn; otherwise tokens emit per sentence (the unchanged default). Providers with no configured limit are uncapped and stay per-sentence even under expressive — Fish Audio's markers are sentence-scoped, so batching would cost time-to-first-audio and buy no steering.

    Parameters

    • provider: string
    • options: {
          expressive: boolean;
      }
      • expressive: boolean

    Returns tokenize.SentenceTokenizer