Per-session orchestrator: inbound audio → STT → turn callback → TTS → outbound audio.
Decoupled from any specific app. The host provides:
:turn_fn—fn text -> {:ok, response} | {:error, reason}end:endpoint— Phoenix Endpoint module for broadcasting to channels:pubsub— Phoenix.PubSub module for internal notifications:config—VoiceEngine.Configstruct with STT/TTS adapters + opts
Starting
VoiceEngine.Bridge.start_link(
session_id: "abc-123",
config: VoiceEngine.Config.current(:my_app),
turn_fn: &MyApp.ConvEngine.turn(session_id, &1),
endpoint: MyAppWeb.Endpoint,
pubsub: MyApp.PubSub
)
Summary
Functions
Returns a specification to start this module under a supervisor.