WebRTCVAD

@objc
public class WebRTCVAD : NSObject, SpeechProcessor

Swift wrapper for WebRTC’s voice activity detector.

  • Configuration for the detector.

    Declaration

    Swift

    @objc
    public var configuration: SpeechConfiguration
  • Global state for the speech pipeline.

    Declaration

    Swift

    @objc
    public var context: SpeechContext
  • Triggered by the speech pipeline, instructing the detector to begin streaming and processing audio.

    Declaration

    Swift

    @objc
    public func startStreaming()
  • Triggered by the speech pipeline, instructing the detector to stop streaming audio and complete processing.

    Declaration

    Swift

    @objc
    public func stopStreaming()
  • Initializes a WebRTCVAD instance.

    A recognizer is initialized by, and receives startStreaming and stopStreaming events from, an instance of SpeechPipeline.

    The WebRTCVAD receives audio data frames to process from AudioController.

    Declaration

    Swift

    @objc
    public init(_ configuration: SpeechConfiguration, context: SpeechContext)

    Parameters

    configuration

    Configuration for the detector.

    context

    Global state for the speech pipeline.

  • Processes an audio frame, detecting speech.

    Declaration

    Swift

    @objc
    public func process(_ frame: Data)

    Parameters

    frame

    Audio frame of samples.