examples: capture camera or screen. allow setting framerate

This commit is contained in:
Aleix Conchillo Flaqué
2025-05-29 10:15:18 -07:00
parent 67dd146038
commit ca7b0650c2
11 changed files with 34 additions and 21 deletions

View File

@@ -11,6 +11,7 @@ import tkinter as tk
from dotenv import load_dotenv
from loguru import logger
from pipecat.examples.run import maybe_capture_participant_camera
from pipecat.frames.frames import (
Frame,
InputAudioRawFrame,
@@ -107,6 +108,7 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si
@transport.event_handler("on_client_connected")
async def on_client_connected(transport, client):
logger.info(f"Client connected")
await maybe_capture_participant_camera(transport, client, framerate=30)
@transport.event_handler("on_client_disconnected")
async def on_client_disconnected(transport, client):