Introduced a new AggregatedTextFrame Frame type that TTSTextFrame inherits from

This frame introduces an `aggregated_by` field to describe the type of text included
in the frame and allows unspoken groupings of text to be pushed through the pipeline
and treated similar to TTSTextFrames.
This commit is contained in:
mattie ruth backman
2025-11-17 14:55:04 -05:00
committed by Mattie Ruth
parent 0e820a01b9
commit 7a4372a909
8 changed files with 88 additions and 34 deletions

View File

@@ -39,6 +39,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added word-level timestamps support to Hume TTS service
- Introduced a new `AggregatedTextFrame` type to support passing text along with an
`aggregated_by` field to describe the type of text included. `TTSTextFrame`s now
inherit from `AggregatedTextFrame`. With this inheritance, an observer can watch for
`AggregatedTextFrame`s to accumlate the perceived output and determine whether or not
the text was spoken based on if that frame is also a `TTSTextFrame`.
With this frame, the llm token stream can be transformed into custom composable
chunks, allowing for aggregation outside the TTS service. This makes it possible to
listen for or handle those aggregations and sets the stage for doing things like
composing a best effort of the perceived llm output in a more digestable form and
to do so whether or not it is processed by a TTS or if even a TTS exists.
### Changed
- ⚠️ Breaking change: `LLMContext.create_image_message()`,