diff --git a/api-reference/server/utilities/turn-management/turn-events.mdx b/api-reference/server/utilities/turn-management/turn-events.mdx index 1c5d8dde..9f269775 100644 --- a/api-reference/server/utilities/turn-management/turn-events.mdx +++ b/api-reference/server/utilities/turn-management/turn-events.mdx @@ -193,10 +193,11 @@ async def on_assistant_turn_stopped(aggregator, message: AssistantTurnStoppedMes | `message` | `AssistantTurnStoppedMessage` | Contains the assistant's transcript and metadata | - This event fires when the LLM response completes, when the user interrupts, or - when a user image is appended to context. The event always fires when a turn - ends, even if `content` is empty (e.g., the turn was interrupted before any - tokens were generated). + This event fires when the LLM response completes, when the user interrupts, + when a user image is appended to context, or when a + `TTSSpeakFrame(append_to_context=True)` greeting finishes. The event always + fires when a turn ends, even if `content` is empty (e.g., the turn was + interrupted before any tokens were generated). ### on_assistant_thought diff --git a/pipecat/learn/text-to-speech.mdx b/pipecat/learn/text-to-speech.mdx index 15775bbe..d5d6953c 100644 --- a/pipecat/learn/text-to-speech.mdx +++ b/pipecat/learn/text-to-speech.mdx @@ -330,6 +330,13 @@ await tts.queue_frame( The `append_to_context` parameter controls whether the spoken text is added to the conversation history. When `append_to_context=True`, the text is automatically committed to the context after being spoken, making it useful for bot greetings and injected speech that should be part of the conversation flow. + + When using `append_to_context=True`, the assistant aggregator's + `on_assistant_turn_started` and `on_assistant_turn_stopped` events will fire, + allowing you to capture the greeting text in your turn event handlers just like + LLM-generated responses. See [Turn Events](/api-reference/server/utilities/turn-management/turn-events) for details. + + ### Dynamic Settings Updates Update TTS settings during conversation using typed settings objects: