Skip to content

Commit

Permalink
added more fields for verbose_json format
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank-Buss committed Nov 8, 2024
1 parent 0704ac4 commit 90acb23
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions Sources/OpenAI/Public/Models/AudioTranscriptionResult.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

0 comments on commit 90acb23

Please sign in to comment.