adk_live_voice_bridge (erlang_adk v0.7.0)

View Source

Owner-bound binary bridge between a WebSocket adapter and ADK Live.

The bridge is deliberately transport agnostic. It accepts only strict v1 binary frames, applies synchronous ingress backpressure, and forwards a small public event projection to its owner. Forwarded events retain their ADK subscriber credit until the owner returns an exact binary ACK frame; non-public events are acknowledged internally.

Summary

Types

options/0

-type options() ::
          #{credit => #{messages := pos_integer(), bytes := pos_integer()},
            max_audio_frame_bytes => pos_integer()}.

Functions

code_change(OldVersion, State, Extra)

format_status(Status)

frame(Bridge, Binary)

-spec frame(pid(), binary()) -> {ok, pos_integer()} | ok | {error, term()}.

handle_call(Request, From, State)

handle_cast(Message, State)

handle_info(Message, State)

init(_)

start(Session, Principal, Owner, Opts)

-spec start(pid(), binary(), pid(), map()) -> gen_server:start_ret().

stop(Bridge)

-spec stop(pid()) -> ok | {error, term()}.

terminate(Reason, State)