From 3132e1226571228bda6fc6a323128a2c3095e003 Mon Sep 17 00:00:00 2001 From: Mark Backman Date: Fri, 14 Nov 2025 10:48:52 -0500 Subject: [PATCH] Add camera and screen capture support to dev runner for SmallWebRTC --- CHANGELOG.md | 8 ++++++++ src/pipecat/runner/utils.py | 16 ++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 04d789370..de1f520a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- Added ai-coustics integrated VAD (`AICVADAnalyzer`) with `AICFilter` factory and + example wiring; leverages the enhancement model for robust detection with no + ONNX dependency or added processing complexity. + - Added a watchdog to `DeepgramFluxSTTService` to prevent dangling tasks in case the user was speaking and we stop receiving audio. @@ -39,6 +43,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Updated all STT and TTS services to use consistent error handling pattern with `push_error()` method for better pipeline error event integration. +- Added support for `maybe_capture_participant_camera()` and + `maybe_capture_participant_screen()` for `SmallWebRTCTransport` in the runner + utils. + - Added Hindi support for Rime TTS services. - Updated `GeminiTTSService` to use Google Cloud Text-to-Speech streaming API diff --git a/src/pipecat/runner/utils.py b/src/pipecat/runner/utils.py index f9fd0c14a..76a6fa82f 100644 --- a/src/pipecat/runner/utils.py +++ b/src/pipecat/runner/utils.py @@ -281,6 +281,14 @@ async def maybe_capture_participant_camera( except ImportError: pass + try: + from pipecat.transports.smallwebrtc.transport import SmallWebRTCTransport + + if isinstance(transport, SmallWebRTCTransport): + await transport.capture_participant_video(video_source="camera") + except ImportError: + pass + async def maybe_capture_participant_screen( transport: BaseTransport, client: Any, framerate: int = 0 @@ -303,6 +311,14 @@ async def maybe_capture_participant_screen( except ImportError: pass + try: + from pipecat.transports.smallwebrtc.transport import SmallWebRTCTransport + + if isinstance(transport, SmallWebRTCTransport): + await transport.capture_participant_video(video_source="screenVideo") + except ImportError: + pass + def _smallwebrtc_sdp_cleanup_ice_candidates(text: str, pattern: str) -> str: """Clean up ICE candidates in SDP text for SmallWebRTC.