- Operating System: Ubuntu 18.04+ or CentOS 7.0+
- CPU Architecture: x86-64
- Performance Requirements:
- CPU: 8 cores at 1.8 GHz or higher
- Memory: 2 GB (4 GB+ recommended)
- Network Requirements:
- Public IP
- Access to
.agora.io
and.agoralab.co
domains
- Apache Maven or other build tools
- JDK 8+
Refer to the official example documentation
For detailed examples, please refer to examples/README.md
For complete API documentation, please visit Agora Java Server SDK API Reference
AgoraAudioVadV2
is a Voice Activity Detection (VAD) module used to process audio frames. It can detect voice activity in audio streams and handle them based on configuration parameters.
public AgoraAudioVadV2(AgoraAudioVadConfigV2 config)
- Parameters
config
:AgoraAudioVadConfigV2
type, VAD configuration.
public synchronized VadProcessResult processFrame(AudioFrame frame)
- Parameters
frame
:AudioFrame
type, the audio frame.
- Returns
VadProcessResult
type, the result of the VAD process.
public synchronized void destroy()
- Destroys the VAD module and releases resources.
Stores the VAD process result.
public VadProcessResult(byte[] result, Constants.VadState state)
- Parameters
result
:byte[]
type, the processed audio data.state
:Constants.VadState
type, the current VAD state.
Here is a simple example demonstrating how to use AgoraAudioVadV2
to process audio frames:
import io.agora.rtc.AgoraAudioVadV2;
import io.agora.rtc.AgoraAudioVadConfigV2;
import io.agora.rtc.Constants;
import io.agora.rtc.AudioFrame;
import io.agora.rtc.VadProcessResult;
public class Main {
public static void main(String[] args) {
// Create VAD configuration
AgoraAudioVadConfigV2 config = new AgoraAudioVadConfigV2();
config.setPreStartRecognizeCount(16);
config.setStartRecognizeCount(30);
config.setStopRecognizeCount(20);
config.setActivePercent(0.7f);
config.setInactivePercent(0.5f);
config.setStartVoiceProb(70);
config.setStopVoiceProb(70);
config.setStartRmsThreshold(-50);
config.setStopRmsThreshold(-50);
// Create VAD instance
AgoraAudioVadV2 vad = new AgoraAudioVadV2(config);
// Simulate audio frame processing
AudioFrame frame = new AudioFrame();
// Set frame properties...
VadProcessResult result = vad.processFrame(frame);
if (result != null) {
System.out.println("VAD State: " + result.getState());
System.out.println("Processed Data Length: " + result.getResult().length);
}
// Destroy VAD instance
vad.destroy();
}
}
- Added AgoraAudioVad2 related Vad2 interfaces, removed AgoraAudioVad related Vad interfaces
- Introduced new callback interface IAudioEncodedFrameObserver for receiving encoded audio
- Fixed crash issues related to LocalAudioDetailedStats callbacks
- Modified parameter types for the onAudioVolumeIndication callback
- For detailed update information, please refer to the Release Notes
If you encounter any issues, please refer to the Documentation Center or search for related issues on GitHub Issues
- Technical Support: [email protected]
- Business Inquiries: [email protected]
- Other Architectural Support: [email protected]