Synaptic.Voice.PartialSTTAdapter behaviour (synaptic v0.3.0-alpha.9)

View Source

Optional behaviour for providers that can keep a live STT stream and emit native partials.

Summary

Callbacks

end_stream(stream, opts)

@callback end_stream(stream :: pid(), opts :: keyword()) :: :ok

push_audio(stream, audio_chunk, opts)

@callback push_audio(stream :: pid(), audio_chunk :: binary(), opts :: keyword()) :: :ok

start_stream(owner, opts)

@callback start_stream(owner :: pid(), opts :: keyword()) ::
  {:ok, pid()} | {:error, term()}

stop(stream, reason)

@callback stop(stream :: pid(), reason :: term()) :: :ok