AudioTranslationFormat Class

public final class AudioTranslationFormat
extends ExpandableStringEnum<AudioTranslationFormat>

Defines available options for the underlying response format of output translation information.

Field Summary

Modifier and Type Field and Description
static final AudioTranslationFormat JSON

Use a response body that is a JSON object containing a single 'text' field for the translation.

static final AudioTranslationFormat SRT

Use a response body that is plain text in SubRip (SRT) format that also includes timing information.

static final AudioTranslationFormat TEXT

Use a response body that is plain text containing the raw, unannotated translation.

static final AudioTranslationFormat VERBOSE_JSON

Use a response body that is a JSON object containing translation text along with timing, segments, and other metadata.

static final AudioTranslationFormat VTT

Use a response body that is plain text in Web Video Text Tracks (VTT) format that also includes timing information.

Constructor Summary

Constructor Description
AudioTranslationFormat()

Deprecated

Use the fromString(String name) factory method.

Creates a new instance of AudioTranslationFormat value.

Method Summary

Modifier and Type Method and Description
static AudioTranslationFormat fromString(String name)

Creates or finds a AudioTranslationFormat from its string representation.

static Collection<AudioTranslationFormat> values()

Gets known AudioTranslationFormat values.

Methods inherited from ExpandableStringEnum

Methods inherited from java.lang.Object

Field Details

JSON

public static final AudioTranslationFormat JSON

Use a response body that is a JSON object containing a single 'text' field for the translation.

SRT

public static final AudioTranslationFormat SRT

Use a response body that is plain text in SubRip (SRT) format that also includes timing information.

TEXT

public static final AudioTranslationFormat TEXT

Use a response body that is plain text containing the raw, unannotated translation.

VERBOSE_JSON

public static final AudioTranslationFormat VERBOSE_JSON

Use a response body that is a JSON object containing translation text along with timing, segments, and other metadata.

VTT

public static final AudioTranslationFormat VTT

Use a response body that is plain text in Web Video Text Tracks (VTT) format that also includes timing information.

Constructor Details

AudioTranslationFormat

@Deprecated
public AudioTranslationFormat()

Deprecated

Use the fromString(String name) factory method.

Creates a new instance of AudioTranslationFormat value.

Method Details

fromString

public static AudioTranslationFormat fromString(String name)

Creates or finds a AudioTranslationFormat from its string representation.

Parameters:

name - a name to look for.

Returns:

the corresponding AudioTranslationFormat.

values

public static Collection values()

Gets known AudioTranslationFormat values.

Returns:

known AudioTranslationFormat values.

Applies to