SLM Voice Agent
Conversational voice assistant powered by local ONNX Speech-to-Text (STT) and Text-to-Speech (TTS) models with real-time barge-in capability.
01 / Overview & Capabilities
Conversational voice assistant powered by local ONNX Speech-to-Text (STT) and Text-to-Speech (TTS) models with real-time barge-in capability.
Key Features
- Offline Speech-to-Text (STT) transcription
- Multilingual Text-to-Speech (TTS) synthesis (English, Hindi, Tamil, Telugu)
- Real-time audio stream barge-in interrupt detection
- Sub-50ms CPU synthesis latency
02 / Standalone OS Harness Installers, CLI & Python SDK
In SLMAgents 2.0, SLM Voice Agent executes inside the 10-Plane Pure-CPU Agent Harness (slm_harness). Download a self-extracting Individual Agent + Harness OS Installer for macOS, Windows, or Linux (bundling slm_voice + slm_harness + the ./slm CLI), install the full 26-agent desktop suite, or install via Python pip:
1. Individual SLM Voice Agent + 10-Plane Harness Installers (All OSes)
slm_voice + slm_harness + ./slm CLIslm_voice + slm_harnessslm_voice + slm_harness + ./slm CLI2. Full 26-Agent Studio & Desktop OS Installers
3. 10-Plane Harness CLI (./slm) & Python pip Installation
# Option A: Install via PyPI or editable source with the 10-Plane Harness $ pip install slm-voice $ pip install -e ./slm_harness -e ./slm_voice # Option B: Run directly through the Unified 10-Plane Pure-CPU Harness CLI (./slm) $ ./slm ask "Transcribe @meeting_clip.wav and synthesize a spoken summary to reply.wav" $ ./slm chat # Interactive Rich TUI with 18 slash commands (/trace, /models, /arena, /undo) $ ./slm serve # 100% Offline Web AI Studio + OpenAI /v1 API at http://127.0.0.1:7860
03 / 10-Plane Pure-CPU Harness Integration (slm_harness)
Rather than executing as an isolated prompt wrapper, SLM Voice Agent is natively orchestrated by the SLMAgents 2.0 10-Plane Pure-CPU Harness (via slm_harness.runtime.legacy_bridge and CascadeRouter). Every call benefits from hybrid llama.cpp GGUF (Q4_K_M) + Quantized INT4/INT8 CPU execution, watermarked LRU memory governance, grammar-constrained decoding, and deterministic verification at $0 API cost:
| Harness Plane | Subsystem | How It Powers SLM Voice Agent on Pure CPU |
|---|---|---|
| Plane 6 | CascadeRouter (<35ms) |
Stage 1 (Audio MIME Inspection: .wav, .mp3, .flac, PCM stream) |
| Plane 2 & 5 | MemoryArena & Hybrid CPU Runtime |
Specialist Role: stt (Whisper-tiny/base INT8) + primary (Qwen3-4B GGUF Q4_K_M) + tts (Kokoro-82M / Piper ONNX). Managed inside Watermark LRU MemoryArena (lite 2.6 GB / balanced 4.7 GB / power 8.2 GB) with zero-copy session sharing and automatic OOM tier step-down (8B -> 4B -> 3B -> 0.8B). |
| Plane 7 & 8 | Deterministic Verifier & Governance | Plane 5 MemoryArena Coordinated Audio Pipeline (STT -> LLM -> TTS under 3.2 GB RAM) + WAV Frame Verifier |
| Plane 1, 3 & 4 | Kernel, Artifact Scratchpad & 4-Tier Memory | SQLite WAL CheckpointStore (/fork, /rewind, /undo), content-addressed artifact://<sha12> handles to prevent prompt bloat, and hybrid SQLite FTS5 BM25 + HNSW vector memory. |
04 / Source Checkout (Git Sparse-Checkout)
Clone this agent alongside the 10-Plane Pure-CPU Harness (slm_harness) from the monorepo using Git sparse-checkout — no need to download all 26 agents:
Option 1 — Sparse Checkout with 10-Plane Harness (Recommended)
# 1. Create and enter a new directory $ mkdir slm_voice_workspace && cd slm_voice_workspace # 2. Initialise empty git repo and add remote $ git init $ git remote add origin https://github.com/t00114218-stack/SLMAgents.git # 3. Enable sparse-checkout for both slm_harness and slm_voice $ git sparse-checkout init --cone $ git sparse-checkout set slm_harness slm_voice # 4. Pull the 10-Plane Harness and agent source $ git pull origin main
Option 2 — Full Repository Clone
$ git clone https://github.com/t00114218-stack/SLMAgents.git $ cd SLMAgents $ ./slm doctor
Note: After checkout, install the harness and agent in editable mode with pip install -e ./slm_harness -e ./slm_voice or download the pre-packaged OS Harness Installer above.
05 / Configuration & API Reference
Constructor Parameters
Instantiate SLMVoiceAgent with performance and runtime options:
| Parameter | Type / Default | Description |
|---|---|---|
stt_model_path | str | None | Path to local STT ONNX weights. Default: None. |
tts_model_path | str | None | Path to local TTS ONNX weights. Default: None. |
temperature | float | 0.7 | Sampling temperature for speech synthesis. Default: 0.7. |
top_p | float | 0.9 | Nucleus sampling cutoff threshold. Default: 0.9. |
max_tokens | int | 256 | Maximum output token generation limit per response. Default: 256. |
cache_dir | str | None | Local directory for caching model weights. Default: None. |
n_threads | int | 4 | Number of CPU threads for inference. Default: 4. |
Methods
| Method Signature | Return Type | Description |
|---|---|---|
process_speech_text(speech_transcript, ...) | dict | Transcribes audio input or processes text transcript and returns synthesized speech payload. |
Execution Parameters
Complete list of execution parameters accepted by the primary agent method:
| Parameter | Type / Default | Description |
|---|---|---|
speech_transcript | str | Input raw audio transcription string or speech input text. |
language | str | English | Target output synthesis language (English, Hindi, Tamil, Telugu). Default: English. |
system_prompt | str | None | Custom system prompt instruction. Default: None. |
user_input | str | None | Optional additional contextual text keys. Default: None. |
temperature | float | 0.7 | Sampling temperature. Default: 0.7. |
top_p | float | 0.9 | Nucleus sampling probability. Default: 0.9. |
max_tokens | int | 256 | Maximum generation token limit. Default: 256. |
Quick Start
from slm_voice import SLMVoiceAgent
voice = SLMVoiceAgent(temperature=0.7, top_p=0.9, max_tokens=256)
res = voice.process_speech_text(
speech_transcript="Schedule a team sync meeting for tomorrow at 3 PM",
language="English",
system_prompt="Conversational voice assistant",
user_input="Remind about Q3 project deadline",
temperature=0.7,
top_p=0.9,
max_tokens=256
)
print(res)
06 / Verified Execution Logs
Diagnostic execution console output running locally on CPU:
→ INPUT:
Speech Transcript: Schedule a team sync meeting for tomorrow at 3 PM
Language: English
← OUTPUT:
{
'status': '200 OK',
'transcript': 'Schedule a team sync meeting for tomorrow at 3 PM',
'response': 'Scheduled team sync meeting for tomorrow at 3 PM.',
'audio_synthesized': True,
'barge_in_enabled': True
}