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
@SerialName(value = "duration")
val duration: Double? = null
Link copied to clipboard
@SerialName(value = "language")
val language: String? = null
Link copied to clipboard
@SerialName(value = "segments")
val segments: List<Segment>? = null
Link copied to clipboard
@SerialName(value = "text")
val text: String

Translation text.