# Audio

To upload audio files to your Space, go to <mark style="color:yellow;">Assets/Audio Content</mark>

<figure><img src="https://955540963-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgWSBgBDll5yYEIDkdXon%2Fuploads%2Ferfz4ZVPWcqsqWiyJIQd%2Fimage.png?alt=media&#x26;token=181e3f22-765c-4918-a496-e2edb502a972" alt="Assets/Audio Content"><figcaption></figcaption></figure>

Drag and drop or use the upload button to add your audio files. We currently support MP3, AAC and WAV files.

<figure><img src="https://955540963-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgWSBgBDll5yYEIDkdXon%2Fuploads%2FyBYqw4VEcM2I3e9gEW6i%2Fimage.png?alt=media&#x26;token=1e1e7676-de76-47ad-bfcd-d61dbfb49040" alt="Audio Content"><figcaption></figcaption></figure>

You can use the play function in this screen to listen to the uploaded audio files to ensure they are correct.

There are two ways to use audio in Sphere, as a background track which will play while your viewer is browsing your sphere, or audio can be applied as an Action in Curator. This will allow the audio file to play when a user clicks on the action object in your published sphere.

### Background Audio

To apply a background track to your Sphere you first need to enable audio. You do this via the <mark style="color:yellow;">Sphere Settings</mark> options.

<figure><img src="https://955540963-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgWSBgBDll5yYEIDkdXon%2Fuploads%2F2YWfjTCUrocP2ZKSKYIK%2Fimage.png?alt=media&#x26;token=cc7f60f8-1fde-473a-a5a0-ce3dcad1f299" alt="Audio - disabled "><figcaption></figcaption></figure>

Once enabled, the options will expand. Allowing you to select an uploaded track, set the volume (this is relative volume to the end user's device) and style the audio UI controls which will appear on your Sphere.

We've placed these settings at the Sphere level to allow you to have different audio tracks and styling options for each Sphere you create.

<figure><img src="https://955540963-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgWSBgBDll5yYEIDkdXon%2Fuploads%2FwGx7BZ5OS78L28E3Lj62%2Fimage.png?alt=media&#x26;token=6c7af848-6153-4bc6-8740-3f9f10922283" alt="Audio - enabled"><figcaption></figcaption></figure>

To ensure that background audio on your sphere is compliant with Accessibility standards, we have made updates to the cookies acceptance pop-up which appears when a visitor first loads a Sphere. This update allows the visitor to select if they want audio to autoplay. You can see these new options in <mark style="color:yellow;">Settings / Cookies.</mark> The option to play audio will only appear if you have set a track for the Sphere.

<figure><img src="https://955540963-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgWSBgBDll5yYEIDkdXon%2Fuploads%2F2jMF7xjzXKEZLkDWseMb%2Fimage.png?alt=media&#x26;token=71a11584-13e4-4b37-87c4-26d8eff08ed4" alt="Cookies"><figcaption></figcaption></figure>

The UI on your published Sphere for audio will appear in the top right of the screen. If you have a background track enabled, the UI to mute/unmute this will always be visible. If you have canvas based audio actions, the UI to stop the playback will appear only when the track is playing. Allowing the viewer to stop the playback.

<figure><img src="https://955540963-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgWSBgBDll5yYEIDkdXon%2Fuploads%2FByaXq7ReqVH4xxXHXiAI%2Fsphere-ui.png?alt=media&#x26;token=bce9d1bb-277c-4651-b61e-954c1ac828af" alt=""><figcaption></figcaption></figure>

If background audio was playing when a visitor triggered a canvas audio action, the background audio will mute while the action plays and then unmute once the action is complete.

The same applies for other canvas actions which activate overlays. The background audio will mute while an overlay is open and unmute when the overlay is closed.

### Audio Actions

If you have uploaded audio files to your space, you can assign them to objects on the canvas which play the audio when a user interacts with the object on a published Sphere.

While in Actions Mode in Curator, you will see a new audio action.

<figure><img src="https://955540963-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgWSBgBDll5yYEIDkdXon%2Fuploads%2FZUDv8w1bSEaIR1GIKzOL%2Faudio-action.png?alt=media&#x26;token=d3fcb1dd-6326-4d5e-8cfc-6fd773927489" alt=""><figcaption></figcaption></figure>

Drag the action to an object like you would any other action and select from one of your uploaded audio files.

Audio actions will play through the track once when clicked on a published Sphere and if the viewer had background audio playing when interacting with an audio action, the background track will resume once the action is complete.

### Sample Library

If you don't have access to audio files but would like to test this feature, we recommend using a service like <https://pixabay.com/music/> to download royalty free samples.

{% hint style="warning" %}
It's important to remember that Sphere and Cozmos take no responsibility for the licensing of audio used in Spheres you create and the correct licensing is the responsibility of the Space Owner.
{% endhint %}
