examples: update with LLMUserAggregatorParams vad_analyzer and VADProcessor

This commit is contained in:
Aleix Conchillo Flaqué
2026-01-28 11:58:08 -08:00
parent 305ab44132
commit 307aeaeda0
184 changed files with 628 additions and 1028 deletions

View File

@@ -95,9 +95,8 @@ class UrlToImageProcessor(FrameProcessor):
logger.error(error_msg)
# We store functions so objects (e.g. SileroVADAnalyzer) don't get
# instantiated. The function will be called when the desired transport gets
# selected.
# We use lambdas to defer transport parameter creation until the transport
# type is selected at runtime.
transport_params = {
"daily": lambda: DailyParams(
audio_in_enabled=True,
@@ -105,7 +104,6 @@ transport_params = {
video_out_enabled=True,
video_out_width=1024,
video_out_height=1024,
vad_analyzer=SileroVADAnalyzer(params=VADParams(stop_secs=0.2)),
),
"webrtc": lambda: TransportParams(
audio_in_enabled=True,
@@ -113,7 +111,6 @@ transport_params = {
video_out_enabled=True,
video_out_width=1024,
video_out_height=1024,
vad_analyzer=SileroVADAnalyzer(params=VADParams(stop_secs=0.2)),
),
}
@@ -200,6 +197,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
TurnAnalyzerUserTurnStopStrategy(turn_analyzer=LocalSmartTurnAnalyzerV3())
]
),
vad_analyzer=SileroVADAnalyzer(params=VADParams(stop_secs=0.2)),
),
)
mcp_image_processor = UrlToImageProcessor(aiohttp_session=session)