play
Play file(s), ringtones, speech or silence.
Parameters
Name | Type | Description |
---|---|---|
urls (or url ) | string | string [] | URL or array of URLs to play. Required. Allowed URLs are:
|
volume | number | Optional volume gain to apply to played URLs. Allowed values from -40.0 to 40.0 . Default 0. |
say_voice | string | Optional voice to use with say: for text to speech. Default is Polly.Salli . |
say_language | string | Optional language to use with say: for text to speech. Default is en-US . |
say_gender | string | Optional gender to use with say: for text to speech. Default is female. |
Variables
Read by the method:
say_voice:
(in) - Optional voice to use for text to speech.say_language:
(in) - Optional language to use for text to speech.say_gender:
(in) - Optional gender to use for text to speech.
Possible Values of Voice, Language and Ringtone
The following voice, language and ringtone values are permitted.
The ml
variant stands for the multilingual version.
Supported Voices and Languages
To learn more about the supported voices and languages, please visit the Supported Voices and Languages Documentation.
Supported Ring tones
Parameter | |
---|---|
urls.ring | Available values are the following ISO 3166-1 alpha-2 country codes: at, au, bg, br, be, ch, cl, cn, cz, de, dk, ee, es, fi, fr, gr, hu, il, in, it, lt, jp, mx, my, nl, no, nz, ph, pl, pt, ru, se, sg, th, uk, us, us-old, tw, ve, za. |
Examples
Playing a single URL
- YAML
- JSON
version: 1.0.0
sections:
main:
- play: https://example.com/file.mp3
{
"version": "1.0.0",
"sections": {
"main": [
{
"play": "https://example.com/file.mp3"
}
]
}
}
Playing multiple URLs
- YAML
- JSON
version: 1.0.0
sections:
main:
- play:
- https://example.com/file1.wav
- https://example.com/file2.wav
- say:this is something to say
- silence:3.0
- ring:10.0:us
{
"version": "1.0.0",
"sections": {
"main": [
{
"play": [
"https://example.com/file1.wav",
"https://example.com/file2.wav",
"say: this is something to say",
"silence:3.0",
"ring:10.0:us"
]
}
]
}
}
Playing multiple URLs with volume adjusted
- YAML
- JSON
version: 1.0.0
sections:
main:
- play:
volume: 30
urls:
- https://example.com/file1.wav
- https://example.com/file2.wav
- say:this is something to say
- silence:3.0
- ring:10.0:us
{
"version": "1.0.0",
"sections": {
"main": [
{
"play": {
"volume": 30,
"urls": [
"https://example.com/file1.wav",
"https://example.com/file2.wav",
"say:this is something to say",
"silence:3.0",
"ring:10.0:us"
]
}
}
]
}
}