ConversationTranslator class

Join, leave or connect to a conversation.

Extends

ConversationCommon

Constructors

ConversationTranslator(AudioConfig)

Properties

canceled
conversationExpiration
participants
participantsChanged
properties
recognized
recognizing
sessionStarted
sessionStopped
speechRecognitionLanguage
textMessageReceived
transcribed
transcribing

Methods

dispose(string, () => void, (error: string) => void)
isDisposed()
joinConversationAsync(IConversation, string, Callback, Callback)

Join a conversation. If this is the host, pass in the previously created Conversation object.

joinConversationAsync(string, string, string, Callback, Callback)
leaveConversationAsync(Callback, Callback)

Leave the conversation

onToken(IAuthentication)
sendTextMessageAsync(string, Callback, Callback)

Send a text message

setServiceProperty(string, string)
startTranscribingAsync(Callback, Callback)

Start speaking

stopTranscribingAsync(Callback, Callback)

Stop speaking

Constructor Details

ConversationTranslator(AudioConfig)

new ConversationTranslator(audioConfig?: AudioConfig)

Parameters

audioConfig
AudioConfig

Property Details

canceled

canceled: (sender: ConversationHandler, event: ConversationTranslationCanceledEventArgs) => void

Property Value

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

conversationExpiration

conversationExpiration: (sender: IConversationTranslator, event: ConversationExpirationEventArgs) => void

Property Value

(sender: IConversationTranslator, event: ConversationExpirationEventArgs) => void

participants

Participant[] participants

Property Value

participantsChanged

participantsChanged: (sender: IConversationTranslator, event: ConversationParticipantsChangedEventArgs) => void

Property Value

(sender: IConversationTranslator, event: ConversationParticipantsChangedEventArgs) => void

properties

PropertyCollection properties

Property Value

recognized

recognized: (sender: IConversationTranslator, event: TranslationRecognitionEventArgs) => void

Property Value

(sender: IConversationTranslator, event: TranslationRecognitionEventArgs) => void

recognizing

recognizing: (sender: IConversationTranslator, event: TranslationRecognitionEventArgs) => void

Property Value

(sender: IConversationTranslator, event: TranslationRecognitionEventArgs) => void

sessionStarted

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

Property Value

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

sessionStopped

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

Property Value

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

speechRecognitionLanguage

string speechRecognitionLanguage

Property Value

string

textMessageReceived

textMessageReceived: (sender: IConversationTranslator, event: ConversationTranslationEventArgs) => void

Property Value

(sender: IConversationTranslator, event: ConversationTranslationEventArgs) => void

transcribed

transcribed: (sender: IConversationTranslator, event: ConversationTranslationEventArgs) => void

Property Value

(sender: IConversationTranslator, event: ConversationTranslationEventArgs) => void

transcribing

transcribing: (sender: IConversationTranslator, event: ConversationTranslationEventArgs) => void

Property Value

(sender: IConversationTranslator, event: ConversationTranslationEventArgs) => void

Method Details

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

function dispose(reason?: string, success?: () => void, err?: (error: string) => void)

Parameters

reason

string

success

() => void

err

(error: string) => void

isDisposed()

function isDisposed(): boolean

Returns

boolean

joinConversationAsync(IConversation, string, Callback, Callback)

Join a conversation. If this is the host, pass in the previously created Conversation object.

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

Parameters

conversation

IConversation

nickname

string

cb

Callback

err

Callback

joinConversationAsync(string, string, string, Callback, Callback)

function joinConversationAsync(conversationId: string, nickname: string, lang: string, cb?: Callback, err?: Callback)

Parameters

conversationId

string

nickname

string

lang

string

cb

Callback

err

Callback

leaveConversationAsync(Callback, Callback)

Leave the conversation

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

Parameters

cb

Callback

err

Callback

onToken(IAuthentication)

function onToken(token: IAuthentication)

Parameters

token

IAuthentication

sendTextMessageAsync(string, Callback, Callback)

Send a text message

function sendTextMessageAsync(message: string, cb?: Callback, err?: Callback)

Parameters

message

string

cb

Callback

err

Callback

setServiceProperty(string, string)

function setServiceProperty(name: string, value: string)

Parameters

name

string

value

string

startTranscribingAsync(Callback, Callback)

Start speaking

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

Parameters

cb

Callback

err

Callback

stopTranscribingAsync(Callback, Callback)

Stop speaking

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

Parameters

cb

Callback

err

Callback