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

View Source

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

Summary

Callbacks

cancel_output(adapter)

@callback cancel_output(adapter :: pid()) :: :ok

flush(adapter, opts)

@callback flush(adapter :: pid(), 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

synthesize_segment(adapter, text_segment, opts)

@callback synthesize_segment(
  adapter :: pid(),
  text_segment :: String.t(),
  opts :: keyword()
) :: :ok