Skip to main content

@dialstack/sdk-dev / js/src / Sentiment

Interface: Sentiment

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

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?

TypeScript
optional local?: ChannelSentiment;

Defined in: sdk/js/src/types/components.ts:341

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


magnitude

TypeScript
magnitude: number;

Defined in: sdk/js/src/types/components.ts:339

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


overall

TypeScript
overall: SentimentLabel;

Defined in: sdk/js/src/types/components.ts:335


remote?

TypeScript
optional remote?: ChannelSentiment;

Defined in: sdk/js/src/types/components.ts:343

The other party's side. Absent for voicemail.


score

TypeScript
score: number;

Defined in: sdk/js/src/types/components.ts:337

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