startAsync

fun startAsync(preferredPort: Int, whisperRelease: String, whisperReleaseBaseUrl: String, modelUrl: String, modelsDir: File, binDir: File, whisperDir: File, noGpu: Boolean, threadCount: Int?, maxRAMPercent: Double, maxComputePercent: Double, onReady: (port: Int) -> Unit)

Avvia l'inizializzazione in background: scarica il file binario e il modello del server Whisper, garantisce ffmpeg, avvia il server e avvia il monitor delle risorse.

Parameters

preferredPort

The TCP port to try first.

whisperRelease

whisper.cpp release tag (e.g. "v1.7.6").

whisperReleaseBaseUrl

Base URL prefix for whisper.cpp release downloads.

modelUrl

URL of the GGML model to download.

modelsDir

Directory to store downloaded models.

binDir

Directory to store extracted binaries.

whisperDir

Root directory for all Whisper artifacts.

noGpu

When true, GPU acceleration is disabled.

threadCount

Explicit thread count, or null to auto-detect.

maxRAMPercent

RAM usage threshold for resource gating.

maxComputePercent

Compute usage threshold for resource gating.

onReady

Called when the server is fully ready (for updating static port fields).