transport
The bot’s eval transport: a WebSocket server speaking RTVI, plus the eval’s own behavior.
The harness sets per-connection query flags. skip_tts silences the
bot’s speech for the session (text mode), applied before
on_client_connected so a greeting made there is silent too.
capture_bot_audio forwards the bot’s synthesized audio to the harness,
for transcription and the recording. capture_bot_images reports each
image the bot outputs, by size and format. trigger_disconnect fires the bot’s
on_client_disconnected when the connection ends; it is off by default,
since bots often cancel their pipeline there and the server serves several
scenarios in a row.
The input transport also serves the harness’s image to a vision bot, which has no camera under eval. The user’s audio arrives as a continuous stream, so nothing else is special on the way in.
- class pipecat.evals.transport.EvalTransportParams(*, audio_out_enabled: bool = False, audio_out_sample_rate: int | None = None, audio_out_channels: int = 1, audio_out_bitrate: int = 96000, audio_out_10ms_chunks: int = 4, audio_out_filter: BaseAudioFilter | None = None, audio_out_mixer: Mapping[str | None, ~pipecat.audio.mixers.base_audio_mixer.BaseAudioMixer] | None=None, audio_out_destinations: list[str] = <factory>, audio_out_end_silence_secs: int = 2, audio_out_auto_silence: bool = True, audio_out_write_timeout_secs: float = 10.0, audio_in_enabled: bool = False, audio_in_sample_rate: int | None = None, audio_in_channels: int = 1, audio_in_filter: BaseAudioFilter | None = None, audio_in_stream_on_start: bool = True, audio_in_passthrough: bool = True, video_in_enabled: bool = False, video_out_enabled: bool = False, video_out_is_live: bool = False, video_out_width: int = 1024, video_out_height: int = 768, video_out_bitrate: int | None = None, video_out_framerate: int = 30, video_out_color_format: str = 'RGB', video_out_codec: str | None = None, video_out_destinations: list[str] = <factory>, add_wav_header: bool = False, serializer: FrameSerializer | None = None, session_timeout: int | None = None, allowed_origins: list[str] = <factory>)[source]
Bases:
SingleClientWebsocketServerParamsParameters of the eval transport, so a bot’s
transport_paramsnames it as such.
- class pipecat.evals.transport.EvalInputTransport(transport: SingleClientWebsocketServerTransport, host: str, port: int, params: SingleClientWebsocketServerParams, callbacks: SingleClientWebsocketServerCallbacks, **kwargs)[source]
Bases:
SingleClientWebsocketServerInputTransportInput transport that serves the harness’s image.
A vision bot asks for the user’s camera image; under eval there is no camera, so the image the harness registered for the turn is served instead.
- async process_frame(frame: Frame, direction: FrameDirection)[source]
Serve image requests; otherwise behave like the base input transport.
- class pipecat.evals.transport.EvalOutputTransport(transport: SingleClientWebsocketServerTransport, params: SingleClientWebsocketServerParams, **kwargs)[source]
Bases:
SingleClientWebsocketServerOutputTransportOutput transport that reports the bot’s images to the harness.
The WebSocket server output has no video, so an image the bot outputs is handed to the serializer as it arrives, whether or not the bot enabled video output; the serializer sends it only when the harness asked.
- async process_frame(frame: Frame, direction: FrameDirection)[source]
Report output images; otherwise behave like the base output transport.
- class pipecat.evals.transport.EvalTransport(params: SingleClientWebsocketServerParams, host: str = 'localhost', port: int = 8765, input_name: str | None = None, output_name: str | None = None)[source]
Bases:
SingleClientWebsocketServerTransportWebSocket server transport used by the eval harness (see the module docstring).
- input() SingleClientWebsocketServerInputTransport[source]
Return an input transport that can serve harness-provided images.
- output() SingleClientWebsocketServerOutputTransport[source]
Return the eval output transport.