Skip to content

Realtime session

[BETA] Defines a base class for realtime session modules.

Authors

Henry Wicaksono (henry.wicaksono@gdplabs.id)

References

NONE

BaseRealtimeSession()

Bases: ABC

[BETA] A base class for realtime session modules.

The BaseRealtimeSession class provides a framework for processing real-time conversation sessions.

Initializes a new instance of the BaseRealtimeSession class.

start(input_streamers=None, output_streamers=None) abstractmethod async

Starts the real-time conversation session using the provided input and output streamers.

This abstract method must be implemented by subclasses to define the logic for starting the real-time conversation session.

Parameters:

Name Type Description Default
input_streamers list[BaseInputStreamer] | None

The input streamers to use. Defaults to None.

None
output_streamers list[BaseOutputStreamer] | None

The output streamers to use. Defaults to None.

None

Raises:

Type Description
NotImplementedError

If the method is not implemented in a subclass.