ConversationTranscriber class

Performs speech recognition with speaker separation from microphone, file, or other audio input streams, and gets transcribed text as result.

Extends

Constructors

ConversationTranscriber(SpeechConfig, AudioConfig)

ConversationTranscriber constructor.

Properties

authorizationToken

Gets the authorization token used to communicate with the service.

canceled

The event canceled signals that an error occurred during transcription.

endpointId

Gets the endpoint id of a customized speech model that is used for transcription.

internalData
outputFormat

Gets the output format of transcription.

properties

The collection of properties and their values defined for this conversation transcriber.

speechRecognitionLanguage

Gets the spoken language of transcription.

telemetryEnabled

This method returns the current state of the telemetry setting.

transcribed

The event transcriber signals that a final recognition result is received.

transcribing

The event transcribing signals that an intermediate transcription result is received.

Inherited Properties

sessionStarted

Defines event handler for session started events.

sessionStopped

Defines event handler for session stopped events.

speechEndDetected

Defines event handler for speech stopped events.

speechStartDetected

Defines event handler for speech started events.

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.

FromConfig(SpeechConfig, AutoDetectSourceLanguageConfig, AudioConfig)

ConversationTranscriber constructor.

startTranscribingAsync(() => void, (e: string) => void)

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

stopTranscribingAsync(() => void, (e: string) => void)

Stops conversation transcription.

Inherited Methods

enableTelemetry(boolean)

This method globally enables or disables telemetry.

Constructor Details

ConversationTranscriber(SpeechConfig, AudioConfig)

ConversationTranscriber constructor.

new ConversationTranscriber(speechConfig: SpeechConfig, audioConfig?: AudioConfig)

Parameters

speechConfig
SpeechConfig

an set of initial properties for this recognizer

audioConfig
AudioConfig

An optional audio configuration associated with the recognizer

Property Details

authorizationToken

Gets 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: Recognizer, event: ConversationTranscriptionCanceledEventArgs) => void

Property Value

(sender: Recognizer, event: ConversationTranscriptionCanceledEventArgs) => void

endpointId

Gets the endpoint id of a customized speech model that is used for transcription.

string endpointId

Property Value

string

the endpoint id of a customized speech model that is used for speech recognition.

internalData

object internalData

Property Value

object

outputFormat

Gets the output format of transcription.

OutputFormat outputFormat

Property Value

The output format of transcription.

properties

The collection of properties and their values defined for this conversation transcriber.

PropertyCollection properties

Property Value

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

speechRecognitionLanguage

Gets the spoken language of transcription.

string speechRecognitionLanguage

Property Value

string

The spoken language of transcription.

telemetryEnabled

This method returns the current state of the telemetry setting.

static boolean telemetryEnabled

Property Value

boolean

true if the telemetry is enabled, false otherwise.

transcribed

The event transcriber signals that a final recognition result is received.

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

Property Value

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

transcribing

The event transcribing signals that an intermediate transcription result is received.

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

Property Value

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

Inherited Property Details

sessionStarted

Defines event handler for session started events.

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

Property Value

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

Inherited From Recognizer.sessionStarted

sessionStopped

Defines event handler for session stopped events.

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

Property Value

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

Inherited From Recognizer.sessionStopped

speechEndDetected

Defines event handler for speech stopped events.

public speechEndDetected: (sender: Recognizer, event: RecognitionEventArgs) => void

Property Value

(sender: Recognizer, event: RecognitionEventArgs) => void

Inherited From Recognizer.speechEndDetected

speechStartDetected

Defines event handler for speech started events.

public speechStartDetected: (sender: Recognizer, event: RecognitionEventArgs) => void

Property Value

(sender: Recognizer, event: RecognitionEventArgs) => void

Inherited From Recognizer.speechStartDetected

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): Promise<void>

Parameters

disposing

boolean

true if disposing the object.

Returns

Promise<void>

FromConfig(SpeechConfig, AutoDetectSourceLanguageConfig, AudioConfig)

ConversationTranscriber constructor.

static function FromConfig(speechConfig: SpeechConfig, autoDetectSourceLanguageConfig: AutoDetectSourceLanguageConfig, audioConfig?: AudioConfig): ConversationTranscriber

Parameters

speechConfig
SpeechConfig

an set of initial properties for this recognizer

autoDetectSourceLanguageConfig
AutoDetectSourceLanguageConfig

An source language detection configuration associated with the recognizer

audioConfig
AudioConfig

An optional audio configuration associated with the recognizer

Returns

startTranscribingAsync(() => void, (e: string) => void)

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

function startTranscribingAsync(cb?: () => void, err?: (e: string) => void)

Parameters

cb

() => void

Callback invoked once the transcription has started.

err

(e: string) => void

Callback invoked in case of an error.

stopTranscribingAsync(() => void, (e: string) => void)

Stops conversation transcription.

function stopTranscribingAsync(cb?: () => void, err?: (e: string) => void)

Parameters

cb

() => void

Callback invoked once the transcription has stopped.

err

(e: string) => void

Callback invoked in case of an error.

Inherited Method Details

enableTelemetry(boolean)

This method globally enables or disables telemetry.

static function enableTelemetry(enabled: boolean)

Parameters

enabled

boolean

Global setting for telemetry collection. If set to true, telemetry information like microphone errors, recognition errors are collected and sent to Microsoft. If set to false, no telemetry is sent to Microsoft.

Inherited From Recognizer.enableTelemetry