You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sources/OpenAI/Public/Parameters/Audio/AudioTranscriptionParameters.swift
+9-2
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,9 @@ public struct AudioTranscriptionParameters: Encodable {
24
24
letresponseFormat:String?
25
25
/// The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit. Defaults to 0
26
26
lettemperature:Double?
27
+
/// Defaults to segment
28
+
/// The timestamp granularities to populate for this transcription. response_format must be set verbose_json to use timestamp granularities. Either or both of these options are supported: word, or segment. Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency.
29
+
lettimestampGranularities:[String]?
27
30
28
31
publicenumModel:String{
29
32
case whisperOne ="whisper-1"
@@ -36,6 +39,7 @@ public struct AudioTranscriptionParameters: Encodable {
36
39
case responseFormat ="response_format"
37
40
case temperature
38
41
case language
42
+
case timestampGranularities ="timestamp_granularities[]"
39
43
}
40
44
41
45
publicinit(
@@ -45,7 +49,8 @@ public struct AudioTranscriptionParameters: Encodable {
45
49
prompt:String?=nil,
46
50
responseFormat:String?=nil,
47
51
temperature:Double?=nil,
48
-
language:String?=nil)
52
+
language:String?=nil,
53
+
timestampGranularities:[String]?=nil)
49
54
{
50
55
self.fileName = fileName
51
56
self.file = file
@@ -54,6 +59,7 @@ public struct AudioTranscriptionParameters: Encodable {
0 commit comments