Skip to main content

Music Ducking

About Music Ducking

Music ducking is a technique used in voice communication applications to reduce the volume of background music when someone is speaking. This is important because it allows the speaker's voice to be heard clearly without being drowned out by the music. Music ducking works by automatically lowering the volume of the music when the microphone picks up sound, and then gradually increasing it again once the sound has stopped. This technique is commonly used in radio broadcasting, podcasting, and video conferencing applications to ensure that the conversation remains clear and easy to understand. By using music ducking, voice communication applications can provide a more professional and polished experience for their users.

Audio Lab

This example plays an audio file and ducks the playback volume based on the user's microphone input.

Code Example

{
"nodes": {
{ "id": "audioPlayerNode", "type": "AudioPlayerNode" },
{ "id": "musicDuckingNode", "type": "MusicDuckingNode" }
},
"connections": {
{ "sourceNode": "audioPlayerNode", "destinationNode": "musicDuckingNode" },
{ "sourceNode": "inputNode", "destinationNode": "musicDuckingNode" },
{ "sourceNode": "musicDuckingNode", "destinationNode": "outputNode" }
},
"tracks": {
"audioPlayerNode": "example.mp3"
}
}