Skip to main content

Overview

A TTS service performs expression tags through its expression adapter, which declares what the service performs and writes each tag in the provider’s markup. The services below have one for the models or voices listed. Any other TTS service, or model, speaks only the words: tags are left out of its speech. For a walkthrough, see Expressive Conversation.

Supported Services

  • Listed: the service performs the names it declares, the provider’s own, which the LLM is offered by their universal names. See the provider’s documentation for its list.
  • Free text: the service also takes a delivery or sound described in a few words, so any name is passed through as written.
  • Pauses: a pause outside the range is clamped to it. A service without a range performs no pauses.
  • Delivery changes: where in a reply the delivery can change. Between sentences, a sentence is spoken in the delivery its words start in, and a span’s whole sentence is spoken in the span’s delivery.
The expression adapter is chosen by the service’s model or voice, so a settings change can change what the service performs, and the LLM is taught the new tags.

Avatars

Tavus

TavusTransport sets the replica’s facial emotion to follow the delivery of the bot’s speech, as each word is spoken. The replica shows the emotion of the delivery’s first name other than slow, fast and emphasis, such as happiness for ["warm", "slow"]. The voice’s baseline, and a delivery not in the table, show neutral. At start, a warning names the policy’s deliveries that have no emotion.
TAVUS_DELIVERY_EMOTIONS holds this table, as dict[str, TavusEmotion].

ExpressionCapabilities

What a TTS service performs, as its expression adapter declares it and as TTSMetadataFrame.expression carries it at start.
ExpressionTerm is one sound or delivery: its name, by the service’s own name, and a description of when to use it, which the LLM is shown, or "".

delivery_name

Returns the name the service performs a delivery by, given the name written in its tag, or None when it can’t perform it.

sound_name

Returns the name the service performs a sound by, or None when it can’t perform it.

Adding an Adapter

To make another TTS service expressive, subclass BaseExpressionAdapter and set it as the service’s expression_adapter_class, or override get_expression_adapter() to choose an adapter by model or voice. The service calls the adapter only with what its capabilities say it performs, by the service’s own names.
Set the markup apart from the words with spaces, so the word timestamps a service reports line up with the text it was sent.