addProjectSound
Upload a local audio file (MP3, M4A, AAC, or WAV under 1 MB) into a project's sound library so every device can play it by name with glasses.audio.playSound(). Use when building UI sounds like shutter clicks during app development.
Instructions
Upload a local audio file into a project's named-sound library. Pass the name app code will play it with and a path to an MP3/M4A/AAC/WAV file under 1 MB. After the next assistant start (app relaunch), every device running the app can glasses.audio.playSound(name) — and the sound appears in the dashboard's Agent section, where a human can re-point that name at a different clip with no app change. The SDK plays none of them on its own. Code registrations (audio.registerSound) win over library sounds on name collisions. GATED by the project's MCP access grant (assistant_config.sounds — default Read+Write; a permission_denied 403 means the owner restricted it). Requires a linked Extentos account (a 401 returns account_required, run extentos-mcp login). USE to provision an app's UI sounds while building it — e.g. a camera app's shutter click ({ name: "shutter", filePath: "./sounds/shutter.mp3" }). DON'T USE for the assistant's VOICE (that's setAssistantConfig) or for sounds the app should bundle locally (registerSound in app code needs no upload).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The play-by-name key, e.g. "shutter" — app code calls glasses.audio.playSound(name). | |
| filePath | Yes | Path to a local MP3/M4A/AAC/WAV file under 1 MB (relative to the working directory, or absolute). | |
| appPackage | Yes | The app's package / bundle id (project_install_id), e.g. com.example.myapp. |