Feline.Processors.TurnManager.Strategy behaviour (feline v0.1.0-rc.1)

Copy Markdown View Source

Behaviour for pluggable turn detection strategies.

A strategy receives frames and returns events (speaking frames, interruption frames) to be emitted alongside the original frame.

Summary

Callbacks

handle_frame(frame, state)

@callback handle_frame(frame :: struct(), state :: term()) ::
  {:events, [struct()], state :: term()} | {:ok, state :: term()}

init(opts)

@callback init(opts :: keyword()) :: {:ok, state :: term()}