Skip to content

Translations

Create translation
audio.translations.create(TranslationCreateParams**kwargs) -> TranslationCreateResponse
POST/audio/translations
ModelsExpand Collapse
class Translation:
text: str
class TranslationVerbose:
duration: float

The duration of the input audio.

language: str

The language of the output translation (always english).

text: str

The translated text.

segments: Optional[List[TranscriptionSegment]]

Segments of the translated text and their corresponding details.

id: int

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: int

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: str

Text content of the segment.

tokens: List[int]

Array of token IDs for the text content.