⚡ 100% SOVEREIGN LOCAL AI • SUB-800MS LATENCY • ZERO CLOUD VOICE LEAKAGE

Autonomous AI Voice Receptionist & Real-Time Call Interception Core

An end-to-end, self-hosted telecommunications pipeline engineered in Python (FastAPI), Flutter and local Gemma-2 LLMs. It intercepts declined mobile calls over a private Tailscale mesh, holds multi-turn voice conversations through virtual audio hardware, and logs structured intelligence to an SQLite ledger in real time.

● LIVE CALL PIPELINE STATUS

  1. › [ANDROID FLUTTER BRIDGE] Incoming call detected → user declined → routing over private Tailscale mesh
  2. [WINDOWS UI AUTOMATION] Google Voice desktop auto-answered → neural TTS greeting piped to VB-Cable
  3. [WHISPER BASE.EN STT] 16kHz float32 in-memory audio transcribed in 310ms
  4. [GEMMA-2 LOCAL LLM] Structured JSON: caller identity, urgency HIGH, core issue, spoken reply
  5. [SQLITE LEDGER] Transaction committed & voicemail WAV archived

System architecture

STAGE 1 · main.dart

Flutter mobile call-state bridge

  • Monitors hardware PhoneState.stream on Android.
  • A declined call fires a WebSocket trigger over an encrypted Tailscale tunnel to wake the host PC.

STAGE 2 · server.py

Desktop & virtual audio core

  • pywinauto UI Automation and Chrome DevTools Protocol answer and hang up Google Voice with no extensions.
  • edge-tts (en-US-AriaNeural) and caller audio route through VB-Cable virtual drivers with silence detection.

STAGE 3 · Whisper + Ollama

Sovereign local AI inference

  • Raw PCM resampled in-memory to 16kHz float32 NumPy arrays for whisper base.en.
  • Local gemma2 on Ollama with strict JSON schema returns a spoken reply plus structured metadata.

STAGE 4 · docker-compose

Containerized ledger & change-log vault

  • Core service (port 8000) and Streamlit dashboard (port 8501) share one SQLite volume.
  • SHA-256 change-log time machine tracks every ledger revision.

Live AI voice ledger & call simulator

A browser-only demonstration with sample callers — no real calls or AI requests are made.

HANDSET

Idle

Total entries logged

0

High urgency flags

0

Latest person extracted

—

TimestampCaller identityUrgencyCore issueReworded summaryRaw transcript
Choose a caller scenario to populate the ledger.

📥 Latest caller audio

🗣️ Latest Gemma spoken reply

Code & DevOps blueprint

@app.websocket("/ws/voice-agent")
async def voice_agent(ws: WebSocket):
    await ws.accept()
    pcm = await capture_cable_output(silence_ms=900)
    audio = resample(pcm, 16_000).astype(np.float32)
    text = whisper_model.transcribe(audio, fp16=False)["text"]
    reply = ollama.chat(model="gemma2-local:latest",
        format=CALL_SCHEMA, messages=[SYSTEM, {"role": "user", "content": text}])
    data = json.loads(reply["message"]["content"])
    await speak(data["spoken_reply"])   # edge-tts -> CABLE Input
    ledger.commit(data, transcript=text)

Simplified excerpts of the architecture; private network addresses and credentials are omitted.

Book a systems architecture consultation

Explore other builds: Focus-Manager Execution Core, PLC & automation, full portfolio.

What do you need?
Or email directly
Back home

Built & engineered by Justin Samuel Parsons