We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ad26716 commit 3ebfa14Copy full SHA for 3ebfa14
Sources/WhisperKit/Core/WhisperKit.swift
@@ -784,6 +784,8 @@ open class WhisperKit {
784
decodeOptions: decodeOptions
785
)
786
787
+ progress.totalUnitCount = max(progress.totalUnitCount, Int64(audioChunks.count))
788
+
789
// Reset the seek times since we've already chunked the audio
790
var chunkedOptions = decodeOptions
791
chunkedOptions?.clipTimestamps = []
@@ -844,7 +846,8 @@ open class WhisperKit {
844
846
try Task.checkCancellation()
845
847
848
let childProgress = Progress()
- progress.totalUnitCount += 1
849
+ // Total can be set elsewhere, here ensures it is at least 1
850
+ progress.totalUnitCount = max(1, progress.totalUnitCount)
851
progress.addChild(childProgress, withPendingUnitCount: 1)
852
853
let transcribeTask = TranscribeTask(
0 commit comments