WhisperFS uses a "batteries included" approach for native whisper.cpp binaries, automatically downloading and managing platform-specific libraries as needed.
- Native libraries are downloaded from official whisper.cpp GitHub releases
- Currently pinned to whisper.cpp v1.7.6 for stability
- Libraries are cached locally to avoid repeated downloads
- Location:
%LOCALAPPDATA%\WhisperFS\native\v1.7.6\(Windows)
- CPU: Standard x86/x64 binaries (~3-4 MB)
- BLAS: OpenBLAS-accelerated binaries (~10-16 MB)
- CUDA 11.8: For older NVIDIA GPUs (~44 MB)
- CUDA 12.4: For newer NVIDIA GPUs (~443 MB)
- OpenCL: For AMD, Intel, and other GPUs via CLBlast (~15-20 MB)
- CoreML: Hardware-accelerated for Apple Silicon
- OpenCL: Available through system frameworks (Intel/AMD GPUs)
- CPU: Fallback for Intel Macs
- CPU: Standard builds
- CUDA: When NVIDIA drivers detected
- OpenCL: For AMD, Intel GPUs when OpenCL runtime installed
- (Linux binaries need to be built separately as whisper.cpp doesn't provide them)
The library automatically selects the best runtime based on priority:
- CUDA 12 (if NVIDIA GPU + CUDA 12 detected)
- CUDA 11 (if NVIDIA GPU + CUDA 11 detected)
- CoreML (on macOS with Apple Silicon)
- OpenCL (if OpenCL runtime detected - AMD, Intel, or other GPUs)
- BLAS (if OpenBLAS or Intel MKL detected)
- CPU (universal fallback)
// Initialize WhisperFS - downloads best runtime automatically
let! result = WhisperFS.Native.Library.initializeAsync()
match result with
| Ok runtime ->
printfn "Loaded runtime: %A" runtime.Type
| Error err ->
printfn "Failed to initialize: %s" err.Message// Force a specific runtime
let! result = WhisperFS.Native.Library.ensureRuntimeAsync RuntimeType.Cuda12
match result with
| Ok path ->
printfn "CUDA 12 runtime available at: %s" path
| Error err ->
printfn "Failed to load CUDA runtime: %s" err.Messagelet runtimes = WhisperFS.Native.Library.getAvailableRuntimes()
for runtime in runtimes do
printfn "%A - Priority %d - %s"
runtime.Type
runtime.Priority
(if runtime.Available then "Available" else "Not available")WhisperFS includes automatic OpenCL support for GPU acceleration on non-NVIDIA hardware:
- AMD GPUs: Radeon RX series, Radeon Pro, AMD Instinct
- Intel GPUs: Intel Arc, Intel Iris Xe, Intel UHD Graphics
- Other: Any GPU with OpenCL 1.2+ support
The library automatically detects OpenCL availability by checking for:
- Windows:
OpenCL.dllin system directories - Linux:
libOpenCL.soin standard library paths - macOS: OpenCL framework (built-in)
OpenCL acceleration typically provides:
- 5-10x speedup over CPU-only processing
- 50-70% of CUDA performance on comparable hardware
- Better efficiency than BLAS for long-form audio
For NVIDIA GPUs, WhisperFS supports both CUDA 11 and CUDA 12:
- NVIDIA GPU with Compute Capability 5.0+
- CUDA Toolkit 11.8+ or 12.0+
- Compatible NVIDIA drivers
The library checks for CUDA by:
- Examining
CUDA_PATHenvironment variable - Checking standard CUDA installation directories
- Verifying driver compatibility
To verify GPU acceleration is working:
let runtimes = WhisperFS.Native.Library.detectAvailableRuntimes()
let gpuRuntime = runtimes |> List.tryFind (fun r ->
match r.Type with
| RuntimeType.Cuda11 | RuntimeType.Cuda12 | RuntimeType.OpenCL -> true
| _ -> false)
match gpuRuntime with
| Some runtime ->
printfn "GPU acceleration available: %A" runtime.Type
| None ->
printfn "No GPU acceleration detected, using CPU"Override the default native library directory:
set WHISPERFS_NATIVE_DIR=C:\MyApp\nativeAutomatically detected to enable CUDA support:
set CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4Detected for BLAS acceleration:
set OPENBLAS_PATH=C:\Tools\OpenBLASAfter initialization, the native directory contains:
%LOCALAPPDATA%\WhisperFS\native\v1.7.6\
├── cuda12\
│ └── whisper.dll
├── cuda11\
│ └── whisper.dll
├── opencl\
│ └── whisper.dll
├── blas\
│ └── whisper.dll
└── cpu\
└── whisper.dll
- WhisperFS is pinned to specific whisper.cpp versions for stability
- Version updates are tested before being adopted
- Multiple versions can coexist in different directories
- Ensure internet connection for first-time download
- Check firewall doesn't block GitHub access
- Verify write permissions to
%LOCALAPPDATA%\WhisperFS
- Verify CUDA toolkit is installed
- Check GPU driver version matches CUDA version
- Try falling back to CPU runtime
If automatic download fails, manually download from: https://github.com/ggerganov/whisper.cpp/releases/v1.7.6
Extract the appropriate zip file to:
%LOCALAPPDATA%\WhisperFS\native\v1.7.6\[runtime_type]\
For deployment scenarios:
- Ship only F# assemblies
- Native libraries downloaded on first run
- Smaller initial package size
- Include native libraries in package
- Set
WHISPERFS_NATIVE_DIRto package location - Larger package but no runtime download needed
Similar to Whisper.NET approach:
WhisperFS.Runtime.Cuda- CUDA binariesWhisperFS.Runtime.Cpu- CPU binaries- User chooses which to install
| Runtime | Processing Time | Speed Factor |
|---|---|---|
| CUDA 12 | ~30s | 120x |
| CUDA 11 | ~35s | 100x |
| CoreML | ~45s | 80x |
| OpenCL | ~50s | 72x |
| BLAS | ~90s | 40x |
| CPU | ~180s | 20x |
| Runtime | Latency | Can Process Realtime? |
|---|---|---|
| CUDA 12 | <100ms | Yes (with headroom) |
| CUDA 11 | <150ms | Yes (with headroom) |
| CoreML | <200ms | Yes |
| OpenCL | <250ms | Yes |
| BLAS | <500ms | Yes (marginal) |
| CPU | <1000ms | Depends on model size |
Note: Realtime performance requires processing audio chunks faster than they are captured. Latency values are approximate for base model with 1-second chunks.
- Linux pre-built binaries
- Android/iOS support via xcframework
- Custom build configurations
- Model-specific optimizations
- Runtime performance profiling