This topic explains how to set a background sound for an audio/video call between an AI agent and an end user to make the agent sound more human-like.
Introduction
The background sound feature lets you add preset background sounds, such as cafe chatter, office noise, or street sounds, to an audio/video call between an AI agent and a user.
This feature is designed for use cases such as customer service, virtual social interactions, and remote interviews. It creates a more natural and realistic call atmosphere without exposing the user's actual environment.
Use cases
AI customer service: Enabling an office or call center sound simulates a professional service environment and builds trust during calls with an AI agent.
Virtual social interactions: Using ambient sounds such as cafe chatter or park enhances immersion in virtual dating or companionship scenarios.
Implementation
1. Upload background sounds in the console
Go to the AI Agents page in the IMS console. Select an agent and click Manage in the Actions column.

Click the Advanced Configurations tab. In the Background Sounds section, Alibaba Cloud provides official background sounds.

You can also upload custom sounds. On the Custom tab, click Upload to upload an audio file and get the corresponding Sound ID.

2. Set background sounds during a call
Audio/Video calls
When calling the StartAIAgentInstance operation, configure the AmbientSoundConfig parameter in the AIAgentConfig object. The structure is as follows:
Parameter | Type | Description | Example |
ResourceId | String | The ID of the background sound. | public_conversation |
Volume | Integer | The volume of the background sound. Valid values: [0, 100]. A value of 0 disables the sound. | 50 |