Multilingual Code-Switching Aligner

SkillAI & models

Offline experimental English/Spanish lexicon helper for phone-workflow demonstrations. Returns a code-mixing ratio and suggested style; no ASR or LLM prompt integration is included.

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 Multilingual Code-Switching Aligner skill

What this skill tells your AI

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

This offline prototype counts a small Spanish vocabulary in supplied text and suggests an English/Spanish mixing style. It does not identify arbitrary matrix languages, support Hinglish, or establish improvements in inclusivity, trust, or cognitive load.

The helper returns a style label only. A separate host could use it as a suggestion, subject to the caller's stated language preference; rapport or cognitive-load benefits are not established.

Scientific Foundation

Paper / FrameworkRelevance
Output Language Alignment for CSWDemonstrates that AI mirroring code-switching frequencies increases user trust and reduces linguistic anxiety.
Matrix Language Frame (MLF) modelMyers-Scotton framework for distinguishing embedded words vs the matrix language.
FCA Consumer Duty (Vulnerability)Reduces cognitive load for non-native speakers by allowing them to use their natural hybrid dialects.

How it works

  1. Supply a transcript string. An optional host ASR component is outside this contribution.
  2. It strips punctuation and detects embedded vocabularies to calculate a Code-Mixing Index (CMI).
  3. The system returns a structured CodeSwitchingReport containing the CMI and the suggested PromptStyle.
  4. A host may review the suggested style before updating a prompt; the helper performs no prompt or speech mutation.

Decision Matrix

Code-Mixing Index (CMI)Derived Prompt StyleExpected LLM Output Behavior
CMI == 0.0monolingual_englishStrict monolingual English (standard).
0.0 < CMI < 0.30low_code_switchingOccasional embedded loan words (e.g., "gracias", "pero").
CMI >= 0.30high_code_switchingFluid Spanglish; alternating sentence clauses.

Expected Outcomes & Metrics

Latency is a design target, not a measured integration benchmark.

MetricTargetNotes
CMI Computation Latency< 5msRuns via ultra-fast lexicon matching.
Rapport / Trust ScoreNot measuredNo A/B evaluation of this helper is supplied.

Limitations & Known Constraints

  • Lexicon Coverage: The prototype uses a hardcoded vocabulary set. Production systems should use dynamic NLP models to classify embedded words for any language pair.
  • ASR Dependency: Requires an ASR model capable of transcribing code-switched audio without forcing translations (e.g. Whisper large-v3).

Integration

This is an offline text helper. Real-time middleware, ASR, language preferences, and LLM prompt updates are proposed host integration work.

Signals

GitHub stars
104
Forks
527
Last commit
Sep 2026
Advanced
Item type
skill
Key
call-multilingual-code-switching-aligner
Source
github.com/calle-ai/awesome-phone-call-agents