io.agora.rtc

## Class AgoraExternalAudioProcessorObserverWrapper

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

-     class AgoraExternalAudioProcessorObserverWrapper
      extends java.lang.Object

  Wrapper for audio frame observer that integrates VAD functionality.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private AgoraExternalAudioProcessor` | `audioProcessor` The external audio processor
    `private IExternalAudioProcessorObserver` | `externalAudioProcessorObserver` The wrapped audio frame observer
    `private AgoraAudioVadV2` | `vad` VAD instance
    `private VadDumpUtils` | `vadDumpUtils` VAD dump utilities
    `private VadProcessResult` | `vadProcessResult` VAD processing result

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AgoraExternalAudioProcessorObserverWrapper(AgoraExternalAudioProcessor audioProcessor, IExternalAudioProcessorObserver observer, AgoraAudioVadConfigV2 vadConfig, AgoraServiceConfig agoraServiceConfig, AgoraApmConfig apmConfig)` Constructs an AgoraExternalAudioProcessorObserverWrapper.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `destroy()` Destroys the wrapper and releases resources.
    `void` | `onAudioFrame(AudioFrame audioFrame)` Called by JNI when an audio frame is processed.

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

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

- - ### Field Detail

    - #### audioProcessor

          private volatile AgoraExternalAudioProcessor audioProcessor

      The external audio processor

    - #### externalAudioProcessorObserver

          private volatile IExternalAudioProcessorObserver externalAudioProcessorObserver

      The wrapped audio frame observer

    - #### vad

          private volatile AgoraAudioVadV2 vad

      VAD instance

    - #### vadProcessResult

          private volatile VadProcessResult vadProcessResult

      VAD processing result

    - #### vadDumpUtils

          private volatile VadDumpUtils vadDumpUtils

      VAD dump utilities

  - ### Constructor Detail

    - #### AgoraExternalAudioProcessorObserverWrapper

          public AgoraExternalAudioProcessorObserverWrapper(AgoraExternalAudioProcessor audioProcessor,
                                                            IExternalAudioProcessorObserver observer,
                                                            AgoraAudioVadConfigV2 vadConfig,
                                                            AgoraServiceConfig agoraServiceConfig,
                                                            AgoraApmConfig apmConfig)

      Constructs an AgoraExternalAudioProcessorObserverWrapper.
      Parameters:
        `audioProcessor` - External audio processor
        `observer` - External audio processor observer
        `vadConfig` - VAD configuration
        `agoraServiceConfig` - Agora service configuration
        `apmConfig` - APM configuration

  - ### Method Detail

    - #### destroy

          public void destroy()

      Destroys the wrapper and releases resources.

    - #### onAudioFrame

          public void onAudioFrame(AudioFrame audioFrame)

      Called by JNI when an audio frame is processed. This method is called from native code.
      Parameters:
        `audioFrame` - The processed audio frame