BaseTask

class pipecat.pipeline.base_task.PipelineTaskParams(loop)[source]

Bases: object

Specific configuration for the pipeline task.

Parameters:

loop (AbstractEventLoop)

loop: AbstractEventLoop
class pipecat.pipeline.base_task.BasePipelineTask(*, name=None)[source]

Bases: BaseObject

Parameters:

name (str | None)

abstractmethod has_finished()[source]

Indicates whether the tasks has finished. That is, all processors have stopped.

Return type:

bool

abstractmethod async stop_when_done()[source]

This is a helper function that sends an EndFrame to the pipeline in order to stop the task after everything in it has been processed.

abstractmethod async cancel()[source]

Stops the running pipeline immediately.

abstractmethod async run(params)[source]

Starts running the given pipeline.

Parameters:

params (PipelineTaskParams)

abstractmethod async queue_frame(frame)[source]

Queue a frame to be pushed down the pipeline.

Parameters:

frame (Frame)

abstractmethod async queue_frames(frames)[source]

Queues multiple frames to be pushed down the pipeline.

Parameters:

frames (Iterable[Frame] | AsyncIterable[Frame])