Skip to main content

play

Play file(s), ringtones, speech or silence.

Parameters

NameTypeDescription
urls (or url)string | string[]URL or array of URLs to play. Required. Allowed URLs are:
  • http:// - audio file to GET
  • https:// - audio file to GET
  • ring:[duration:]<country code> - ring tone to play. For example: ring:us to play single ring or ring:20.0:us to play ring for 20 seconds.
  • say:<text to speak> - Sentence to say
  • silence:<duration> - seconds of silence to play
volumenumberOptional volume gain to apply to played URLs. Allowed values from -40.0 to 40.0. Default 0.
say_voicestringOptional voice to use with say: for text to speech. Default is Polly.Salli.
say_languagestringOptional language to use with say: for text to speech. Default is en-US.
say_genderstringOptional 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.

Parameter
say_voiceThe available Amazon Polly voices are here
The available Google Cloud voices are here
The available Elevenlabs are:
  • rachel
  • rachel-ml
  • clyde
  • clyde-ml
  • domi
  • domi-ml
  • dave
  • dave-ml
  • fin
  • fin-ml
  • bella
  • bella-ml
  • antoni
  • antoni-ml
  • thomas
  • thomas-ml
  • charlie
  • charlie-ml
  • emily
  • emily-ml
  • elli
  • elli-ml
  • callum
  • callum-ml
  • patrick
  • patrick-ml
  • harry
  • harry-ml
  • liam
  • liam-ml
  • dorothy
  • dorothy-ml
  • josh
  • josh-ml
  • arnold
  • arnold-ml
  • charlotte
  • charlotte-ml
  • matilda
  • matilda-ml
  • matthew
  • matthew-ml
  • james
  • james-ml
  • joseph
  • joseph-ml
  • jeremy
  • jeremy-ml
  • michael
  • michael-ml
  • ethan
  • ethan-ml
  • gigi
  • gigi-ml
  • freya
  • freya-ml
  • grace
  • grace-ml
  • daniel
  • daniel-ml
  • serena
  • serena-ml
  • adam
  • adam-ml
  • nicole
  • nicole-ml
  • jessie
  • jessie-ml
  • ryan
  • ryan-ml
  • sam
  • sam-ml
  • glinda
  • glinda-ml
  • giovanni
  • giovanni-ml
  • mimi
  • mimi-ml
say_language default: enarb [Arabic, Modern Standard]
ar-AR [Arabic, Modern Standard]
ar-XA [Arabic] gcloud
bn-IN [Bengali, India] gcloud
yue-HK [Chinese, Hong Kong] gcloud
cmn-CN [Chinese, Mandarin] gcloud
cmn-TW [Chinese, Mandarin] gcloud
zh-CN [Chinese, Mandarin]
cs-CZ [Czech, Czech Republic] gcloud
cy-GB [Welsh, UK]
da-DK [Danish, Denmark]
de [German, Germany]
de-DE [German, Germany]
en [English, United States]
en-AU [English, Australia]
en-CA [English, Canada]
en-GB [English, UK]
en-GB-WLS [English, Wales]
en-IN [English, India]
en-US [English, United States]
es [Spanish, United States]
es-ES [Spanish, Spain]
es-MX [Spanish, Mexico]
es-US [Spanish, United States]
fil-PH [Filipino, Philippines] gcloud
fi-FI [Finnish, Finland] gcloud
fr [French, France]
fr-CA [French, Canada]
fr-FR [French, France]
el-GR [Greek, Greece] gcloud
gu-IN [Gujarati, India] gcloud
hi-IN [Hindi, India]
hu-HU [Hungarian, Hungary] gcloud
is-IS [Icelandic, Iceland]
id-ID [Indonesian, Indonesia] gcloud
it [Italian, Italy]
it-IT [Italian, Italy]
ja-JP [Japanese, Japan]
kn-IN [Kannada, India] gcloud
ko-KR [Korean, Korea]
ml-IN [Malayalam, India] gcloud
morse [Morse Code, Dit Dah]
nb-NO [Norwegian, Norway]
nl-NL [Dutch, Netherlands]
pl-PL [Polish, Poland]
pt-BR [Portuguese, Brazil]
pt-PT [Portuguese, Portugal]
ro-RO [Romanian, Romania]
ru-RU [Russian, Russia]
sk-SK [Slovak, Slovakia] gcloud
sv-SE [Swedish, Sweden]
ta-IN [Tamil, India] gcloud
te-IN [Telugu, India] gcloud
th-TH [Thai, Thailand] gcloud
tr-TR [Turkish, Turkey]
uk-UA [Ukrainian, Ukraine] gcloud
vi-VN [Vietnamese, Vietnam] gcloud
urls.ringAvailable 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

version: 1.0.0
sections:
main:
- play: https://example.com/file.mp3

Playing multiple URLs

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

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