Audio Clips
Background audio comes from an audio clip. Ultravox provides three built-in clips:office, hvac and birds. You can also
upload up to 5 of your own. Clips you upload are private to your account.
An uploaded clip must be:
- An uncompressed (PCM) WAV file
- Mono, with 16-bit samples
- Sampled between 16kHz and 48kHz
- At most 60 seconds long, and at most 6MB
In the Web App
The Audio Clips page in the Ultravox web app lists your clips and the built-in ones. You can play any of them, upload a new clip, or delete one of yours.With the API
Upload a clip with Create Audio Clip. Its name must be unique within your account:Adding Background Audio to an Agent
In the agent builder, open the settings panel and choose a clip under Background Audio. You can preview the clip there and adjust its volume. With the API, setbackgroundAudio in the agent’s callTemplate, naming the clip by its name or ID:
volume multiplies the clip’s samples, from 0 to 10. 1 plays the clip as recorded, and the default of 0.3 plays it at 30% of
its recorded amplitude. Values above 1 amplify the clip, and any sample pushed past the maximum level is clipped, which distorts
the sound.
Ultravox stores the clip’s ID, so renaming a clip doesn’t affect the agents that use it.
Calls
Calls created with an agent use the agent’s background audio. To change it for a single call, setbackgroundAudio when
creating the call. The call’s value replaces the agent’s.
Calls created directly, without an agent, take the same backgroundAudio field in the
Create Call request.
Background audio needs a voice call. Creating an agent or call that sets backgroundAudio returns a 400 error when its
medium restriction doesn’t allow voice.