Skip to main content

@dialstack/sdk / index / Sentiment

Interface: Sentiment

Defined in: sdk/src/types/components.ts:329

AI-derived sentiment of a call or voicemail transcript, produced automatically alongside the summary once transcription completes.

Two independent axes. score is the emotional leaning (-1.0 to +1.0, with overall derived from it); magnitude is how strongly feeling was expressed at all (0.0 to 1.0, unsigned). Read them together: a call where one side was angry and the other delighted scores near 0 with a HIGH magnitude, while a routine call scores near 0 with a LOW one — both neutral by label.

Sentiment reflects how the participants feel about the interaction, not the subject matter: a calm conversation about an unpleasant topic is neutral, while a frustrated caller is negative even when the exchange stays cordial.

Properties

local?

optional local?: ChannelSentiment;

Defined in: sdk/src/types/components.ts:336

Your user's side. Absent for voicemail, whose audio is single-channel.


magnitude

magnitude: number;

Defined in: sdk/src/types/components.ts:334

Unsigned strength of expressed feeling, 0.0 (flat) to 1.0 (intense).


overall

overall: SentimentLabel;

Defined in: sdk/src/types/components.ts:330


remote?

optional remote?: ChannelSentiment;

Defined in: sdk/src/types/components.ts:338

The other party's side. Absent for voicemail.


score

score: number;

Defined in: sdk/src/types/components.ts:332

Emotional leaning, -1.0 (strongly negative) to +1.0 (strongly positive).