<Say/>

Introduction to <Say/> Tag in Opentact XML

The <Say/> tag in Opentact XML provides a straightforward way to incorporate spoken text into phone conversations. Utilizing Text-to-Speech (TTS) technology, Opentact dynamically converts specified text into an audio file, enhancing the interactivity and customization of call flows. Let's explore how the <Say/> tag works through an illustrative example:

Basic Text-to-Speech Conversion:

<?xml version="1.0" encoding="UTF-8"?>
<Response>
   <!-- The <Say/> tag automatically converts text to speech -->
   <Say>How are you?</Say>
   <Hangup/>
</Response>

In this example, the <Say/> tag is employed to render the text "How are you?" as speech. Opentact seamlessly converts the provided text into an audio file, which is then played during the phone conversation. Following the <Say/> tag, the call flow proceeds to the <Hangup/> tag, concluding the interaction.

Dynamic and Customizable:

The <Say/> tag allows users to dynamically generate spoken content during calls, providing a personalized experience for callers. It supports the inclusion of various phrases, greetings, or informational messages, enhancing the overall communication.

<?xml version="1.0" encoding="UTF-8"?>
<Response>
   <Say>Welcome to Opentact. Your account balance is $50. Have a great day!</Say>
   <Hangup/>
</Response>

Multilingual Support:

Opentact's Text-to-Speech capabilities support multiple languages, enabling users to deliver content in the preferred language of their audience.

<?xml version="1.0" encoding="UTF-8"?>
<Response>
   <Say lang="es">Bienvenido a Opentact. Gracias por llamar.</Say>
   <Hangup/>
</Response>

Here are the fields supported by <Say/>

Field Name

Required

Description

type

no

WaveNet | Standard

Default: Standard

gender

no

MALE | FEMALE

Default: FEMALE

code

no

voice code

/rest/dict/gtts

lang

no

TextToSpeech language.

Default: "en-US"

loop

no

Default: 1

Last updated