How devopstem/plna_voice works
Daemon is a local Linux assistant and TCP control plane. The primary remote workflow is controller → newline-JSON protocol → authenticated daemon request handling → allowlisted skill routing → OS action and response; local text commands use the same router. A separate microphone path captures PCM through selectable sources into the voice engine, while optional TTS speaks skill results. The graph reflects README capabilities and shown source references; some audio and networking internals were not excerpted, so uncertain links are omitted.
Main entry points: main.cpp CLI and mode entry · daemon_server.cpp TCP daemon server · router.cpp Skill router · make_source.cpp Audio source factory
Components 17
Entry modes
- CLI and mode entry
src/app/main.cpp
Audio capture
- Audio source factory
src/audio/make_source.cpp - Mock source
src/audio/mock_source.cpp - PipeWire capture
src/audio/pipewire_source.cpp - PCM ring buffer
src/audio/ring_buffer.cpp - Voice engine
src/core/voice_engine.cpp
Control plane
- TCP daemon server
src/net/daemon_server.cpp - JSON line protocol
src/net/protocol.cpp - Shared protocol contract
protocol/schema/v1/request.schema.json
Skills and OS
- Skill router
src/skills/router.cpp - Browser opener
src/skills/os_open.cpp - System status skills
src/skills/os_status.cpp - Safe process launcher
src/platform/process.cpp
Speech output
- TTS engine
src/tts/engine.cpp - Speech CLI tools
Other components
- Local operator
- Remote controller
Connections 19
- Local operator → CLI and mode entry: enters command
src/app/main.cpp - CLI and mode entry → Skill router: routes local text
src/app/main.cpp - CLI and mode entry → Audio source factory: selects source
src/app/main.cpp - Audio source factory → Mock source: creates source
src/audio/make_source.cpp - Audio source factory → PipeWire capture: creates source
src/audio/make_source.cpp - CLI and mode entry → Voice engine: starts capture
src/app/main.cpp - PipeWire capture → PCM ring buffer: buffers PCM
- Voice engine → PCM ring buffer: reads PCM
- Remote controller → TCP daemon server: sends TCP request
README.md - CLI and mode entry → TCP daemon server: starts daemon
src/app/main.cpp - TCP daemon server → JSON line protocol: parses and replies
- TCP daemon server → Skill router: dispatches skill
- Shared protocol contract → JSON line protocol: defines request shape
README.md - Skill router → Browser opener: dispatches match
src/skills/router.cpp - Skill router → System status skills: dispatches match
src/skills/router.cpp - Browser opener → Safe process launcher: launches application
src/skills/os_open.cpp - CLI and mode entry → TTS engine: creates and invokes
src/app/main.cpp - TTS engine → Safe process launcher: spawns speech tool
src/tts/engine.cpp - TTS engine → Speech CLI tools: speaks through
src/tts/engine.cpp