RequestSession class

Constructors

RequestSession(string)

Properties

audioNodeId
bytesSent
currentTurnAudioOffset
getTelemetry
isRecognizing
isSpeechEnded
onPreConnectionStart
onServiceTurnStartResponse
recogNumber
requestId
sessionId
turnCompletionPromise

Methods

dispose(string)
listenForServiceTelemetry(IEventSource<PlatformEvent>)
onAudioSent(number)
onAudioSourceAttachCompleted(ReplayableAudioNode, boolean, string)
onAuthCompleted(boolean, string)
onConnectionEstablishCompleted(number, string)
onHypothesis(number)
onPhraseRecognized(number)
onServiceRecognized(number)
onServiceTurnEndResponse(boolean)
onSpeechEnded()
onStopRecognizing()
startNewRecognition()

Constructor Details

RequestSession(string)

new RequestSession(audioSourceId: string)

Parameters

audioSourceId

string

Property Details

audioNodeId

string audioNodeId

Property Value

string

bytesSent

number bytesSent

Property Value

number

currentTurnAudioOffset

number currentTurnAudioOffset

Property Value

number

getTelemetry

getTelemetry: () => string

Property Value

() => string

isRecognizing

boolean isRecognizing

Property Value

boolean

isSpeechEnded

boolean isSpeechEnded

Property Value

boolean

onPreConnectionStart

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

Property Value

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

onServiceTurnStartResponse

onServiceTurnStartResponse: () => void

Property Value

() => void

recogNumber

number recogNumber

Property Value

number

requestId

string requestId

Property Value

string

sessionId

string sessionId

Property Value

string

turnCompletionPromise

Promise<void> turnCompletionPromise

Property Value

Promise<void>

Method Details

dispose(string)

function dispose(error?: string)

Parameters

error

string

Returns

Promise<void>

listenForServiceTelemetry(IEventSource<PlatformEvent>)

function listenForServiceTelemetry(eventSource: IEventSource<PlatformEvent>)

Parameters

onAudioSent(number)

function onAudioSent(bytesSent: number)

Parameters

bytesSent

number

onAudioSourceAttachCompleted(ReplayableAudioNode, boolean, string)

function onAudioSourceAttachCompleted(audioNode: ReplayableAudioNode, isError: boolean, error?: string)

Parameters

isError

boolean

error

string

Returns

Promise<void>

onAuthCompleted(boolean, string)

function onAuthCompleted(isError: boolean, error?: string)

Parameters

isError

boolean

error

string

Returns

Promise<void>

onConnectionEstablishCompleted(number, string)

function onConnectionEstablishCompleted(statusCode: number, reason?: string)

Parameters

statusCode

number

reason

string

Returns

Promise<void>

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

onServiceTurnEndResponse(boolean)

function onServiceTurnEndResponse(continuousRecognition: boolean)

Parameters

continuousRecognition

boolean

Returns

Promise<void>

onSpeechEnded()

function onSpeechEnded()

onStopRecognizing()

function onStopRecognizing()

Returns

Promise<void>

startNewRecognition()

function startNewRecognition()