SmallWebRTCConnection: complain if av package not found

This commit is contained in:
Aleix Conchillo Flaqué
2025-05-12 10:07:06 -07:00
parent 175f352ea7
commit 8171fec925

View File

@@ -9,7 +9,6 @@ import json
import time
from typing import Any, List, Literal, Optional, Union
from av.frame import Frame
from loguru import logger
from pydantic import BaseModel, TypeAdapter
@@ -24,6 +23,7 @@ try:
RTCSessionDescription,
)
from aiortc.rtcrtpreceiver import RemoteStreamTrack
from av.frame import Frame
except ModuleNotFoundError as e:
logger.error(f"Exception: {e}")
logger.error("In order to use the SmallWebRTC, you need to `pip install pipecat-ai[webrtc]`.")