Skip to content

Commit 59aaa4e

Browse files
authoredAug 11, 2024··
Change static var stored properties to static let. (#190)
As far as I can tell, these stored properties are not meant to be changed. Therefore, change them to be immutable. This change also makes these static properties concurrency-safe.
1 parent c268c8d commit 59aaa4e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
 

‎Sources/WhisperKit/Core/WhisperKit.swift

+5-5
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ open class WhisperKit {
2626
public var segmentSeeker: any SegmentSeeking
2727

2828
/// Shapes
29-
public static var sampleRate: Int = 16000
30-
public static var hopLength: Int = 160
31-
public static var chunkLength: Int = 30 // seconds
32-
public static var windowSamples: Int = 480_000 // sampleRate * chunkLength
33-
public static var secondsPerTimeToken = Float(0.02)
29+
public static let sampleRate: Int = 16000
30+
public static let hopLength: Int = 160
31+
public static let chunkLength: Int = 30 // seconds
32+
public static let windowSamples: Int = 480_000 // sampleRate * chunkLength
33+
public static let secondsPerTimeToken = Float(0.02)
3434

3535
/// Progress
3636
public private(set) var currentTimings: TranscriptionTimings

0 commit comments

Comments
 (0)
Please sign in to comment.