Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,11 @@ async def on_assistant_turn_stopped(aggregator, message: AssistantTurnStoppedMes
| `message` | `AssistantTurnStoppedMessage` | Contains the assistant's transcript and metadata |

<Note>
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).
</Note>

### on_assistant_thought
Expand Down
7 changes: 7 additions & 0 deletions pipecat/learn/text-to-speech.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<Note>
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.
</Note>

### Dynamic Settings Updates

Update TTS settings during conversation using typed settings objects:
Expand Down
Loading