Add Groq cloud STT engine - #513
johnalpha911 wants to merge 2 commits into
Conversation
|
The point of wirepod is to run all the base Vector functions locally, no? Wouldn't this defeat the point of that because of it being a cloud STT? |
That's a fair point but this was mostly made to bridge the gap between accuracy and the need to have good hardware because as I mentioned with the cloud whisper you get free almost zero delay and very accurate transcription that's why I thought it would be a helpful addition |
|
Thanks for this PR — I've tested it on Escape Pod / Linux wire-pod and it works well in practice (Vector commands + custom intents). What I like most is that this effectively decouples STT from wire-pod: chipper only needs an OpenAI-compatible Suggestion: make the env vars generic (not Groq-branded) UI request Thanks again for building and maintaining wire-pod — this STT path is a big unlock for Pi / Escape Pod hosts and for open-source ASR. |
Adds a new speech-to-text engine, groq, that streams Vector's captured audio to Groq's OpenAI-compatible transcription API (running whisper-large-v3) instead of running a model locally.
This gives low-power hosts — a Raspberry Pi 3B+ in particular — accurate, open-vocabulary recognition that isn't achievable with a local model on 1 GB of ARM. The Pi only captures and forwards audio; Groq does the inference. It also handles accented English and non-English languages (e.g. Greek) far better than the small local VOSK model, and is fast enough that there's no perceptible delay on short commands.
What's included
chipper/pkg/wirepod/stt/groq/Groq.go — the engine. Implements the standard interface (Name, Init, STT). Drains the audio stream to end-of-speech, wraps the PCM as WAV, POSTs it, parses the response, lowercases it. Includes brief retries on transient errors and fail-fast on client errors like a bad key.
chipper/cmd/groq/main.go — entry point, matching the other engines.
chipper/start.sh — adds the groq branch to STT dispatch.
setup.sh — adds Groq Whisper as menu option 5, an API-key prompt, and the build step.
Configuration (env vars in source.sh)
GROQ_API_KEY (required)
GROQ_STT_MODEL (default whisper-large-v3; also whisper-large-v3-turbo)
GROQ_STT_LANGUAGE (default auto-detect; e.g. en, el)
GROQ_STT_PROMPT (optional biasing prompt)
GROQ_API_URL (override for OpenAI-compatible endpoints)
Notes
No new Go dependencies — reuses the audio libraries the existing Whisper module already pulls in.
The build is CGO but does not link any local STT library, so there's no libvosk/whisper.cpp runtime requirement.
Testing
Built and run on a Raspberry Pi 3B+ (Debian trixie, aarch64) against a live Vector. Confirmed correct transcription of short commands with no perceptible latency, custom intents matching as before, and clean startup/error logging