SpeechRecognizerAggregator

class SpeechRecognizerAggregator(    keywordDetector: KeywordDetector?,     speechProcessor: SpeechProcessorDelegate,     audioProvider: AudioProvider,     handler: Handler = Handler(Looper.getMainLooper()),     threadFactory: ThreadFactory = Executors.defaultThreadFactory()) : SpeechRecognizerAggregatorInterface

Constructors

Link copied to clipboard
fun SpeechRecognizerAggregator(    keywordDetector: KeywordDetector?,     speechProcessor: SpeechProcessorDelegate,     audioProvider: AudioProvider,     handler: Handler = Handler(Looper.getMainLooper()),     threadFactory: ThreadFactory = Executors.defaultThreadFactory())

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun addListener(listener: SpeechRecognizerAggregatorInterface.OnStateChangeListener)

Add a listener to be called when a state changed.

Link copied to clipboard
open override fun getState(): SpeechRecognizerAggregatorInterface.State
Link copied to clipboard
open override fun isActive(): Boolean
Link copied to clipboard
open override fun removeListener(listener: SpeechRecognizerAggregatorInterface.OnStateChangeListener)

Remove a listener

Link copied to clipboard
open override fun startListening(    wakeupInfo: WakeupInfo?,     epdParam: EndPointDetectorParam?,     callback: ASRAgentInterface.StartRecognitionCallback?,     initiator: ASRAgentInterface.Initiator)

Start keyword detector.

Link copied to clipboard
open override fun startListeningWithTrigger(    epdParam: EndPointDetectorParam?,     triggerCallback: SpeechRecognizerAggregatorInterface.TriggerCallback?,     listeningCallback: ASRAgentInterface.StartRecognitionCallback?)

Start recognizing

Link copied to clipboard
open override fun stop()

Stop Recognizing

Link copied to clipboard
open override fun stopListening(cancel: Boolean)

Stop end point detector. If cancel is true, stop epd and cancel asr processing. Otherwise, stop epd but finish asr processing.

Link copied to clipboard
open override fun stopTrigger()

Stop keyword detector