PlayTTS

This action should be used to play a text to speech message on the call.

The following is an example of the JSON response you would need to provide:

{
    "commands": [ 
            {
                "function": "PlayTTS",
                "message": "Hello This is a test message", 
                "voice": "f",
                "language": "en",
                "dtmfInterrupt": true,
                "dtmfLength": 5
            } 
     ]
}

The above example would be used if you want the message “This is a test message” to be pronounced in an English female voice.

The action should contain the following parameters:

Name

Type

Description

function

String

PlayTTS – Text to speech function.

message

String

The message that will be generated and played to the calling user.

language

String

The language of the TTS message. See below the list of supported languages.

voice

String

Defines gender used to generate and play the TTS message. See below the list of supported genders and languages

dtmfInterrupt

Boolean

(Optional) Enables dial-pad inputs from the calling user. The # (hash) key will end the user's dial-pad input.

dtmfLength

Integer

(Optional) Maximum number of dial-pad inputs that the calling user can make. Accepted values are from 1 to 20.

Please note that If dtmfInterrupt is used, dtmfLength is also required. The calling user's dial-pad inputs will be provided to you in the Call Handle dtmf key.

Supported TTS Voice and language are:

Language

Value

Male voice (M)

Female voice (F)

English

EN

Yes

Yes

Chinese

ZH

No

Yes

Danish

DA

Yes

Yes

Dutch

NL

Yes

Yes

French

FR

Yes

Yes

German

DE

Yes

Yes

Hindi

HI

No

Yes

Icelandic

IS

Yes

Yes

Italian

IT

Yes

Yes

Japanese

JA

Yes

Yes

Korean

SV

No

Yes

Norwegian

NB

No

Yes

Polish

PL

Yes

Yes

Portuguese

PT

Yes

Yes

Romanian

RO

No

Yes

Russian

RU

Yes

Yes

Spanish

ES

Yes

Yes

Swedish

SV

No

Yes

Thai

TH

No

Yes

Turkish

TR

No

Yes

Vietnamese

VN

Yes

Yes

Welsh

CY

No

Yes