Skip to content

Translations

Create translation
audio.translations.create(**kwargs) -> TranslationCreateResponse
POST/audio/translations
ModelsExpand Collapse
class Translation { text }
text: String
class TranslationVerbose { duration, language, text, segments }
duration: Float

The duration of the input audio.

language: String

The language of the output translation (always english).

text: String

The translated text.

segments: Array[TranscriptionSegment { id, avg_logprob, compression_ratio, 7 more } ]

Segments of the translated text and their corresponding details.

id: Integer

Unique identifier of the segment.

avg_logprob: Float

Average logprob of the segment. If the value is lower than -1, consider the logprobs failed.

formatfloat
compression_ratio: Float

Compression ratio of the segment. If the value is greater than 2.4, consider the compression failed.

formatfloat
end_: Float

End time of the segment in seconds.

formatfloat
no_speech_prob: Float

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.

formatfloat
seek: Integer

Seek offset of the segment.

start: Float

Start time of the segment in seconds.

formatfloat
temperature: Float

Temperature parameter used for generating the segment.

formatfloat
text: String

Text content of the segment.

tokens: Array[Integer]

Array of token IDs for the text content.