SmallWebRTCConnection: complain if av package not found
This commit is contained in:
@@ -9,7 +9,6 @@ import json
|
|||||||
import time
|
import time
|
||||||
from typing import Any, List, Literal, Optional, Union
|
from typing import Any, List, Literal, Optional, Union
|
||||||
|
|
||||||
from av.frame import Frame
|
|
||||||
from loguru import logger
|
from loguru import logger
|
||||||
from pydantic import BaseModel, TypeAdapter
|
from pydantic import BaseModel, TypeAdapter
|
||||||
|
|
||||||
@@ -24,6 +23,7 @@ try:
|
|||||||
RTCSessionDescription,
|
RTCSessionDescription,
|
||||||
)
|
)
|
||||||
from aiortc.rtcrtpreceiver import RemoteStreamTrack
|
from aiortc.rtcrtpreceiver import RemoteStreamTrack
|
||||||
|
from av.frame import Frame
|
||||||
except ModuleNotFoundError as e:
|
except ModuleNotFoundError as e:
|
||||||
logger.error(f"Exception: {e}")
|
logger.error(f"Exception: {e}")
|
||||||
logger.error("In order to use the SmallWebRTC, you need to `pip install pipecat-ai[webrtc]`.")
|
logger.error("In order to use the SmallWebRTC, you need to `pip install pipecat-ai[webrtc]`.")
|
||||||
|
|||||||
Reference in New Issue
Block a user