# Code-Switching Detection via Language-Selective Dimensions in Speech Foundation Models

DevFeed: [Code-Switching Detection via Language-Selective Dimensions in Speech Foundation Models](<https://devfeed.tech/articles/code-switching-detection-via-language-selective-dimensions-in-speech-foundation-models-87264.md>)

Original publisher: [Read original article](<https://machinelearning.apple.com/research/code-switching-detection>)

Published: 2026-10-14T00:00:00Z

Content type: article

Language: en

Sources: [Apple Machine Learning Research](<https://devfeed.tech/sources/apple-machine-learning-research.md>)

Topics: [asr](<https://devfeed.tech/topics/asr.md>), [Whisper](<https://devfeed.tech/topics/whisper.md>), [Internationalization (i18n)](<https://devfeed.tech/topics/i18n.md>)

Tags: [asr](<https://devfeed.tech/tags/asr.md>), [detection](<https://devfeed.tech/tags/detection.md>), [foundation-models](<https://devfeed.tech/tags/foundation-models.md>), [generation](<https://devfeed.tech/tags/generation.md>), [speech](<https://devfeed.tech/tags/speech.md>)

## AI overview

The paper presents a lightweight method for detecting code-switching directly from speech. It aggregates frame-level activations from language-selective dimensions in pretrained speech encoders, and reports that the Whisper-small encoder achieves a mean F1 of 0.798 across 14 language pairs in CS-FLEURS. The findings suggest that pretrained speech encoders contain information useful for identifying code-switched utterances and building more representative multilingual corpora.

## Source excerpt

Code-switching (CS), the alternation between languages within an utterance, is common in multilingual speech but underrepresented in pretraining corpora. Increasing CS coverage requires finding relevant utterances in large speech collections so that they can be included in training data. One way to find such utterances is to transcribe the speech and detect language alternation in the text, but this depends on obtaining accurate multilingual transcriptions. We propose a lightweight method that detects CS directly from speech. It uses frame-level language information in pretrained speech...