Prosodic Entrainment Optimizer

SkillAI & models

Offline experimental phone-workflow helper that compares supplied prosodic features and suggests bounded TTS parameter changes. Use for synthetic demonstrations and host integration planning.

Available today. Use it from your connected AI after setup.

Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.

Then ask your AI: use the Prosodic Entrainment Optimizer skill

What this skill tells your AI

The instructions your AI receives, as published by calle-ai/awesome-phone-call-agents in skills/call-prosodic-entrainment-optimizer/SKILL.md and read by ahel’s review.

Vocal entrainment is the natural, subconscious phenomenon where people synchronize their speech patterns — pitch, pace, rhythm, and intensity — with their conversation partner. This synchronization is one of the most robustly documented proxies for rapport, trust, and cooperative intent in human communication, first formalized by Howard Giles' Communication Accommodation Theory (1973) and now computationally validated through deep learning (Nasir et al., IEEE TAFFC 2022).

The supplied Python helper is an offline, stateless heuristic over supplied numeric features. It returns a score and suggested TTS deltas; it does not capture audio, inject TTS settings, log adjustments, or measure caller rapport. Audio extraction, timing, consent, and any application of suggestions belong to a separate host integration. It is not a clinical, crisis-response, or financial decision tool.

Research-inspired prototype: the studies below motivate the design but do not validate this implementation or its outcomes.

Scientific Foundation

PaperVenueYearContribution to This Skill
Communication Accommodation TheoryLanguage Sciences, Elsevier2023Theoretical framework: convergence/divergence mechanisms, mediated communication model
Modeling Vocal Entrainment via Deep Unsupervised LearningIEEE Transactions on Affective Computing2022Triplet-network entrainment distance → basis for cosine similarity aggregation
Context-Aware Computational Entrainment in Dyadic ConversationsarXiv2022Cross-subject attention model for real-time dyadic entrainment tracking
ISO/IEC 42001:2023 AI Management SystemISO2023Transparency, logging, and auditability requirements for adaptive AI systems

How It Works

A proposed host integration could place this helper between feature extraction and TTS. The shipped helper only computes suggestions:

Step 1: Baseline Calibration (first 5 seconds)

The host may set is_calibrating=True during a chosen warm-up window. This returns CALIBRATING and an identity directive; the helper itself has no clock, feature collection, or automatic five-second calibration.

Step 2: Feature Extraction (per 1-second window)

The host must supply three features; no audio extractor is included:

  • Fundamental Frequency (F0, Hz): Perceived pitch — speaker identity and emotional state marker.
  • Speech Rate (WPM): Cognitive load and urgency indicator.
  • RMS Energy (normalized): Loudness and engagement level.

Step 3: Entrainment Score Computation

Cosine similarity is computed between the L2-normalized caller and agent prosodic feature vectors. entrainment_score ∈ [0.0, 1.0]:

  • 1.0 = perfect prosodic synchrony
  • 0.0 = complete divergence

Step 4: Status Classification & TTS Directive Generation

entrainment_scoreStatusAction
>= 0.90OPTIMALNo directive — back off to avoid over-mirroring
0.75 – 0.89TARGET_REACHEDBounded directive may still be returned
< 0.75LOW_ENTRAINMENTIssue TTSDirective with bounded parameter deltas
First 5sCALIBRATINGIdentity directive — no adjustment

Step 5: Safety-Bounded TTS Directive

ParameterAdjustment LogicSafety Cap
pitch_shift_semitonesProportional to F0 delta (Hz → semitones)±3.0 semitones/window
rate_multiplierProportional to WPM ratio[0.80, 1.20]
energy_scaleProportional to RMS energy ratio[0.70, 1.30]

The formula uses a fixed 0.05 fraction of the feature difference, subject to the caps above. This is not a 5% output cap or a time-based rate limit; the host controls invocation timing.

Mode Presets

ModeUse CaseBehavior
DEFAULTGeneral inbound/outboundBalanced bidirectional convergence
SALESOutbound sales, lead qualificationConverge toward caller's energy to build rapport
SUPPORTSynthetic downward-only demonstrationNever raises pitch, rate, or energy; no clinical de-escalation efficacy is established

