ServiceRecognizerBase class

Constructors

ServiceRecognizerBase(IAuthentication, IConnectionFactory, IAudioSource, RecognizerConfig, Recognizer)

Properties

activityTemplate
agentConfig
audioSource
authentication
connectionEvents
conversationTranslatorToken
dynamicGrammar
recognitionMode
serviceEvents
speechContext
telemetryData
telemetryDataEnabled

Methods

connect()
connectAsync(Callback, Callback)
disconnect()
dispose(string)
isDisposed()
recognize(RecognitionMode, (e: SpeechRecognitionResult) => void, (e: string) => void)
sendMessage(string)
sendNetworkMessage(string, string | ArrayBuffer)
stopRecognizing()

Constructor Details

ServiceRecognizerBase(IAuthentication, IConnectionFactory, IAudioSource, RecognizerConfig, Recognizer)

new ServiceRecognizerBase(authentication: IAuthentication, connectionFactory: IConnectionFactory, audioSource: IAudioSource, recognizerConfig: RecognizerConfig, recognizer: Recognizer)

Parameters

authentication
IAuthentication
connectionFactory
IConnectionFactory
audioSource
IAudioSource
recognizerConfig
RecognizerConfig
recognizer
Recognizer

Property Details

activityTemplate

string activityTemplate

Property Value

string

agentConfig

AgentConfig agentConfig

Property Value

audioSource

IAudioSource audioSource

Property Value

authentication

any authentication

Property Value

any

connectionEvents

EventSource<ConnectionEvent> connectionEvents

Property Value

conversationTranslatorToken

any conversationTranslatorToken

Property Value

any

dynamicGrammar

DynamicGrammarBuilder dynamicGrammar

Property Value

recognitionMode

RecognitionMode recognitionMode

Property Value

serviceEvents

EventSource<ServiceEvent> serviceEvents

Property Value

speechContext

SpeechContext speechContext

Property Value

telemetryData

static telemetryData: (json: string) => void

Property Value

(json: string) => void

telemetryDataEnabled

static telemetryDataEnabled: boolean

Property Value

boolean

Method Details

connect()

function connect()

Returns

Promise<void>

connectAsync(Callback, Callback)

function connectAsync(cb?: Callback, err?: Callback)

Parameters

err
Callback

disconnect()

function disconnect()

Returns

Promise<void>

dispose(string)

function dispose(reason?: string)

Parameters

reason

string

Returns

Promise<void>

isDisposed()

function isDisposed()

Returns

boolean

recognize(RecognitionMode, (e: SpeechRecognitionResult) => void, (e: string) => void)

function recognize(recoMode: RecognitionMode, successCallback: (e: SpeechRecognitionResult) => void, errorCallBack: (e: string) => void)

Parameters

recoMode
RecognitionMode
successCallback

(e: SpeechRecognitionResult) => void

errorCallBack

(e: string) => void

Returns

Promise<void>

sendMessage(string)

function sendMessage(message: string)

Parameters

message

string

sendNetworkMessage(string, string | ArrayBuffer)

function sendNetworkMessage(path: string, payload: string | ArrayBuffer)

Parameters

path

string

payload

string | ArrayBuffer

Returns

Promise<void>

stopRecognizing()

function stopRecognizing()

Returns

Promise<void>