aethersdr / aethersdr/AetherSDR
Ship whisper-gpu (Windows) as a C-API DLL — cross-build with MinGW, drop the Windows-box dependency
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 221
- Forks
- 117
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 299
Description
Background
PR #4338 (RFC #4333, landed on main as 4d7f00a6) ships the Windows ASR GPU backend (whisper Vulkan) as prebuilt MSVC static libs hosted on the whisper-gpu-<ver> release tag (currently whisper-gpu-1.9.1), consumed via -DASR_USE_PREBUILT_WHISPER_GPU=ON. This was necessary because MSVC compiles ggml-vulkan.cpp too slowly to finish inside GitHub's 6-hour job timeout on the stock windows-latest runner.
Problem
The prebuilt libs are MSVC-ABI static libs, so regenerating them — e.g. on any whisper.cpp bump — requires a native Windows box (scripts/build/build-whisper-vulkan-windows.ps1). They can't be cross-compiled from Linux with MinGW because MinGW and MSVC have incompatible C++ ABIs and static linking needs whole-library ABI compatibility. That's a recurring maintenance friction point: every whisper bump means booting into Windows to rebuild and re-upload the asset.
Proposal
Repackage whisper-gpu as a C-API DLL, exactly the way sherpa-onnx is already shipped. A C-ABI boundary (exported C functions, self-contained runtime) is stable across toolchains — which is why the MSVC-built app already links sherpa's DLL fine. whisper.h is a C API, so this is viable.
Once it's a C-API DLL:
- The MSVC app links the DLL's import lib and loads it at runtime (no C++ across the boundary).
- The DLL itself can be built with MinGW-w64, cross-compiled on Linux (the toolchain is already installed on the dev box) — no Windows machine required.
- The asset can then be regenerated in CI on a fast Linux runner, replacing the manual Windows build.
Tasks
- Build whisper + ggml + ggml-vulkan as a shared library exporting the
whisper.hC API (BUILD_SHARED_LIBS,-static-libgcc -static-libstdc++so the DLL is self-contained). - Cross-compile for
win-x64viax86_64-w64-mingw32on Linux; produce the import lib (.dll.a/.lib) the MSVC app links against. - Sort out the Vulkan loader for the MinGW build (link
vulkan-1, shipvulkan-1.dll— already handled app-side). - Update the
ASR_USE_PREBUILT_WHISPER_GPUCMake path to link the DLL import lib instead of the static libs, and deploy the DLL alongside the exe (mirror the sherpa-onnx deploy). - New CI workflow to build + publish the
whisper-gpuC-API DLL asset from Linux (retire the manual Windows producer script). - Runtime smoke test: confirm the Vulkan GPU path works with the MinGW-built DLL loaded into the MSVC-built
AetherSDR.exe.
Notes
- This is a maintenance / infra improvement, not user-facing — the current MSVC-static-lib approach works and ships GPU today.
- Model to follow: the existing
sherpa-onnxC-API DLL packaging (scripts/setup/setup-sherpa-onnx.*), which already bridges the MinGW/MSVC toolchain gap. - Related: PR #4338,
scripts/build/build-whisper-vulkan-windows.ps1(current Windows producer).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading scripts/build/build-whisper-vulkan-windows.ps1 and the existing scripts/setup/setup-sherpa-onnx.* packaging flow, then inspect the ASR_USE_PREBUILT_WHISPER_GPU CMake path. Compare the current static-library producer and deployment steps with the sherpa-onnx model. Done means a Linux CI workflow publishes the C-API DLL, the MSVC app deploys and loads it, and the Vulkan GPU smoke test passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp, github-actions
- Domain
- build-system, ci-cd, infrastructure
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100