# audio

> Talos 0.6 · Since 0.6

Use it in a scene entity's `components` list as `{ "type": "audio", … }`. The contract writes the fields flat and refuses unknown keys.

## Fields

| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
| `asset` | `string` | yes |  |  |  |
| `spatial` | `boolean` | yes |  |  |  |
| `loop` | `boolean` | yes |  |  |  |
| `volume` | `number` | yes |  |  |  |
| `autoplay` | `boolean` | no |  |  |  |
| `range` | `number` | no |  |  |  |

## Rules that can refuse it

- `asset-builtin-unknown`
- `audio-bus-unknown`
- `audio-loops-stacked`
- `audio-missing-file`
- `audio-orphan`
- `feel/audio-none`
- `feel/audio-unplayable`
- `project-default-invalid`

## Example

From the contract's tested fixture `fixtures/contract/full20/scene.json#speaker`.

```json
{
  "type": "audio",
  "asset": "ambience",
  "spatial": true,
  "loop": true,
  "volume": 0.4,
  "autoplay": true,
  "range": 12
}
```
