#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:
- Adds the audio file to your Xcode project as a bundled resource
- Sets up an audio player using AVFoundation
- 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
Select your audio file
The file picker opens, filtered to MP3, WAV, and AIFF files. Choose the sound you want to add.
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.
Example Prompts
Tips for Working with Audio
Use short clips for UI feedback
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.
Use MP3 for longer audio
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.
Consider letting users mute sounds
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.
Where to Find Sound Effects
Related
Toolkit Overview
See all available # commands and how the toolkit works.
#video — Video Files
Add video content to your app for in-app playback.