Class TranscriptionCreateResponse
-
- All Implemented Interfaces:
public final class TranscriptionCreateResponseRepresents a transcription response returned by model, based on the provided input.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceTranscriptionCreateResponse.VisitorAn interface that defines how to map each variant of TranscriptionCreateResponse to a value of type T.
-
Method Summary
Modifier and Type Method Description final Optional<Transcription>transcription()Represents a transcription response returned by model, based on the provided input. final Optional<TranscriptionDiarized>diarized()Represents a diarized transcription response returned by the model, including the combined transcript and speaker-segment annotations. final Optional<TranscriptionVerbose>verbose()Represents a verbose json transcription response returned by model, based on the provided input. final BooleanisTranscription()final BooleanisDiarized()final BooleanisVerbose()final TranscriptionasTranscription()Represents a transcription response returned by model, based on the provided input. final TranscriptionDiarizedasDiarized()Represents a diarized transcription response returned by the model, including the combined transcript and speaker-segment annotations. final TranscriptionVerboseasVerbose()Represents a verbose json transcription response returned by model, based on the provided input. final Optional<JsonValue>_json()final <T extends Any> Taccept(TranscriptionCreateResponse.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final TranscriptionCreateResponsevalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static TranscriptionCreateResponseofTranscription(Transcription transcription)Represents a transcription response returned by model, based on the provided input. final static TranscriptionCreateResponseofDiarized(TranscriptionDiarized diarized)Represents a diarized transcription response returned by the model, including the combined transcript and speaker-segment annotations. final static TranscriptionCreateResponseofVerbose(TranscriptionVerbose verbose)Represents a verbose json transcription response returned by model, based on the provided input. -
-
Method Detail
-
transcription
final Optional<Transcription> transcription()
Represents a transcription response returned by model, based on the provided input.
-
diarized
final Optional<TranscriptionDiarized> diarized()
Represents a diarized transcription response returned by the model, including the combined transcript and speaker-segment annotations.
-
verbose
final Optional<TranscriptionVerbose> verbose()
Represents a verbose json transcription response returned by model, based on the provided input.
-
isTranscription
final Boolean isTranscription()
-
isDiarized
final Boolean isDiarized()
-
asTranscription
final Transcription asTranscription()
Represents a transcription response returned by model, based on the provided input.
-
asDiarized
final TranscriptionDiarized asDiarized()
Represents a diarized transcription response returned by the model, including the combined transcript and speaker-segment annotations.
-
asVerbose
final TranscriptionVerbose asVerbose()
Represents a verbose json transcription response returned by model, based on the provided input.
-
accept
final <T extends Any> T accept(TranscriptionCreateResponse.Visitor<T> visitor)
Maps this instance's current variant to a value of type T using the given visitor.
Note that this method is not forwards compatible with new variants from the API, unless visitor overrides Visitor.unknown. To handle variants not known to this version of the SDK gracefully, consider overriding Visitor.unknown:
import com.openai.core.JsonValue; import java.util.Optional; Optional<String> result = transcriptionCreateResponse.accept(new TranscriptionCreateResponse.Visitor<Optional<String>>() { @Override public Optional<String> visitTranscription(Transcription transcription) { return Optional.of(transcription.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final TranscriptionCreateResponse validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
ofTranscription
final static TranscriptionCreateResponse ofTranscription(Transcription transcription)
Represents a transcription response returned by model, based on the provided input.
-
ofDiarized
final static TranscriptionCreateResponse ofDiarized(TranscriptionDiarized diarized)
Represents a diarized transcription response returned by the model, including the combined transcript and speaker-segment annotations.
-
ofVerbose
final static TranscriptionCreateResponse ofVerbose(TranscriptionVerbose verbose)
Represents a verbose json transcription response returned by model, based on the provided input.
-
-
-
-