Processor that passes frames only after detecting wake phrases in transcriptions
Deprecated:WakeCheckFilter is deprecated in favor of
WakePhraseUserTurnStartStrategy.
The new strategy provides better integration with turn management and supports
both timeout and single-activation modes.
Overview
WakeCheckFilter monitors TranscriptionFrames for specified wake phrases and only allows frames to pass through after a wake phrase has been detected. It includes a keepalive timeout to maintain the awake state for a period after detection, allowing continuous conversation without requiring repeated wake phrases.
Constructor Parameters
list[str]
required
List of wake phrases to detect in transcriptions. Blank entries are ignored.
float
default:"3"
Number of seconds to remain in the awake state after each transcription
Functionality
The filter maintains state for each participant and processes frames as follows:
TranscriptionFrame objects are checked for wake phrases
If a wake phrase is detected, the filter enters the “AWAKE” state
While in the “AWAKE” state, all transcription frames pass through
After no activity for the keepalive timeout period, the filter returns to “IDLE”
All non-transcription frames pass through normally
Wake phrases are detected using regular expressions that match whole words with flexible spacing, making detection resilient to minor transcription variations.
States
WakeState
Default state - only non-transcription frames pass through
WakeState
Active state after wake phrase detection - all frames pass through
Output Frames
All non-transcription frames pass through unchanged
After wake phrase detection, transcription frames pass through
When awake, transcription frames reset the keepalive timer
Usage Example
from pipecat.pipeline.pipeline import Pipelinefrom pipecat.processors.filters.wake_check_filter import WakeCheckFilter# Create filter with wake phraseswake_filter = WakeCheckFilter( wake_phrases=["hey assistant", "ok computer", "listen up"], keepalive_timeout=5.0 # Stay awake for 5 seconds after each transcription)# Add to pipelinepipeline = Pipeline([ transport.input(), stt_service, wake_filter, # Only passes transcriptions after wake phrases llm_service, tts_service, transport.output()])
Frame Flow
Notes
Maintains separate state for each participant ID
Uses regex pattern matching for resilient wake phrase detection
Accumulates transcription text to detect phrases across multiple frames
Trims accumulated text when wake phrase is detected
Supports multiple wake phrases
Passes all non-transcription frames through unchanged
Error handling produces ErrorFrames for robust operation
Case-insensitive matching for natural language use