Share via


TranscriptionDiarizationOptions Class

  • java.lang.Object
    • com.azure.ai.speech.transcription.models.TranscriptionDiarizationOptions

Implements

public final class TranscriptionDiarizationOptions
implements JsonSerializable<TranscriptionDiarizationOptions>

The Speaker Diarization settings. Diarization settings must be specified to enable speaker diarization.

Constructor Summary

Constructor Description
TranscriptionDiarizationOptions()

Creates an instance of TranscriptionDiarizationOptions class.

Method Summary

Modifier and Type Method and Description
static TranscriptionDiarizationOptions fromJson(JsonReader jsonReader)

Reads an instance of TranscriptionDiarizationOptions from the JsonReader.

Integer getMaxSpeakers()

Get the maxSpeakers property: Gets or sets a hint for the maximum number of speakers for diarization.

Boolean isEnabled()

Get the enabled property: Enable speaker diarization.

TranscriptionDiarizationOptions setMaxSpeakers(Integer maxSpeakers)

Set the maxSpeakers property: Gets or sets a hint for the maximum number of speakers for diarization.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

TranscriptionDiarizationOptions

public TranscriptionDiarizationOptions()

Creates an instance of TranscriptionDiarizationOptions class.

Method Details

fromJson

public static TranscriptionDiarizationOptions fromJson(JsonReader jsonReader)

Reads an instance of TranscriptionDiarizationOptions from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of TranscriptionDiarizationOptions if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the TranscriptionDiarizationOptions.

getMaxSpeakers

public Integer getMaxSpeakers()

Get the maxSpeakers property: Gets or sets a hint for the maximum number of speakers for diarization. Must be greater than 1 and less than 36.

Returns:

the maxSpeakers value.

isEnabled

public Boolean isEnabled()

Get the enabled property: Enable speaker diarization. This is automatically set to true when maxSpeakers is specified.

Returns:

the enabled value.

setMaxSpeakers

public TranscriptionDiarizationOptions setMaxSpeakers(Integer maxSpeakers)

Set the maxSpeakers property: Gets or sets a hint for the maximum number of speakers for diarization. Must be greater than 1 and less than 36.

Parameters:

maxSpeakers - the maxSpeakers value to set.

Returns:

the TranscriptionDiarizationOptions object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to