Pipeline
Create a Pipeline from the given component PipelineOptions.Constructor
Speech-to-text provider. Defaults to
null.Language-model provider. Defaults to
null.Text-to-speech provider. Defaults to
null.Voice-activity-detection provider. Defaults to
null.End-of-turn detector. Defaults to
null.Avatar/video provider. Defaults to
null.Audio denoiser. Defaults to
null.End-of-utterance config. Defaults to
EOUConfig().Interruption-handling config. Defaults to
InterruptConfig().Conversational-graph routing config. Defaults to
null.Context-window trimming policy. Defaults to
null.Voicemail detector. Defaults to
null.DTMF (touch-tone) handler. Defaults to
null.Realtime speech-to-speech config. Defaults to
null.Enable the streaming LLM token-rewrite hook. Defaults to
false.Per-token timeout for the LLM stream hook, in milliseconds. Defaults to
100.Grace period in milliseconds before considering playback finished. Defaults to
0.Regex patterns to drop from transcripts. Defaults to DEFAULT_STT_FILTER_PATTERNS.
Word replacements applied to transcripts (
{ from: to }). Defaults to {}.Seconds of inactivity before the session times out, or
null to disable. Defaults to null.Seconds of caller silence before the agent’s
onWakeUp hook fires, or null to disable. Defaults to null.Maximum wake-up nudges before the call ends, or
null for no cap. Defaults to null.Drop a transcript that consists solely of a filler word (“okay”, “yeah”, …)
without an LLM turn. Defaults to
false (every transcript reaches the model).Filler words used when PipelineOptions.filterFillerWords is on. When unset, the runtime supplies its own defaults.
changeComponent
passContext: false clears the LLM’s history
(only after the runtime confirms the swap succeeded).
changePipeline
llm/components you pass.
closeEmitter
emit
getLatestFrames
numFrames
Number of frames to return (most recent). Defaults to
1.getSessionMetricsSnapshot
interrupt
listenerCount
off
on
event. Usable directly (on(event, fn)) or as a decorator
factory (on(event)). Delegates to Pipeline.hooks.
once
processText
text into the bound agent’s session as model input.
pushAudioFrame
audio_delta hooks for an incoming audio frame.
pushVisionFrame
vision_frame hooks.
removeAllListeners
replyWithContext
instructions on the bound agent’s session.
sendMessage
text on the bound agent’s session.
setAgent
PipelineHooks
Registry of pipeline hooks. Accessed via Pipeline.hooks orPipeline.on(...);
lets you observe or transform audio, transcripts, LLM tokens, and lifecycle events.
Constructor
clearAllHooks
getHooks
event.
hasLlmObservationHooks
llm hooks are registered.
hasLlmStreamHook
hasSttStreamHook
hasTtsStreamHook
on
registeredNames
PipelineHookError
Thrown when a registered pipeline hook is not supported.Constructor
PipelineComponent
A processing component that can be present in a Pipeline.PipelineConfig
Create a PipelineConfig.Constructor
Overall pipeline shape.
Realtime wiring, or
null for a non-realtime pipeline.Whether a realtime model is in use.
Components present in the pipeline.
hasComponent
PipelineMode
The shape of the configured pipeline, derived from which components (PipelineComponent) are present. Determined automatically from the Pipeline you build; not normally set by hand.RealtimeMode
How a realtime speech-to-speech model is wired into the pipeline.STT
Base class for speech-to-text providers. Provider plugins (e.g.DeepgramSTT({...}))
extend this; subclass it only to integrate a custom STT.
Constructor
close
closeEmitter
emit
getRuntimeConfig
listenerCount
off
on
once
onSttTranscript
processAudio
removeAllListeners
streamTranscribe
STTResponse
Create an STTResponse.Constructor
SpeechData
Create SpeechData.Constructor
LLM
Base class for language-model providers. Provider plugins (e.g.GoogleLLM({...}))
extend this; subclass it only to integrate a custom LLM.
Constructor
cancelCurrentGeneration
chat
close
closeEmitter
emit
getRuntimeConfig
listenerCount
off
on
once
removeAllListeners
LLMResponse
Create an LLMResponse.Constructor
TTS
Base class for text-to-speech providers. Provider plugins (e.g.CartesiaTTS({...}))
extend this; subclass it only to integrate a custom TTS.
Constructor
Output sample rate in Hz. Defaults to
24000.Number of output channels. Defaults to
1.close
closeEmitter
emit
getRuntimeConfig
interrupt
listenerCount
off
on
once
onFirstAudioByte
removeAllListeners
synthesize
text on the active session.
VAD
Base class for voice-activity-detection providers. Provider plugins extend this; subclass it only to integrate a custom VAD.Constructor
Input sample rate in Hz. Defaults to
16000.Speech-probability threshold 0-1 above which audio counts as speech. Defaults to
0.5.Minimum speech duration in seconds to register a start-of-speech. Defaults to
0.5.Minimum silence duration in seconds to register an end-of-speech. Defaults to
0.5.close
closeEmitter
emit
flush
getRuntimeConfig
listenerCount
off
on
once
onVadEvent
processAudio
removeAllListeners
VADResponse
Create a VADResponse.Constructor
VADData
Create VADData.Constructor
EOU
Base class for end-of-utterance (turn-detection) providers. Provider plugins extend this; subclass it only to integrate a custom turn detector.Constructor
End-of-utterance probability threshold 0-1. Defaults to
0.7.cleanup
close
closeEmitter
detectEndOfUtterance
threshold (or the configured one).
emit
getEouProbability
0.5 when unknown).
getRuntimeConfig
listenerCount
off
on
once
removeAllListeners
setThreshold
FallbackSTT
Create an STT provider that tries each provider in order, failing over to the next when one is unavailable.Constructor
Providers in priority order; the first is the primary.
Seconds to skip a failing provider before retrying. Defaults to DEFAULT_TEMPORARY_DISABLE_SEC.
Failed attempts after which a provider is disabled for the session. Defaults to DEFAULT_PERMANENT_DISABLE_AFTER_ATTEMPTS.
Seconds between health checks of a disabled provider. Defaults to DEFAULT_RECOVERY_CHECK_INTERVAL_SEC.
Latency ceiling in ms for the active provider. When exceeded for
consecutiveLatencyHits turns in a row, the chain fails over. Omitted/0 = disabled.Consecutive turns over
latencyThresholdMs before failing over. Defaults to 3.close
closeEmitter
emit
getRuntimeConfig
listenerCount
off
on
once
onSttTranscript
processAudio
removeAllListeners
streamTranscribe
FallbackLLM
Create an LLM provider that tries each provider in order, failing over to the next when one is unavailable. The primary’stemperature and
max_output_tokens settings carry through.
Constructor
Providers in priority order; the first is the primary.
Seconds to skip a failing provider before retrying. Defaults to DEFAULT_TEMPORARY_DISABLE_SEC.
Failed attempts after which a provider is disabled for the session. Defaults to DEFAULT_PERMANENT_DISABLE_AFTER_ATTEMPTS.
Seconds between health checks of a disabled provider. Defaults to DEFAULT_RECOVERY_CHECK_INTERVAL_SEC.
Latency ceiling in ms for the active provider. When exceeded for
consecutiveLatencyHits turns in a row, the chain fails over. Omitted/0 = disabled.Consecutive turns over
latencyThresholdMs before failing over. Defaults to 3.cancelCurrentGeneration
chat
close
closeEmitter
emit
getRuntimeConfig
listenerCount
off
on
once
removeAllListeners
FallbackTTS
Create a TTS provider that tries each provider in order, failing over to the next when one is unavailable.Constructor
Providers in priority order; the first is the primary.
Seconds to skip a failing provider before retrying. Defaults to DEFAULT_TEMPORARY_DISABLE_SEC.
Failed attempts after which a provider is disabled for the session. Defaults to DEFAULT_PERMANENT_DISABLE_AFTER_ATTEMPTS.
Seconds between health checks of a disabled provider. Defaults to DEFAULT_RECOVERY_CHECK_INTERVAL_SEC.
Latency ceiling in ms for the active provider. When exceeded for
consecutiveLatencyHits turns in a row, the chain fails over. Omitted/0 = disabled.Consecutive turns over
latencyThresholdMs before failing over. Defaults to 3.close
closeEmitter
emit
getRuntimeConfig
interrupt
listenerCount
off
on
once
onFirstAudioByte
removeAllListeners
synthesize
text on the active session.
UtteranceHandle
See the class-level description for usage.Constructor
Identifier for the utterance. Default: a generated UUID.
Whether the utterance can be interrupted without
force. Default: true.done
interrupt
force is true.