Skip to main content

Overview

Port: 4003 The Realtime Audio Service handles voice cloning (ElevenLabs), speech-to-text (Whisper), LiveKit room management, and the voice conversation pipeline.
Voice calls are currently disabled on the frontend (“Coming Soon”). The backend pipeline exists but the browser-side audio capture and HTTP turn processing is not yet implemented. See docs/architecture/VOICE_CALL_IMPLEMENTATION_PLAN.md for the full plan.

Endpoints

Voice Conversations

Voice Management

Service Info

Config DB Fallback

API keys are loaded from the platform_config table at startup (encrypted, decrypted with JWT_SECRET). Falls back to process.env if DB value not set. Keys loaded from config:
  • ELEVENLABS_API_KEY
  • LIVEKIT_API_KEY
  • LIVEKIT_API_SECRET
  • LIVEKIT_URL
  • OPENAI_API_KEY

External Integrations

Voice Conversation Pipeline

Billing Hooks

The service records provider costs through record_external_cost_event() using RealtimeAudioBillingRepository:
Billing writes are currently best-effort for realtime-audio paths. Errors are logged and request flow continues.

Known Issues

These issues need to be fixed when implementing the full voice call feature:
  • sendMessageToBot() calls wrong bot endpoint — should be POST /bots/:id/chat
  • /turn returns mock S3 URL instead of inline base64 audio
  • Turn number hardcoded to 1
  • LiveKit RoomServiceClient needs HTTPS URL (not WSS) — handled with auto-conversion