public class VoiceActivityTrigger extends Object implements SpeechProcessor
VoiceActivityTrigger is a speech pipeline component that implements Voice Activity Detection (VAD) using the VoiceActivityDetector class. The trigger activates the speech context whenever speech is detected.
Constructor and Description |
---|
VoiceActivityTrigger(SpeechConfig config)
constructs a new trigger instance.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
pipeline cleanup.
|
void |
process(SpeechContext context,
ByteBuffer frame)
processes a frame of audio.
|
void |
reset()
resets all state internal to the stage.
|
public VoiceActivityTrigger(SpeechConfig config)
config
- the pipeline configuration instancepublic void close()
close
in interface AutoCloseable
public void process(SpeechContext context, ByteBuffer frame)
process
in interface SpeechProcessor
context
- the current speech contextframe
- the audio frame to detectpublic void reset()
SpeechProcessor
reset
in interface SpeechProcessor
Copyright © 2021. All rights reserved.