public final class ActivationTimeout extends Object implements SpeechProcessor
This component manages the timeout for pipeline activation (the period of time in which the pipeline is actively listening and sending speech through a speech recognition provider).
The pipeline can be activated via a trigger component or manually; it will remain active for a minimum amount of time, after which it will be deactivated when the user stops speaking, or a timeout occurs. Both the minimum and maximum activation times are configurable, via the following properties:
Constructor and Description |
---|
ActivationTimeout(SpeechConfig config)
Constructs a new timeout component.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
process(SpeechContext context,
ByteBuffer buffer)
processes the current speech frame.
|
void |
reset()
resets all state internal to the stage.
|
public ActivationTimeout(SpeechConfig config)
config
- the pipeline configurationpublic void process(SpeechContext context, ByteBuffer buffer)
SpeechProcessor
process
in interface SpeechProcessor
context
- the current speech contextbuffer
- the received audio framepublic void reset()
SpeechProcessor
reset
in interface SpeechProcessor
public void close()
close
in interface AutoCloseable
Copyright © 2020. All rights reserved.