📚 API ReferenceGenerative AI
<TTS>
Add text-to-speech support to your agent.
Import
Usage
The TTS component adds text-to-speech capabilities to your agent, allowing it to speak messages using a specified voice endpoint.
-
Add the component to your agent:
-
Use the
say
action in your agent's responses:Or, simply chat with the agent to get them to speak.
Props
Prop | Type | Default |
---|---|---|
voiceEndpoint | string | null (uses default voice) |
Custom voices
You can create and use custom voices with the USDK CLI. Learn how to do that here.
Using Custom Voices with <TTS>
Once created, use your custom voice in the TTS component by setting the voiceEndpoint prop: