The Voice SDK supports the following scenarios:
- Voice communication
- Live voice broadcast
v2.9.1 is released on Sep 19, 2019.
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.
To improve the user experience, we made the following changes in v2.9.1:
report_vadparameter in the
vadmember in the
v2.9.0 is released on Aug. 16, 2019.
1. RTMP streaming
In this release, we deleted the following methods:
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.
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
joinChannelByToken methods. After the audience successfully switches to another channel by calling the
switchChannelByToken method, the SDK triggers the
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.
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
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
errorparameter for troubleshooting.
- The remote audio: Stopped(0), Starting(1), Decoding(2), Frozen(3), or Failed(4). See the
reasonparameter 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
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.
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: 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
- Improves the audio quality after the user disables the microphone in the Communication profile.
- 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.
To improve the user experience, we made the following changes in v2.9.0:
didMicrophoneEnabled. Use AgoraAudioLocalStateStopped(0) or AgoraAudioLocalStateRecording(1) in the
audioTransportStatsOfUid. Use the
v2.8.0 is released on Jul. 8, 2019.
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
getUserInfoByUserAccountmethod 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
frozenRate members in the AgoraRtcRemoteAudioStats class, to report the audio freeze time and freeze rate of the remote user.
This release also adds the
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.
- Occasional crashes.
To improve your experience, we made the following changes to the APIs:
frozenRatemembers in the AgoraRtcRemoteAudioStats class
lowLatencymember in the AgoraLiveTranscoding class
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.
- Quick start
- Use security keys
- Report in-call statistics
- Adjust the volume
- Play audio effects/audio mixing
- Set the voice changer and reverberation effects
- Push Streams to the CDN
- Test or select a media device
If you migrate to this SDK from the macOS Video SDK, refer to the Release notes for the macOS video SDK for audio improvements.