# \<audio>

## \<audio> <a href="#audio" id="audio"></a>

Retrieves and plays the specified audio file. If the audio file is unavailable, any enclosed text is sent to the TTS engine for speech synthesis instead.

### Attributes

<table><thead><tr><th width="218">Name</th><th width="151.33333333333331">Data type<select><option value="a507827f0c654a4b8f209c65fae21d1b" label="String" color="blue"></option><option value="afb4c07b4a13492f8f6f8bf8a5c706dd" label="Integer" color="blue"></option><option value="d58658131b3d4bcaad01834080c80c2e" label="Boolean" color="blue"></option></select></th><th>Description</th></tr></thead><tbody><tr><td>src</td><td><span data-option="a507827f0c654a4b8f209c65fae21d1b">String</span></td><td>The URI of the audio prompt. See <a href="../../../developer-reference/audio-formats-and-prompts#supported_audio_formats">here</a> for supported audio formats.</td></tr><tr><td>expr</td><td><span data-option="a507827f0c654a4b8f209c65fae21d1b">String</span></td><td>The expression may be either a reference to audio previously recorded with the item or evaluate to the URI of an audio resource to fetch.</td></tr><tr><td>stream</td><td><span data-option="a507827f0c654a4b8f209c65fae21d1b">String</span></td><td>The URI of an audio stream to play. Any queued audio is immediately cleared if an MP3 audio stream is opened.</td></tr><tr><td>fetchhint</td><td></td><td>This attribute is not supported.</td></tr><tr><td>fetchtimeout</td><td><span data-option="a507827f0c654a4b8f209c65fae21d1b">String</span></td><td>(defaults to “fetchtimeout” global property value) The timeout for fetches. Must be specified with the appropriate time units (e.g., “120s” for 120 seconds).</td></tr><tr><td>maxage</td><td><span data-option="a507827f0c654a4b8f209c65fae21d1b">String</span></td><td>(defaults to “audiomaxage” global property value) Tells the platform the maximum acceptable age, in seconds, of cached audio resources.</td></tr><tr><td>maxstale</td><td><span data-option="a507827f0c654a4b8f209c65fae21d1b">String</span></td><td>(defaults to “audiomaxstale” global property value) Tells the platform the maximum acceptable staleness, in seconds, of expired cached audio resources.</td></tr><tr><td>maxtime</td><td><span data-option="a507827f0c654a4b8f209c65fae21d1b">String</span></td><td>(defaults to unlimited) The maximum number of seconds of the audio prompt to play.</td></tr><tr><td>starttime</td><td><span data-option="a507827f0c654a4b8f209c65fae21d1b">String</span></td><td>(defaults to “0s”) The number of seconds into the referenced audio prompt at which to begin playback.</td></tr></tbody></table>

### Notes

The setting for the “src” attribute has priority over the setting for the “expr” attribute.\
If the wave file at the location specified by the “src” attribute can not be retrieved, the text within the “audio” tag will be read by the TTS engine.

### Example

```markup
<?xml version="1.0"?>
<vxml version="2.0">
  <form>
    <block>
      <prompt>
        I'm going to play an audio file.
      </prompt>
      <audio src="http://nonexistent.domain.com/test.wav">
        Oops, the audio file could not be retrieved!
      </audio>
    </block>
  </form>
</vxml>
```

The output of the above script would be:

> Computer: I'm going to play an audio file.\
> Computer: (plays audio file if available)

### Child Tags

[\<audio>](https://docs.plumvoice.com/dev/voicexml/tags/audio-tag), [\<break>](https://docs.plumvoice.com/dev/voicexml/tags/break-tag), [\<desc>](https://docs.plumvoice.com/dev/voicexml/tags/desc-tag), [\<emphasis>](https://docs.plumvoice.com/dev/voicexml/tags/emphasis-tag), [\<enumerate>](https://docs.plumvoice.com/dev/voicexml/tags/enumerate-tag), [\<mark>](https://docs.plumvoice.com/dev/voicexml/tags/mark-tag), [\<p>](https://docs.plumvoice.com/dev/voicexml/tags/paragraph-tag), [\<paragraph>](https://docs.plumvoice.com/dev/voicexml/tags/paragraph-tag), [\<phoneme>](https://docs.plumvoice.com/dev/voicexml/tags/phoneme-tag), [\<prosody>](https://docs.plumvoice.com/dev/voicexml/tags/prosody-tag),  [\<say-as>](https://docs.plumvoice.com/dev/voicexml/tags/say-as-tag), [\<sentence>](https://docs.plumvoice.com/dev/voicexml/tags/sentence-tag), [\<speak>](https://docs.plumvoice.com/dev/voicexml/tags/speak-tag), [\<sub>](https://docs.plumvoice.com/dev/voicexml/tags/sub-tag), [\<value>](https://docs.plumvoice.com/dev/voicexml/tags/value-tag), [\<voice>](https://docs.plumvoice.com/dev/voicexml/tags/voice-tag)

### Parent Tags

[\<audio>](https://docs.plumvoice.com/dev/voicexml/tags/audio-tag), [\<block>](https://docs.plumvoice.com/dev/voicexml/tags/block-tag), [\<catch>](https://docs.plumvoice.com/dev/voicexml/tags/catch-tag), [\<emphasis>](https://docs.plumvoice.com/dev/voicexml/tags/emphasis-tag), [\<enumerate>](https://docs.plumvoice.com/dev/voicexml/tags/enumerate-tag), [\<error>](https://docs.plumvoice.com/dev/voicexml/tags/error-tag), [\<field>](https://docs.plumvoice.com/dev/voicexml/tags/field-tag), [\<filled>](https://docs.plumvoice.com/dev/voicexml/tags/filled-tag), [\<foreach>](https://docs.plumvoice.com/dev/voicexml/tags/foreach-tag), [\<help>](https://docs.plumvoice.com/dev/voicexml/tags/help-tag), [\<if>](https://docs.plumvoice.com/dev/voicexml/tags/if-tag), [\<initial>](https://docs.plumvoice.com/dev/voicexml/tags/initial-tag), [\<menu>](https://docs.plumvoice.com/dev/voicexml/tags/menu-tag), [\<noinput>](https://docs.plumvoice.com/dev/voicexml/tags/noinput-tag), [\<nomatch>](https://docs.plumvoice.com/dev/voicexml/tags/nomatch-tag), [\<paragraph>](https://docs.plumvoice.com/dev/voicexml/tags/paragraph-tag), [\<prompt>](https://docs.plumvoice.com/dev/voicexml/tags/prompt-tag), [\<prosody>](https://docs.plumvoice.com/dev/voicexml/tags/prosody-tag), [\<record>](https://docs.plumvoice.com/dev/voicexml/tags/record-tag), [\<sentence>](https://docs.plumvoice.com/dev/voicexml/tags/sentence-tag), [\<speak>](https://docs.plumvoice.com/dev/voicexml/tags/speak-tag), [\<subdialog>](https://docs.plumvoice.com/dev/voicexml/tags/subdialog-tag), [\<transfer>](https://docs.plumvoice.com/dev/voicexml/tags/transfer-tag), [\<voice>](https://docs.plumvoice.com/dev/voicexml/tags/voice-tag)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.plumvoice.com/dev/voicexml/tags/audio-tag.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