Key Features

  • Bounded suggestions: Parameter caps are enforced per invocation; perceptual effects have not been measured.
  • Anti-over-mirroring: Backs off automatically at score >= 0.90 to prevent the "uncanny valley" of identical-sounding voices.
  • Host-controlled calibration: is_calibrating=True suppresses adjustments.
  • Fail-safe on zero/silence: Muted callers, zero-rate speech, and whispering are all handled without crashes or division-by-zero errors.
  • SUPPORT mode: Only holds or lowers pitch, rate, and energy. It does not implement an upward matching phase or establish de-escalation efficacy.

Configuration Reference

Source constants and proposed host settings are listed below, not a runtime configuration API. The helper has no window-duration or calibration-duration parameter.

ParameterDefaultRangeDescription
TARGET_THRESHOLD0.750.60 – 0.85Below this → issue TTSDirective
OPTIMAL_CEILING0.900.80 – 0.95Above this → back off (no directive)
MAX_PITCH_DELTA3.0 semitones1.0 – 5.0Safety cap on pitch adjustment per window
MAX_RATE_DELTA0.20 (±20%)0.10 – 0.30Safety cap on rate multiplier delta
MAX_ENERGY_DELTA0.30 (±30%)0.15 – 0.40Safety cap on energy scale delta
step_factor0.05Source edit onlyFixed interpolation factor, not an output/time cap
window_duration_s1.00.5 – 2.0Feature extraction window length
calibration_duration_s5.03.0 – 10.0Baseline collection period

Expected Outcomes & Metrics

The following are design hypotheses or operating targets, not measured outcomes of this helper:

MetricExpected ImprovementNotes
CSAT ScoreNot measuredRequires a separate evaluation
Call Abandonment RateNot measuredNo outcome improvement is established
First Call Resolution (FCR)Not measuredNo outcome improvement is established
Entrainment Score (avg call)0.78 – 0.85Target operating range
Directive latency< 10msSynthesis parameter update time

Use Cases

Proposed research contexts only, not validated clinical, crisis-response, sales, or financial deployments:

  • Outbound sales calls: Mirror the prospect's energy and cadence to build trust before pitching.
  • Healthcare intake: Automatically slow pace and lower pitch to match an elderly or anxious caller, reducing cognitive load and improving information capture.
  • Debt collection: Reduce confrontational dynamics by actively converging toward a calm, measured pace even when the caller is agitated.
  • Mental health support lines: Gently mirror distressed caller's cadence (SUPPORT mode) while guiding toward slower, regulated rhythm via Match & Lead.
  • High-volume IVR exit: Reduce caller frustration after a failed IVR interaction by rapidly entraining to their speech pattern when a live-agent-style AI picks up.

Limitations & Known Constraints

  • Cosine similarity is angle-based: Features that point in the same direction in feature space can score high even with different magnitudes. This is expected behavior — the system is measuring style convergence, not energy matching. The energy scale directive handles amplitude alignment separately.
  • TTS dependency: The TTSDirective output requires a TTS engine that accepts real-time prosodic parameter overrides (e.g., SSML <prosody> tags or equivalent API). Not all TTS providers support this.
  • Non-verbal speakers: The host must detect missing/unreliable features and choose whether to keep calibration enabled. The helper does not infer this condition.
  • Accent diversity: Threshold calibration must include diverse vocal profiles to prevent systematic bias against non-standard prosodic patterns.

Integration

[Caller Audio]
      |
[ASR + Prosodic Feature Extractor]
      |
[call-prosodic-entrainment-optimizer]  <-- this skill
      |
  TTSDirective { pitch=-1.2, rate=0.94, energy=0.91 }
      |
[TTS Synthesis Engine]  <-- applies SSML prosody overrides
      |
[Agent Voice → Caller]

References

See references/research-papers.md for research inspiration; citations are not implementation validation. See references/safety.md for safety and host responsibilities; no ISO conformity is established. See references/examples.md for end-to-end scenario walkthroughs.

Signals

GitHub stars
104
Forks
527
Last commit
Sep 2026
Advanced
Item type
skill
Key
call-prosodic-entrainment-optimizer
Source
github.com/calle-ai/awesome-phone-call-agents