The Voice SDK supports the following scenarios:

  • Voice communication
  • Live voice broadcast

For the key features included in each scenario, see Voice Overview and Audio Broadcast Overview.


v2.9.1 is released on Sep 19, 2019.

New features

Detecting local voice activity

This release adds the report_vad(bool) parameter to the enableAudioVolumeIndication method to enable local voice activity detection. Once it is enabled, you can check the AgoraRtcAudioVolumeInfo struct of the reportAudioVolumeIndicationOfSpeakers callback for the voice activity status of the local user.


Supporting more audio sample rates for recording

To enable more audio sample rate options for recording, this release adds a new startAudioRecording method with a sampleRate parameter. In the new method, you can set the sample rate as 16, 32, 44.1 or 48 kHz. The original method supports only a fixed sample rate of 32 kHz and is deprecated.

API changes

To improve the user experience, we made the following changes in v2.9.1:



  • startAudioRecording


v2.9.0 is released on Aug. 16, 2019.

Compatibility changes

1. RTMP streaming

In this release, we deleted the following methods:

  • configPublisher

If your app implements RTMP streaming with the methods above, ensure that you upgrade the SDK to the latest version and use the following methods for the same function:

For how to implement the new methods, see Push Streams to the CDN.

2. Disabling/enabling the local audio

To improve the audio quality in the Communication profile, this release sets the system volume to the media volume after you call the enableLocalAudio(true) method. Calling enableLocalAudio(false) switches the system volume back to the in-call volume.

New features

1. Faster switching to another channel

This release adds the switchChannelByToken method to enable the audience in a Live Broadcast channel to quickly switch to another channel. With this method, you can achieve a much faster switch than with the leaveChannel and joinChannelByToken methods. After the audience successfully switches to another channel by calling the switchChannelByToken method, the SDK triggers the didLeaveChannelWithStats and didJoinChannel callbacks to indicate that the audience has left the original channel and joined a new one.

2. Channel media stream relay

This release adds the following methods to relay the media streams of a host from a source channel to a destination channel. This feature applies to scenarios such as online singing contests, where hosts of different Live Broadcast channels interact with each other.

During the media stream relay, the SDK reports the states and events of the relay with the channelMediaRelayStateDidChange and didReceiveChannelMediaRelayEvent callbacks.

For more information on the implementation, API call sequence, sample code, and considerations, see Co-host Across Channels.

3. Reporting the local and remote audio state

This release adds the localAudioStateChange and remoteAudioStateChangedOfUid callbacks to report the local and remote audio states. With these callbacks, the SDK reports the following states for the local and remote audio:

  • The local audio: Stopped(0), Recording(1), Encoding(2), or Failed(3). When the state is Failed(3), see the error parameter for troubleshooting.
  • The remote audio: Stopped(0), Starting(1), Decoding(2), Frozen(3), or Failed(4). See the reason parameter for why the remote audio state changes.

4. Reporting the local audio statistics

This release adds the localAudioStats callback to report the statistics of the local audio during a call, including the number of channels, the sending sample rate, and the average sending bitrate of the local audio.

5. Pulling the remote audio data

To improve the experience in audio playback, this release adds the following methods to pull the remote audio data. After getting the audio data, you can process it and play it with the audio effects that you want.

The difference between the onPlaybackAudioFrame callback and the pullPlaybackAudioFrameRawData / pullPlaybackAudioFrameSampleBufferByLengthInByte method is as follows:

  • onPlaybackAudioFrame: The SDK sends the audio data to the app once every 10 ms. Any delay in processing the audio frames may result in an audio delay.
  • pullPlaybackAudioFrameRawData / pullPlaybackAudioFrameSampleBufferByLengthInByte: The app pulls the remote audio data. After setting the audio data parameters, the SDK adjusts the frame buffer and avoids problems caused by jitter in external audio playback.


1. Reporting more statistics of the in-call quality

This release adds the following statistics in the AgoraChannelStats class:

  • AgoraChannelStats: The total number of the sent audio bytes and received audio bytes during a session.

2. Other Improvements

  • Improves the audio quality when the audio scenario is set to GameStreaming.
  • Improves the audio quality after the user disables the microphone in the Communication profile.

Issues fixed


  • When interoperating with a Web app, voice distortion occurs after the native app enables the remote sound position indication.
  • Crashes occur when testing the microphone.


  • Occasionally mixed streams in RTMP streaming.

API changes

To improve the user experience, we made the following changes in v2.9.0:




  • configPublisher


v2.8.0 is released on Jul. 8, 2019.

New features

1. Supporting string usernames

Many apps use string usernames. This release adds the following methods to enable apps to join an Agora channel directly with string usernames as user accounts:

For other methods, Agora uses the integer uid parameter. The Agora Engine maintains a mapping table that contains the user ID and string user account, and you can get the corresponding user account or ID by calling the getUserInfoByUid or getUserInfoByUserAccount method.

To ensure smooth communication, use the same parameter type to identify all users within a channel, that is, all users should use either the integer user ID or the string user account to join a channel.


  • Do not mix parameter types within the same channel. The following Agora SDKs support string user accounts:

    • The Native SDK: v2.8.0 and later.
    • The Web SDK: v2.5.0 and later.

    If you use SDKs that do not support string user accounts, only integer user IDs can be used in the channel.

  • If you change your usernames into string user accounts, ensure that all app clients are upgraded to the latest version.

  • If you use string user accounts, ensure that the token generation script on your server is updated to the latest version. If you join the channel with a user account, ensure that you use the same user account or its corresponding integer user ID to generate a token. Call the getUserInfoByUserAccount method to get the user ID that corresponds to the user account.

2. Adding remote statistics

To monitor the audio transmission quality during a call or live broadcast, this release adds the totalFrozenTime and frozenRate members in the AgoraRtcRemoteAudioStats class, to report the audio freeze time and freeze rate of the remote user.

This release also adds the numChannels, receivedSampleRate, and receivedBitrate members in the AgoraRtcRemoteAudioStats class.


This release adds a AgoraConnectionChangedKeepAliveTimeout(14) member to the AgoraConnectionChangedReason parameter of the connectionChangedToState callback. This member indicates a connection state change caused by the timeout of the connection keep-alive between the SDK and Agora's edge server.

Issues fixed

  • Occasional crashes.

API changes

To improve your experience, we made the following changes to the APIs:




V2.4.1 is released on Jun 12th, 2019.

This is the first release of the Agora Voice SDK for macOS. Refer to the following guides to quickly integrate the SDK and enable real-time voice communication in your project.

If you migrate to this SDK from the macOS Video SDK, refer to the Release notes for the macOS video SDK for audio improvements.