---
description: Introduction to <Say/> Tag in Opentact XML
---

# \<Say/>

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
<?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
<?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
<?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       | <p>WaveNet | Standard </p><p>Default: Standard</p>    |
| gender     | no       | <p>MALE | FEMALE </p><p>Default: FEMALE</p>           |
| code       | no       | <p>voice code </p><p>/rest/dict/gtts</p>              |
| lang       | no       | <p>TextToSpeech language. </p><p>Default: "en-US"</p> |
| loop       | no       | Default: 1                                            |

