feat(expressive): expose expressive mode and add expressive_agent example - #6698
Conversation
0b0c069 to
1e8e69c
Compare
1e8e69c to
3937959
Compare
52f7dff to
cafd3ef
Compare
cafd3ef to
866399f
Compare
4b64172 to
a41675a
Compare
777a7c2 to
d06ec89
Compare
…the persona The delivery guide teaches contractions, but it is injected only when expressive mode is on — so an `expressive=False` run, which is half the demo's comparison, lost the guidance entirely and read stiffer for a reason unrelated to delivery. Word choice belongs to the persona; tone and pacing stay in the guide.
…e-mode Conflicted only on the _provider_format import block: this branch added `_mood.match_mood` while main expanded the markup_utils import for the tag-stripping space fix (#6717). Both are additive, so the resolution is the union.
| payload = {"expression": expression, "mood": match_mood(expression)} | ||
| return {ATTRIBUTE_TRANSCRIPTION_EXPRESSION: json.dumps(payload, separators=(",", ":"))} |
There was a problem hiding this comment.
🟡 Frontends reading the agent's mood label stop working after this change
The published delivery-label payload is rewritten to a new shape (json.dumps(payload...) at livekit-agents/livekit/agents/tts/_provider_format.py:952-953), dropping the previously published key, so any app already reading the old key sees nothing.
Impact: Existing clients that display the agent's emotion lose it silently after upgrading.
Wire-format change of the lk.expression transcription attribute
expression_attribute() previously emitted {"value": "<label>"} under the lk.expression attribute (livekit-agents/livekit/agents/types.py:11). It now emits {"expression": "<label>", "mood": "<normalized>"}. Any client SDK/frontend parsing payload["value"] gets a KeyError/undefined. The attribute is published on both the opening (livekit-agents/livekit/agents/voice/room_io/_output.py:499-501) and closing (:557) transcription stream headers. If backward compatibility matters, keeping value alongside the two new keys would be a non-breaking superset.
Was this helpful? React with 👍 or 👎 to provide feedback.
Emotions grow 9 -> 19 and sounds 3 -> 8 (with steering governance and alias salvage), every emotion mapping to a non-fallback mood so lk.expression stays meaningful. Fish's tone controls (whispering, soft, shouting, hurried) land as wrapping prosody that lowers to its native prefix markers. All labels from the documented Fish s2 vocabulary.
No description provided.