KeensenseKeywordDetector

class KeensenseKeywordDetector(    var keywordResource: KeensenseKeywordDetector.KeywordResources,     powerMeasure: PowerMeasure? = null,     assetManager: AssetManager? = null) : KeywordDetector

Constructors

Link copied to clipboard
fun KeensenseKeywordDetector(    keywordResource: KeensenseKeywordDetector.KeywordResources,     powerMeasure: PowerMeasure? = null,     assetManager: AssetManager? = null)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
data class KeywordResources(    val keyword: String,     val netFilePath: String,     val searchFilePath: String)

Functions

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

Add observer

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

Get current state

Link copied to clipboard
open override 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
open override fun removeDetectorStateObserver(listener: KeywordDetector.OnStateChangeListener)

Remove observer

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

Start Detector

Link copied to clipboard
open override 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.

Properties

Link copied to clipboard