DefaultClientSpeechRecognizer

class DefaultClientSpeechRecognizer(    inputProcessorManager: InputProcessorManagerInterface,     audioEncoder: Encoder,     messageSender: MessageSender,     endPointDetector: AudioEndPointDetector) : SpeechRecognizer, InputProcessor, AudioEndPointDetector.OnStateChangedListener

Constructors

Link copied to clipboard
fun DefaultClientSpeechRecognizer(    inputProcessorManager: InputProcessorManagerInterface,     audioEncoder: Encoder,     messageSender: MessageSender,     endPointDetector: AudioEndPointDetector)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun addListener(listener: SpeechRecognizer.OnStateChangeListener)
Link copied to clipboard
open override fun isRecognizing(): Boolean
Link copied to clipboard
open override fun notifyResult(directive: Directive, payload: AsrNotifyResultPayload)
Link copied to clipboard
open override fun onError(type: AudioEndPointDetector.ErrorType, e: Exception?)

Called when occur error

Link copied to clipboard
open override fun onExpectingSpeech()

Called when ready to listening(the epd start)

Link copied to clipboard
open override fun onReceiveDirectives(dialogRequestId: String, directives: List<Directive>): Boolean
Link copied to clipboard
open override fun onResponseTimeout(dialogRequestId: String)
Link copied to clipboard
open override fun onSendEventFinished(dialogRequestId: String)
Link copied to clipboard
open override fun onSpeechEnd(eventPosition: Long?)

Called when the speech end

Link copied to clipboard
open override fun onSpeechStart(eventPosition: Long?)

Called when the speech start

Link copied to clipboard
open override fun onStop()

Called when stopped by stopDetector

Link copied to clipboard
open override fun onTimeout(type: AudioEndPointDetector.TimeoutType)

Called when the timeout occur

Link copied to clipboard
open override fun removeListener(listener: SpeechRecognizer.OnStateChangeListener)
Link copied to clipboard
open override fun start(    audioInputStream: SharedDataStream,     audioFormat: AudioFormat,     context: String,     wakeupInfo: WakeupInfo?,     expectSpeechDirectiveParam: DefaultASRAgent.ExpectSpeechDirectiveParam?,     attribute: DialogAttribute?,     epdParam: EndPointDetectorParam,     resultListener: ASRAgentInterface.OnResultListener?): SpeechRecognizer.Request?
Link copied to clipboard
open override fun stop(cancel: Boolean, cause: ASRAgentInterface.CancelCause)

Properties

Link copied to clipboard
open override var enablePartialResult: Boolean = true