DefaultASRAgent

class DefaultASRAgent(    inputProcessorManager: InputProcessorManagerInterface,     focusManager: SeamlessFocusManagerInterface,     messageSender: MessageSender,     contextManager: ContextManagerInterface,     sessionManager: SessionManagerInterface,     dialogAttributeStorage: DialogAttributeStorageInterface,     audioProvider: AudioProvider,     audioEncoder: Encoder,     endPointDetector: AudioEndPointDetector?,     defaultEpdTimeoutMillis: Long,     userInteractionDialogChannelName: String,     internalDialogChannelName: String,     playSynchronizer: PlaySynchronizerInterface,     interactionControlManager: InteractionControlManagerInterface) : AbstractCapabilityAgent, ASRAgentInterface, SpeechRecognizer.OnStateChangeListener, ChannelObserver

Constructors

Link copied to clipboard
fun DefaultASRAgent(    inputProcessorManager: InputProcessorManagerInterface,     focusManager: SeamlessFocusManagerInterface,     messageSender: MessageSender,     contextManager: ContextManagerInterface,     sessionManager: SessionManagerInterface,     dialogAttributeStorage: DialogAttributeStorageInterface,     audioProvider: AudioProvider,     audioEncoder: Encoder,     endPointDetector: AudioEndPointDetector?,     defaultEpdTimeoutMillis: Long,     userInteractionDialogChannelName: String,     internalDialogChannelName: String,     playSynchronizer: PlaySynchronizerInterface,     interactionControlManager: InteractionControlManagerInterface)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
data class ExpectSpeechDirectiveParam(    val directive: ExpectSpeechDirective,     val result: DirectiveHandlerResult,     val playSyncObject: PlaySynchronizerInterface.SynchronizeObject) : SessionManagerInterface.Requester
Link copied to clipboard
data class InternalStartRecognitionParam(    val audioInputStream: SharedDataStream,     val audioFormat: AudioFormat,     val wakeupInfo: WakeupInfo?,     val expectSpeechDirectiveParam: DefaultASRAgent.ExpectSpeechDirectiveParam?,     val endPointDetectorParam: EndPointDetectorParam?,     val callback: ASRAgentInterface.StartRecognitionCallback?,     val jsonContext: String,     val initiator: ASRAgentInterface.Initiator,     val asrResultListener: ASRAgentInterface.OnResultListener? = null)

Functions

Link copied to clipboard
open override fun addOnMultiturnListener(listener: ASRAgentInterface.OnMultiturnListener)

Add a listener to be called when multi-turn state changed.

Link copied to clipboard
open override fun addOnResultListener(listener: ASRAgentInterface.OnResultListener)

Add a listener to be called when receive a result for ASR.

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

Add a listener to be called when a state changed.

Link copied to clipboard
open override fun cancelDirective(messageId: String)
Link copied to clipboard
open override fun handleDirective(messageId: String): Boolean
Link copied to clipboard
open override fun onFocusChanged(newFocus: FocusState)
Link copied to clipboard
fun onSetAttribute(key: String)
Link copied to clipboard
open override fun onStateChanged(state: SpeechRecognizer.State, request: SpeechRecognizer.Request)
Link copied to clipboard
fun onUnsetAttribute(key: String)
Link copied to clipboard
open override fun preHandleDirective(directive: Directive, result: DirectiveHandlerResult)
Link copied to clipboard
open override fun provideState(    contextSetter: ContextSetterInterface,     namespaceAndName: NamespaceAndName,     contextType: ContextType,     stateRequestToken: Int)
Link copied to clipboard
open override fun removeOnMultiturnListener(listener: ASRAgentInterface.OnMultiturnListener)

Remove a listener

Link copied to clipboard
open override fun removeOnResultListener(listener: ASRAgentInterface.OnResultListener)

Remove a listener

Link copied to clipboard
open override fun removeOnStateChangeListener(listener: ASRAgentInterface.OnStateChangeListener)

Remove a listener

Link copied to clipboard
open override fun startRecognition(    audioInputStream: SharedDataStream?,     audioFormat: AudioFormat?,     wakeupInfo: WakeupInfo?,     param: EndPointDetectorParam?,     callback: ASRAgentInterface.StartRecognitionCallback?,     initiator: ASRAgentInterface.Initiator)

start recognition

Link copied to clipboard
open override fun stopRecognition(cancel: Boolean, cause: ASRAgentInterface.CancelCause)

Stop current recognition

Properties

Link copied to clipboard
open override val configurations: Map<NamespaceAndName, BlockingPolicy>
Link copied to clipboard
override val namespaceAndName: NamespaceAndName