RequestSession class

Constructors

RequestSession(string)

Properties

audioNodeId
bytesSent
completionPromise
currentTurnAudioOffset
dispose
getTelemetry
isRecognizing
isSpeechEnded
onAudioSourceAttachCompleted
onAuthCompleted
onConnectionEstablishCompleted
onPreConnectionStart
onServiceTurnEndResponse
recogNumber
requestId
sessionId

Methods

listenForServiceTelemetry(IEventSource<PlatformEvent>)
onAudioSent(number)
onHypothesis(number)
onPhraseRecognized(number)
onServiceRecognized(number)
onSpeechEnded()
onStopRecognizing()
startNewRecognition()

Constructor Details

RequestSession(string)

new RequestSession(audioSourceId: string)

Parameters

audioSourceId
string

Property Details

audioNodeId

audioNodeId: string

Property Value

string

bytesSent

bytesSent: number

Property Value

number

completionPromise

completionPromise: Promise<boolean>

Property Value

Promise<boolean>

currentTurnAudioOffset

currentTurnAudioOffset: number

Property Value

number

dispose

dispose: (error?: string) => void

Property Value

(error?: string) => void

getTelemetry

getTelemetry: () => string

Property Value

() => string

isRecognizing

isRecognizing: boolean

Property Value

boolean

isSpeechEnded

isSpeechEnded: boolean

Property Value

boolean

onAudioSourceAttachCompleted

onAudioSourceAttachCompleted: (audioNode: ReplayableAudioNode, isError: boolean, error?: string) => void

Property Value

(audioNode: ReplayableAudioNode, isError: boolean, error?: string) => void

onAuthCompleted

onAuthCompleted: (isError: boolean, error?: string) => void

Property Value

(isError: boolean, error?: string) => void

onConnectionEstablishCompleted

onConnectionEstablishCompleted: (statusCode: number, reason?: string) => void

Property Value

(statusCode: number, reason?: string) => void

onPreConnectionStart

onPreConnectionStart: (authFetchEventId: string, connectionId: string) => void

Property Value

(authFetchEventId: string, connectionId: string) => void

onServiceTurnEndResponse

onServiceTurnEndResponse: (continuousRecognition: boolean) => void

Property Value

(continuousRecognition: boolean) => void

recogNumber

recogNumber: number

Property Value

number

requestId

requestId: string

Property Value

string

sessionId

sessionId: string

Property Value

string

Method Details

listenForServiceTelemetry(IEventSource<PlatformEvent>)

function listenForServiceTelemetry(eventSource: IEventSource<PlatformEvent>)

Parameters

onAudioSent(number)

function onAudioSent(bytesSent: number)

Parameters

bytesSent
number

onHypothesis(number)

function onHypothesis(offset: number)

Parameters

offset
number

onPhraseRecognized(number)

function onPhraseRecognized(offset: number)

Parameters

offset
number

onServiceRecognized(number)

function onServiceRecognized(offset: number)

Parameters

offset
number

onSpeechEnded()

function onSpeechEnded()

onStopRecognizing()

function onStopRecognizing()

startNewRecognition()

function startNewRecognition()