KeywordDetector

interface KeywordDetector

Types

Link copied to clipboard
interface DetectorResultObserver

The observer for keyword detector

Link copied to clipboard
interface OnStateChangeListener

Interface of a observer to be called when there has been an change of state

Link copied to clipboard
enum State : Enum<KeywordDetector.State>

Enum class for state

Functions

Link copied to clipboard
abstract fun addOnStateChangeListener(listener: KeywordDetector.OnStateChangeListener)

Add observer

Link copied to clipboard
abstract fun getDetectorState(): KeywordDetector.State

Get current state

Link copied to clipboard
abstract fun getSupportedFormats(): List<AudioFormat>

Get supported audio formats. Should use the audio format in this list at startDetect. If not supported format provided, startDetect return true. but, DetectorResultObserver.onError will be called.

Link copied to clipboard
abstract fun removeDetectorStateObserver(listener: KeywordDetector.OnStateChangeListener)

Remove observer

Link copied to clipboard
abstract fun startDetect(    inputStream: SharedDataStream,     audioFormat: AudioFormat,     observer: KeywordDetector.DetectorResultObserver): Boolean

Start Detector

Link copied to clipboard
abstract fun stopDetect()

Stop Detector If active state, DetectorResultObserver.onStopped and a state will be changed to State.INACTIVE abd OnStateChangeListener.onStateChange called. Otherwise, nothing to happen.

Inheritors

Link copied to clipboard