Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Say/Play Widget


Studio uses Widgets to represent various parts of Twilio's functionality that can then be stitched together in your Studio Flow to build out robust applications that require no coding on your part.

(information)

Info

New to Twilio Studio? Check out our Getting Started guide!

The Say/Play Widget allows you to play a recorded message, dictate text to a user, or play DTMF tones on a call. Use this Widget to say or play information to the user before any subsequent action. If you want to request a user's input after a message, use the Gather Input on Call Widget instead.

Say / Play Widget.

_10
<emphasis level="strong">Thanks for calling!</emphasis>

SSML also works together with Liquid, so you can reference Liquid variables in and around your SSML tags:


_10
<emphasis level="{{flow.variables.level}}">{{flow.variables.text}}</emphasis>

See Text-to-Speech for more details of using SSML.

Play a Message Configuration

play-a-message-configuration page anchor

Use this option to play a recorded audio message to the caller. You can see the list of supported audio file formats in the <Play> TwiML documentation. Once you select Play a Message, you will be able to configure the following value:

(information)

Info

Twilio offers a static hosting service, Twilio Assets, which you can use to upload and store audio files.

Play Digits Configuration

play-digits-configuration page anchor

Selecting Digits allows you to play DTMF tones during a call. For example, if you need to test an IVR system, you can use this feature to simulate digits being pressed to navigate through the menu options.

Include w to introduce a 0.5 second pause between DTMF tones. For example, 1w2 will tell Twilio to pause 0.5 seconds after the first DTMF tone before playing the next DTMF tone. To include a one-second pause, add ww.

Once you select Digits, you will be able to configure the following value:

NameDescriptionExample
DigitsThe sequence of digits to play as DTMF tones. Digits can be 0-9, #, and *. Use w in between digits to add a .5 second pause between tones. Do not include any spaces between digits.12ww#

These events trigger transitions from this Widget to another Widget in your Flow. For more information on working with Studio Transitions, see the Getting Started Guide.

NameDescription
Audio CompleteThe message finished playing

When the Say/Play Widget executes, it will have stored the following variables for use throughout your Studio Flow. For more information on working with variables in Studio, see the Getting Started Guide.

Find definitions and examples for these variables at the Twilio Voice: <Say> documentation.

NameLiquid Template Language
Language{{widgets.MY_WIDGET_NAME.language}}
Voice{{widgets.MY_WIDGET_NAME.voice}}

Example: Business Hours

example-business-hours page anchor

In the following example a user will be told that the business is open if within business hours, or if closed the information about hours of operation. You can find more information on date variables in the Liquid Template Language tutorial.

Twilio Studio Play/Say Widget Example Updated.Rate this page:

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.