Share via


TranscriptionOptions Class

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

Implements

public final class TranscriptionOptions
implements JsonSerializable<TranscriptionOptions>

Metadata for a transcription request.

Constructor Summary

Constructor Description
TranscriptionOptions(AudioFileDetails fileDetails)

Creates an instance of TranscriptionOptions class with audio file details.

TranscriptionOptions(String audioUrl)

Creates an instance of TranscriptionOptions class with audio URL.

Method Summary

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

Reads an instance of TranscriptionOptions from the JsonReader.

List<Integer> getActiveChannels()

Get the activeChannels property: The 0-based indices of the channels to be transcribed separately.

String getAudioUrl()

Get the audioUrl property: The URL of the audio to be transcribed.

TranscriptionDiarizationOptions getDiarizationOptions()

Get the diarizationOptions property: Mode of diarization.

EnhancedModeOptions getEnhancedModeOptions()

Get the enhancedModeOptions property: Enhanced mode properties.

AudioFileDetails getFileDetails()

Get the audioFileDetails property: The audio file details for transcription.

Map<String,String> getLocaleModelMapping()

Get the localeModelMapping property: Maps some or all candidate locales to a model URI to be used for transcription.

List<String> getLocales()

Get the locales property: A list of possible locales for the transcription.

PhraseListOptions getPhraseListOptions()

Get the phraseListOptions property: Phrase list properties.

ProfanityFilterMode getProfanityFilterMode()

Get the profanityFilterMode property: Mode of profanity filtering.

TranscriptionOptions setActiveChannels(List<Integer> activeChannels)

Set the activeChannels property: The 0-based indices of the channels to be transcribed separately.

TranscriptionOptions setDiarizationOptions(TranscriptionDiarizationOptions diarizationOptions)

Set the diarizationOptions property: Mode of diarization.

TranscriptionOptions setEnhancedModeOptions(EnhancedModeOptions enhancedModeOptions)

Set the enhancedModeOptions property: Enhanced mode properties.

TranscriptionOptions setLocaleModelMapping(Map<String,String> localeModelMapping)

Set the localeModelMapping property: Maps some or all candidate locales to a model URI to be used for transcription.

TranscriptionOptions setLocales(List<String> locales)

Set the locales property: A list of possible locales for the transcription.

TranscriptionOptions setPhraseListOptions(PhraseListOptions phraseListOptions)

Set the phraseListOptions property: Phrase list properties.

TranscriptionOptions setProfanityFilterMode(ProfanityFilterMode profanityFilterMode)

Set the profanityFilterMode property: Mode of profanity filtering.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

TranscriptionOptions

public TranscriptionOptions(AudioFileDetails fileDetails)

Creates an instance of TranscriptionOptions class with audio file details.

Parameters:

fileDetails - the audio file details

TranscriptionOptions

public TranscriptionOptions(String audioUrl)

Creates an instance of TranscriptionOptions class with audio URL.

Parameters:

audioUrl - the URL of the audio to be transcribed

Method Details

fromJson

public static TranscriptionOptions fromJson(JsonReader jsonReader)

Reads an instance of TranscriptionOptions from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of TranscriptionOptions 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 TranscriptionOptions.

getActiveChannels

public List<Integer> getActiveChannels()

Get the activeChannels property: The 0-based indices of the channels to be transcribed separately. If not specified, multiple channels are merged and transcribed jointly. Only up to two channels are supported.

Returns:

the activeChannels value.

getAudioUrl

public String getAudioUrl()

Get the audioUrl property: The URL of the audio to be transcribed. The audio must be shorter than 2 hours in audio duration and smaller than 250 MB in size. If both Audio and AudioUrl are provided, Audio is used.

Returns:

the audioUrl value.

getDiarizationOptions

public TranscriptionDiarizationOptions getDiarizationOptions()

Get the diarizationOptions property: Mode of diarization.

Returns:

the diarizationOptions value.

getEnhancedModeOptions

public EnhancedModeOptions getEnhancedModeOptions()

Get the enhancedModeOptions property: Enhanced mode properties.

Returns:

the enhancedModeOptions value.

getFileDetails

public AudioFileDetails getFileDetails()

Get the audioFileDetails property: The audio file details for transcription.

Returns:

the audioFileDetails value.

getLocaleModelMapping

public Map<String,String> getLocaleModelMapping()

Get the localeModelMapping property: Maps some or all candidate locales to a model URI to be used for transcription. If no mapping is given, the default model for the locale is used.

Returns:

the localeModelMapping value.

getLocales

public List<String> getLocales()

Get the locales property: A list of possible locales for the transcription. If not specified, the locale of the speech in the audio is detected automatically from all supported locales.

Returns:

the locales value.

getPhraseListOptions

public PhraseListOptions getPhraseListOptions()

Get the phraseListOptions property: Phrase list properties.

Returns:

the phraseListOptions value.

getProfanityFilterMode

public ProfanityFilterMode getProfanityFilterMode()

Get the profanityFilterMode property: Mode of profanity filtering.

Returns:

the profanityFilterMode value.

setActiveChannels

public TranscriptionOptions setActiveChannels(List<Integer> activeChannels)

Set the activeChannels property: The 0-based indices of the channels to be transcribed separately. If not specified, multiple channels are merged and transcribed jointly. Only up to two channels are supported.

Parameters:

activeChannels - the activeChannels value to set.

Returns:

the TranscriptionOptions object itself.

setDiarizationOptions

public TranscriptionOptions setDiarizationOptions(TranscriptionDiarizationOptions diarizationOptions)

Set the diarizationOptions property: Mode of diarization.

Parameters:

diarizationOptions - the diarizationOptions value to set.

Returns:

the TranscriptionOptions object itself.

setEnhancedModeOptions

public TranscriptionOptions setEnhancedModeOptions(EnhancedModeOptions enhancedModeOptions)

Set the enhancedModeOptions property: Enhanced mode properties.

Parameters:

enhancedModeOptions - the enhancedModeOptions value to set.

Returns:

the TranscriptionOptions object itself.

setLocaleModelMapping

public TranscriptionOptions setLocaleModelMapping(Map<String,String> localeModelMapping)

Set the localeModelMapping property: Maps some or all candidate locales to a model URI to be used for transcription. If no mapping is given, the default model for the locale is used.

Parameters:

localeModelMapping - the localeModelMapping value to set.

Returns:

the TranscriptionOptions object itself.

setLocales

public TranscriptionOptions setLocales(List<String> locales)

Set the locales property: A list of possible locales for the transcription. If not specified, the locale of the speech in the audio is detected automatically from all supported locales.

Parameters:

locales - the locales value to set.

Returns:

the TranscriptionOptions object itself.

setPhraseListOptions

public TranscriptionOptions setPhraseListOptions(PhraseListOptions phraseListOptions)

Set the phraseListOptions property: Phrase list properties.

Parameters:

phraseListOptions - the phraseListOptions value to set.

Returns:

the TranscriptionOptions object itself.

setProfanityFilterMode

public TranscriptionOptions setProfanityFilterMode(ProfanityFilterMode profanityFilterMode)

Set the profanityFilterMode property: Mode of profanity filtering.

Parameters:

profanityFilterMode - the profanityFilterMode value to set.

Returns:

the TranscriptionOptions object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to