WhisperKit icon indicating copy to clipboard operation
WhisperKit copied to clipboard

Make public enums conform to Sendable

Open naykutguven opened this issue 5 months ago • 0 comments

Concurrency and safety improvements:

  • Added the Sendable protocol conformance to several enums (ModelVariant, ModelState, ChunkingStrategy, TranscriptionState, and WhisperError) to ensure they can be safely used across threads in concurrent code.

Code organization and utility refactoring:

  • Refactored utility types (ModelUtilities, TextUtilities, and TranscriptionUtilities) from structs with private initializers to enums with only static methods, and made them conform to Sendable. This clarifies their intended usage as namespaces for static utilities and improves thread safety.
  • Removed unused or redundant instance-level methods from ModelUtilities to streamline the utility interface.

naykutguven avatar Nov 23 '25 17:11 naykutguven