Avignon Université Builds One Speech Encoder That Knows What and Who
A new post-training framework teaches one speech encoder to simultaneously understand what is said and who said it, across 83 languages.
ProTakeaways
- Researchers propose a unified post-training framework that trains one speech encoder to produce both semantic and speaker embeddings simultaneously.
- The model uses task-specific branches with learnable layer-weighting, so each task automatically selects the most relevant encoder layers.
- On multilingual speech retrieval (VoxPopuli, 24 language pairs), the multi-task model stays within ~1 R@1 point of the single-task semantic baseline and outperforms SONAR.
- On speaker verification (VoxCeleb1-O), the multi-task model achieves 0.91% EER, nearly matching the ECAPA-TDNN teacher at 0.90%.
- The encoder is trained on 8,250 hours of Common Voice speech across 83 languages using w2v-BERT 2.0 as the backbone.
- Code is built on the open-source SpeechBrain SENSE recipe; future work targets emotion, language, and accent as additional attributes.
Speech AI has a split-personality problem. Models that are great at understanding what someone said tend to lose track of who said it, and vice versa. A new paper from Avignon Université proposes a unified post-training framework that forces a single encoder to hold both kinds of knowledge at once, without meaningfully sacrificing either.
The frame-level ceiling
To understand why this matters, you need to know how most speech foundation models work. Models like wav2vec 2.0, HuBERT, and w2v-BERT are trained with self-supervised learning on massive amounts of unlabeled audio. They produce frame-level acoustic representations -- one embedding vector roughly every 20ms of audio -- which are highly effective for tasks like automatic speech recognition or speech translation.
Beyond frame-level representations, there has been growing interest in learning utterance-level speech embeddings that capture higher-level information such as semantics or speaker traits. Such representations are particularly useful for tasks including speech retrieval, cross-modal search, speaker verification, or conversational understanding. The key prior work here is SONAR from Meta and SAMU-XLSR from MIT: unlike earlier approaches that embed at the acoustic frame level (10-20ms), these methods learn multimodal speech-text embeddings at the resolution of a full sentence (5-10s), semantically aligned across different languages.
But there is a catch. Aligning speech representations exclusively with semantic embeddings introduces an important limitation: paralinguistic information present in speech may be suppressed. In particular, attributes such as speaker identity, emotion, or speaking style are not preserved when the representation is optimized solely to match textual semantic embeddings. You end up with a model that knows what was said, but has forgotten the voice that said it.
One encoder, many heads
The paper introduces a framework that sidesteps this trade-off by attaching multiple task-specific branches to a single shared SSL encoder. Each branch is responsible for producing one type of utterance-level embedding. A shared speech encoder is jointly trained to align with different targets through task-specific projection branches. As a proof of concept, the team instantiates two branches: one for semantics (aligned to the multilingual text model BGE-M3) and one for speaker identity (aligned to a pretrained ECAPA-TDNN speaker verification model).

The architecture has three key components per branch:
- Layer-weighted interpolation: Rather than reading from just the last encoder layer, each branch learns a softmax-normalized importance score over all N encoder layers. This lets the semantic branch focus on middle layers and the speaker branch focus on later layers, without any hard-coded assumptions.
- Attribute-specific linear projections: Each layer's hidden state is projected into a task-specific feature space before being mixed. This keeps the shared encoder general-purpose and reduces interference between tasks.
- Attention pooling: The weighted, projected frame sequence is collapsed into a single utterance-level vector using a learned attention mechanism, one per branch.
The final embedding from each branch is L2-normalized and trained to maximize cosine similarity with its respective teacher embedding. The whole system -- shared encoder plus all branches -- is optimized jointly end-to-end.
Training at scale
The speech encoder is initialized with w2v-BERT 2.0 and trained on the Common Voice 19 dataset using 83 languages supported by BGE-M3, corresponding to 8,250 hours of speech. Training is performed with a batch size of 20 and runs for 350K iterations using 8 H100 GPUs. The implementation is built on top of the open-source SpeechBrain SENSE recipe, making it relatively accessible to reproduce.
Does it actually work?
The short answer is yes, and the margins are surprisingly small. On multilingual speech-to-speech retrieval (VoxPopuli), the multi-task model Att(sem+spk) stays within about 1 R@1 point of the single-task semantic baseline Att(sem) across all 24 language pairs tested, and consistently outperforms SONAR despite SONAR using 37 separate language-specific encoders versus one shared encoder here.

On speaker verification (VoxCeleb1-O), the results are equally striking:
| Model | EER (lower is better) | MinDCF |
|---|---|---|
| ECAPA-TDNN teacher | 0.90% | 0.1104 |
| Single-task speaker branch | 0.93% | 0.1285 |
| Multi-task (sem+spk) | 0.91% | 0.1253 |
The multi-task model achieves an EER of 0.91%, very close to the ECAPA-TDNN teacher at 0.90%, with a similarly small gap in MinDCF. Moreover, the joint optimization may even benefit speaker representations, as the multi-task model slightly outperforms the single-task speaker baseline. EER (Equal Error Rate) is the point where false acceptances and false rejections are equally likely -- lower is better.
What the layers reveal
One of the most interesting findings is the layer analysis. The semantic branch concentrates most of its weight on a narrow range of middle layers, with a strong peak around layers 13 and 14. In contrast, the speaker branch distributes its weights more broadly across the entire encoder, with a gradual increase toward the highest layers, peaking at layers 23 and 24. This is consistent with what the interpretability literature has shown about transformer speech models: lower-to-middle layers tend to capture phonetic and linguistic content, while upper layers encode more abstract, speaker-level features. The fact that the model learns this automatically, without being told, is a meaningful validation of the approach.
What it unlocks
The practical upside is a single deployable model that can serve multiple downstream tasks simultaneously. Some concrete use cases:
- Multilingual voice search: Retrieve audio clips by meaning across languages, while also filtering or ranking by speaker identity.
- Cross-lingual speaker diarization: Identify who is speaking in a meeting, even when participants switch languages mid-conversation.
- Speech dataset mining: Find semantically equivalent utterances across languages and verify they come from different speakers, useful for building training corpora.
- Conversational AI: Maintain both topic context and speaker tracking in a single embedding pipeline.
The framework is explicitly designed to be extensible. Future work plans to incorporate additional attributes such as emotion, language, and accent, toward building richer and more versatile speech representations from a unified speech encoder. Adding a new attribute is, in principle, as simple as adding a new branch and a new teacher model.
The main limitation to be aware of is that the framework still requires a strong pretrained teacher for each attribute you want to learn. If no good teacher model exists for your target attribute -- say, fine-grained accent classification -- you cannot easily plug it in. The approach also has not yet been tested beyond two simultaneous attributes, so how gracefully it scales to three or four branches remains an open question.