ConversationTranslator class

Join, leave or connect to a conversation.

Extends

Constructors

ConversationTranslator(AudioConfig)

Properties

canceled
conversationExpiration
participants
participantsChanged
properties
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

sendTextMessageAsync(string, Callback, Callback)

Send a text message

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

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()

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

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

err
Callback

leaveConversationAsync(Callback, Callback)

Leave the conversation

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

Parameters

err
Callback

sendTextMessageAsync(string, Callback, Callback)

Send a text message

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

Parameters

message

string

err
Callback

startTranscribingAsync(Callback, Callback)

Start speaking

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

Parameters

err
Callback

stopTranscribingAsync(Callback, Callback)

Stop speaking

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

Parameters

err
Callback