Structuremacpaw.openai 0.3.8OpenAI
Word
AudioTranscriptionResult.swift:12struct Word
struct Word
import OpenAI
struct AudioTranscriptionResult
init(from decoder: any Decoder) throws
init(task: String? = nil, language: String? = nil, duration: Float? = nil, text: String, words: [Word]? = nil, segments: [Segment]? = nil)
let duration: Float?
The duration of the input audio.
let language: String?
The language of the input audio.
let segments: [Segment]?
Segments of the transcribed text and their corresponding details.
let task: String?
let text: String
The transcribed text.
let words: [Word]?
Extracted words and their corresponding timestamps.
struct Segment
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.
protocol Sendable
init(from decoder: any Decoder) throws
let end: Float
End time of the word in seconds.
let start: Float
Start time of the word in seconds.
let word: String
The text content of the word.
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.