A local voice layer for any coding agent or harness. The model speaks, you answer out loud.
Role
Designer and developer
Tags
ai
Stack
Python
asyncio
MCP
WebSocket
faster-whisper
Piper
React
Vite
TypeScript
Vitest
uv
Team
Solo, 2026
What I owned
Everything: the Python server (speech-to-text, text-to-speech, MCP over stdio, WebSocket), the agent backends, and the React page that shows only code, permission prompts or the reply.
As a developer who works with coding agents several hours a day, sometimes I want to be examined out loud on a project I built, or to drive a coding session by voice. Socra is a local, private voice layer for that: the model speaks, you answer out loud, and the page shows only code, permission prompts or the reply.
Constraints
Private: the server binds to 127.0.0.1 only, nothing leaves the machine except what the agent itself sends.
Windows first. Python 3.12+, Node 22+, a microphone and Edge or Chrome. An NVIDIA GPU is optional; it works well on CPU.
A transcription budget of 3.0 s or less.
The Piper voice model is about 79 MB.
Decisions
Switching mode is a handoff, not a resume. Resuming would keep the old system prompt and an ever-growing context.
Whisper large-v3-turbo as the default. The aim is the highest recognition accuracy and robustness against accents and slang.
Speak each reply sentence by sentence while it is still being written, so the answer starts before it is finished.
English first, one voice. In English the voice sounds less robotic and Whisper transcribes better. A test keeps the language to a single source.
80 ms of lead-in before speech. Lead-ins of 30 to 75 ms cut the first phoneme; a test requires at least 60 ms.
What I owned
As it is a solo project, I built the whole thing with coding agents, from the server and the audio pipeline to the React page and the tests.
Result
Socra works well for me and helps me understand AI-generated codebases or concepts, and make sure I get it right. Any user or contributor is welcome!
One measurement exists, with a caveat. On an RTX 4060 8 GB, with synthesized Spanish audio, measured before the switch to English:
Model
Transcription time
Model load
large-v3-turbo, CUDA fp16
0.55 s and 0.43 s (two clips)
4.35 s
small
0.30 s (first clip)
not recorded
base
0.60 s (first clip)
not recorded
End-to-end speed has not been measured.
What I’d change
I’d measure end-to-end latency, and re-run the Whisper benchmark on English audio, since the current numbers are Spanish.
I’d make Pi questions that need a choice or free text answerable by voice. Today they are cancelled.