Class AudioTranslationSegment

java.lang.Object
com.azure.ai.openai.models.AudioTranslationSegment

public final class AudioTranslationSegment extends Object
Extended information about a single segment of translated audio data. Segments generally represent roughly 5-10 seconds of speech. Segment boundaries typically occur between words but not necessarily sentences.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Get the avgLogprob property: The average log probability associated with this audio segment.
    double
    Get the compressionRatio property: The compression ratio of this audio segment.
    Get the end property: The time at which this segment ended relative to the beginning of the translated audio.
    int
    Get the id property: The 0-based index of this segment within a translation.
    double
    Get the noSpeechProb property: The probability of no speech detection within this audio segment.
    int
    Get the seek property: The seek position associated with the processing of this audio segment.
    Get the start property: The time at which this segment started relative to the beginning of the translated audio.
    double
    Get the temperature property: The temperature score associated with this audio segment.
    Get the text property: The translated text that was part of this audio segment.
    Get the tokens property: The token IDs matching the translated text in this audio segment.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getId

      public int getId()
      Get the id property: The 0-based index of this segment within a translation.
      Returns:
      the id value.
    • getStart

      public Duration getStart()
      Get the start property: The time at which this segment started relative to the beginning of the translated audio.
      Returns:
      the start value.
    • getEnd

      public Duration getEnd()
      Get the end property: The time at which this segment ended relative to the beginning of the translated audio.
      Returns:
      the end value.
    • getText

      public String getText()
      Get the text property: The translated text that was part of this audio segment.
      Returns:
      the text value.
    • getTemperature

      public double getTemperature()
      Get the temperature property: The temperature score associated with this audio segment.
      Returns:
      the temperature value.
    • getAvgLogprob

      public double getAvgLogprob()
      Get the avgLogprob property: The average log probability associated with this audio segment.
      Returns:
      the avgLogprob value.
    • getCompressionRatio

      public double getCompressionRatio()
      Get the compressionRatio property: The compression ratio of this audio segment.
      Returns:
      the compressionRatio value.
    • getNoSpeechProb

      public double getNoSpeechProb()
      Get the noSpeechProb property: The probability of no speech detection within this audio segment.
      Returns:
      the noSpeechProb value.
    • getTokens

      public List<Integer> getTokens()
      Get the tokens property: The token IDs matching the translated text in this audio segment.
      Returns:
      the tokens value.
    • getSeek

      public int getSeek()
      Get the seek property: The seek position associated with the processing of this audio segment. Seek positions are expressed as hundredths of seconds. The model may process several segments from a single seek position, so while the seek position will never represent a later time than the segment's start, the segment's start may represent a significantly later time than the segment's associated seek position.
      Returns:
      the seek value.