# Create a Media File with Text to Speech

Use **Create a Media File with Text to Speech** when you want MiRTA PBX to generate a prompt from written text instead of uploading a prerecorded audio file.

## Open the form

<table id="bkmrk-stepaction-1select-t"><thead><tr><th>Step</th><th>Action</th></tr></thead><tbody><tr><td>1</td><td>Select the correct tenant in the top bar.</td></tr><tr><td>2</td><td>Open **Configuration &gt; Media Files**.</td></tr><tr><td>3</td><td>Select **New Media File**.</td></tr><tr><td>4</td><td>Complete the Information, text-to-speech, and transformation blocks, then select **Save**.</td></tr></tbody></table>

## Information

<figure id="bkmrk-information-block-wh">![Information block when creating a text-to-speech media file.](https://manual.mirtapbx.com/uploads/images/gallery/2026-06/tjKtts-information.png)<figcaption>Information block when creating a text-to-speech media file.</figcaption></figure>This block identifies the generated prompt in lists and destination selectors.

<table id="bkmrk-fielddescription-nam"><thead><tr><th>Field</th><th>Description</th></tr></thead><tbody><tr><td>Name</td><td>Short display name for the generated prompt. The example uses **Docs Demo IVR Menu TTS**.</td></tr><tr><td>Description</td><td>Administrative note for the generated prompt. Use it to describe the IVR, queue, or call flow that will use the prompt.</td></tr></tbody></table>

## Text to Speech

<figure id="bkmrk-text-to-speech-block">![Text-to-speech block with an IVR selection prompt example.](https://manual.mirtapbx.com/uploads/images/gallery/2026-06/fkftts-text-to-speech.png)<figcaption>Text-to-speech block with an IVR selection prompt example.</figcaption></figure>This block defines the script, voice engine, voice, and creation mode.

<table id="bkmrk-field-or-optiondescr"><thead><tr><th>Field or option</th><th>Description</th></tr></thead><tbody><tr><td>Text</td><td>Prompt text to synthesize. The field supports runtime variables such as `${INCOMINGDID}` and `${CALLERID(num)}`. When the media file is generated dynamically during the call, any Asterisk channel variable or user-defined variable available in the call can be used in this format. Surround a number with `//` markers when it should be read digit by digit.</td></tr><tr><td>Engine</td><td>Voice engine to use. Leave **Tenant Default** unless this prompt needs a specific configured engine.</td></tr><tr><td>Voice</td><td>Voice to use for the generated prompt. Leave **Tenant Default** unless the prompt requires a specific language, dialect, or voice.</td></tr><tr><td>Create now</td><td>Generates and stores the audio when you save the media file. Use this for fixed prompts that do not need runtime variables.</td></tr><tr><td>Dynamically during the call</td><td>Stores the text and voice settings, then generates the prompt during call execution. Use this when the prompt includes Asterisk channel variables, user-defined variables, or other values that must be read from the active call.</td></tr><tr><td>Region</td><td>Appears for engines that require a regional endpoint, such as Amazon AWS Polly.</td></tr><tr><td>Voice Engine API username</td><td>Optional per-prompt API username when the selected engine requires credentials. Prefer tenant or global defaults when possible.</td></tr><tr><td>Voice Engine API password</td><td>Optional per-prompt API password. Treat it as sensitive.</td></tr></tbody></table>

## Example Text

For an IVR selection menu, use clear wording and keep the option list short:

```
Thank you for calling Canistracci OIL. For accounting, press 1. For sales, press 2. For support, press 3. To repeat this menu, press 9.
```

Dynamic prompts can include call variables, for example:

```
We received your call from ${CALLERID(num)} for ${INCOMINGDID}. Your support case is ${CASEID}.
```

## Upload/Create Transformations

<figure id="bkmrk-upload%2Fcreate-transf-1">![Upload/create transformations block for a text-to-speech media file.](https://manual.mirtapbx.com/uploads/images/gallery/2026-06/w3btts-transformations.png)<figcaption>Upload/create transformations block for a text-to-speech media file.</figcaption></figure>This block controls volume and format conversion for generated audio. It is especially relevant when using **Create now**, because the media file is synthesized and stored immediately.

<table id="bkmrk-field-or-optiondescr-1"><thead><tr><th>Field or option</th><th>Description</th></tr></thead><tbody><tr><td>Volume correction</td><td>Applies a linear gain adjustment. Use **1.0** for no change. Values below 1 reduce volume; values above 1 increase it.</td></tr><tr><td>Automatic</td><td>Lets MiRTA PBX choose the stored format.</td></tr><tr><td>WAV mono 8Khz 64kbps</td><td>Converts the generated audio to an 8 kHz mono WAV format suitable for narrowband telephony prompts.</td></tr><tr><td>WAV mono 16Khz 128kbps</td><td>Converts the generated audio to a 16 kHz mono WAV format.</td></tr><tr><td>SLN 8 khz format</td><td>Converts the generated audio to 8 kHz signed linear audio.</td></tr><tr><td>SLN 16 khz format</td><td>Converts the generated audio to 16 kHz signed linear audio.</td></tr><tr><td>Leave as is</td><td>Stores the generated file without conversion, except for any requested volume correction.</td></tr></tbody></table>

## Editing

To edit a text-to-speech media file, open it from the Media Files list, update the text, engine, voice, creation mode, or transformation options, and select **Save**. If the prompt is used by an IVR, queue, or other call flow, test the call flow after saving.