FluxyChat

Platform

Voice AI

STT→LLM→TTS pipeline, latency SLOs, transport fallback, and room integration.

Production voice runs on the same Worker as chat. Dashboard: Voice AI.

Latency SLO

TierTargetPath
ProductionP95 ≤ 300ms end-to-endOpenAI Realtime WebSocket (openai-realtime)
AcceptableP95 ≤ 350msGemini Live (OpenAI-compatible WS surface)
DegradedBest effortChunked REST STT → LLM → TTS
Demo / offlineN/AText-only pipeline (useVoice simulation)

Report samples via POST /admin/voice-ai/metrics and inspect aggregates on /voice-ai (avg, P95, under-300ms count).

Transport fallback ladder

The SDK degrades automatically when a faster path is unavailable:

realtime (OpenAI/Gemini WS)
  ↓ mic denied / WS error / missing API key
chunked (REST STT + TTS segments)
  ↓ provider error
text_only (LLM + TTS text path — dashboard demo default)
import { useVoice } from "@fluxy-chat/react";

const voice = useVoice({
  preferredTransport: "realtime",
  autoFallback: true,
  noiseSuppression: true,
  echoCancellation: true,
  onMetrics: ({ totalLatencyMs }) => {
    if (totalLatencyMs > 300) console.warn("above SLO");
  },
});

await voice.start();
console.log(voice.pipeline?.getActiveTransport()); // realtime | chunked | text_only

Listen for transport_fallback events on the pipeline when debugging production paths.

Worker session

curl -X POST "$WORKER_URL/admin/voice-ai/sessions" \
  -H "Authorization: Bearer $ADMIN_JWT" \
  -H "Content-Type: application/json" \
  -d '{"providerId":"openai-realtime","roomId":"support"}'

Returns targetLatencyMs: 300 and a session wsUrl for streaming audio.

Room integration

Voice sessions optionally bind to a roomId. Agent replies and voice message transcriptions appear on the same room WebSocket as chat (message with kind: "voice"). See Voice AI pipeline guide.

On this page