WhisperEngineOptions

data class WhisperEngineOptions(val gpuDevice: Int = 0, val allowBackendFallback: Boolean = true)(source)

Construction-time options of a WhisperEngine that are specific to Whisper (the compute configuration itself is a com.donfuldauer.kggml.core.BackendConfig).

Constructors

Link copied to clipboard
constructor(gpuDevice: Int = 0, allowBackendFallback: Boolean = true)

Properties

Link copied to clipboard

when true (default), an unavailable requested backend falls back along ComputeBackend.fallback (CoreML → Metal → CPU, Vulkan → CPU); when false, it fails with com.donfuldauer.kggml.core.BackendUnavailableException. A GPU backend counts as unavailable when it fails the load-time warm-up (1 s of silence encoded on it), e.g. a compute pipeline the GPU driver cannot build, or cannot allocate the model's weights or state (device memory exhausted, a model too large for the GPU). A weight allocation that fails on the CPU throws com.donfuldauer.kggml.core.OutOfMemoryException.

Link copied to clipboard

ggml GPU device index used by accelerated backends.