whisper.cpp/examples/mic
nick huang 53a289d268 examples: translate whisper-mic prompts to english 2026-03-20 08:06:21 +08:00
..
CMakeLists.txt examples: refine whisper-mic params and upstream-style cmake 2026-03-20 07:50:30 +08:00
README.md examples: add mic docs and limit mic example to unix 2026-03-20 08:01:41 +08:00
whisper-mic.cpp examples: translate whisper-mic prompts to english 2026-03-20 08:06:21 +08:00

README.md

whisper.cpp/examples/mic

This example captures live microphone audio and performs manual start/stop transcription. Unlike whisper-stream, it records a full segment first and then transcribes that segment.

Run

./build/bin/whisper-mic -m ./models/ggml-base.bin

Press Enter to start recording, then press Enter again to stop and transcribe.

Options

  -h,   --help           show help and exit
  -m F, --model F        model path
  -t N, --timeout N      max recording time in seconds
  -c N, --capture N      capture device ID
  -l S, --language S     language (for example: zh, en)
  -ng,  --no-gpu         disable GPU inference

Build

cmake -B build
cmake --build build --config Release -j

GPU build (optional)

cmake -S . -B build_gpu -DGGML_CUDA=ON
cmake --build build_gpu --config Release -j

Then run:

./build_gpu/bin/whisper-mic -m ./models/ggml-base.bin