ASRAgentInterface

interface ASRAgentInterface

The public interface for ASRAgent

Types

Link copied to clipboard
enum CancelCause : Enum<ASRAgentInterface.CancelCause>

The cause for cancel

Link copied to clipboard
enum ErrorType : Enum<ASRAgentInterface.ErrorType>

The error type for ASR result

Link copied to clipboard
enum Initiator : Enum<ASRAgentInterface.Initiator>
Link copied to clipboard
interface OnHeaderAttachingCallback

Interface of a callback to attach a set of request headers

Link copied to clipboard
interface OnMultiturnListener

Interface of a listener to be called when there has been an change of multi-turn state

Link copied to clipboard
interface OnResultListener

Event(Result) Listener for speech to text(STT)

Link copied to clipboard
interface OnStateChangeListener

Interface of a listener to be called when there has been changes of state

Link copied to clipboard
sealed class State

Functions

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

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

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

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

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

Add a listener to be called when a state changed.

Link copied to clipboard
abstract fun removeOnMultiturnListener(listener: ASRAgentInterface.OnMultiturnListener)

Remove a listener

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

Remove a listener

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

Remove a listener

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

start recognition

Link copied to clipboard
abstract fun stopRecognition(cancel: Boolean = true, cause: ASRAgentInterface.CancelCause = CancelCause.LOCAL_API)

Stop current recognition

Inheritors

Link copied to clipboard