Recently, I’ve been using Whisper to transcribe YouTube videos for subtitle translation. I have a Windows PC with an NVIDIA 3060 GPU, which is suitable for running Whisper. Initially, I set up the Whisper.cpp service under WSL2 (Windows Subsystem for Linux) because I’m more comfortable with Linux development.
At first, everything worked fine, but I noticed that the network connection between my local computer and the Whisper.cpp service was a bit unstable. The setup looked like this:
local_computer => windows PC(Port forward) => Whisper.cpp server on WSL2
Sometimes, the network would become unstable, and even SSH connections would get stuck. After some research, I found various reasons online—some suggested that WSL2’s network might be unstable, while others pointed to firewall issues. I thought it might be better to run the Whisper.cpp server directly on Windows instead of WSL2 to avoid potential network instability. However, I later discovered that the issue wasn’t with WSL2 but with a virtual network card installed on my computer at the time. After resetting the network, the problem was resolved.
OS: Windows 10
CPU: Intel i7 4790K
Memory: 16GB
GPU: NVIDIA 3060 Ti (8G)
Prerequisite:
Environment Setup:
Building Whisper.cpp:
mkdir build
cd build
cmake -S . -B ./build -A x64 -DGGML_CUDA=ON
cmake --build . --config Release
build/Release/bin
directorybin
could be accessibleRun whisper.cpp server:
./build/Release/bin/server.exe -m models/ggml-base.bin
This is my experience building and running Whisper.cpp on Windows. I hope it helps others who might face similar issues!
Reference: