- Home
- Skills
- APIs & Backend
- Local Voice Assistant (Cross-Platform & Offline)
More screenshots
Works with the AI Agents you already use
Local Voice Assistant (Cross-Platform & Offline)
by Rustom Yadav
Real-Time Sentence-by-Sentence VAD (Voice Activity Detection) - Direct OS-level 16 kHz audio capture via sounddevice (never relies on browser mic streaming).
$29
Local Voice Assistant (Cross-Platform & Offline)
Example session with this skill installed
Scaffold a 100% offline desktop voice assistant on my machine using Python, faster-whisper, Ollama, and Electron with zero memory leaks.
- Read your context and instructions
- Compiled the local voice assistant
Summary
Successfully scaffolded a production-grade, 100% offline desktop voice assistant featuring real-time Voice Activity Detection (VAD), faster-whisper speech-to-text, Ollama local LLM streaming, and an Electron UI with clean child process termination.
Architecture & Benchmark Breakdown
| Component | Implementation | Performance / Privacy |
|---|---|---|
| Audio Capture | Native soundcard via sounddevice | 16 kHz Mono Float32 (Zero browser audio overhead) |
| VAD Engine | RMS Energy (0.3s pre-roll + 0.8s silence cut) | Never clips opening consonants; instant sentence finalization |
| Speech-to-Text | faster-whisper (small.en, int8 CPU) | Instant sub-second startup via offline cache loading |
| LLM Streaming | Local Ollama (llama3.2:3b) | Progressive token streaming over WebSockets |
| Process Hygiene | Process tree termination (taskkill / SIGTERM) | Guaranteed zero background zombie python.exe processes |
Generated Project Structure
voice-assistant/
├── backend/
│ ├── pyproject.toml # Dependencies: fastapi, uvicorn, faster-whisper, sounddevice, ollama
│ ├── config.py # Audio thresholds, sample rate (16kHz), model names
│ ├── audio.py # UtteranceRecorder: 30ms chunks, RMS VAD, 0.3s pre-roll buffer
│ ├── stt.py # Transcriber: faster-whisper int8 CPU wrapper
│ ├── llm.py # stream_answer: Async Ollama client with error fallback
│ ├── session.py # Session state machine bridging audio callback to asyncio.Queue
│ ├── main.py # FastAPI app, lifespan singleton model cache, WebSocket router
│ └── checks/ # Modular hardware and engine diagnostics
│ ├── check_audio.py # Verify microphone driver access
│ ├── check_stt.py # Benchmark local Whisper transcription
│ ├── check_llm.py # Test Ollama streaming connection
│ └── check_server.py # WebSocket endpoint handshake test
│
└── electron/
├── package.json # "type": "module", devDependencies: electron ^33.2.0
├── main.js # Cross-platform Python child process spawner & tree kill
└── renderer/
├── index.html # Strict CSP-secured desktop layout
├── style.css # Modern dark-mode interface styling
└── app.js # Reactive streaming state machine & WebSocket listener
Automated Diagnostic Output
Executed backend verification checks
[1/4] Checking audio hardware... PASS (Found default input: Microphone) [2/4] Checking Whisper STT engine... PASS (Initialized small.en on int8 CPU) [3/4] Checking local Ollama LLM... PASS (Streaming ready on llama3.2:3b) [4/4] Checking WebSocket endpoint... PASS (Handshake confirmed on ws://127.0.0.1:8765/ws) RESULT: ALL SYSTEMS GO. Ready for launch.
Next Steps to Run
- Start the desktop application from the
electrondirectory:cd electron && npm start - Electron will automatically spawn the Python backend, connect to ws://127.0.0.1:8765/ws, and open the UI. Click Start Listening to speak.
Connects securely to your tools. The creator never sees your data.
About this skill
Overview
Building a local, offline desktop voice assistant from scratch involves complex edge cases: browser WebRTC permissions, messy AudioWorklets, clipping first words of speech, zombie process memory leaks on exit, and Whisper hanging on HuggingFace network checks.
This skill equips your AI Agent (Cursor, Claude Code, Codex, Antigravity) with a production-grade blueprint, modular scripts, and deep references to scaffold a 100% offline desktop voice assistant in under 5 minutes.
Key Differentiators & Highlights
1. Real-Time Sentence-by-Sentence VAD (Voice Activity Detection)
- Direct OS-level 16 kHz audio capture via
sounddevice(never relies on browser mic streaming). - 0.3s Pre-Roll Ring Buffer: The opening consonant of speech is never clipped.
- 0.8s Silence Hangover: Automatically cuts speech on natural pauses, transcribing each sentence progressively.
- Short noises (<0.3s clicks, coughs) are automatically filtered out.
2. Native Cross-Platform Lifecycle (Zero Memory Leaks)
- Engineered specifically for Windows, macOS, and Linux system behaviors:
- Windows: Auto-resolves
.venv\Scripts\python.exeand terminates child process trees withtaskkill /T /F. - macOS / Linux: Resolves
.venv/bin/pythonand uses POSIXSIGTERM. - macOS Dock: Handles
activateevents to cleanly re-launch windows without duplicate backend instances.
- Windows: Auto-resolves
- Zero Zombie Processes: Guaranteed clean shutdown ensures no leftover background
python.exeprocesses.
3. 100% Stateless Backend (Ultimate Privacy)
- The backend never saves audio, prompts, or chat history to disk or databases.
- The transcript lives strictly in the frontend editable textarea, giving users complete control to inspect or modify their question before streaming an answer from the local LLM.
4. Instant Offline Startup
- Uses
faster-whisper(small.en,int8CPU quantization) with smartlocal_files_onlycache loading to avoid 60-second HuggingFace network timeouts. - Streams progressive tokens directly from local Ollama (
llama3.2:3b).
What’s Included in the Package:
SKILL.md: Standardized instructions, triggers, and scaffolding workflow.scripts/:audio_recorder.py(Microphone capture + VAD)transcriber.py(faster-whisper int8 wrapper with offline cache check)llm_streamer.py(Ollama streaming generator with friendly error handling)server.py(FastAPI WebSocket server + session queue)verify_pipeline.py(Automated 3-point diagnostic check)
reference/:websocket_protocol.md(Bidirectional JSON protocol specifications)electron_setup.md(Cross-platform Electron shell blueprint)architecture.md(Threading, VAD math, and caching design)troubleshooting.md(PortAudio, Ollama, and port resolution)
Tech Stack & Compatibility
- Desktop Shell: Electron (Node.js ES Modules)
- Backend: Python 3.12 (FastAPI + WebSocket) managed via
uv - Speech-to-Text:
faster-whisper(small.en,int8on CPU) - Local LLM: Ollama (
llama3.2:3b) - OS Support: Windows, macOS, and Linux
Requires local Ollama installation. Python 3.12+ and Node.js 18+ required. STT performance depends on CPU for int8 quantization.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 17 days ago
- Software
Python
Permissions
What's inside
Frequently Asked Questions
New in APIs & Backend
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.