m4/org/openalice-voice-agent

openalice-voice-agent

[Atlas card](https://atlas.blal.pro/repos/openalice-voice-agent)

Features
7
Status
·unknown
Last activity
1mo ago
Branch
mvp

Architecture rating

D1mo ago
consistencyB

Strong substrate adoption: valid manifest (100), drift 100, zero circular deps, zero dead imports, AGENTS.md + deny.toml present — uniform with org conventions, only 1 god module/deep-nesting blemish.

docsC

Good manifest summary + 7 @feature annotations + AGENTS.md, but README is a bare Atlas-card stub and 27 missing docstrings across modules; roadmap 80, features axis weakest at 76.

reliabilityD

Realtime STT→LLM→TTS loop with one max-complexity-51 hotspot and a single TODO; no visible evidence of SIGTERM graceful shutdown, timeouts/retries on LLM/TTS calls, or idempotency — code_health 100 but reliability primitives unconfirmed.

securityD

deny.toml present (cargo-deny supply-chain/license gate) is the only concrete control; no manifest evidence of authn/authz on SFU/LLM join, token/secret handling, rate-limiting or security headers — graded conservatively for absent signals.

observabilityD

Only a GET /health probe is exposed (and it currently fails Atlas probe — no https endpoint in manifest); no metrics, tracing, or structured-log signals surfaced for a latency-sensitive voice pipeline.

data layerD

Stateless pipeline — owns 0 tables, no migrations dir, no schema/FK/RLS/GDPR surface; nothing wrong but nothing to credit, so scored low on absence rather than design quality.

testingF

No tests/ directory and no test signal from inspector (no count, critical STT/LLM/TTS paths uncovered); any inline #[cfg(test)] is unverified — graded as effectively absent.

source · auto-grader-2026-06-16

Ecosystem manifest

.atlas-deps.yml

Rust AI voice participant — STT→A2A LLM→TTS pipeline that joins openalice-voice SFU rooms as an agent.

Runtime deps
  • via A2A_URL
    External A2A endpoint — forward transcribed user utterances and receive LLM reply text
  • ConnectorEvent / ToolCall types and A2A message schema
  • via cargo
    Shared Axum/reqwest/JWT plumbing used at compile time
  • via VOICE_SFU_WS_URL
    Join SFU voice rooms as a participant; receive Opus audio frames and send TTS audio back
  • openalice-rtwsoptional
    via RT_URL
    Persona side-channel — emit emotion/expression events so the VRM avatar reacts to conversation
Consumed env
  • VOICE_AGENT_PORT
  • VOICE_AGENT_MODE
  • VOICE_AGENT_AUTO_JOIN_ROOM
  • VOICE_SFU_WS_URL
  • VOICE_SFU_API_URL
  • A2A_URL
  • A2A_API_KEY
  • RT_URL
  • STT_PROVIDER
  • STT_API_URL
  • STT_API_KEY
  • STT_MODEL
  • TTS_PROVIDER
  • TTS_API_URL
  • TTS_API_KEY
  • TTS_VOICE_ID
  • TTS_MODEL
  • VAD_THRESHOLD
  • SILENCE_DURATION_MS
  • MAX_AUDIO_DURATION_MS
Exposes
  • http_endpoint: GET /health
  • docker_image: openalice-voice-agent

Roadmap · what's planned next

2% avg4 goals

Code composition

tokei · loc
946loc
  • Rust96.4%
  • TOML3.6%
  • Rust96.4%· 912
  • TOML3.6%· 34
Language% codecodecommentsblanksfiles
Rust96.4%9127115310
TOML3.6%341022
Markdown0.0%0105422

Telemetry ribbon · last 90 days

5 events
MAYJUNJUL2026-05-21 · commit · new commit 390412e → 7cfcc1b2026-05-21 · commit · new commit 7cfcc1b → 310e1d22026-05-22 · commit · new commit 310e1d2 → 356a9312026-06-16 · commit · new commit 356a931 → 86e814c2026-06-16 · commit · new commit 86e814c → a50ddc6NOW
commitmanifestlifecyclekind

voice-agent/llm

1 feature
  • voice-agent.llm.bridge
    src/a2a_client.rs:1
    A2A JSON-RPC 2.0 client in src/a2a_client.rs. Calls tasks/send on the openalice A2A gateway (A2A_URL) with the transcript as a user message and channel metadata "voice". Extracts the response text from result.history[-1].parts[0].text.

voice-agent/metrics

1 feature
  • voice-agent.http.metrics
    src/main.rs:6
    GET /metrics — Prometheus text exposition with `voice_agent_up`,
    api:GET /metrics

voice-agent/persona

1 feature
  • voice-agent.persona.rt-emitter
    src/rt_emitter.rs:1
    Real-time Persona side-channel in src/rt_emitter.rs. Sends WebSocket "mutate" events to openalice-rt for the agent persona: emotion state (thinking/speaking/neutral) and lipsync viseme weights (placeholder float array). Failure is non-fatal; the pipeline continues without RT if unreachable.

voice-agent/service

1 feature
  • voice-agent.service.crate
    src/main.rs:1
    Binary crate `openalice-voice-agent` (Tokio + Axum runtime). Exposes GET /health and GET /metrics; spawns AgentManager background task that joins SFU rooms and runs the voice pipeline on demand. Entry point: src/main.rs.

voice-agent/stt

1 feature
  • voice-agent.stt.pipeline
    src/stt.rs:1
    Speech-to-text stage. Trait SttProvider in src/stt.rs. Concrete backend: OpenAiStt — POSTs WAV to OpenAI Whisper (default model: whisper-1, configurable via STT_MODEL). PCM→WAV conversion is performed inline by OpusCodec::pcm_to_wav.

voice-agent/tts

1 feature
  • voice-agent.tts.pipeline
    src/tts.rs:1
    Text-to-speech stage. Trait TtsProvider + enum TtsBackend in src/tts.rs. Two concrete backends selectable at runtime via TTS_PROVIDER: OpenAiTts (requests response_format "opus"/OGG Opus bytes) and ElevenLabsTts (v1 API with stability/similarity_boost tuning). Audio bytes are forwarded as binary WebSocket frames to the SFU.

voice-agent/vad

1 feature
  • voice-agent.vad.energy
    src/vad.rs:1
    Energy-based voice activity detector in src/vad.rs. is_speech() computes RMS over i16 PCM frames against a configurable threshold (VAD_THRESHOLD, default 0.5 normalised). VadState tracks speech/silence transitions and fires speech-end events after SILENCE_DURATION_MS (default 1500ms) of sustained quiet.