SynthesisTurn class

Constructors

SynthesisTurn()

Properties

audioOutputFormat
bytesReceived
currentTextOffset
dispose
isSynthesisEnded
isSynthesizing
onAuthCompleted
onConnectionEstablishCompleted
onPreConnectionStart
onServiceResponseMessage
onServiceTurnEndResponse
onServiceTurnStartResponse
requestId
streamId
turnCompletionPromise

Methods

getAllReceivedAudio()
getAllReceivedAudioWithHeader()
getAndClearVisemeAnimation()

Gets the viseme animation string (merged from animation chunk), and clears the internal partial animation.

onAudioChunkReceived(ArrayBuffer)
onStopSynthesizing()
onVisemeMetadataReceived(ISynthesisMetadata)
onWordBoundaryEvent(string)
startNewSynthesis(string, string, boolean, IAudioDestination)

Constructor Details

SynthesisTurn()

new SynthesisTurn()

Property Details

audioOutputFormat

AudioOutputFormatImpl audioOutputFormat

Property Value

AudioOutputFormatImpl

bytesReceived

number bytesReceived

Property Value

number

currentTextOffset

number currentTextOffset

Property Value

number

dispose

dispose: (error?: string) => void

Property Value

(error?: string) => void

isSynthesisEnded

boolean isSynthesisEnded

Property Value

boolean

isSynthesizing

boolean isSynthesizing

Property Value

boolean

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

onServiceResponseMessage

onServiceResponseMessage: (responseJson: string) => void

Property Value

(responseJson: string) => void

onServiceTurnEndResponse

onServiceTurnEndResponse: () => void

Property Value

() => void

onServiceTurnStartResponse

onServiceTurnStartResponse: () => void

Property Value

() => void

requestId

string requestId

Property Value

string

streamId

string streamId

Property Value

string

turnCompletionPromise

Promise<void> turnCompletionPromise

Property Value

Promise<void>

Method Details

getAllReceivedAudio()

function getAllReceivedAudio()

Returns

Promise<ArrayBuffer>

getAllReceivedAudioWithHeader()

function getAllReceivedAudioWithHeader()

Returns

Promise<ArrayBuffer>

getAndClearVisemeAnimation()

Gets the viseme animation string (merged from animation chunk), and clears the internal partial animation.

function getAndClearVisemeAnimation()

Returns

string

onAudioChunkReceived(ArrayBuffer)

function onAudioChunkReceived(data: ArrayBuffer)

Parameters

data

ArrayBuffer

onStopSynthesizing()

function onStopSynthesizing()

onVisemeMetadataReceived(ISynthesisMetadata)

function onVisemeMetadataReceived(metadata: ISynthesisMetadata)

Parameters

onWordBoundaryEvent(string)

function onWordBoundaryEvent(text: string)

Parameters

text

string

startNewSynthesis(string, string, boolean, IAudioDestination)

function startNewSynthesis(requestId: string, rawText: string, isSSML: boolean, audioDestination?: IAudioDestination)

Parameters

requestId

string

rawText

string

isSSML

boolean

audioDestination
IAudioDestination