# Say

The `<Say>` verb converts text to speech and plays it to the caller. Use it for spoken prompts, greetings and instructions when you do not have a recorded audio file.

## Attributes

| Name | Type | Default | Description |
|------|------|---------|-------------|
| `voice` | string | `man` | The voice used for speech synthesis. Any string is accepted; Signals does not check `voice` against a fixed list. See [Voice selection](#voice-selection) for how each value is read. |
| `language` | string | `en` | Must match the selected voice. A mismatch returns an error. The built-in aliases and current ElevenLabs integration accept `en` and `en-US`; other Google languages require a matching named voice. |
| `loop` | integer | `1` | Number of times to speak the text. `0` repeats it until the call ends, capped at 1,000 repetitions. |

## Voice selection

Google Cloud Text-to-Speech is the default speech engine. Signals reads the `voice` string you supply according to these rules:

| `voice` value | Voice used |
|---|---|
| `man` (default) | Google male neural voice (`en-US-Neural2-I`). |
| `woman` or `alice`, matched exactly in lowercase | Google female neural voice (`en-US-Neural2-C`). |
| Any other plain string, including a typo or a capitalized form such as `Woman` | The Google male neural voice (`en-US-Neural2-I`). |
| `Google.<voice-name>` | The named Google Cloud Text-to-Speech voice, for example `Google.en-US-Wavenet-D`. |
| `Elevenlabs.<voice-id>` | The named ElevenLabs voice, spoken with the `eleven_v3` model. Signals supplies the ElevenLabs credentials; you do not pass a key in the document. |

The provider name before the first period (`Google` or `Elevenlabs`) is matched without regard to case, and everything after the period is passed through unchanged as the voice name or ID. A provider name Signals does not recognize falls back to the default Google male voice; the caller hears that voice, not an error.

## Nesting

`<Say>` contains only the text to speak and cannot contain other verbs. It may appear as a direct child of `<Response>`, or inside [`<Gather>`](/programmable-voice/oneml/gather) as a prompt the caller can interrupt.

## Examples

A plain greeting:

```xml
<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Say>Thank you for calling Acme Delivery support.</Say>
</Response>
```

Selecting an ElevenLabs voice by ID:

```xml
<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Say voice="Elevenlabs.aRlmTYIQo6Tlg5SlulGC">Thank you for calling Acme Delivery support.</Say>
</Response>
```

Selecting a specific Google Cloud Text-to-Speech voice:

```xml
<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Say voice="Google.en-US-Wavenet-D">Thank you for calling Acme Delivery support.</Say>
</Response>
```

Speaking a one-time passcode twice, with spaces so each digit is read separately:

```xml
<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Say loop="2">Your verification code is 4 8 2 9 1 6.</Say>
  <Hangup/>
</Response>
```

`<Say>` inside [`<Gather>`](/programmable-voice/oneml/gather) as a menu prompt:

```xml
<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Gather action="/handle-menu" numDigits="1">
    <Say>For sales, press 1. For support, press 2.</Say>
  </Gather>
</Response>
```

## See also

- [Play](/programmable-voice/oneml/play)
- [Gather](/programmable-voice/oneml/gather)
- [OneML overview](/programmable-voice/oneml/overview)

A Google voice with an explicit matching language:

```xml
<Response>
  <Say voice="Google.fr-FR-Standard-A" language="fr-FR">Bonjour.</Say>
</Response>
```
