The text to be synthesized into speech.
Each provider has its own limit on the text length.
OptionalproviderThe text-to-speech provider and voice that synthesize input, from the list of supported providers.
One of the objects in TtsProvider: a type naming the provider, the
voice_id to speak with, and optional provider-specific voice_config. Leave it out and the
SDK sends the script without a provider, so the voice is chosen server-side; the Agents API
documents Microsoft TTS as its default when no provider is given.
OptionalsentimentSentiment name to speak with. Expressive (V4) agents only; if the agent does not support the requested sentiment, its default sentiment is used.
Optionalshould_Queue this speak behind the current speech instead of interrupting it. Expressive (V4) agents only.
OptionalssmlIs the text provided in ssml form.
Set it to true when input is SSML markup rather than plain
text, so the provider reads the tags instead of speaking them.
Which kind of script this is. Always text for this variant; an
AudioStreamScript carries audio instead.
A script that makes the agent say text you supply, synthesized by a text-to-speech provider.
The usual payload for speak(). The agent's LLM is not involved, so the agent says exactly what input contains — which is what makes it the right script for greetings and other canned lines. Passing a plain string to speak() is shorthand for this script with
ssmlset tofalse.Example: Text
Example: Text with sentiment
sentimentis for Expressive (V4) agents only. If the requested sentiment is not supported by the agent, the default sentiment is used.