Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

51 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AXIOM - Advanced Voice Agent with Conversational Intelligence

DOI Read Paper License: Apache 2.0

Python 3.10+ FastAPI

AXIOM Mascot


Overview

AXIOM is a voice agent built for robotics / edge environments. It combines modern ML techniques with an efficient inference pipeline to deliver:

  • Instant Voice Interaction: Real-time speech processing with WebSocket communication
  • Intelligent Intent Classification: SetFit-based intent recognition using secure .safetensors (no pickle-based model head)
  • Context-Aware Responses: Semantic RAG + 2,116+ template responses
  • 3D Interactive UI: WebGL-based carousel for visual equipment interaction
  • Multi-turn Conversation: FIFO history management for contextual understanding
  • Clean TTS Output: Phonetic + minimal safe correctors (e.g., 5m β†’ 5 meters)

Quick Start

Prerequisites

  • Python: 3.10+
  • RAM: 8GB minimum (16GB recommended)
  • VRAM: 2-3.6GB for GPU acceleration (optionalβ€”CPU mode works too)
  • Disk: 1GB for models (Kokoro, Sherpa, SetFit)

Step 1: Clone & Setup

# Clone repository
git clone https://github.com/pheonix-delta/axiom-voice-agent.git
cd axiom-voice-agent

# Create virtual environment (recommended name: axiomvenv)
python3 -m venv axiomvenv
source axiomvenv/bin/activate  # Linux/Mac
# or
axiomvenv\Scripts\activate  # Windows

# Install dependencies (avoid --break-system-packages; use the venv)
pip install -r requirements.txt

Step 2: Download Models (First Run Only)

Models are symlinked from your system. Verify they're accessible:

# Check symlinks
ls -la models/
# Output should show:
# kokoro-en-v0_19 -> ../../kokoro-en-v0_19
# sherpa-onnx-... -> ../../sherpa-onnx-...

# If symlinks are broken, set environment variables:
export KOKORO_PATH=/path/to/kokoro-en-v0_19
export SHERPA_PATH=/path/to/sherpa-onnx-...

πŸ“– See MODEL_PATH_RESOLUTION.md for complete setup options:

  • Environment variables (recommended)
  • Creating symlinks
  • Configuration files (.env)
  • Troubleshooting broken paths

Step 3: Start the Server

cd backend
python main_agent_web.py

# Output:
# INFO:     Application startup complete
# INFO:     Uvicorn running on http://0.0.0.0:8000

Step 4: Open Browser

Navigate to:

http://localhost:8000

πŸŽ™οΈ Click the microphone icon and start speaking!

⚠️ Important: Use localhost or 127.0.0.1 (not IP addresses) for browser microphone permissions.


Live Demos

πŸ–₯️ Web Interface Screenshots

AXIOM Web Interface - Main View
Interactive carousel with equipment cards and voice agent

AXIOM Web Interface - Equipment Details
Detailed equipment specifications and 3D models

AXIOM Web Interface - Voice Interaction
Real-time voice interaction with visual feedback

Real Benchmarks (Measured)

Benchmark scripts and analysis live in benchmarks/.

Live terminal results for resource consumption

Performance Analysis
Component-level latency breakdown and system throughput metrics

Response Time Distribution
End-to-end response time analysis across intent categories

Charts

Latency Benchmarks

Detailed Performance Table


Terminal Demo



Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Browser (Web UI)   β”‚
β”‚  - Voice Capture    β”‚
β”‚  - 3D Visualization β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β”‚ WebSocket
           ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         FastAPI Backend Server           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ β”Œβ”€ STT Pipeline ─────────────────────┐  β”‚
β”‚ β”‚ β€’ Sherpa-ONNX Parakeet             β”‚  β”‚
β”‚ β”‚ β€’ Silero VAD (Voice Detection)     β”‚  β”‚
β”‚ β”‚ β€’ Phonetic + Minimal Safe Correctorβ”‚  β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚ β”Œβ”€ Intent Classification ────────────┐  β”‚
β”‚ β”‚ β€’ SetFit Model (Local inference)   β”‚  β”‚
β”‚ β”‚ β€’ Intent classes                   β”‚  β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚ β”Œβ”€ Response Pipeline ────────────────┐  β”‚
β”‚ β”‚ β€’ Template-based bypass            β”‚  β”‚
β”‚ β”‚ β€’ Semantic RAG handler             β”‚  β”‚
β”‚ β”‚ β€’ Ollama LLM fallback              β”‚  β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚ β”Œβ”€ TTS Engine ───────────────────────┐  β”‚
β”‚ β”‚ β€’ Kokoro TTS (Sherpa-ONNX)         β”‚  β”‚
β”‚ β”‚ β€’ Sequential queue (no echo)       β”‚  β”‚
β”‚ β”‚ β€’ TTS-safe text normalization      β”‚  β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
        ↓ (Data Persistence)
   SQLite Database
   (Conversation History)

System Architecture

