Translation

@Serializable
data class Translation(val text: String, val language: String? = null, val duration: Double? = null, val segments: List<Segment>? = null)

Create translation response.

text format depends on TranslationRequest's responseFormat. Remaining field are provided only in case of response format verbose_json.

Constructors

Link copied to clipboard
constructor(text: String, language: String? = null, duration: Double? = null, segments: List<Segment>? = null)

Properties

Link copied to clipboard
val duration: Double? = null
Link copied to clipboard
val language: String? = null
Link copied to clipboard
val segments: List<Segment>? = null
Link copied to clipboard

Translation text.