SubscribeSettings to be pydantic and comment fixes
This commit is contained in:
@@ -563,8 +563,7 @@ async def create_transport(
|
|||||||
),
|
),
|
||||||
"vonage": lambda: VonageVideoConnectorTransportParams(
|
"vonage": lambda: VonageVideoConnectorTransportParams(
|
||||||
audio_in_enabled=True,
|
audio_in_enabled=True,
|
||||||
audio_out_enabled=True,
|
audio_out_enabled=True
|
||||||
vad_analyzer=SileroVADAnalyzer(),
|
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ from typing import Any, Optional, TypeVar
|
|||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from loguru import logger
|
from loguru import logger
|
||||||
|
from pydantic import BaseModel
|
||||||
|
|
||||||
from pipecat.audio.utils import create_stream_resampler
|
from pipecat.audio.utils import create_stream_resampler
|
||||||
from pipecat.frames.frames import (
|
from pipecat.frames.frames import (
|
||||||
@@ -70,7 +71,7 @@ try:
|
|||||||
except ModuleNotFoundError as e:
|
except ModuleNotFoundError as e:
|
||||||
logger.error(f"Exception: {e}")
|
logger.error(f"Exception: {e}")
|
||||||
logger.error(
|
logger.error(
|
||||||
f"In order to use Vonage Video Connector, you need to have the Vonage Video Connector python library installed."
|
"In order to use Vonage Video Connector, you need to `pip install pipecat-ai[vonage-video-connector]`."
|
||||||
)
|
)
|
||||||
raise Exception(f"Missing module: {e}")
|
raise Exception(f"Missing module: {e}")
|
||||||
|
|
||||||
@@ -101,13 +102,12 @@ class VonageVideoConnectorTransportParams(TransportParams):
|
|||||||
clear_buffers_on_interruption: bool = True
|
clear_buffers_on_interruption: bool = True
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
class SubscribeSettings(BaseModel):
|
||||||
class SubscribeSettings:
|
|
||||||
"""Parameters for stream input subscription.
|
"""Parameters for stream input subscription.
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
capture_audio: Whether to subscribe to audio.
|
subscribe_to_audio: Whether to subscribe to audio.
|
||||||
capture_video: Whether to subscribe to video.
|
subscribe_to_video: Whether to subscribe to video.
|
||||||
preferred_resolution: Preferred resolution for video subscription.
|
preferred_resolution: Preferred resolution for video subscription.
|
||||||
preferred_framerate: Preferred framerate for video subscription.
|
preferred_framerate: Preferred framerate for video subscription.
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user