Declares TTS markup capabilities for the expressive pipeline.

Plugins opt in by overriding TTS.markupProviderKey: it selects which markup dialect the TTS speaks — what the LLM is taught to write, and how those markers are normalized and lowered to the provider's native syntax before synthesis. Stripping markup back out is not here — the transcript sinks do it provider-agnostically (see splitAllMarkup).

Accessors

  • get providerKey(): string
  • Key into the shared provider_format markup tables, or '' for none.

    Returns string

  • get supported(): boolean
  • Whether this voice speaks a markup dialect at all.

    Allocation-free, unlike testing llmInstructions for undefined — which the expressive gate does once per speech segment.

    Returns boolean

Methods

  • Convert framework-standard markup to the provider's native format.

    Called before text is sent to the TTS; a no-op when the provider declares no markup. Plugins that use non-XML formats (e.g. square brackets) opt in via TTS.markupProviderKey so <expression value="..."/> becomes native syntax.

    Parameters

    • text: string

    Returns string

  • Instructions for the LLM describing available markup tags.

    The framework injects this into the LLM system prompt when expressive mode is active. Returns undefined if this TTS has no markup support. When speechSteering is given, sounds it disables are omitted from the advertised vocabulary.

    Parameters

    Returns undefined | string

  • Fix common LLM markup mistakes (e.g. unclosed self-closing tags).

    Parameters

    • text: string

    Returns string