class Transcription::Conversation

class Transcription::Conversation
  : public std::enable_shared_from_this< Conversation >

Class for conversation. Added in version 1.8.0.

Members

Properties

Syntax: public PropertyCollection & Properties;

A collection of properties and their values defined for this Conversation.

Conversation

Syntax: public inline explicit Conversation ( SPXCONVERSATIONHANDLE hconversation );

Internal constructor. Creates a new instance using the provided handle.

Parameters

  • hconversation Recognizer handle.

~Conversation

Syntax: public inline ~Conversation ( );

Destructor.

operator SPXCONVERSATIONHANDLE

Syntax: public inline explicit operator SPXCONVERSATIONHANDLE ( ) const;

Internal operator used to get underlying handle value.

Returns

A handle.

GetConversationId

Syntax: public inline std::string GetConversationId ( );

Get the conversation id.

Returns

Conversation id.

AddParticipantAsync

Syntax: public inline std::future< std::shared_ptr< Participant > > AddParticipantAsync ( const std::string & userId );

Add a participant to a conversation using the user's id.

Note: The returned participant can be used to remove. If the client changes the participant's attributes, the changed attributes are passed on to the service only when the participant is added again.

Parameters

  • userId A user id.

Returns

a shared smart pointer of the participant.

AddParticipantAsync

Syntax: public inline std::future< std::shared_ptr< User > > AddParticipantAsync ( const std::shared_ptr< User > & user );

Add a participant to a conversation using the User object.

Parameters

  • user A shared smart pointer to a User object.

Returns

The passed in User object.

AddParticipantAsync

Syntax: public inline std::future< std::shared_ptr< Participant > > AddParticipantAsync ( const std::shared_ptr< Participant > & participant );

Add a participant to a conversation using the participant object.

Parameters

  • participant A shared smart pointer to a participant object.

Returns

The passed in participant object.

RemoveParticipantAsync

Syntax: public inline std::future< void > RemoveParticipantAsync ( const std::shared_ptr< Participant > & participant );

Remove a participant from a conversation using the participant object.

Parameters

  • participant A shared smart pointer of a participant object.

Returns

An empty future.

RemoveParticipantAsync

Syntax: public inline std::future< void > RemoveParticipantAsync ( const std::shared_ptr< User > & user );

Remove a participant from a conversation using the User object.

Parameters

  • user A smart pointer of a User.

Returns

An empty future.

RemoveParticipantAsync

Syntax: public inline std::future< void > RemoveParticipantAsync ( const std::string & userId );

Remove a participant from a conversation using a user id string.

Parameters

  • userId A user id.

Returns

An empty future.

EndConversationAsync

Syntax: public inline std::future< void > EndConversationAsync ( );

Ends the current conversation.

Returns

An empty future.

SetAuthorizationToken

Syntax: public inline void SetAuthorizationToken ( const std::string & token );

Sets the authorization token that will be used for connecting the server.

Parameters

  • token The authorization token.

GetAuthorizationToken

Syntax: public inline std::string GetAuthorizationToken ( );

Gets the authorization token.

Returns

Authorization token

StartConversationAsync

Syntax: public inline std::future< void > StartConversationAsync ( );

Start the conversation.

Returns

An empty future.

DeleteConversationAsync

Syntax: public inline std::future< void > DeleteConversationAsync ( );

Deletes the conversation. Any participants that are still part of the converation will be ejected after this call.

Returns

An empty future.

LockConversationAsync

Syntax: public inline std::future< void > LockConversationAsync ( );

Locks the conversation. After this no new participants will be able to join.

Returns

An empty future.

UnlockConversationAsync

Syntax: public inline std::future< void > UnlockConversationAsync ( );

Unlocks the conversation.

Returns

An empty future.

MuteAllParticipantsAsync

Syntax: public inline std::future< void > MuteAllParticipantsAsync ( );

Mutes all participants except for the host. This prevents others from generating transcriptions, or sending text messages.

Returns

An empty future.

UnmuteAllParticipantsAsync

Syntax: public inline std::future< void > UnmuteAllParticipantsAsync ( );

Allows other participants to generate transcriptions, or send text messages.

Returns

An empty future.

MuteParticipantAsync

Syntax: public inline std::future< void > MuteParticipantAsync ( const std::string & participantId );

Mutes a particular participant. This will prevent them generating new transcriptions, or sending text messages.

Parameters

  • participantId The identifier for the participant.

Returns

An empty future.

UnmuteParticipantAsync

Syntax: public inline std::future< void > UnmuteParticipantAsync ( const std::string & participantId );

Unmutes a particular participant.

Parameters

  • participantId The identifier for the participant.

Returns

An empty future.

CreateConversationAsync

Syntax: public inline static std::future< std::shared_ptr< Conversation > > CreateConversationAsync ( std::shared_ptr< SpeechConfig > speechConfig , const std::string & conversationId );

Create a conversation using a speech config and an optional conversation id.

Parameters

  • speechConfig A shared smart pointer of a speech config object.

  • conversationId Conversation Id.

Returns

A shared smart pointer of the created conversation object.