High-Level Flow

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Browser (frontend/)                                                          β”‚
β”‚  - voice-carousel-integrated.html                                            β”‚
β”‚  - audio-capture-processor.js                                                β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                   β”‚ WebSocket (binary audio + JSON messages)
                                   β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ FastAPI Backend (backend/main_agent_web.py)                                  β”‚
β”‚                                                                              β”‚
β”‚  audio bytes                                                                 β”‚
β”‚     β–Ό                                                                        β”‚
β”‚  [VAD] backend/vad_handler.py                                                β”‚
β”‚     β–Ό                                                                        β”‚
β”‚  [STT] backend/stt_handler.py  β†’ transcription                               β”‚
β”‚     β–Ό                                                                        β”‚
β”‚  [Intent] backend/intent_classifier.py β†’ intent + confidence                 β”‚
β”‚     β–Ό                                                                        β”‚
β”‚  [Context] backend/conversation_manager.py (SQLite + FIFO)                   β”‚
β”‚     β–Ό                                                                        β”‚
β”‚  [Response]                                                                  β”‚
β”‚     - Fast path: backend/template_responses.py (2,116 templates)             β”‚
β”‚     - Smart path: backend/semantic_rag_handler.py (RAG) + backend/axiom_brain.py (LLM)
β”‚     β–Ό                                                                        β”‚
β”‚  [TTS] backend/sequential_tts_handler.py + text normalizers                  β”‚
β”‚     β–Ό                                                                        β”‚
β”‚  audio out β†’ WebSocket β†’ browser playback                                    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Component Responsibilities

Component Purpose Tech Stack
VAD Handler Detect speech segments Silero VAD
STT Handler Convert audio β†’ text Sherpa-ONNX
Intent Classifier Detect user intent SetFit (sentence-transformers)
Conversation Manager Maintain context SQLite + FIFO
Template Responses Fast replies 2,116 JSON templates
RAG Handler Search knowledge bases Sentence-Transformers embeddings
LLM Interface Complex queries Ollama + local model
TTS Handler Generate speech Kokoro-EN (Sherpa-ONNX)
3D Mapper Map keywords β†’ GLB models Keyword extraction
WebSocket Server Real-time communication FastAPI + uvicorn

Response Quality (Unique Feature)

  • Phonetic Corrector: TTS-friendly conversion of units and domain terms
    • Example: 5m β†’ 5 meters, jetson nano β†’ Jetson Nano
  • Minimal Safe Corrector: Removes markdown/noise without changing meaning
    • Example: **bold**, *italic*, `code` β†’ plain text
  • Template Bypass: Short, verified replies when confidence is high
    • Saves GPU/LLM resources and improves latency

Project Structure

axiom-voice-agent/
β”œβ”€β”€ backend/                      # FastAPI server + core voice pipeline
β”‚   β”œβ”€β”€ main_agent_web.py         # App entrypoint (WebSocket server)
β”‚   β”œβ”€β”€ vad_handler.py            # Voice activity detection
β”‚   β”œβ”€β”€ stt_handler.py            # Speech-to-text
β”‚   β”œβ”€β”€ intent_classifier.py      # Intent routing
β”‚   β”œβ”€β”€ semantic_rag_handler.py   # RAG + fallback path
β”‚   β”œβ”€β”€ template_responses.py     # 2,116 template responses
β”‚   β”œβ”€β”€ sequential_tts_handler.py # TTS queue + generation
β”‚   └── ...
β”œβ”€β”€ frontend/                     # Web UI
β”‚   β”œβ”€β”€ voice-carousel-integrated.html
β”‚   └── audio-capture-processor.js
β”œβ”€β”€ data/                         # Knowledge bases + templates
β”‚   β”œβ”€β”€ template_database.json
β”‚   β”œβ”€β”€ rag_knowledge_base.json
β”‚   β”œβ”€β”€ project_ideas_rag.json
β”‚   β”œβ”€β”€ inventory.json
β”‚   └── carousel_mapping.json
β”œβ”€β”€ assets/                       # Images, 3D models, benchmarks
β”‚   β”œβ”€β”€ screenshots/
β”‚   β”œβ”€β”€ branding/
β”‚   β”œβ”€β”€ benchmarks/
β”‚   └── 3d v2/
β”œβ”€β”€ benchmarks/                   # Benchmark scripts + reports
β”œβ”€β”€ demos/                        # Demo logs + recordings
β”œβ”€β”€ docs/                         # Architecture + installation docs
β”œβ”€β”€ models/                       # Symlink-based model directory
β”œβ”€β”€ scripts/                      # Utilities (charts, safetensors tools, etc.)
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ start.sh
└── README.md

Documentation


Citation

If you use AXIOM in research, please cite:


Community

Trending

  • Adoption: 5000+ clones (community-reported)
  • Visibility: 50,000+ views on Reddit (community-reported)

If this project helps you, please star the repo β€” it helps others find an offline, low-latency voice agent.


Acknowledgments

  • Open-source ecosystem: FastAPI, Sherpa-ONNX, Silero VAD, SetFit, sentence-transformers, Ollama, model-viewer

Releases

Packages

Contributors

Languages