ConversationTranscriber class

Constructors

ConversationTranscriber(AudioConfig)

ConversationTranscriber constructor.

Properties

authorizationToken

Gets the authorization token used to communicate with the service. Gets/Sets the authorization token used to communicate with the service.

canceled

The event canceled signals that an error occurred during transcription.

properties

The collection of properties and their values defined for this ConversationTranscriber.

sessionStarted

Defines event handler for session started events.

sessionStopped

Defines event handler for session stopped events.

speechRecognitionLanguage

Gets the spoken language of recognition.

transcribed

The event recognized signals that a final conversation transcription result is received.

transcribing

The event recognizing signals that an intermediate conversation transcription result is received.

Methods

close(() => void, (error: string) => void)

closes all external resources held by an instance of this class.

dispose(boolean)

Disposes any resources held by the object.

joinConversationAsync(IConversation, Callback, Callback)
leaveConversationAsync(Callback, Callback)

Leave the current conversation. After this is called, you will no longer receive any events.

startTranscribingAsync(Callback, Callback)

Starts conversation transcription, until stopTranscribingAsync() is called. User must subscribe to events to receive transcription results.

stopTranscribingAsync(Callback, Callback)

Starts conversation transcription, until stopTranscribingAsync() is called. User must subscribe to events to receive transcription results.

Constructor Details

ConversationTranscriber(AudioConfig)

ConversationTranscriber constructor.

new ConversationTranscriber(audioConfig?: AudioConfig)

Parameters

audioConfig
AudioConfig

An optional audio configuration associated with the recognizer

Property Details

authorizationToken

Gets the authorization token used to communicate with the service. Gets/Sets the authorization token used to communicate with the service.

string authorizationToken

Property Value

string

Authorization token.

canceled

The event canceled signals that an error occurred during transcription.

public canceled: (sender: ConversationHandler, event: CancellationEventArgs) => void

Property Value

(sender: ConversationHandler, event: CancellationEventArgs) => void

properties

The collection of properties and their values defined for this ConversationTranscriber.

PropertyCollection properties

Property Value

The collection of properties and their values defined for this ConversationTranscriber.

sessionStarted

Defines event handler for session started events.

public sessionStarted: (sender: ConversationHandler, event: SessionEventArgs) => void

Property Value

(sender: ConversationHandler, event: SessionEventArgs) => void

sessionStopped

Defines event handler for session stopped events.

public sessionStopped: (sender: ConversationHandler, event: SessionEventArgs) => void

Property Value

(sender: ConversationHandler, event: SessionEventArgs) => void

speechRecognitionLanguage

Gets the spoken language of recognition.

string speechRecognitionLanguage

Property Value

string

The spoken language of recognition.

transcribed

The event recognized signals that a final conversation transcription result is received.

public transcribed: (sender: ConversationTranscriptionHandler, event: ConversationTranscriptionEventArgs) => void

Property Value

(sender: ConversationTranscriptionHandler, event: ConversationTranscriptionEventArgs) => void

transcribing

The event recognizing signals that an intermediate conversation transcription result is received.

public transcribing: (sender: ConversationTranscriptionHandler, event: ConversationTranscriptionEventArgs) => void

Property Value

(sender: ConversationTranscriptionHandler, event: ConversationTranscriptionEventArgs) => void

Method Details

close(() => void, (error: string) => void)

closes all external resources held by an instance of this class.

function close(cb?: () => void, errorCb?: (error: string) => void)

Parameters

cb

() => void

errorCb

(error: string) => void

dispose(boolean)

Disposes any resources held by the object.

function dispose(disposing: boolean)

Parameters

disposing

boolean

true if disposing the object.

Returns

Promise<void>

joinConversationAsync(IConversation, Callback, Callback)

function joinConversationAsync(conversation: IConversation, cb?: Callback, err?: Callback)

Parameters

conversation
IConversation
err
Callback

leaveConversationAsync(Callback, Callback)

Leave the current conversation. After this is called, you will no longer receive any events.

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

Parameters

err
Callback

startTranscribingAsync(Callback, Callback)

Starts conversation transcription, until stopTranscribingAsync() is called. User must subscribe to events to receive transcription results.

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

Parameters

cb
Callback

Callback invoked once the transcription has started.

err
Callback

Callback invoked in case of an error.

stopTranscribingAsync(Callback, Callback)

Starts conversation transcription, until stopTranscribingAsync() is called. User must subscribe to events to receive transcription results.

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

Parameters

cb
Callback

Callback invoked once the transcription has started.

err
Callback

Callback invoked in case of an error.