openalice-voice
[Atlas card](https://atlas.blal.pro/repos/openalice-voice) · Live at **`https://voice.blal.pro`**
Architecture rating
Manifest valid (100/100), zero drift, no circular deps, 0 dead imports — Atlas quality 91/A shows strong substrate/convention adoption across signal/rtp/tts/stt module layout.
26 integration tests thoroughly cover the critical WS signalling path (join/leave/mute/relay bi-dir/ICE, multi-client broadcast, disconnect cleanup) plus rooms/tokens/metrics — but CI run is failing and no unit tests or TTS/STT-provider/SSRF regression coverage is visible.
/health probe live (200) and Prometheus-style /metrics exposing voice_rooms_active gauge (tested), but no distributed-tracing or confirmed structured-logging evidence for the WS/RTP paths.
Internal-secret gating on /api/v1/say + GDPR export, room JWT issuance via /api/v1/tokens, DTLS/SRTP media path — but no evidence of rate-limiting on TTS/room creation or security headers, and WebRTC signalling SSRF/abuse guards unverified.
Strong manifest (100) with 9 @feature annotations (92) plus AGENTS.md, docs/ dir and README/Atlas card — undercut by 236 missing docstrings driving code_health to 50/100 (the repo's weakest axis).
Stateless SFU owns zero tables (by design) so no schema/migrations/RLS to grade; GDPR TTS-cache export endpoint (/internal/me/:tenant_id/export.json) is present and tenant-scoped, but cache persistence/retention controls are unverified.
Health probe 200 with 100% 24h uptime and tested WS disconnect/participant cleanup, but CI is currently RED (run failed 2026-06-16), no graceful-SIGTERM-shutdown evidence, and 16 complexity flags + 18 god-modules raise fault-surface concerns.
source · auto-grader-2026-06-16
Ecosystem manifest
.atlas-deps.ymlRust SFU media server for real-time voice rooms (LiveKit-inspired): WebRTC/ICE/DTLS/SRTP signalling, pluggable TTS/STT providers, and transcript dispatch to live-control and social-api.
- via cargoAgentRuntimeConfig + fetch_agent_config() helper for deserialising the unified agent config returned by openalice-auth's internal endpoint.
- openalice-authhttpvia AUTH_INTERNAL_URLFetch per-user unified agent_config (TTS/STT provider, voice id, emotion, pace, language) via /internal/agent-config/:user_id.
- via cargoShared axum plumbing: internal_client() builder and verify_internal_secret() used by every inbound /api/v1/say and /internal/* call.
- via VOICE_DISPATCH_URLPOST /internal/agent/dispatch with ConnectorEvent::VoiceUtterance once the SFU's STT audio-capture path is wired (TranscriptDispatcher).
- via VOICE_DISPATCH_URLSame dispatch endpoint — product=social path. Optional: voice does not need social-api at startup.
- VOICE_JWT_SECRET
- SHARED_JWT_SECRET
- VOICE_ALLOW_INSECURE
- INTERNAL_BROADCAST_SECRET
- INTERNAL_SECRET
- VOICE_API_KEY
- VOICE_API_SECRET
- VOICE_PORT
- VOICE_UDP_PORT
- VOICE_BIND
- VOICE_CORS_ORIGINS
- VOICE_RATE_LIMIT
- VOICE_MAX_ROOMS
- VOICE_MAX_PARTICIPANTS
- TTS_PROVIDER
- ELEVENLABS_API_KEY
- ELEVENLABS_BASE_URL
- ELEVENLABS_VOICE_ID
- ELEVENLABS_MODEL_ID
- ELEVENLABS_STREAMING_MODEL_ID
- CARTESIA_API_KEY
- CARTESIA_BASE_URL
- CARTESIA_MODEL
- CARTESIA_DEFAULT_VOICE
- CARTESIA_VOICE_ID
- OPENAI_API_KEY
- OPENAI_BASE_URL
- OPENAI_REALTIME_API_KEY
- OPENAI_REALTIME_BASE_URL
- OPENAI_REALTIME_MODEL
- OPENAI_REALTIME_VOICE
- OPENAI_TTS_MODEL
- OPENAI_TTS_VOICE
- HUME_API_KEY
- HUME_BASE_URL
- HUME_DEFAULT_VOICE
- GOOGLE_GEMINI_API_KEY
- GEMINI_API_KEY
- GEMINI_BASE_URL
- GEMINI_TTS_MODEL
- GEMINI_DEFAULT_VOICE
- OPENROUTER_API_KEY
- OPENROUTER_TTS_MODEL_ID
- DASHSCOPE_API_KEY
- DASHSCOPE_BASE_URL
- QWEN3_API_KEY
- QWEN3_TTS_MODEL
- QWEN3_DEFAULT_VOICE
- SESAME_ENDPOINT
- STT_PROVIDER
- DEEPGRAM_API_KEY
- DEEPGRAM_MODEL
- WHISPER_MODEL
- ASSEMBLYAI_API_KEY
- VOICE_CACHE_DIR
- OTEL_EXPORTER_OTLP_ENDPOINT
- OTEL_SERVICE_NAME
- docker_image: openalice-voice
- http_endpoint: POST /api/v1/say — TTS synthesis (internal-secret-gated)
- http_endpoint: POST /api/v1/say-stream — streaming TTS + lipsync SSE (ElevenLabs)
- http_endpoint: POST /api/v1/rooms — create voice room
- http_endpoint: GET /api/v1/rooms — list voice rooms
- http_endpoint: POST /api/v1/tokens — issue room JWT
- ws_endpoint: WS /ws — WebRTC signalling (join/leave/offer/answer/ICE)
- http_endpoint: GET /internal/me/:tenant_id/export.json — GDPR TTS-cache export (internal-secret-gated)
Roadmap · what's planned next
- alice-integration-defaultplanned0%no description
- clustering-redis-defaultplanned0%no description
- stt-transcript-dispatchplanned0%no description
- webrtc-rs-migrationplanned0%no description
- per-tenant-tts-quotaplanned0%no description
Code composition
tokei · loc- Rust99.1%
- TOML0.9%
- Rust99.1%
- TOML0.9%
- Rust99.1%· 7,204
- TOML0.9%· 68
| Language | % code | code | comments | blanks | files |
|---|---|---|---|---|---|
| Rust | 99.1% | 7,204 | 667 | 1,047 | 45 |
| TOML | 0.9% | 68 | 50 | 21 | 2 |
| Markdown | 0.0% | 0 | 336 | 104 | 4 |
Telemetry ribbon · last 90 days
10 eventsvoice/agents
1 feature- voice.alice.toolssrc/alice.rs:61Voice tool schemas (voice_join, voice_leave, voice_speak, voice_status) for AI agents to participate in rooms.since 0.1.0
voice/audio
1 feature- voice.speaker.detectsrc/rtp/speaker.rs:58Active speaker detection using LiveKit 2-gate + EMA over RFC 6464 audio levels.since 0.1.0
voice/auth
1 feature- voice.auth.tokensrc/lib.rs:138Issue a signed JWT (HS256) for joining a room with publish/subscribe scopes.api:POST /api/v1/tokenssince 0.1.0
voice/cluster
1 feature- voice.cluster.select-nodesrc/cluster.rs:77Pick the best node for a new room using strategy (Any, LowestSysload, TwoChoice, RegionAware).since 0.1.0
voice/quality
1 feature- voice.quality.mossrc/rtp/quality.rs:31Per-participant connection quality MOS score using LiveKit E-model with asymmetric smoothing.since 0.1.0
voice/rooms
2 features- voice.rooms.createsrc/lib.rs:73Create a new voice room with a name and participant cap.api:POST /api/v1/roomssince 0.1.0
- voice.rooms.listsrc/lib.rs:103List active voice rooms with participant counts.api:GET /api/v1/roomssince 0.1.0
voice/signal
1 feature- voice.signal.websocketsrc/lib.rs:209WebSocket signalling channel for join/leave/mute/offer/answer/ICE.api:WS /wssince 0.1.0
voice/transport
1 feature- voice.transport.udp-muxsrc/transport/mod.rs:91Single-port UDP mux with RFC 5764 packet classification (STUN/DTLS/RTP/RTCP).since 0.1.0