video_connector

Vonage Video Connector transport.

class pipecat.transports.vonage.video_connector.VonageVideoConnectorInputTransport(client: VonageClient, params: VonageVideoConnectorTransportParams)[source]

Bases: BaseInputTransport

Input transport for Vonage, handling audio input from the Vonage session.

Receives audio from a Vonage Video session and pushes it as input frames.

__init__(client: VonageClient, params: VonageVideoConnectorTransportParams)[source]

Initialize the Vonage input transport.

Parameters:
  • client – The VonageClient instance to use.

  • params – Transport parameters for input configuration.

async setup(setup: FrameProcessorSetup) → None[source]

Set up the processor with required components.

Parameters:

setup – Configuration object containing setup parameters.

async cleanup() → None[source]

Cleanup input transport.

async start(frame: StartFrame) → None[source]

Start the Vonage input transport.

Parameters:

frame – The StartFrame to initiate the transport.

async stop(frame: EndFrame) → None[source]

Stop the Vonage input transport.

Parameters:

frame – The EndFrame to stop the transport.

async cancel(frame: CancelFrame) → None[source]

Cancel the Vonage input transport.

Parameters:

frame – The CancelFrame to cancel the transport.

async push_caption_frame(frame: TranscriptionFrame | InterimTranscriptionFrame) → None[source]

Push a transcription frame downstream if captions input is enabled.

Parameters:

frame – The input transcription frame to process.

async subscribe_to_stream(stream_id: str, params: SubscribeSettings) → None[source]

Subscribe to a participant’s stream.

Parameters:
  • stream_id – The ID of the participant to subscribe to.

  • params – Subscription parameters for the subscription.

class pipecat.transports.vonage.video_connector.VonageVideoConnectorOutputTransport(client: VonageClient, params: VonageVideoConnectorTransportParams)[source]

Bases: BaseOutputTransport

Output transport for Vonage, handling audio output to the Vonage session.

Sends audio frames to a Vonage Video session as output.

__init__(client: VonageClient, params: VonageVideoConnectorTransportParams)[source]

Initialize the Vonage output transport.

Parameters:
  • client – The VonageClient instance to use.

  • params – Transport parameters for output configuration.

async setup(setup: FrameProcessorSetup) → None[source]

Set up the processor with required components.

Parameters:

setup – Configuration object containing setup parameters.

async cleanup() → None[source]

Cleanup output transport.

async start(frame: StartFrame) → None[source]

Start the Vonage output transport.

Parameters:

frame – The StartFrame to initiate the transport.

async stop(frame: EndFrame) → None[source]

Stop the Vonage output transport.

Parameters:

frame – The EndFrame to stop the transport.

async cancel(frame: CancelFrame) → None[source]

Cancel the Vonage output transport.

Parameters:

frame – The CancelFrame to cancel the transport.

async process_frame(frame: Frame, direction: FrameDirection) → None[source]

Process a frame for the Vonage output transport.

Parameters:
  • frame – The frame to process.

  • direction – The direction of frame flow in the pipeline.

async write_audio_frame(frame: OutputAudioRawFrame) → bool[source]

Write an audio frame to the Vonage session.

Parameters:

frame – The OutputAudioRawFrame to send.

async write_video_frame(frame: OutputImageRawFrame) → bool[source]

Write a video frame to the transport.

Parameters:

frame – The output video frame to write.

class pipecat.transports.vonage.video_connector.VonageVideoConnectorTransport(application_id: str, session_id: str, token: str, params: VonageVideoConnectorTransportParams)[source]

Bases: BaseTransport

Vonage Video Connector transport implementation for Pipecat.

Provides input and output audio transport for Vonage Video sessions, supporting event handling for session and participant lifecycle.

Supported features:

  • Audio input and output transport for Vonage Video sessions

  • Event handler registration for session and participant events

  • Publisher and subscriber management

  • Configurable audio and migration parameters

__init__(application_id: str, session_id: str, token: str, params: VonageVideoConnectorTransportParams)[source]

Initialize the Vonage Video Connector transport.

Parameters:
  • application_id – The Vonage Video application ID.

  • session_id – The session ID to connect to.

  • token – The authentication token for the session.

  • params – Transport parameters for input/output configuration.

get_client_id(client: Any) → str[source]

The id of a client, as passed to on_client_connected.

Parameters:

client – The client, as passed to the transport’s client events.

Returns:

The client’s stream id.

input() → FrameProcessor[source]

Get the input transport for Vonage.

Returns:

The VonageVideoConnectorInputTransport instance.

output() → FrameProcessor[source]

Get the output transport for Vonage.

Returns:

The VonageVideoConnectorOutputTransport instance.

async subscribe_to_stream(stream_id: str, params: SubscribeSettings) → None[source]

Subscribe to a participant’s stream.

Parameters:
  • stream_id – The ID of the participant to subscribe to.

  • params – Subscription parameters for the subscription.