Record Class OpenAiAudioApi.StructuredResponse
java.lang.Object
java.lang.Record
org.springframework.ai.openai.api.OpenAiAudioApi.StructuredResponse
- Record Components:
language- The language of the transcribed text.duration- The duration of the audio in seconds.text- The transcribed text.words- The extracted words and their timestamps.segments- The segments of the transcribed text and their corresponding details.
- Enclosing class:
OpenAiAudioApi
public static record OpenAiAudioApi.StructuredResponse(String language, Float duration, String text, List<OpenAiAudioApi.StructuredResponse.Word> words, List<OpenAiAudioApi.StructuredResponse.Segment> segments)
extends Record
The Transcription
Object represents a verbose json transcription response returned by model,
based on the provided input.
- Since:
- 0.8.1
- Author:
- Christian Tzolov, Ilayaperumal Gopinathan, Jonghoon Park, Filip Hrisafov, Alexandros Pappas
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordSegment of the transcribed text and its corresponding details.static final recordExtracted word and it corresponding timestamps. -
Constructor Summary
ConstructorsConstructorDescriptionStructuredResponse(String language, Float duration, String text, List<OpenAiAudioApi.StructuredResponse.Word> words, List<OpenAiAudioApi.StructuredResponse.Segment> segments) Creates an instance of aStructuredResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionduration()Returns the value of thedurationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.language()Returns the value of thelanguagerecord component.segments()Returns the value of thesegmentsrecord component.text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.words()Returns the value of thewordsrecord component.
-
Constructor Details
-
StructuredResponse
public StructuredResponse(String language, Float duration, String text, List<OpenAiAudioApi.StructuredResponse.Word> words, List<OpenAiAudioApi.StructuredResponse.Segment> segments) Creates an instance of aStructuredResponserecord class.
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
language
-
duration
-
text
-
words
-
segments
-