Skip to main content

You are viewing Agora Docs forBetaproducts and features. Switch to Docs

Android
iOS
macOS
Web
Windows
Electron
Flutter
React Native
Python
React JS
Unity
Unreal Engine
Unreal (Blueprint)

Audio-strength stream selection

By default, users joining a channel are automatically subscribed to the audio streams of all remote users. However, in scenarios with many users streaming simultaneously, such as large meetings, this consumes significant downstream bandwidth and system resources. To alleviate the bandwidth pressure and reduce system resource consumption on the receiving end, Agora offers audio-strength stream selection based on volume.

Understand the tech

After you enable audio-strength stream selection, Agora selects N audio streams with the highest volume, according to an audio-strength algorithm, and transmits them to the receiving end. The default value of N is 3 streams but you can customize it according to your requirements. To accommodate diverse business scenarios, Agora also provides the streaming end with the option to choose whether its published audio stream participates in audio-strength stream selection or is directly transmitted to the receiving end.

Prerequisites

Ensure that you have implemented the SDK quickstart in your project.

Information

To enable this feature, contact technical support.

Implement stream selection

This section shows you how to implement audio-strength stream selection in common business scenarios.

Enable audio-strength stream selection

When audio-strength stream selection is enabled, all audio streams in the channel participate in the selection by default. Agora transmits the top 3 audio streams with the highest volume to the receiving end. To customize the number of transmitted audio streams N, contact technical support. In scenarios with dozens or even hundreds of simultaneous streams, enabling audio-strength stream selection helps reduce pressure on the downstream bandwidth resource at the receiving end.

Customize participation

To exclude a user from audio-strength stream selection and ensure that their stream is transmitted to the receiving end regardless of its volume, use one of the following methods:

  • When calling joinChannel or joinChannelWithUserAccount to join a channel, set isAudioFilterable to false in ChannelMediaOptions and pass the object in the options argument.

  • After joining a channel, call updateChannelMediaOptions and set isAudioFilterable to false in ChannelMediaOptions and pass the object in the options argument.

To receive all audio streams for a particular user, without any filtering by the audio-strength stream selection feature, pull all subscribed remote audio streams. To achieve this, you call the setParameters method with suitable JSON options. For details, contact technical support.

Use case example

In a large enterprise meeting, with audio-strength stream selection enabled, certain key participants may designate their published audio streams to be excluded from selection based on audio strength. Instead, these streams are transmitted directly to the receiving end.

If there are 500 participants in the channel, and N is set to 4, it means that Agora transmits the top 4 audio streams with the highest volume to the receiving end. However, the main speaker A, representing headquarters, and other branch representatives B, C, D set their published audio streams not to participate in the selection. This setting reduces stuttering when playing audio streams at the receiving end. It also ensures that key users have their audio streams received by the audience, even if their speaking volume is low.

Use Case Scenario

Reference

This section contains content that completes the information on this page, or points you to documentation that explains other aspects to this product.

Voice Calling