Function expressionAttribute

  • Build the lk.expression transcription attribute from stripped markup tags.

    Surfaces a segment's leading delivery/emotion (expression for Inworld/xAI, emotion for Cartesia) as {"expression": ..., "mood": ...}: the provider's own words, plus the mood they normalize to, so a client can drive UI off a fixed enum without reimplementing the matching. Returns undefined when no such tag was present.

    Parameters

    Returns Record<string, string> | undefined