Repository navigation
Home
Tip
Official Interactive Documentation: For the complete set of getting started guides, advanced options, and APIs, visit the official FasterWhisper.NET Documentation Site.
This page provides the architectural details, platform compatibility matrix, and setup instructions for FasterWhisper.NET. Following the recent upgrades, the SDK supports native cross-platform execution on desktop, server, and mobile devices (Android and iOS).
FasterWhisper.NET utilizes a hybrid architecture consisting of a managed C# assembly (FasterWhisper.NET) wrapping the native C++ CTranslate2 inference engine and Silero VAD (via ONNX Runtime).
| Operating System | Architecture | Package | Math Backend | RID (Runtime Identifier) | Native Library Extension |
|---|---|---|---|---|---|
| Windows | x64 | CPU / GPU | Intel MKL / CUDA + cuDNN | win-x64 | .dll |
| Linux | x64 | CPU / GPU | OpenBLAS / CUDA + cuDNN | linux-x64 | .so |
| macOS | x64 | CPU | Apple Accelerate | osx-x64 | .dylib |
| macOS | arm64 | CPU | Apple Accelerate | osx-arm64 | .dylib |
| Android | arm64-v8a | CPU | Eigen / Ruy | android-arm64 | .so |
| iOS | arm64 | CPU | Apple Accelerate | ios-arm64 | .dylib (embedded framework) |
Note: tvOS and WebAssembly (Browser) are not currently supported by the native interop layer.
The native binaries are bundled within the NuGet packages under target-specific folders. MSBuild automatically resolves the host platform at compile time and extracts the correct binaries into the output folder of your application.
Contains compiled native libraries for CPU execution, optimized with hardware-specific backends:
runtimes/
βββ win-x64/native/qourex_fasterwhisper_native.dll
βββ linux-x64/native/qourex_fasterwhisper_native.so, libctranslate2.so
βββ osx-x64/native/qourex_fasterwhisper_native.dylib, libctranslate2.dylib
βββ osx-arm64/native/qourex_fasterwhisper_native.dylib, libctranslate2.dylib
βββ android-arm64/native/qourex_fasterwhisper_native.so, libctranslate2.so
βββ ios-arm64/native/qourex_fasterwhisper_native.dylib, libctranslate2.dylib
Contains CUDA-enabled CTranslate2 builds for GPU acceleration on Windows and Linux:
runtimes/
βββ win-x64/native/qourex_fasterwhisper_native.dll, ctranslate2.dll, cudnn*.dll, cublas*.dll
βββ linux-x64/native/qourex_fasterwhisper_native.so, libctranslate2.so
The samples/ directory contains 10 separate projects demonstrating integration patterns in various UI and server frameworks targeting .NET 10.0:
-
Projects:
Qourex.FasterWhisper.NET.Samples.Console.Cpu&.Gpu - Use Case: Lightweight command-line tools. Demonstrates asynchronous model downloading and basic WAV transcription.
-
Projects:
Qourex.FasterWhisper.NET.Samples.AspNetCore.Cpu&.Gpu -
Architecture: Implements
WhisperModelas a Singleton service. Demonstrates thread-safe request serialization using a semaphore lock to prevent concurrent reentrancy exceptions in the underlying native engine. -
Execution: Exposes a
POST /api/transcribeendpoint accepting multipart audio uploads.
-
Projects:
Qourex.FasterWhisper.NET.Samples.Blazor.Cpu&.Gpu - UI Features: Glassmorphic theme, Outfit typography, visual segment timeline mapping.
-
Rendering: Configured with
@rendermode InteractiveServerto handle real-time downloading progress bars and event binding via SignalR.
-
Projects:
Qourex.FasterWhisper.NET.Samples.WinForms.Cpu&.Gpu -
Features: Built using the native .NET 10.0 WinForms Dark Mode (
Application.SetColorMode(SystemColorMode.Dark)). Offloads CPU-intensive operations (model loading and transcription) to background threads usingTask.Runand routes GUI updates usingProgress<T>to maintain desktop responsiveness.
-
Projects:
Qourex.FasterWhisper.NET.Samples.Maui.Cpu&.Gpu - Targeting: CPU version targets Windows, iOS, Mac Catalyst, and Android. GPU version targets Windows only.
-
Mobile Workarounds:
-
Asset Extraction: Packaged raw files (like VAD models and audio assets) in mobile bundles cannot be accessed via standard file system paths. The samples extract raw resources to the local app cache path (
FileSystem.CacheDirectory) at startup. - Unified File Pickers: Standardizes cross-platform WAV file picking filters for mobile and desktop environments.
-
Asset Extraction: Packaged raw files (like VAD models and audio assets) in mobile bundles cannot be accessed via standard file system paths. The samples extract raw resources to the local app cache path (
-
Workloads: Ensure the
.NET MAUIorAndroidworkload is installed:dotnet workload install android
-
Permissions: Ensure your
AndroidManifest.xmlrequests storage read permissions if you plan to pick external audio files:<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
-
Workloads: Ensure the
iosworkload is installed:dotnet workload install ios
- Mathematical Backend: The iOS compilation pipeline utilizes the native Apple Accelerate framework. No external BLAS dependencies are packaged, ensuring a lightweight and battery-efficient footprint.
-
Deployment: On physical iOS devices, code signing is required. Native
.dylibfiles are automatically codesigned and embedded in the app bundle by the MSBuild pipeline.
Since model files (even the tiny model is ~75MB) are too large to package directly inside mobile app bundles, it is highly recommended to:
- Use the
ModelDownloaderAPI to download models dynamically toFileSystem.AppDataDirectoryupon first launch. - Display a progress bar during model initialization.
If you encounter a DllNotFoundException at runtime:
- On Windows: Verify you have installed the Visual C++ Redistributable.
- On GPU/CUDA: Ensure that the CUDA Toolkit (12.x) and cuDNN (9.x) libraries are present in your system environment PATH.
-
On Linux: Ensure
libopenblas-devor compatible BLAS libraries are installed on the host machine. -
On Android/iOS: Ensure your project targets a supported 64-bit architecture (
arm64-v8a/ios-arm64). 32-bit simulators or devices are not supported.