> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainlit.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Audio

The `Audio` class allows you to display an audio player for a specific audio file in the chatbot user interface.

You must provide either an url or a path or content bytes.

## Attributes

<ParamField path="name" type="str">
  The name of the audio file to be displayed in the UI. This is shown to users.
</ParamField>

<ParamField path="display" type="ElementDisplay" optional>
  Determines where the element should be displayed in the UI. Choices are "side"
  (default), "inline", or "page".
</ParamField>

<ParamField path="url" type="str" optional>
  The remote URL of the audio.
</ParamField>

<ParamField path="path" type="str" optional>
  The local file path of the audio.
</ParamField>

<ParamField path="content" type="bytes" optional>
  The file content of the audio in bytes format.
</ParamField>

<ParamField path="auto_play" type="bool" optional>
  Whether the audio should start playing automatically.
</ParamField>

## Example

```python theme={null}
import chainlit as cl


@cl.on_chat_start
async def main():
    elements = [
        cl.Audio(name="example.mp3", path="./example.mp3", display="inline"),
    ]
    await cl.Message(
        content="Here is an audio file",
        elements=elements,
    ).send()
```
