-
Configuration for the trigger.
Declaration
Swift
@objc public var configuration: SpeechConfiguration
-
Global state for the speech pipeline.
Declaration
Swift
@objc public var context: SpeechContext
-
Initializes a VADTrigger instance. A wakeword trigger is initialized by, and receives
startStreaming
andstopStreaming
events from, an instance ofSpeechPipeline
. The VADTrigger receives audio data frames toprocess
fromAudioController
.Declaration
Swift
@objc public init(_ configuration: SpeechConfiguration, context: SpeechContext)
Parameters
configuration
Configuration for the recognizer.
context
Global state for the speech pipeline.
-
Triggered by the speech pipeline, instructing the trigger to begin streaming and processing audio.
Declaration
Swift
@objc public func startStreaming()
-
Triggered by the speech pipeline, instructing the trigger to stop streaming audio and complete processing.
Declaration
Swift
@objc public func stopStreaming()
-
Processes an audio frame, activating the pipeline if speech is detected.
Declaration
Swift
@objc public func process(_ frame: Data)
Parameters
frame
Audio frame of samples.