diff --git a/Sources/OpenAI/Public/Models/AudioTranscriptionResult.swift b/Sources/OpenAI/Public/Models/AudioTranscriptionResult.swift index b1c96f56..bfdda768 100644 --- a/Sources/OpenAI/Public/Models/AudioTranscriptionResult.swift +++ b/Sources/OpenAI/Public/Models/AudioTranscriptionResult.swift @@ -8,7 +8,27 @@ import Foundation public struct AudioTranscriptionResult: Codable, Equatable { - - /// The transcribed text. + /// The task type (always "transcribe" for transcriptions) + public let task: String? + /// The detected language + public let language: String? + /// The duration of the audio in seconds + public let duration: Double? + /// The transcribed text public let text: String + /// The segments containing detailed information (only present in verbose_json format) + public let segments: [Segment]? + + public struct Segment: Codable, Equatable { + public let id: Int + public let seek: Int + public let start: Double + public let end: Double + public let text: String + public let tokens: [Int] + public let temperature: Double + public let avg_logprob: Double + public let compression_ratio: Double + public let no_speech_prob: Double + } }