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

# #sound — Audio Files

> Add sound effects and audio to your app

The `#sound` command bundles audio files into your app so you can play them at specific moments — button taps, notifications, transitions, background music, or anything else that benefits from sound.

## What It Does

When you use `#sound`, the AI:

1. Adds the audio file to your Xcode project as a bundled resource
2. Sets up an audio player using AVFoundation
3. Triggers playback at the moment you describe

## Supported Formats

| Format   | Best for                         | Notes                             |
| -------- | -------------------------------- | --------------------------------- |
| **MP3**  | Music, longer audio clips        | Compressed, smaller file size     |
| **WAV**  | Short sound effects, UI feedback | Uncompressed, higher quality      |
| **AIFF** | High-quality audio               | Apple's uncompressed audio format |

## How to Use

<Steps>
  <Step title="Type #sound in the chat">
    Type `#` and select **sound** from the toolkit popover.
  </Step>

  <Step title="Select your audio file">
    The file picker opens, filtered to MP3, WAV, and AIFF files. Choose the sound you want to add.
  </Step>

  <Step title="Describe when to play it">
    The file appears as an orange chip below the input. Tell the AI when and where to play the sound.
  </Step>

  <Step title="Send your message">
    Press Enter. The AI bundles the audio file and sets up playback logic where you specified.
  </Step>
</Steps>

## Example Prompts

```
Play this sound when a notification arrives
```

```
Use this as background music on the home screen
```

```
Play this click sound when buttons are tapped
```

```
Play this success chime when the user completes a task
```

```
Use this as a swoosh transition sound between screens
```

## Tips for Working with Audio

<AccordionGroup>
  <Accordion title="Use short clips for UI feedback">
    Button taps, swipes, and transitions should use very short audio clips (under 1 second). This keeps the interaction feeling responsive and avoids annoying your users.
  </Accordion>

  <Accordion title="Use MP3 for longer audio">
    If you're adding background music or audio that's more than a few seconds, use MP3 to keep the file size manageable. WAV files are uncompressed and can be very large.
  </Accordion>

  <Accordion title="Consider letting users mute sounds">
    Not everyone wants an app that makes noise. If you add sound effects, consider including a mute toggle in your app's settings.
  </Accordion>
</AccordionGroup>

<Tip>
  Use short audio clips for UI feedback. Use MP3 for longer audio to keep file size down.
</Tip>

## Where to Find Sound Effects

| Source                                          | License               | Notes                                          |
| ----------------------------------------------- | --------------------- | ---------------------------------------------- |
| [Freesound](https://freesound.org)              | Varies (many CC0)     | Large library of community-contributed sounds  |
| [Mixkit](https://mixkit.co/free-sound-effects/) | Free                  | Curated sound effects, no attribution required |
| [Zapsplat](https://zapsplat.com)                | Free with attribution | Thousands of categorized sound effects         |
| GarageBand                                      | Royalty-free          | Built into macOS, great for creating your own  |

## Related

<CardGroup cols={2}>
  <Card title="Toolkit Overview" icon="grid-2" href="/toolkit/overview">
    See all available # commands and how the toolkit works.
  </Card>

  <Card title="#video — Video Files" icon="video" href="/toolkit/video">
    Add video content to your app for in-app playback.
  </Card>
</CardGroup>
