How events are emitted and consumed.
TRANSCRIPT
: Indicates a partial transcript for the conversation has been received.TRANSCRIPT_COMPLETE
: Indicates the transcript is complete (ie conversation has ended).ACTION
: Indicates that a Vocode action has begun or completed.PHONE_CALL_CONNECTED
: Indicates a phone call has been connected (only gets sent during PhoneConversation
s)PHONE_CALL_ENDED
: Indicates a phone call has ended.vocode.streaming.utils.EventsManager
and override the handle_event
method.
You can also configure which events your EventsManager
is subscribed to by using the subscriptions
property (see example).
EventsManager
subclass is created with a subscription to the TRANSCRIPT_COMPLETE
event and then print the transcript when we receive the event.
To use CustomEventsManager
, you can pass it into any Conversation, e.g.
TelephonyServer
, like: