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
Content copied to clipboard
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)
Content copied to clipboard
Types
Link copied to clipboard
data class ExpectSpeechDirectiveParam( val directive: ExpectSpeechDirective, val result: DirectiveHandlerResult, val playSyncObject: PlaySynchronizerInterface.SynchronizeObject) : SessionManagerInterface.Requester
Content copied to clipboard
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)
Content copied to clipboard
Functions
Link copied to clipboard
open override fun addOnMultiturnListener(listener: ASRAgentInterface.OnMultiturnListener)
Content copied to clipboard
Add a listener to be called when multi-turn state changed.
Link copied to clipboard
open override fun addOnResultListener(listener: ASRAgentInterface.OnResultListener)
Content copied to clipboard
Add a listener to be called when receive a result for ASR.
Link copied to clipboard
open override fun addOnStateChangeListener(listener: ASRAgentInterface.OnStateChangeListener)
Content copied to clipboard
Add a listener to be called when a state changed.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun onStateChanged(state: SpeechRecognizer.State, request: SpeechRecognizer.Request)
Content copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun preHandleDirective(directive: Directive, result: DirectiveHandlerResult)
Content copied to clipboard
Link copied to clipboard
open override fun provideState( contextSetter: ContextSetterInterface, namespaceAndName: NamespaceAndName, contextType: ContextType, stateRequestToken: Int)
Content copied to clipboard
Link copied to clipboard
open override fun removeOnMultiturnListener(listener: ASRAgentInterface.OnMultiturnListener)
Content copied to clipboard
Remove a listener
Link copied to clipboard
open override fun removeOnResultListener(listener: ASRAgentInterface.OnResultListener)
Content copied to clipboard
Remove a listener
Link copied to clipboard
open override fun removeOnStateChangeListener(listener: ASRAgentInterface.OnStateChangeListener)
Content copied to clipboard
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)
Content copied to clipboard
start recognition
Link copied to clipboard
open override fun stopRecognition(cancel: Boolean, cause: ASRAgentInterface.CancelCause)
Content copied to clipboard
Stop current recognition