File tree 2 files changed +8
-3
lines changed
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ public struct DecodingOptions: Codable {
178
178
logProbThreshold: Float ? = - 1.0 ,
179
179
firstTokenLogProbThreshold: Float ? = - 1.5 ,
180
180
noSpeechThreshold: Float ? = 0.6 ,
181
- concurrentWorkerCount: Int = 16 ,
181
+ concurrentWorkerCount: Int ? = nil ,
182
182
chunkingStrategy: ChunkingStrategy ? = nil
183
183
) {
184
184
self . verbose = verbose
@@ -205,7 +205,13 @@ public struct DecodingOptions: Codable {
205
205
self . logProbThreshold = logProbThreshold
206
206
self . firstTokenLogProbThreshold = firstTokenLogProbThreshold
207
207
self . noSpeechThreshold = noSpeechThreshold
208
- self . concurrentWorkerCount = concurrentWorkerCount
208
+ // Set platform-specific default worker count if not explicitly provided
209
+ // Non-macOS devices have shown regressions with >4 workers, default to 4 for safety
210
+ #if os(macOS)
211
+ self . concurrentWorkerCount = concurrentWorkerCount ?? 16
212
+ #else
213
+ self . concurrentWorkerCount = concurrentWorkerCount ?? 4
214
+ #endif
209
215
self . chunkingStrategy = chunkingStrategy
210
216
}
211
217
}
Original file line number Diff line number Diff line change @@ -51,7 +51,6 @@ class RegressionTests: XCTestCase {
51
51
let vadDecodingOptions = DecodingOptions (
52
52
verbose: true ,
53
53
task: . transcribe,
54
- concurrentWorkerCount: 16 ,
55
54
chunkingStrategy: . vad
56
55
)
57
56
You can’t perform that action at this time.
0 commit comments