Skip to content

Installing the engines

whispa orchestrates three local tools. Install the ones you need; mock the rest.

whisper.cpp (speech-to-text)

git clone https://github.com/ggml-org/whisper.cpp
cd whisper.cpp && cmake -B build && cmake --build build -j
# download a model
./models/download-ggml-model.sh base.en

Ensure the whisper-cli binary is on your PATH (or pass binary to WhisperCppStt). whisper.cpp expects 16 kHz mono WAV input.

new WhisperCppStt({ model: 'models/ggml-base.en.bin' });

Ollama (LLM)

# install from https://ollama.com, then:
ollama pull llama3.2
ollama serve   # usually already running on :11434
new OllamaLlm({ model: 'llama3.2' });               // http://localhost:11434
new OllamaLlm({ model: 'qwen2.5', host: 'http://localhost:11434' });

Piper (text-to-speech)

# download a release from https://github.com/rhasspy/piper
# and a voice model (.onnx + .onnx.json)
new PiperTts({ model: 'voices/en_US-amy-medium.onnx' });

Recording & playback

whispa handles the STT→LLM→TTS core. Capturing microphone audio and playing the resulting WAV are intentionally out of scope — use sox/arecord/ffmpeg or a platform audio library, then pass the WAV path (or bytes) to pipeline.turn().

Hardware notes

  • base/small whisper models and 1–3B LLMs run comfortably on a modern laptop.
  • On a Raspberry Pi 5, prefer tiny/base whisper and a small quantized LLM.