Modules
A voice agent in a room: a module with instructions and tools, added to a
room's workers/1 with agent/3.
Mixes several inputs of s16le mono PCM into one stream, a chunk at a time, for a model that has one audio input (Gemini Live).
Accumulates observed text and emits finalized conversation items to the owner.
Frames are the structs that processors pass to each other.
The frames built into agents. See Octoroom.Agent.Frame for the categories.
Gemini Live's wire format: the frames sent to it and the events its frames decode to. Pure, so it's tested without a socket.
Downloads and caches optional ONNX models that are too large to bundle in the Hex package.
OpenAI Live API (wss://api.openai.com/v1/live/sessions, gpt-live-1.1 /
gpt-live-1) wire format: client events sent to OpenAI and the events
server frames decode to. Pure, so it's tested without a socket.
The pure part of an agent's pipeline.
Builds a pipeline spec with |>
Runs a pipeline spec in the calling process, with no sockets or timers, for tests.
A stage in a pipeline. See docs/pipelines.md.
A processor written as a state machine, with gen_statem semantics.
Collects the assistant's reply and sends it back to the context as an
AssistantMessage once it's known how much of it people heard.
Turn taking with no STT, for the half-cascaded pipeline: the LLM hears each user turn as audio.
The only owner of the conversation history.
Asks a decision model about each turn, and attaches the answers to the turn: who the speaker is talking to, and whether an assistant could usefully answer. The agent's gate uses them to decide whether to reply.
Gemini Live speech-to-speech as one stage: InputAudio in (16 kHz),
OutputAudio out (24 kHz). The model does its own turn-taking. When it
reports that someone talked over it, this stage pushes an Interruption.
When its reply is done generating, it pushes an AssistantMessage, though
the audio may play for a while yet.
Streams the LLM's reply for each LLMContext.
OpenAI Live (gpt-live-1.1 / gpt-live-1) full-duplex speech-to-speech as
one stage: InputAudio in (resampled from 16 kHz to 24 kHz by default),
OutputAudio out (24 kHz). The model listens and speaks simultaneously and
takes its own turns.
Streaming speech-to-text through an Octoroom.Agent.STT provider.
Turn taking by the STT provider's own endpointing.
Speaks Text frames.
Splits the LLM's streamed text into Text chunks for TTS.
Runs the LLM's tool calls.
Transcribes each UserAudio turn with an LLM, off the reply path.
Local voice activity detection with Silero.
Streaming speech-to-text providers.
AssemblyAI realtime speech-to-text over its v3 WebSocket API.
Reson8 realtime speech-to-text over its WebSocket API.
Soniox real-time speech-to-text over its WebSocket API.
Text-to-speech providers.
AssemblyAI text-to-speech, over its streaming WebSocket.
Inworld text-to-speech, over its bidirectional WebSocket.
OpenAI text-to-speech (/v1/audio/speech).
Local text-to-speech using tiny-voca
(4.5M parameters, Apache-2.0) running on ONNX Runtime via OnnxRuntime.
The :telemetry events octoroom_agents emits.
Runs tool handlers inside the agent's process, on the app's node, so a handler can call the app directly (its Repo, PubSub, contexts).
Pipecat's Smart Turn v3 end-of-turn classifier for 16 kHz mono PCM16 audio.
Voice activity state machine.
Silero VAD (v5 ONNX) speech-probability analyzer for 16 kHz mono PCM16 audio.
Runs an agent as an Octoroom worker: one process per agent, hearing any
number of people. Usually started by Octoroom.Agent.agent/3 from an
Octoroom.Agent module
Mix Tasks
Downloads and verifies optional ONNX models (currently Smart Turn v3.2) into
the local cache directory, or into --dir.