io.agora.rtc

## Class AgoraAudioVadConfig

- java.lang.Object
- - io.agora.rtc.AgoraAudioVadConfig

-     public class AgoraAudioVadConfig
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private float` | `activePercent` active percent, if over this percent, will be recognized as speaking, default value is 0.6
    `private float` | `aggressive` aggressive factor, greater value means more aggressive, default value is 5.0
    `private int` | `anaWindowSz` fft-window Size, will be used to calc rms, default value is 768
    `private int` | `fftSz` fft-size, only support: 128, 256, 512, 1024, default value is 1024
    `private int` | `frqInputAvailableFlag` whether Aed_InputData will contain external freq.
    `private int` | `hopSz` fft-Hop Size, will be used to check, default value is 160
    `private float` | `inactivePercent` inactive percent, if below this percent, will be recognized as non-speaking, default value is 0.2
    `private float` | `jointThr` joint threshold in dB, default value is 0.0
    `private int` | `preStartRecognizeCount` pre start recognize count, buffer size for 10ms 16KHz 16bit 1channel PCM, default value is 10
    `private float` | `rmsThr` rms threshold in dB, default value is -40.0
    `private int` | `startRecognizeCount` start recognize count, buffer size for 10ms 16KHz 16bit 1channel PCM, default value is 10
    `private int` | `stopRecognizeCount` stop recognize count, buffer size for 10ms 16KHz 16bit 1channel PCM, default value is 6
    `private int` | `useCVersionAIModule` whether to use the C version of AI submodules, default value is 0
    `private float` | `voiceProbThr` voice probability threshold 0.0f ~ 1.0f, default value is 0.8

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AgoraAudioVadConfig()`
    `AgoraAudioVadConfig(int fftSz, int hopSz, int anaWindowSz, int frqInputAvailableFlag, int useCVersionAIModule, float voiceProbThr, float rmsThr, float jointThr, float aggressive, int startRecognizeCount, int stopRecognizeCount, int preStartRecognizeCount, float activePercent, float inactivePercent)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `float` | `getActivePercent()`
    `float` | `getAggressive()`
    `int` | `getAnaWindowSz()`
    `int` | `getFftSz()`
    `int` | `getFrqInputAvailableFlag()`
    `int` | `getHopSz()`
    `float` | `getInactivePercent()`
    `float` | `getJointThr()`
    `int` | `getPreStartRecognizeCount()`
    `float` | `getRmsThr()`
    `int` | `getStartRecognizeCount()`
    `int` | `getStopRecognizeCount()`
    `int` | `getUseCVersionAIModule()`
    `float` | `getVoiceProbThr()`
    `void` | `setActivePercent(float activePercent)`
    `void` | `setAggressive(float aggressive)`
    `void` | `setAnaWindowSz(int anaWindowSz)`
    `void` | `setFftSz(int fftSz)`
    `void` | `setFrqInputAvailableFlag(int frqInputAvailableFlag)`
    `void` | `setHopSz(int hopSz)`
    `void` | `setInactivePercent(float inactivePercent)`
    `void` | `setJointThr(float jointThr)`
    `void` | `setPreStartRecognizeCount(int preStartRecognizeCount)`
    `void` | `setRmsThr(float rmsThr)`
    `void` | `setStartRecognizeCount(int startRecognizeCount)`
    `void` | `setStopRecognizeCount(int stopRecognizeCount)`
    `void` | `setUseCVersionAIModule(int useCVersionAIModule)`
    `void` | `setVoiceProbThr(float voiceProbThr)`
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### fftSz

          private int fftSz

      fft-size, only support: 128, 256, 512, 1024, default value is 1024

    - #### hopSz

          private int hopSz

      fft-Hop Size, will be used to check, default value is 160

    - #### anaWindowSz

          private int anaWindowSz

      fft-window Size, will be used to calc rms, default value is 768

    - #### frqInputAvailableFlag

          private int frqInputAvailableFlag

      whether Aed_InputData will contain external freq. power-sepctra, default value is 0

    - #### useCVersionAIModule

          private int useCVersionAIModule

      whether to use the C version of AI submodules, default value is 0

    - #### voiceProbThr

          private float voiceProbThr

      voice probability threshold 0.0f ~ 1.0f, default value is 0.8

    - #### rmsThr

          private float rmsThr

      rms threshold in dB, default value is -40.0

    - #### jointThr

          private float jointThr

      joint threshold in dB, default value is 0.0

    - #### aggressive

          private float aggressive

      aggressive factor, greater value means more aggressive, default value is 5.0

    - #### startRecognizeCount

          private int startRecognizeCount

      start recognize count, buffer size for 10ms 16KHz 16bit 1channel PCM, default value is 10

    - #### stopRecognizeCount

          private int stopRecognizeCount

      stop recognize count, buffer size for 10ms 16KHz 16bit 1channel PCM, default value is 6

    - #### preStartRecognizeCount

          private int preStartRecognizeCount

      pre start recognize count, buffer size for 10ms 16KHz 16bit 1channel PCM, default value is 10

    - #### activePercent

          private float activePercent

      active percent, if over this percent, will be recognized as speaking, default value is 0.6

    - #### inactivePercent

          private float inactivePercent

      inactive percent, if below this percent, will be recognized as non-speaking, default value is 0.2

  - ### Constructor Detail

    - #### AgoraAudioVadConfig

          public AgoraAudioVadConfig()

    - #### AgoraAudioVadConfig

          public AgoraAudioVadConfig(int fftSz,
                                     int hopSz,
                                     int anaWindowSz,
                                     int frqInputAvailableFlag,
                                     int useCVersionAIModule,
                                     float voiceProbThr,
                                     float rmsThr,
                                     float jointThr,
                                     float aggressive,
                                     int startRecognizeCount,
                                     int stopRecognizeCount,
                                     int preStartRecognizeCount,
                                     float activePercent,
                                     float inactivePercent)

  - ### Method Detail

    - #### getFftSz

          public int getFftSz()

    - #### setFftSz

          public void setFftSz(int fftSz)

    - #### getHopSz

          public int getHopSz()

    - #### setHopSz

          public void setHopSz(int hopSz)

    - #### getAnaWindowSz

          public int getAnaWindowSz()

    - #### setAnaWindowSz

          public void setAnaWindowSz(int anaWindowSz)

    - #### getFrqInputAvailableFlag

          public int getFrqInputAvailableFlag()

    - #### setFrqInputAvailableFlag

          public void setFrqInputAvailableFlag(int frqInputAvailableFlag)

    - #### getUseCVersionAIModule

          public int getUseCVersionAIModule()

    - #### setUseCVersionAIModule

          public void setUseCVersionAIModule(int useCVersionAIModule)

    - #### getVoiceProbThr

          public float getVoiceProbThr()

    - #### setVoiceProbThr

          public void setVoiceProbThr(float voiceProbThr)

    - #### getRmsThr

          public float getRmsThr()

    - #### setRmsThr

          public void setRmsThr(float rmsThr)

    - #### getJointThr

          public float getJointThr()

    - #### setJointThr

          public void setJointThr(float jointThr)

    - #### getAggressive

          public float getAggressive()

    - #### setAggressive

          public void setAggressive(float aggressive)

    - #### getStartRecognizeCount

          public int getStartRecognizeCount()

    - #### setStartRecognizeCount

          public void setStartRecognizeCount(int startRecognizeCount)

    - #### getStopRecognizeCount

          public int getStopRecognizeCount()

    - #### setStopRecognizeCount

          public void setStopRecognizeCount(int stopRecognizeCount)

    - #### getPreStartRecognizeCount

          public int getPreStartRecognizeCount()

    - #### setPreStartRecognizeCount

          public void setPreStartRecognizeCount(int preStartRecognizeCount)

    - #### getActivePercent

          public float getActivePercent()

    - #### setActivePercent

          public void setActivePercent(float activePercent)

    - #### getInactivePercent

          public float getInactivePercent()

    - #### setInactivePercent

          public void setInactivePercent(float inactivePercent)

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`