Participant Class

  • java.lang.Object
    • com.microsoft.cognitiveservices.speech.transcription.Participant

Implements

java.lang.AutoCloseable

public final class Participant
implements java.lang.AutoCloseable

Represents a participant in a conversation transcribing session. Added in version 1.5.0

Method Summary

Modifier and Type Method and Description
void close()

Explicitly frees any external resource attached to the object

static Participant from(String userId)

Create a Participant using user id.

static Participant from(String userId, String preferredLanguage)

Create a Participant using user id and her/his preferred language.

static Participant from(String userId, String preferredLanguage, String voiceSignature)

Create a Participant using user id, her/his preferred language and her/his voice signature.

java.lang.String getAvatar()

Gets the colour of the user's avatar as an HTML hex string (e.g.

java.lang.String getDisplayName()

The participant's display name.

java.lang.String getId()

The unique identifier for the participant.

SafeHandle getImpl()

Returns the participant implementation.

PropertyCollection getProperties()

Gets the properties for participant.

boolean isHost()

Gets whether or not this participant is the host.

boolean isMuted()

Gets whether or not this participant is muted.

boolean isUsingTts()

Gets whether or not the participant is using Text To Speech (TTS).

void setPreferredLanguage(String preferredLanguage)

Sets the preferred languages for participant.

void setVoiceSignature(String voiceSignature)

Sets the voice signature for participant.

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Method Details

close

public void close()

Explicitly frees any external resource attached to the object

from

public static Participant from(String userId)

Create a Participant using user id.

Parameters:

userId - user's Id.

Returns:

Participant object.

from

public static Participant from(String userId, String preferredLanguage)

Create a Participant using user id and her/his preferred language.

Parameters:

userId - user's Id.
preferredLanguage - users' preferred language.

Returns:

Participant object.

from

public static Participant from(String userId, String preferredLanguage, String voiceSignature)

Create a Participant using user id, her/his preferred language and her/his voice signature. If voice signature is empty then user will not be identified.

Parameters:

userId - user's Id.
preferredLanguage - users' preferred language.
voiceSignature - user's voice signature.

Returns:

Participant object.

getAvatar

public String getAvatar()

Gets the colour of the user's avatar as an HTML hex string (e.g. FF0000 for red).

Returns:

hex color string

getDisplayName

public String getDisplayName()

The participant's display name. Please note that each participant within the same conversation must have a different display name. Duplicate names within the same conversation are not allowed. You can use the Id property as another way to refer to each participant.

Returns:

The participant's display name.

getId

public String getId()

The unique identifier for the participant.

Returns:

unique ID

getImpl

public SafeHandle getImpl()

Returns the participant implementation.

Returns:

The implementation of the participant.

getProperties

public PropertyCollection getProperties()

Gets the properties for participant.

Returns:

the properties of participant.

isHost

public boolean isHost()

Gets whether or not this participant is the host.

Returns:

whether or not this participant is the host.

isMuted

public boolean isMuted()

Gets whether or not this participant is muted.

Returns:

whether or not this participant is muted.

isUsingTts

public boolean isUsingTts()

Gets whether or not the participant is using Text To Speech (TTS).

Returns:

whether or not the participant is using Text To Speech (TTS).

setPreferredLanguage

public void setPreferredLanguage(String preferredLanguage)

Sets the preferred languages for participant.

Parameters:

preferredLanguage - participant's preferred language.

setVoiceSignature

public void setVoiceSignature(String voiceSignature)

Sets the voice signature for participant. If voice signature is empty then user will not be identified.

Parameters:

voiceSignature - user's voice signature.

Applies to