Synaptic.Voice.STTAdapter behaviour (synaptic v0.3.0-alpha.8)

View Source

Behaviour for speech-to-text adapters used by voice sessions.

Summary

Callbacks

end_turn(adapter, opts)

@callback end_turn(adapter :: pid(), opts :: keyword()) :: :ok

push_audio(adapter, audio_chunk, opts)

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

start_link(owner, opts)

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

stop(adapter, reason)

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