Package-level declarations

Types

Link copied to clipboard
data class StreamingOptions(val transcription: TranscriptionOptions = TranscriptionOptions.DEFAULT, val vad: VadConfig = VadConfig(), val partialStepMs: Int = 300, val carryPromptTokens: Boolean = true, val maxPromptTokens: Int = DEFAULT_MAX_PROMPT_TOKENS, val bufferMs: Int)
Link copied to clipboard
data class TranscriptionOptions(val language: String? = null, val translate: Boolean = false, val initialPrompt: String? = null, val noContext: Boolean = true, val singleSegment: Boolean = false, val noTimestamps: Boolean = false, val maxTokens: Int = 0, val temperature: Float = 0.0f, val temperatureIncrement: Float = 0.2f)

Per-call decoding options of WhisperEngine.transcribe.

Link copied to clipboard
data class TranscriptionResult(val segments: List<WhisperSegment>, val audioDurationMs: Long, val backend: ComputeBackend)

Result of one WhisperEngine.transcribe call.

Link copied to clipboard
class WhisperBackgroundFallback(engine: WhisperEngine, scope: CoroutineScope, abortInFlightOnBackground: Boolean = true, onError: (Throwable) -> Unit = {}) : AutoCloseable

Keeps a WhisperEngine off the GPU while the app is in the background.

Link copied to clipboard

whisper.cpp speech-to-text engine.

Link copied to clipboard
data class WhisperEngineOptions(val gpuDevice: Int = 0, val allowBackendFallback: Boolean = true)

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

Link copied to clipboard
data class WhisperNativeInfo(val moduleVersion: String, val whisperCppVersion: String, val whisperCppCommit: String, val systemInfo: String, val hasCoreMl: Boolean)

Version and capability information of the native whisper library.

Link copied to clipboard
data class WhisperSegment(val index: Int, val text: String, val startMs: Long, val endMs: Long, val noSpeechProbability: Float)

One decoded segment.

Functions

Link copied to clipboard
suspend fun WhisperEngine(modelPath: String, backendConfig: BackendConfig = BackendConfig.DEFAULT, options: WhisperEngineOptions = WhisperEngineOptions()): WhisperEngine

Loads a whisper.cpp ggml model and returns a ready WhisperEngine.