IConversation interface

Manages conversations. Added in version 1.4.0

Properties

authorizationToken

Gets/sets authorization token used to communicate with the service. Note: The caller needs to ensure that the authorization token is valid. Before the authorization token expires, the caller needs to refresh it by calling this setter with a new valid token. Otherwise, the recognizer will encounter errors during recognition.

config
conversationId

Gets the unique identifier for the current conversation.

properties

Gets the collection of properties and their values defined for this instance.

speechRecognitionLanguage

Gets the language name that is used for recognition.

Methods

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

Delete a conversation. After this no one will be able to join the conversation.

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

End a conversation.

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

Lock a conversation. This will prevent new participants from joining.

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

Mute all other participants in the conversation. After this no other participants will have their speech recognitions broadcast, nor be able to send text messages.

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

Mute a participant.

removeParticipantAsync(string | IParticipant | IUser, () => void, (e: string) => void)

Remove a participant from a conversation using the user id, Participant or User object

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

Start a conversation. The host must connect to the websocket within a minute for the conversation to remain open.

unlockConversationAsync()

Unlocks a conversation.

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

Unmute all other participants in the conversation.

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

Unmute a participant.

Property Details

authorizationToken

Gets/sets authorization token used to communicate with the service. Note: The caller needs to ensure that the authorization token is valid. Before the authorization token expires, the caller needs to refresh it by calling this setter with a new valid token. Otherwise, the recognizer will encounter errors during recognition.

authorizationToken: string

Property Value

string

config

config: SpeechTranslationConfig

Property Value

conversationId

Gets the unique identifier for the current conversation.

conversationId: string

Property Value

string

properties

Gets the collection of properties and their values defined for this instance.

properties: PropertyCollection

Property Value

speechRecognitionLanguage

Gets the language name that is used for recognition.

speechRecognitionLanguage: string

Property Value

string

Method Details

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

Delete a conversation. After this no one will be able to join the conversation.

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

Parameters

cb

() => void

err

(e: string) => void

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

End a conversation.

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

Parameters

cb

() => void

err

(e: string) => void

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

Lock a conversation. This will prevent new participants from joining.

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

Parameters

cb

() => void

err

(e: string) => void

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

Mute all other participants in the conversation. After this no other participants will have their speech recognitions broadcast, nor be able to send text messages.

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

Parameters

cb

() => void

err

(e: string) => void

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

Mute a participant.

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

Parameters

userId

string

A user identifier

cb

() => void

err

(e: string) => void

removeParticipantAsync(string | IParticipant | IUser, () => void, (e: string) => void)

Remove a participant from a conversation using the user id, Participant or User object

function removeParticipantAsync(userId: string | IParticipant | IUser, cb?: () => void, err?: (e: string) => void)

Parameters

userId

string | IParticipant | IUser

A user identifier

cb

() => void

err

(e: string) => void

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

Start a conversation. The host must connect to the websocket within a minute for the conversation to remain open.

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

Parameters

cb

() => void

err

(e: string) => void

unlockConversationAsync()

Unlocks a conversation.

function unlockConversationAsync()

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

Unmute all other participants in the conversation.

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

Parameters

cb

() => void

err

(e: string) => void

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

Unmute a participant.

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

Parameters

userId

string

A user identifier

cb

() => void

err

(e: string) => void