Agora Server Gateway SDK Java API Reference
Loading...
Searching...
No Matches
io.agora.rtc.AgoraAudioVadConfigV2 Class Reference

Public Member Functions

 AgoraAudioVadConfigV2 ()
 
 AgoraAudioVadConfigV2 (int preStartRecognizeCount, int startRecognizeCount, int stopRecognizeCount, float activePercent, float inactivePercent, int startVoiceProb, int stopVoiceProb, int startRmsThreshold, int stopRmsThreshold)
 
int getPreStartRecognizeCount ()
 
void setPreStartRecognizeCount (int preStartRecognizeCount)
 
int getStartRecognizeCount ()
 
void setStartRecognizeCount (int startRecognizeCount)
 
int getStopRecognizeCount ()
 
void setStopRecognizeCount (int stopRecognizeCount)
 
float getActivePercent ()
 
void setActivePercent (float activePercent)
 
float getInactivePercent ()
 
void setInactivePercent (float inactivePercent)
 
int getStartVoiceProb ()
 
void setStartVoiceProb (int startVoiceProb)
 
int getStopVoiceProb ()
 
void setStopVoiceProb (int stopVoiceProb)
 
int getStartRmsThreshold ()
 
void setStartRmsThreshold (int startRmsThreshold)
 
int getStopRmsThreshold ()
 
void setStopRmsThreshold (int stopRmsThreshold)
 
String toString ()
 

Private Attributes

int preStartRecognizeCount
 
int startRecognizeCount
 
int stopRecognizeCount
 
float activePercent
 
float inactivePercent
 
int startVoiceProb
 
int stopVoiceProb
 
int startRmsThreshold
 
int stopRmsThreshold
 

Detailed Description

Configuration class for Agora Audio Voice Activity Detection (VAD) V2.

Constructor & Destructor Documentation

◆ AgoraAudioVadConfigV2() [1/2]

io.agora.rtc.AgoraAudioVadConfigV2.AgoraAudioVadConfigV2 ( )

◆ AgoraAudioVadConfigV2() [2/2]

io.agora.rtc.AgoraAudioVadConfigV2.AgoraAudioVadConfigV2 ( int preStartRecognizeCount,
int startRecognizeCount,
int stopRecognizeCount,
float activePercent,
float inactivePercent,
int startVoiceProb,
int stopVoiceProb,
int startRmsThreshold,
int stopRmsThreshold )

Member Function Documentation

◆ getActivePercent()

float io.agora.rtc.AgoraAudioVadConfigV2.getActivePercent ( )

◆ getInactivePercent()

float io.agora.rtc.AgoraAudioVadConfigV2.getInactivePercent ( )

◆ getPreStartRecognizeCount()

int io.agora.rtc.AgoraAudioVadConfigV2.getPreStartRecognizeCount ( )

◆ getStartRecognizeCount()

int io.agora.rtc.AgoraAudioVadConfigV2.getStartRecognizeCount ( )

◆ getStartRmsThreshold()

int io.agora.rtc.AgoraAudioVadConfigV2.getStartRmsThreshold ( )

◆ getStartVoiceProb()

int io.agora.rtc.AgoraAudioVadConfigV2.getStartVoiceProb ( )

◆ getStopRecognizeCount()

int io.agora.rtc.AgoraAudioVadConfigV2.getStopRecognizeCount ( )

◆ getStopRmsThreshold()

int io.agora.rtc.AgoraAudioVadConfigV2.getStopRmsThreshold ( )

◆ getStopVoiceProb()

int io.agora.rtc.AgoraAudioVadConfigV2.getStopVoiceProb ( )

◆ setActivePercent()

void io.agora.rtc.AgoraAudioVadConfigV2.setActivePercent ( float activePercent)

◆ setInactivePercent()

void io.agora.rtc.AgoraAudioVadConfigV2.setInactivePercent ( float inactivePercent)

◆ setPreStartRecognizeCount()

void io.agora.rtc.AgoraAudioVadConfigV2.setPreStartRecognizeCount ( int preStartRecognizeCount)

