subscriber

Bus subscriber mixin for receiving messages from an WorkerBus.

class pipecat.bus.subscriber.BusSubscriber[source]

Bases: object

Mixin for objects that receive messages from an WorkerBus.

Implementors override on_bus_message() to handle incoming messages. Concrete subscribers must provide a name property (typically inherited from BaseObject).

property name: str

Unique name identifying this subscriber on the bus.

async on_bus_message(message: BusMessage) None[source]

Handle an incoming bus message.

Parameters:

message – The bus message to handle.