Structuremacpaw.openai 0.3.2OpenAI
Segment
AudioTranscriptionResult.swift:36struct Segment
struct Segment
import OpenAI
struct AudioTranscriptionResult
init(from decoder: any Decoder) throws
init(task: String? = nil, language: String? = nil, duration: Double? = nil, text: String, segments: [Segment]? = nil)
let duration: Double?
The duration of the audio in seconds
let language: String?
The detected language
let segments: [Segment]?
The segments containing detailed information (only present in verbose_json format)
let task: String?
The task type (always “transcribe” for transcriptions)
let text: String
The transcribed text
protocol Decodable
A type that can decode itself from an external representation.
protocol Encodable
A type that can encode itself to an external representation.
protocol Equatable
A type that can be compared for value equality.
init(from decoder: any Decoder) throws
let avg_logprob: Double
let compression_ratio: Double
let end: Double
let id: Int
let no_speech_prob: Double
let seek: Int
let start: Double
let temperature: Double
let text: String
let tokens: [Int]
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.