Record Class AzureOpenAiAudioTranscriptionOptions.StructuredResponse.Segment

java.lang.Object
java.lang.Record
org.springframework.ai.azure.openai.AzureOpenAiAudioTranscriptionOptions.StructuredResponse.Segment
Record Components:
id - Unique identifier of the segment.
seek - Seek offset of the segment.
start - Start time of the segment in seconds.
end - End time of the segment in seconds.
text - The text content of the segment.
tokens - Array of token IDs for the text content.
temperature - Temperature parameter used for generating the segment.
avgLogprob - Average logprob of the segment. If the value is lower than -1, consider the logprobs failed.
compressionRatio - Compression ratio of the segment. If the value is greater than 2.4, consider the compression failed.
noSpeechProb - Probability of no speech in the segment. If the value is higher than 1.0 and the avg_logprob is below -1, consider this segment silent.
Enclosing class:
AzureOpenAiAudioTranscriptionOptions.StructuredResponse

public static record AzureOpenAiAudioTranscriptionOptions.StructuredResponse.Segment(Integer id, Integer seek, Float start, Float end, String text, List<Integer> tokens, Float temperature, Float avgLogprob, Float compressionRatio, Float noSpeechProb) extends Record
Segment of the transcribed text and its corresponding details.
  • Constructor Details

    • Segment

      public Segment(Integer id, Integer seek, Float start, Float end, String text, List<Integer> tokens, Float temperature, Float avgLogprob, Float compressionRatio, Float noSpeechProb)
      Creates an instance of a Segment record class.
      Parameters:
      id - the value for the id record component
      seek - the value for the seek record component
      start - the value for the start record component
      end - the value for the end record component
      text - the value for the text record component
      tokens - the value for the tokens record component
      temperature - the value for the temperature record component
      avgLogprob - the value for the avgLogprob record component
      compressionRatio - the value for the compressionRatio record component
      noSpeechProb - the value for the noSpeechProb record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public Integer id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • seek

      public Integer seek()
      Returns the value of the seek record component.
      Returns:
      the value of the seek record component
    • start

      public Float start()
      Returns the value of the start record component.
      Returns:
      the value of the start record component
    • end

      public Float end()
      Returns the value of the end record component.
      Returns:
      the value of the end record component
    • text

      public String text()
      Returns the value of the text record component.
      Returns:
      the value of the text record component
    • tokens

      public List<Integer> tokens()
      Returns the value of the tokens record component.
      Returns:
      the value of the tokens record component
    • temperature

      public Float temperature()
      Returns the value of the temperature record component.
      Returns:
      the value of the temperature record component
    • avgLogprob

      public Float avgLogprob()
      Returns the value of the avgLogprob record component.
      Returns:
      the value of the avgLogprob record component
    • compressionRatio

      public Float compressionRatio()
      Returns the value of the compressionRatio record component.
      Returns:
      the value of the compressionRatio record component
    • noSpeechProb

      public Float noSpeechProb()
      Returns the value of the noSpeechProb record component.
      Returns:
      the value of the noSpeechProb record component