◆ setStartRecognizeCount()

void io.agora.rtc.AgoraAudioVadConfigV2.setStartRecognizeCount ( int startRecognizeCount)

◆ setStartRmsThreshold()

void io.agora.rtc.AgoraAudioVadConfigV2.setStartRmsThreshold ( int startRmsThreshold)

◆ setStartVoiceProb()

void io.agora.rtc.AgoraAudioVadConfigV2.setStartVoiceProb ( int startVoiceProb)

◆ setStopRecognizeCount()

void io.agora.rtc.AgoraAudioVadConfigV2.setStopRecognizeCount ( int stopRecognizeCount)

◆ setStopRmsThreshold()

void io.agora.rtc.AgoraAudioVadConfigV2.setStopRmsThreshold ( int stopRmsThreshold)

◆ setStopVoiceProb()

void io.agora.rtc.AgoraAudioVadConfigV2.setStopVoiceProb ( int stopVoiceProb)

◆ toString()

String io.agora.rtc.AgoraAudioVadConfigV2.toString ( )

Member Data Documentation

◆ activePercent

float io.agora.rtc.AgoraAudioVadConfigV2.activePercent
private

The percentage of active frames required in startRecognizeCount frames to enter speaking state.

The default value is 0.7 (70%). The value range is [0.0, 1.0].

◆ inactivePercent

float io.agora.rtc.AgoraAudioVadConfigV2.inactivePercent
private

The percentage of inactive frames required in stopRecognizeCount frames to enter stop speaking state.

The default value is 0.5 (50%). The value range is [0.0, 1.0].

◆ preStartRecognizeCount

int io.agora.rtc.AgoraAudioVadConfigV2.preStartRecognizeCount
private

The number of audio frames to save before entering the start speaking state.

The default value is 16 (frames). The value range is [0, 2^31 - 1].

◆ startRecognizeCount

int io.agora.rtc.AgoraAudioVadConfigV2.startRecognizeCount
private

The number of audio frames required to confirm the speaking state.

The default value is 30 (frames). The value range is [1, 2^31 - 1].

◆ startRmsThreshold

int io.agora.rtc.AgoraAudioVadConfigV2.startRmsThreshold
private

The RMS threshold for starting the voice activity detection. The default value is -50. The value range is [-100, 0].

The higher the value, the more sensitive to voice activity.

  • In a quiet environment, you can set it to -50;
  • In a noisy environment, you can set it to a value between -40 and -30.

◆ startVoiceProb

int io.agora.rtc.AgoraAudioVadConfigV2.startVoiceProb
private

The threshold for starting the voice activity detection. The default value is 70. The value range is [0, 100].

The lower the value, the higher the probability that a frame is judged as activity, which allows the start phase to begin earlier.

Conversely, the higher the value, the lower the probability that a frame is judged as activity, and the higher the probability of being judged as inactivity, which makes the start phase to begin later.

◆ stopRecognizeCount

int io.agora.rtc.AgoraAudioVadConfigV2.stopRecognizeCount
private

The number of audio frames required to confirm the stop speaking state.

The default value is 20 (frames). The value range is [1, 2^31 - 1].

◆ stopRmsThreshold

int io.agora.rtc.AgoraAudioVadConfigV2.stopRmsThreshold
private

The RMS threshold for stopping the voice activiy detection. The default value is -50. The value range is [-100, 0].

The higher the value, the more sensitive to voice activity.

  • In a quiet environment, you can set it to -50;
  • In a noisy environment, you can set it to a value between -40 and -30.

◆ stopVoiceProb

int io.agora.rtc.AgoraAudioVadConfigV2.stopVoiceProb
private

The threshold for stopping the voice activity detection. The default value is 70. The value range is [0, 100].

The lower the value, the higher the probability that a frame is judged as activity, which makes the end phase to begin later.

Conversely, the higher the value, the lower the probability that a frame is judged as activity, and the higher the probability of being judged as inactivity, which allows the end phase to begin earlier.


The documentation for this class was generated from the following file: