<?xml version="1.0" encoding="UTF-8"?>
<rss  xmlns:atom="http://www.w3.org/2005/Atom" 
      xmlns:media="http://search.yahoo.com/mrss/" 
      xmlns:content="http://purl.org/rss/1.0/modules/content/" 
      xmlns:dc="http://purl.org/dc/elements/1.1/" 
      version="2.0">
<channel>
<title>Bruno Hays</title>
<link>https://bruno-hays.github.io/</link>
<atom:link href="https://bruno-hays.github.io/index.xml" rel="self" type="application/rss+xml"/>
<description>Notes from a machine learning engineer</description>
<generator>quarto-1.11.9</generator>
<lastBuildDate>Sat, 28 Nov 2026 23:00:00 GMT</lastBuildDate>
<item>
  <title>You can stack Nemotron Diarization models to increase the number of speakers</title>
  <dc:creator>Bruno Hays</dc:creator>
  <link>https://bruno-hays.github.io/posts/more-than-8-speakers-realtime/</link>
  <description><![CDATA[ 





<p><a href="https://huggingface.co/nvidia/Nemotron-3-Diarization">Nemotron 3 Diarization</a> is NVIDIA’s streaming speaker diarization model. It says who speaks when, in real time, and it has 8 output channels. The 9th person to speak in a call has no channel left: their speech is given to someone else, or dropped.</p>
<p>I got past 8 by running two copies of the model on the same audio and editing what each copy remembers. The first copy keeps the first 7 speakers, the second keeps the next 7. There is no training and no second model to recognise voices, and a label is never changed once given. Everything below runs in real time, with 4.64 s of latency.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="https://bruno-hays.github.io/posts/more-than-8-speakers-realtime/der_three_sets.png" class="img-fluid figure-img"></p>
<figcaption>Diarization error rate on recordings with more than 8 speakers. Nemotron alone and two copies at 4.64 s of latency; eDIAR, whose labels can change for 10 s; DiariZen, which is not real time (async), for reference.</figcaption>
</figure>
</div>
<p>On meetings with 9 or 10 people the error rate goes from 26.5% to 22.7%. On clean synthetic conversations with 10 to 14 people it goes from 31.5% to 10.0%, the score of DiariZen, an async system that waits for the whole recording. The gain shrinks when the audio gets harder, because the model then struggles to tell voices apart even with channels to spare.</p>
<p>Code and data: <a href="https://github.com/bruno-hays/nemotron-diar-stack">github.com/bruno-hays/nemotron-diar-stack</a>.</p>
<section id="how-sortformer-works" class="level2">
<h2 class="anchored" data-anchor-id="how-sortformer-works">How Sortformer works</h2>
<p>Most diarization systems, like <a href="https://github.com/pyannote/pyannote-audio">pyannote</a> or <a href="https://github.com/BUTSpeechFIT/DiariZen">DiariZen</a>, compute a voice embedding for each stretch of speech and cluster them. <a href="https://arxiv.org/abs/2409.06656">Sortformer</a>, the family Nemotron 3 Diarization belongs to, instead predicts directly, for every 80 ms frame, which of its output channels are speaking. Channels are sorted by order of arrival: channel 1 is the first voice heard, channel 2 the second, and so on.</p>
<p>To keep the labels stable over a long stream, the <a href="https://arxiv.org/abs/2507.18446">streaming version</a> re-reads part of the past at every step. Its input is made of three blocks, laid out in time from left to right:</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="https://bruno-hays.github.io/posts/more-than-8-speakers-realtime/nvidia/fifo.png" class="img-fluid figure-img"></p>
<figcaption>The streaming input of Sortformer: speaker cache, FIFO queue and the new chunk. Figure 1 of Medennikov et al., <em>Streaming Sortformer</em> (<a href="https://arxiv.org/abs/2507.18446">arXiv 2507.18446</a>), CC BY 4.0. It shows the 4-speaker model with 15 s blocks; Nemotron 3 Diarization has 8 speakers and 21 s blocks.</figcaption>
</figure>
</div>
<ul>
<li><strong>The speaker cache</strong> (green): about 21 seconds of past audio, chosen so that each speaker seen so far keeps a section of their own, in order of arrival.</li>
<li><strong>The FIFO</strong> (blue): the last 21 seconds. Frames that leave it are used to update the cache.</li>
<li><strong>The new chunk</strong> (purple): 4 s of new audio, plus 0.64 s of lookahead in the 4.64 s setting. Shorter chunks give a lower latency, down to 0.32 s.</li>
</ul>
<p>The model reads the three blocks together and labels the new chunk. The voice in the first section of the cache is speaker 1, so when that voice comes back in the new chunk, it is speaker 1 again.</p>
<p>The model stores no speaker identity anywhere: a label is only the position of a voice in the cache. This is what makes the rest possible. If you edit the cache, you edit the labels.</p>
</section>
<section id="two-copies-with-complementary-memories" class="level2">
<h2 class="anchored" data-anchor-id="two-copies-with-complementary-memories">Two copies with complementary memories</h2>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="https://bruno-hays.github.io/posts/more-than-8-speakers-realtime/two_copies.svg" class="img-fluid figure-img"></p>
<figcaption>The two copies, with the same layout as the figure above. Each copy keeps its own 7 speakers and erases the others from its memory.</figcaption>
</figure>
</div>
<p>Until an 8th speaker appears, one model runs as usual. Then its whole state, the speaker cache and the FIFO, is copied, and each copy erases from it the speakers that are not its own: copy A erases the newcomer, copy B erases speakers 1 to 7 and moves the newcomer to its channel 1. Starting B from a copy matters: it already remembers the newcomer’s first second of speech, so it labels them at once. Started empty, B would give its channel 1 to the first voice it hears, which is almost always one of A’s speakers. From there both copies read every new chunk:</p>
<ul>
<li><strong>Copy A keeps speakers 1 to 7.</strong> After every step, the frames it gave to channel 8 are erased from its memory. Channel 8 therefore never belongs to anyone and keeps catching any voice that is not one of the 7.</li>
<li><strong>Copy B keeps speakers 8 to 14.</strong> The frames of speakers 1 to 7 are erased from its memory in the same way, so they never take one of its channels.</li>
<li><strong>Arbitration.</strong> When a channel of A and a channel of B are active at the same time, the copy whose channel is more confident about that speech (higher average probability over those frames) keeps it, and the other forgets those frames.</li>
</ul>
<p>The output is 7 channels from A and up to 7 from B. Recordings with 7 speakers or fewer give exactly the output of the plain model, since the second copy never starts. Once it starts, each step costs two forward passes of a 99M-parameter model.</p>
</section>
<section id="results" class="level2">
<h2 class="anchored" data-anchor-id="results">Results</h2>
<p>Diarization error rate, no collar, overlapped speech scored. Lower is better.</p>
<section id="real-time" class="level3">
<h3 class="anchored" data-anchor-id="real-time">Real time</h3>
<p>The labels come out while people talk, a few seconds behind.</p>
<table class="caption-top table">
<colgroup>
<col style="width: 22%">
<col style="width: 17%">
<col style="width: 15%">
<col style="width: 15%">
<col style="width: 15%">
<col style="width: 16%">
</colgroup>
<thead>
<tr class="header">
<th></th>
<th>Latency</th>
<th>Earnings calls</th>
<th>Joined meetings</th>
<th>Synthetic, clean</th>
<th>Synthetic, noisy room</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Nemotron alone</td>
<td>4.64 s</td>
<td>21.4%</td>
<td>26.5%</td>
<td>31.5%</td>
<td>44.2%</td>
</tr>
<tr class="even">
<td>Two copies</td>
<td>4.64 s</td>
<td><strong>20.6%</strong></td>
<td><strong>22.7%</strong></td>
<td><strong>10.0%</strong></td>
<td><strong>42.4%</strong></td>
</tr>
<tr class="odd">
<td>eDIAR</td>
<td>11 s (labels final)</td>
<td>21.9%</td>
<td>28.0%</td>
<td>32.1%</td>
<td>52.3%</td>
</tr>
</tbody>
</table>
</section>
<section id="async-for-reference" class="level3">
<h3 class="anchored" data-anchor-id="async-for-reference">Async, for reference</h3>
<p>These systems wait for the whole recording before giving any label, so they can look back and forward in time.</p>
<table class="caption-top table">
<colgroup>
<col style="width: 22%">
<col style="width: 17%">
<col style="width: 15%">
<col style="width: 15%">
<col style="width: 15%">
<col style="width: 16%">
</colgroup>
<thead>
<tr class="header">
<th></th>
<th>Latency</th>
<th>Earnings calls</th>
<th>Joined meetings</th>
<th>Synthetic, clean</th>
<th>Synthetic, noisy room</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>pyannote community-1</td>
<td>whole recording</td>
<td>10.2%</td>
<td>28.7%</td>
<td>10.3%</td>
<td>56.4%</td>
</tr>
<tr class="even">
<td>DiariZen</td>
<td>whole recording</td>
<td>11.8%</td>
<td>17.0%</td>
<td>10.0%</td>
<td>48.2%</td>
</tr>
</tbody>
</table>
<ul>
<li><strong>Earnings calls</strong>: the 31 calls of <a href="https://arxiv.org/abs/2104.11348">Earnings-21</a> with 9 to 20 speakers (32 h). Not in the model’s training data, and never used to design anything here. <a href="https://huggingface.co/datasets/Revai/earnings21">Dataset</a>, published by Rev; the speaker timings come from <a href="https://github.com/revdotcom/speech-datasets/tree/main/earnings21">Rev’s repository</a>.</li>
<li><strong>Joined meetings</strong>: pairs of <a href="https://arxiv.org/abs/2401.08887">NOTSOFAR-1</a> evaluation meetings put end to end, 9 or 10 people (28 recordings, 5.6 h), since no public meeting set has that many people talking. They are artificial: the first group stops talking when the second starts, and the room may change at the join. <a href="https://huggingface.co/datasets/BrunoHays/notsofar1-joined-9-10-speakers">Dataset</a>.</li>
<li><strong>Synthetic</strong>: conversations between 10, 12 or 14 LibriSpeech readers who all talk equally, in two parts: clean (9 recordings, 2.3 h) and in a simulated noisy room (18 recordings, 4.5 h). <a href="https://huggingface.co/datasets/BrunoHays/librispeech-10-14-speakers-synthetic">Dataset</a>.</li>
</ul>
<p>The two copies are ahead of every real-time system on all three sets. On clean synthetic audio they match both async systems (10.0%, against 10.0% and 10.3%), in the noisy room they are ahead of both, and on the joined meetings they are ahead of pyannote.</p>
<p>The gain follows how much the late speakers talk. Speakers who arrive 8th or later hold 39% of the speech on the synthetic set, 23% on the joined meetings and 11% on earnings calls, where three people do 80% of the talking. Those three already fit in one model, so there is little left to win there.</p>
</section>
</section>
<section id="conclusion" class="level2">
<h2 class="anchored" data-anchor-id="conclusion">Conclusion</h2>
<p>Nemotron 3 Diarization stores no speaker identity, so what it remembers can be edited. Two copies with complementary memories take it from 8 to 14 speakers, with no training and no extra model, and it still runs in real time. They are ahead of the plain model and of eDIAR on all three sets, match async DiariZen on clean audio and beat it in the noisy room. The gain is largest when many people talk and the audio is clean, and smallest on hard audio, where the base model already confuses voices.</p>
<p>The rest of this post looks at why it works, where it stops working, and what else I tried.</p>
</section>
<section id="can-channel-8-say-this-voice-is-not-one-of-mine" class="level2">
<h2 class="anchored" data-anchor-id="can-channel-8-say-this-voice-is-not-one-of-mine">Can channel 8 say “this voice is not one of mine”?</h2>
<p>The scheme stands on one question: when a new voice arrives, does copy A put it in channel 8, or give it to one of the 7 speakers it holds? If it gives it away, the voice is labelled as the wrong person, and copy B never hears about it.</p>
<p>To measure it, I matched each person in the recording to the output channel that carries most of their speech, one channel per person. The people who are not matched to one of copy A’s 7 channels are the late arrivals: their speech should go to copy B. For them, I counted how much of their speech copy A gives to one of its own 7 speakers instead. Only the moments where one person speaks alone are counted. If channel 8 worked perfectly, this would be 0%.</p>
<table class="caption-top table">
<thead>
<tr class="header">
<th>Set</th>
<th>Late speakers’ speech taken by copy A (lower is better)</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><a href="https://huggingface.co/datasets/BrunoHays/librispeech-10-14-speakers-synthetic">Synthetic</a>, clean</td>
<td>1 to 5%</td>
</tr>
<tr class="even">
<td><a href="https://huggingface.co/datasets/BrunoHays/notsofar1-joined-9-10-speakers">Joined meetings</a></td>
<td>7 to 14%</td>
</tr>
<tr class="odd">
<td><a href="https://huggingface.co/datasets/BrunoHays/librispeech-10-14-speakers-synthetic">Synthetic</a>, simulated noisy room</td>
<td>25 to 53%</td>
</tr>
</tbody>
</table>
<p>The results follow the same order. On clean audio, where copy A almost always puts a new speaker in its 8th channel, two copies cut the error rate by two thirds (31.5% to 10.0%). On real meetings, where it does so most of the time, they gain 4 points (26.5% to 22.7%). In the noisy room, where it often gives the new speaker to someone it already holds, they gain 2 (44.2% to 42.4%).</p>
<p>The noisy room fails before an 8th channel is even needed. With exactly 8 people talking in that room, Nemotron alone opens only 6.7 of its 8 channels and gives 10.7% of the speech to the wrong person (at 1.04 s of latency). On clean audio, each of the 8 gets a channel. A model that cannot fill its own 8 channels gains nothing from a second copy with 7 more.</p>
<p>So stacking copies works, but it is limited by the base model: on real or noisy audio, Nemotron often gives a new voice to a speaker it already holds instead of opening its 8th channel.</p>
</section>
<section id="what-if-we-stack-three-copies-of-5-speakers" class="level2">
<h2 class="anchored" data-anchor-id="what-if-we-stack-three-copies-of-5-speakers">What if we stack three copies of 5 speakers?</h2>
<p>The model handles its first channels better than its last ones. Measured as in the table above, on the noisy-room recordings with long turns: when copy A keeps 4 speakers, it wrongly gives 17% of the other people’s speech to one of its own speakers; when it keeps 7, 35%. So each copy could stop earlier: three copies of 5 speakers instead of two copies of 7.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="https://bruno-hays.github.io/posts/more-than-8-speakers-realtime/der_three_copies.png" class="img-fluid figure-img"></p>
<figcaption>Diarization error rate at 4.64 s: Nemotron alone, two copies of 7 speakers and three copies of 5. Real meetings with 5 to 7 speakers are the <a href="https://huggingface.co/datasets/microsoft/NOTSOFAR">NOTSOFAR-1</a> evaluation meetings.</figcaption>
</figure>
</div>
<p>Past 8 speakers, three copies win everywhere, mostly because fewer voices are confused. But copy A now splits at the 6th speaker, and on real meetings with 6 or 7 people, which two copies of 7 leave alone, splitting costs 5 to 9 points. So three copies of 5 only pay off when the meeting is known to be large, for example from its number of participants.</p>
</section>
<section id="ediar-another-way-past-8-speakers" class="level2">
<h2 class="anchored" data-anchor-id="ediar-another-way-past-8-speakers">eDIAR, another way past 8 speakers</h2>
<p><a href="https://arxiv.org/abs/2611.18529">eDIAR</a> (Jung, Kim, Lee, Shin and Choo, November 2026) also extends Nemotron without training, in a different way. It keeps Nemotron for who speaks when, and adds a second model, WeSpeaker, that computes voice embeddings. Once all channels are used, it clusters these embeddings inside each channel to split it into several speakers. It runs Nemotron at its 1.04 s setting and can change a label during the following 10 seconds, so its labels are final about 11 s after the speech: later than ours.</p>
<p>I ran its <a href="https://github.com/KyuDan1/eDIAR">public code</a> with the authors’ default settings. On our three sets it does not do better than Nemotron alone, at its own setting (21.5%, 27.4% and 40.5% at 1.04 s). On the earnings calls it never went past 8 speakers; on the synthetic set it found 17 speakers for 12 on a typical recording. To check the run, I rebuilt the VoxConverse part of its paper: the same recordings, from a <a href="https://huggingface.co/datasets/diarizers-community/voxconverse">public copy</a> of the dataset, each cut to its first 8 minutes as in the paper, scored the same way. There eDIAR does what its paper reports. On the 14 recordings with 9 or more speakers it brings the error rate from 10.4% to 8.3%, and two copies at 4.64 s reach 8.2%. On the same 14 recordings at full length, 3 to 20 minutes, its gain almost disappears (15.3% to 14.4%), while two copies go from 14.6% to 10.3%. eDIAR works on short sessions and fades on long ones, as its authors note. Our recordings last from 12 minutes to an hour and a half. Nemotron saw most of these VoxConverse recordings in training, so all these numbers are optimistic, but they are so for both methods.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="https://bruno-hays.github.io/posts/more-than-8-speakers-realtime/der_voxconverse.png" class="img-fluid figure-img"></p>
<figcaption>Diarization error rate on the 14 VoxConverse recordings with 9 or more speakers, cut to their first 8 minutes as in the eDIAR paper, and at full length.</figcaption>
</figure>
</div>
<p>I found no published work that runs several copies of a fixed-capacity diarization model side by side.</p>
</section>
<section id="other-options-explored" class="level2">
<h2 class="anchored" data-anchor-id="other-options-explored">Other options explored</h2>
<p>These were tested with a 12.64 s latency, where the two copies score 22.4% on joined meetings and 31.4% on the whole synthetic set, against 26.5% and 38.8% for Nemotron alone.</p>
<p><strong>Evicting a speaker.</strong> When all 8 channels are taken, erase the frames of the speaker silent for the longest time and give the channel to the newcomer. If that speaker comes back, give them their old label. On the joined meetings, where the first group never comes back, this is the best option: 17.9%. On the synthetic set, where everyone comes back, it stays at 38.8% even when an oracle says who came back. About 5 seconds of speech are lost at each return, the time for the model to open a channel for a voice it no longer remembers.</p>
<p><strong>Decoding twice.</strong> Run the model, cut out the audio of the speakers it found, and run it again on what is left. It is the recipe of the <a href="https://arxiv.org/abs/2106.10654">EEND-EDA paper</a>, which reports almost no gain with its own model. With Nemotron it reaches 23.2% on the joined meetings and 33.7% on the synthetic set, less than the two copies (22.7% and 32.4% on the whole synthetic set), and it cannot run in real time.</p>
</section>
<section id="at-1-second-of-latency" class="level2">
<h2 class="anchored" data-anchor-id="at-1-second-of-latency">At 1 second of latency</h2>
<p>The model also runs with 0.72 s chunks, for 1.04 s of latency. Nemotron alone scores the same as at 4.64 s, and the two copies still win on the joined meetings (27.4% to 24.2%) and on clean synthetic audio (32.4% to 13.2%), with smaller gains. On earnings calls they lose (21.5% to 24.3%), and in the noisy room too (44.1% to 47.6%). The likely reason is the arbitration. It decides chunk by chunk, so with 0.72 s chunks instead of 4 s it fires about 5 times as often on earnings calls (about 650 times per call against 125), each time on less audio. When copy B wins on a voice that belongs to copy A, A forgets a little of that voice, and after enough steps B owns it. On earnings calls this happens to the main speakers: 13% of the speech of the three most talkative people ends up on copy B, which counts as confusion.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="https://bruno-hays.github.io/posts/more-than-8-speakers-realtime/der_latency.png" class="img-fluid figure-img"></p>
<figcaption>Diarization error rate at 1.04 s and 4.64 s of latency, Nemotron alone and two copies.</figcaption>
</figure>
</div>
<p>I then tried a stricter rule: when both copies claim the same speech and copy A’s channel has already carried 30 s of speech, A keeps it. On earnings calls this removes the loss: 20.6% at 1.04 s, below Nemotron alone, and 18.4% at 4.64 s. On the joined meetings it changes nothing. On the clean synthetic recordings it gives back part of the gain (10.0% to 12.9% at 4.64 s): when copy A wrongly claims a late speaker’s speech on a channel it has held for long, it now keeps it. So the rule is a trade-off between recordings dominated by a few voices and recordings where everyone speaks as much. All the other results in this post use the default rule: the copy whose channel is more confident about that speech (higher average probability) keeps it.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="https://bruno-hays.github.io/posts/more-than-8-speakers-realtime/der_hold.png" class="img-fluid figure-img"></p>
<figcaption>Diarization error rate at 1.04 s and 4.64 s of latency, with the rule that lets copy A keep the voices it has carried for 30 s, against the default rule (the copy whose channel has the higher average probability keeps the speech).</figcaption>
</figure>
</div>


</section>

<div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">BibTeX citation:</div><div class="code-copy-outer-scaffold"><pre class="sourceCode quarto-appendix-bibtex code-with-copy"><code class="sourceCode bibtex">@online{hays2026,
  author = {Hays, Bruno},
  title = {You Can Stack {Nemotron} {Diarization} Models to Increase the
    Number of Speakers},
  date = {2026-11-29},
  url = {https://bruno-hays.github.io/posts/more-than-8-speakers-realtime/},
  langid = {en}
}
</code></pre></div><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-hays2026" class="csl-entry quarto-appendix-citeas">
Hays, Bruno. 2026. <span>“You Can Stack Nemotron Diarization Models to
Increase the Number of Speakers.”</span> November 29. <a href="https://bruno-hays.github.io/posts/more-than-8-speakers-realtime/">https://bruno-hays.github.io/posts/more-than-8-speakers-realtime/</a>.
</div></div></section></div> ]]></description>
  <guid>https://bruno-hays.github.io/posts/more-than-8-speakers-realtime/</guid>
  <pubDate>Sat, 28 Nov 2026 23:00:00 GMT</pubDate>
  <media:content url="https://bruno-hays.github.io/posts/more-than-8-speakers-realtime/der_three_sets.png" medium="image" type="image/png" height="63" width="144"/>
</item>
<item>
  <title>Audio embeddings forget the voice: recovering it from intermediate layers takes EmbeddingGemma-2 to rank 1 on MAEB</title>
  <dc:creator>Bruno Hays</dc:creator>
  <link>https://bruno-hays.github.io/posts/maeb-null-space-audio/</link>
  <description><![CDATA[ 





<p>Audio encoders aligned to text keep what was said and progressively throw away how it was said: the voice, the pitch, the emotion. That information is still there in their intermediate layers. To show it, I took <a href="https://huggingface.co/google/embeddinggemma-2">EmbeddingGemma-2</a> (577M parameters), which embeds text, images, video and audio in the same 768-dimensional space, and wrote features from two intermediate layers of its audio encoder into 256 dimensions that text never uses, without training a single weight.</p>
<p>On <a href="https://mteb-leaderboard.hf.space/benchmark/MAEB(v1)">MAEB</a>, the 30-task audio benchmark of the MTEB leaderboard, the score goes from 49.3% to 54.4%. That moves the model from rank 16 to rank 1 on the full benchmark (from 26 to 1 on the audio-only one), ahead of 7B to 9B multimodal models.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="https://bruno-hays.github.io/posts/maeb-null-space-audio/maeb_scores.png" class="img-fluid figure-img"></p>
<figcaption>MAEB macro average over 30 tasks: EmbeddingGemma-2 49.3%, e5-omni-7B 52.5%, LCO-Embedding-Omni-7B 53.5%, EmbeddingGemma-2 with the null-space head 54.4%.</figcaption>
</figure>
</div>
<p>The rank partly reflects the benchmark. MAEB averages many acoustic tasks on which semantic embedders score close to zero, so any acoustic signal brings large gains.</p>
<section id="semantics-aligned-audio-encoders-progressively-throw-away-paralinguistic-information" class="level2">
<h2 class="anchored" data-anchor-id="semantics-aligned-audio-encoders-progressively-throw-away-paralinguistic-information">Semantics-aligned audio encoders progressively throw away paralinguistic information</h2>
<p>An audio encoder aligned to a text LLM is trained to keep what was said. On MAEB, the LLM-backed embedders score 95 to 99% on multilingual text-to-audio retrieval, but only 1 to 6% on unsupervised audio clustering and around 20% on vocal emotion recognition. Voice, pitch, emotion and sound texture do not survive in the final layers.</p>
<p><a href="https://arxiv.org/abs/2603.08312">Bouziane, Mdhaffar and Estève</a> make the same point about speech encoders aligned only with semantic embeddings, whose paralinguistic information may be suppressed. Their work is what motivated this experiment.</p>
<p>The information survives in the earlier layers. Other encoders show it: different attributes (speaker, emotion, content) live at different depths (<a href="https://arxiv.org/abs/2107.04734">Pasad et al.</a>, <a href="https://arxiv.org/abs/2610.21941">Bouziane et al.</a>). I probed the 12 Conformer layers of EmbeddingGemma-2 one by one, and found the same:</p>
<ul>
<li><strong>Layer 2</strong> carries the speaker. Gender clustering on VoxPopuli goes from 0.05% at the final output to about 65%.</li>
<li><strong>Layer 6</strong> carries the emotion. Emotion classification on CREMA-D doubles, from 19.7% to 39.5%.</li>
</ul>
</section>
<section id="free-dimensions" class="level2">
<h2 class="anchored" data-anchor-id="free-dimensions">256 free dimensions</h2>
<p>The text backbone of EmbeddingGemma-2 works in 512 dimensions, and a final linear layer expands its output to 768. This is a strange characteristic of the model: a 512-dimensional signal is stretched into a 768-dimensional vector, so every text embedding only occupies a 512-dimensional slice of the space. The other 256 directions, which a simple matrix decomposition (an SVD) gives exactly, are never used by text.</p>
<p>That is what allows adding information for free in the final embedding. Anything written along those 256 directions has a zero dot product with every text embedding, so it cannot change how a text matches an audio clip or another text. Text embeddings receive nothing at all.</p>
</section>
<section id="zero-training" class="level2">
<h2 class="anchored" data-anchor-id="zero-training">Zero training</h2>
<ol type="1">
<li>Pool layer 2 (mean and standard deviation over time) and layer 6 (mean) of the audio encoder.</li>
<li>Reduce each to 128 dimensions with a PCA, softly whitened, and concatenate them into 256 dimensions.</li>
<li>Write this vector along the 256 free directions, add it to the usual embedding of the clip, then normalize.</li>
</ol>
<p>The PCA is fitted on 1,400 clips, 350 from each of four external datasets with clips capped at 10 seconds: <a href="https://huggingface.co/datasets/ylacombe/expresso">Expresso</a> (expressive speech), <a href="https://huggingface.co/datasets/agkphysics/AudioSet">AudioSet</a> (audio events), <a href="https://huggingface.co/datasets/lewtun/music_genres">music_genres</a> (music) and <a href="https://huggingface.co/datasets/ashraq/esc50">ESC-50</a> (environmental sounds). No MAEB audio is used. Text embeddings are bit-for-bit unchanged, and text-to-audio retrieval in 100+ languages stays within 0.3 points of the base model.</p>
</section>
<section id="results" class="level2">
<h2 class="anchored" data-anchor-id="results">Results</h2>
<p>Audio-to-audio tasks, which are the ones the base model fails, gain the most:</p>
<table class="caption-top table">
<thead>
<tr class="header">
<th>Task</th>
<th>Base</th>
<th>With the head</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Gender clustering (VoxPopuli)</td>
<td>0.05%</td>
<td>63.1%</td>
</tr>
<tr class="even">
<td>Gender classification (IEMOCAP)</td>
<td>66.4%</td>
<td>85.8%</td>
</tr>
<tr class="odd">
<td>Emotion classification (CREMA-D)</td>
<td>19.7%</td>
<td>40.2%</td>
</tr>
<tr class="even">
<td>Artist retrieval (Jamendo)</td>
<td>55.2%</td>
<td>93.8%</td>
</tr>
<tr class="odd">
<td>Environmental sounds (FSD2019)</td>
<td>38.8%</td>
<td>56.3%</td>
</tr>
<tr class="even">
<td>Music genre (GTZAN)</td>
<td>57.7%</td>
<td>71.5%</td>
</tr>
</tbody>
</table>
</section>
<section id="conclusion" class="level2">
<h2 class="anchored" data-anchor-id="conclusion">Conclusion</h2>
<p>This small experiment, with no training at all, belongs to a line of research that is already active: keeping several kinds of information in one speech encoder, as in Bouziane et al.&nbsp;(<a href="https://arxiv.org/abs/2603.08312">semantic and speaker</a>, <a href="https://arxiv.org/abs/2610.21941">multi-attribute distillation</a>). Here the idea is applied to a recent and very strong embedding model. It shows how much information a semantics-aligned audio encoder throws away in its final layers, and how easily the intermediate layers give it back.</p>
</section>
<section id="limits" class="level2">
<h2 class="anchored" data-anchor-id="limits">Limits</h2>
<ul>
<li><strong>The numbers are optimistic.</strong> I chose the layers, the whitening and the strength of the injection by looking at the test scores, over a small grid. The PCA itself never saw MAEB, but the choice of configuration did.</li>
<li><strong>Some tasks get worse.</strong> Spoken topic classification (SIBFLEURS) falls from 57.2% to 21.3%, spoken intent (MInDS14) from 97.6% to 88.3%, and spoken question answering (NMSQA) from 98.1% to 78.7%. The head adds noise for these tasks, which was expected given how crude the method is.</li>
<li><strong>No Matryoshka truncation for audio.</strong> EmbeddingGemma-2 is trained so that its embedding can be cut to its first 512, 256 or 128 dimensions, for cheaper storage and search. The added acoustic part is spread over all 768 coordinates and only stays separate from the text directions when it is complete. Truncated audio embeddings would lose part of it, so audio needs all 768 dimensions.</li>
</ul>
<p>The model is on Hugging Face as <a href="https://huggingface.co/BrunoHays/embeddinggemma-2-nullspace-audio">BrunoHays/embeddinggemma-2-nullspace-audio</a>, with the per-task results for all 30 tasks. The official ranking is on the <a href="https://mteb-leaderboard.hf.space/benchmark/MAEB(v1)">MAEB leaderboard</a>.</p>


</section>

<div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">BibTeX citation:</div><div class="code-copy-outer-scaffold"><pre class="sourceCode quarto-appendix-bibtex code-with-copy"><code class="sourceCode bibtex">@online{hays2026,
  author = {Hays, Bruno},
  title = {Audio Embeddings Forget the Voice: Recovering It from
    Intermediate Layers Takes {EmbeddingGemma-2} to Rank 1 on {MAEB}},
  date = {2026-11-12},
  url = {https://bruno-hays.github.io/posts/maeb-null-space-audio/},
  langid = {en}
}
</code></pre></div><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-hays2026" class="csl-entry quarto-appendix-citeas">
Hays, Bruno. 2026. <span>“Audio Embeddings Forget the Voice: Recovering
It from Intermediate Layers Takes EmbeddingGemma-2 to Rank 1 on
MAEB.”</span> November 12. <a href="https://bruno-hays.github.io/posts/maeb-null-space-audio/">https://bruno-hays.github.io/posts/maeb-null-space-audio/</a>.
</div></div></section></div> ]]></description>
  <guid>https://bruno-hays.github.io/posts/maeb-null-space-audio/</guid>
  <pubDate>Wed, 11 Nov 2026 23:00:00 GMT</pubDate>
  <media:content url="https://bruno-hays.github.io/posts/maeb-null-space-audio/thumbnail.png" medium="image" type="image/png" height="57" width="144"/>
</item>
<item>
  <title>Cutting Qwen3-ASR-1.7B’s phone-number errors by 25% with minimal forgetting</title>
  <dc:creator>Bruno Hays</dc:creator>
  <link>https://bruno-hays.github.io/posts/qwen3-asr-phone-numbers/</link>
  <description><![CDATA[ 





<p>On real phone calls in seven languages, Qwen3-ASR-1.7B gets 29% of the phone numbers wrong, against 23% for AssemblyAI and 21% for ElevenLabs.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="https://bruno-hays.github.io/posts/qwen3-asr-phone-numbers/phone_error.png" class="img-fluid figure-img"></p>
<figcaption>Phone numbers transcribed wrongly on real calls in seven languages: Qwen3-ASR-1.7B 29%, Deepgram 26%, AssemblyAI 23%, ElevenLabs 21%, fine-tuned Qwen3-ASR-1.7B 20%.</figcaption>
</figure>
</div>
<p>This post is about closing that gap. The main challenge was improving digit recognition <strong>without degrading everyday speech transcription</strong>. Two attempts with reinforcement learning were unsuccessful. What worked is a masked supervised fine-tuning (SFT) on corrected transcripts, followed by a re-distillation of the original model. I end with a model that is on par with ElevenLabs on phone numbers and on par with the original model on everyday word error rate (WER).</p>
<section id="data-and-metric" class="level2">
<h2 class="anchored" data-anchor-id="data-and-metric">Data and metric</h2>
<p><strong>Test set.</strong> We sifted millions of transcriptions of real calls, used with user consent for model improvement, to curate calls that contain at least one phone number, each with 30 seconds to a minute of audio around it. The calls were transcribed by humans. The set holds about 425 clips in seven languages.</p>
<p><strong>Metric.</strong> WER is the wrong tool here: one wrong digit makes a number useless. Moreover, real calls are messy: people get interrupted while spelling, repeat parts and correct themselves. So an LLM (Gemini 2.5 Flash) extracts the phone numbers from the transcript. The score is binary: a number is either exactly the reference or wrong.</p>
<p><strong>Forgetting.</strong> To measure forgetting, we track WER on dozens of public and internal datasets, in the same seven languages.</p>
<p><strong>Training data.</strong> It comes from the same real calls, and every call of the test set is excluded. A named entity recognition (NER) model found the phone numbers, and the audio was cut into short clips around them. The pseudo annotations differ across the experiments below.</p>
</section>
<section id="first-attempts-with-rl" class="level2">
<h2 class="anchored" data-anchor-id="first-attempts-with-rl">First attempts with RL</h2>
<p>I started with reinforcement learning for two reasons. First, GRPO (Group Relative Policy Optimization) has been shown to improve WER (<a href="https://arxiv.org/abs/2509.01939">Shivakumar et al.</a>), and to make the decoder rely more on the audio: <a href="https://arxiv.org/abs/2607.08409">Kumar et al.</a> find that it keeps attention anchored to the audio and cuts insertions, which suits digits that are spelled out. Second, RL is known to forget less than SFT, because it only trains on the model’s own samples and mostly reshapes behaviour the model already has, whereas SFT pulls the model towards the training data (see <a href="https://nrehiew.github.io/blog/sft_rl_opd/">this post</a> for a good discussion). Forgetting being the main constraint, this looked like the right tool.</p>
<section id="attempt-1-rl-against-elevenlabs-transcripts" class="level3">
<h3 class="anchored" data-anchor-id="attempt-1-rl-against-elevenlabs-transcripts">Attempt 1: RL against ElevenLabs transcripts</h3>
<p>The first idea was to use ElevenLabs as the teacher: GRPO with the whole-clip WER against its transcripts as the reward, on about 11,000 clips of 7 to 11 seconds.</p>
<p>It worked on the reward: the WER against ElevenLabs on a dev set fell from 44% to 31%. It did not work on the goal. <strong>The model learned ElevenLabs’ style while its digits stayed the same</strong>: phone errors went from 29.1% to 29.0%. A whole-clip reward is dominated by the hundreds of tokens that are not digits, so that is what the policy optimizes. On the plus side, nothing was forgotten (English WER on the generalist set went from 7.6% to 7.7%).</p>
</section>
<section id="attempt-2-rl-with-a-reward-that-targets-digits" class="level3">
<h3 class="anchored" data-anchor-id="attempt-2-rl-with-a-reward-that-targets-digits">Attempt 2: RL with a reward that targets digits</h3>
<p>So I made the reward about the digits: the whole-clip term plus a term on the character error rate of the phone-number spans, found with an NER model, and with advantages normalized per term so the dense WER term could not drown the sparse digit one. The reference was now the ElevenLabs transcript corrected by Gemini.</p>
<p>Before launching, I measured what this reward could do:</p>
<ul>
<li>Against an LLM judge, it ranked pairs of hypotheses correctly about two thirds of the time. Noisy, but usable.</li>
<li>Offline, the base model gets an exact number in 12% of its samples at k=1 and in 35% of the prompts when taking the best of 32. A small headroom, but a seemingly usable one.</li>
</ul>
<p>The run stayed flat, with phone errors at 31.2% before and after. The best-of-32 figure explains why: it means that for about two thirds of the prompts, none of the 32 samples is correct, and those prompts give no gradient. An overfit test on 8 prompts confirmed it: even with 32 samples per prompt, <strong>6 of 8 prompts never produced a single correct number</strong>. The headroom was concentrated on a third of the prompts, too thin to learn from at this small scale.</p>
<p>The sharper way to see it: plain SFT on the same kind of data reached 40% exact numbers in greedy decoding, above the best of 32 samples from the base model (35%). This means we need to go beyond sharpening the model and expand its capabilities, and that is where SFT comes in.</p>
</section>
</section>
<section id="masked-splice-sft" class="level2">
<h2 class="anchored" data-anchor-id="masked-splice-sft">Masked splice-SFT</h2>
<p>The RL rollouts were not informative enough: the model rarely produced a correct number, so there was not enough to reinforce. The distribution of the model itself had to change, and that takes SFT. The challenge is that naive SFT rewrites the whole sentence, which is where forgetting comes from. The recipe that worked:</p>
<ol type="1">
<li><strong>Hard pool.</strong> Out of about 90,000 clips cut from our training set, we kept the 55,000 where Qwen3-ASR and ElevenLabs disagree on the number.</li>
<li><strong>Target.</strong> Qwen3-ASR’s own transcript, in which Gemini 3.8 Flash, listening to the audio, fixed only the phone-number spans. This teacher reaches 19.8% phone errors on the test set, on par with ElevenLabs, which is why it makes a good target.</li>
<li><strong>Masked loss.</strong> Only the tokens of the fixed spans are trained on.</li>
</ol>
<p>The targets are near on-policy, so there is almost nothing to learn outside the spans.</p>
<p>I then tried three variants, all evaluated on phone errors and everyday WER:</p>
<ul>
<li><strong>Decoder LoRA only.</strong> Phone errors fall from 28.0% to 23.4%, and everyday WER stays flat. It plateaued there whatever I changed: the encoder is what hears the digits.</li>
<li><strong>Decoder + audio-encoder LoRA.</strong> Phone errors fall to 21.1%, but everyday WER rises to 19.4%, with repetition loops on some languages.</li>
<li><strong>Decoder + encoder, then re-distillation.</strong> The encoder LoRA brings the phone-number gains but damages everyday transcription. To repair it, a second short stage (300 steps) starts from that model and freezes the audio LoRA, so the gains are kept. It trains only the decoder LoRA to imitate the original model on 8,000 real clips (100 hours) that contain no numbers: a KL divergence loss pulls its output, token by token, towards the output of the original model run on the same clip. Phone errors stay at 20.9% and everyday WER is back to 16.2%. Doing the same thing during the number training instead froze the gains at 25.1%.</li>
</ul>
</section>
<section id="results" class="level2">
<h2 class="anchored" data-anchor-id="results">Results</h2>
<table class="caption-top table">
<colgroup>
<col style="width: 33%">
<col style="width: 33%">
<col style="width: 33%">
</colgroup>
<thead>
<tr class="header">
<th>Phone-number test set</th>
<th>Phone errors</th>
<th>Everyday WER (internal datasets)</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Qwen3-ASR-1.7B (original)</td>
<td>28.0%</td>
<td>16.6%</td>
</tr>
<tr class="even">
<td>ElevenLabs</td>
<td>20.7%</td>
<td></td>
</tr>
<tr class="odd">
<td>Gemini 3.8 Flash, fixing the transcript with the audio</td>
<td>19.8%</td>
<td></td>
</tr>
<tr class="even">
<td>SFT, decoder only</td>
<td>23.4%</td>
<td>16.8%</td>
</tr>
<tr class="odd">
<td>SFT, decoder + audio encoder</td>
<td>21.1%</td>
<td>19.4%</td>
</tr>
<tr class="even">
<td><strong>SFT, decoder + audio encoder + re-distillation</strong></td>
<td><strong>20.9%</strong></td>
<td><strong>16.2%</strong></td>
</tr>
</tbody>
</table>
<p>The final model is on par with ElevenLabs on phone numbers and with the original model on everyday WER. In the end RL was not even needed: the recipe that works contains none.</p>
<p>On our full test suite, which comprises more than 40 public and internal datasets in the seven languages, the final model is flat overall. WER per language, original model vs final model:</p>
<table class="caption-top table">
<colgroup>
<col style="width: 20%">
<col style="width: 20%">
<col style="width: 20%">
<col style="width: 20%">
<col style="width: 20%">
</colgroup>
<thead>
<tr class="header">
<th>Language</th>
<th>Public, original</th>
<th>Public, final</th>
<th>Internal, original</th>
<th>Internal, final</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>English</td>
<td>5.9%</td>
<td>6.0%</td>
<td>7.6%</td>
<td>7.8%</td>
</tr>
<tr class="even">
<td>French</td>
<td>11.2%</td>
<td>11.2%</td>
<td>16.4%</td>
<td>16.2%</td>
</tr>
<tr class="odd">
<td>Italian</td>
<td>7.9%</td>
<td>8.1%</td>
<td>18.3%</td>
<td>18.4%</td>
</tr>
<tr class="even">
<td>Spanish</td>
<td>4.6%</td>
<td>4.8%</td>
<td>12.7%</td>
<td>12.9%</td>
</tr>
<tr class="odd">
<td>German</td>
<td>7.7%</td>
<td>8.0%</td>
<td>16.0%</td>
<td>16.1%</td>
</tr>
<tr class="even">
<td>Portuguese</td>
<td>8.3%</td>
<td>8.7%</td>
<td>16.8%</td>
<td>16.9%</td>
</tr>
<tr class="odd">
<td>Dutch</td>
<td>9.1%</td>
<td>9.6%</td>
<td>28.1%</td>
<td>25.3%</td>
</tr>
<tr class="even">
<td><strong>Average, 7 languages</strong></td>
<td><strong>7.8%</strong></td>
<td><strong>8.1%</strong></td>
<td><strong>16.6%</strong></td>
<td><strong>16.2%</strong></td>
</tr>
<tr class="odd">
<td>Russian (not in training)</td>
<td>5.2%</td>
<td>5.2%</td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<p>The degradation is very small, at most 0.5 points per language on the public datasets. Russian was not part of the training and does not move at all, which shows the model did not forget outside the languages it was trained on.</p>


</section>

<div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">BibTeX citation:</div><div class="code-copy-outer-scaffold"><pre class="sourceCode quarto-appendix-bibtex code-with-copy"><code class="sourceCode bibtex">@online{hays2026,
  author = {Hays, Bruno},
  title = {Cutting {Qwen3-ASR-1.7B’s} Phone-Number Errors by 25\% with
    Minimal Forgetting},
  date = {2026-10-26},
  url = {https://bruno-hays.github.io/posts/qwen3-asr-phone-numbers/},
  langid = {en}
}
</code></pre></div><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-hays2026" class="csl-entry quarto-appendix-citeas">
Hays, Bruno. 2026. <span>“Cutting Qwen3-ASR-1.7B’s Phone-Number Errors
by 25% with Minimal Forgetting.”</span> October 26. <a href="https://bruno-hays.github.io/posts/qwen3-asr-phone-numbers/">https://bruno-hays.github.io/posts/qwen3-asr-phone-numbers/</a>.
</div></div></section></div> ]]></description>
  <guid>https://bruno-hays.github.io/posts/qwen3-asr-phone-numbers/</guid>
  <pubDate>Sun, 25 Oct 2026 23:00:00 GMT</pubDate>
</item>
<item>
  <title>How to fix dictated email addresses lost in real transcripts, at the cost of a few tokens per address</title>
  <dc:creator>Bruno Hays</dc:creator>
  <link>https://bruno-hays.github.io/posts/email-reconstruction-cascade/</link>
  <description><![CDATA[ 





<p>On phone calls, people dictate their email address the way they would to another person: they spell it, correct themselves, give digits and separators as words. A speech recognizer returns the words it heard, and turning them into an address is a separate problem.</p>
<table class="caption-top table">
<colgroup>
<col style="width: 50%">
<col style="width: 50%">
</colgroup>
<thead>
<tr class="header">
<th>What the caller says</th>
<th>What the customer wants</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>“jeanne tiret du 8 dupont, d u p o n d, arobase gmail point com”</td>
<td><code>jeanne_dupond@gmail.com</code></td>
</tr>
<tr class="even">
<td>“it’s m i c h e l l e at hotmail dot com”</td>
<td><code>michelle@hotmail.com</code></td>
</tr>
<tr class="odd">
<td>“john dot smith at yahoo, no sorry, gmail dot com”</td>
<td><code>john.smith@gmail.com</code></td>
</tr>
<tr class="even">
<td>“michel with two l, at hotmail dot com”</td>
<td><code>michelle@hotmail.com</code></td>
</tr>
<tr class="odd">
<td>“yes that’s still the same one, sarah at the company”</td>
<td>not recoverable</td>
</tr>
</tbody>
</table>
<p>About half of the real calls fall in that last category: the address cannot be recovered from the transcript. On the recoverable ones, a simple regexp on the transcript, which is what a client would naturally try, recovers around half. This post is about getting to roughly the accuracy of a large LLM reading the same transcript, at a cost small enough to run in production.</p>
<section id="two-ways-to-extract-the-address" class="level2">
<h2 class="anchored" data-anchor-id="two-ways-to-extract-the-address">Two ways to extract the address</h2>
<p>We worked with Qwen3-ASR-1.7B. There are two ways to turn its transcript into an address:</p>
<ul>
<li><strong>A regexp.</strong> Cheap and instant, but it only finds addresses the ASR already wrote as <code>x@y.z</code>. Spelled letters, spoken separators, corrections and mnemonics all break it.</li>
<li><strong>A large LLM</strong> that reads the transcript, understands the quirks and reconstructs the address. It works much better, and it is too expensive to run on every utterance of every call.</li>
</ul>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="https://bruno-hays.github.io/posts/email-reconstruction-cascade/oob_accuracy.png" class="img-fluid figure-img"></p>
<figcaption>Exact-match accuracy on dictated email addresses: the regexp and the paid ASR APIs reach 24 to 35%, the cascade 42% and the large LLM 45%.</figcaption>
</figure>
</div>
<p>The large LLM gets 45%. That is <strong>what we are trying to match</strong>, and it is close to the best that reading the transcript can do. It is not 100% because a large part of the calls are ambiguous. Often the speaker is only confirming an address the other person already has, as in the last example, or the domain name of a company is spelled in a way no model can guess. Neither the ASR nor a human annotator has the context to know the exact address.</p>
<p>The goal was therefore to get as close as possible to the large LLM at the lowest possible cost. The cascade below recovers 42%, which is 16 of the 19 points between the regexp and the ceiling, and runs the LLM on only 4% of the traffic, when about 2% of it actually contains an email.</p>
</section>
<section id="the-data" class="level2">
<h2 class="anchored" data-anchor-id="the-data">The data</h2>
<ul>
<li><strong>Source.</strong> We sifted millions of transcriptions of real calls, used with user consent for model improvement, to find calls where an email is spelled out. Each sample holds at least one dictated address, with 30 seconds to a minute of audio around it.</li>
<li><strong>Test set.</strong> 576 calls in six languages (French, English, Spanish, German, Portuguese, Italian), each with a human annotation of the exact address.</li>
<li><strong>Training targets.</strong> About 11,000 real transcripts with a dictated address, disjoint from the test set, with pseudo annotations: the address is produced by Kimi K3. For the reconstructor we keep the roughly 4,000 where Gemini 3.7 Flash produces the same address.</li>
<li><strong>Filter test set.</strong> 10,000 random calls, representative of the traffic, of which about 200 contain a dictated address. It is only used to measure the precision and recall of the cheap filters.</li>
<li><strong>Metric.</strong> Exact match after lowercasing.</li>
</ul>
</section>
<section id="making-the-llm-affordable-a-cascade" class="level2">
<h2 class="anchored" data-anchor-id="making-the-llm-affordable-a-cascade">Making the LLM affordable: a cascade</h2>
<p>Each stage is far cheaper than the next and tuned for recall, so an address is not lost on the way.</p>
<pre><code>100%  of transcripts
  80% stop at the regexp: no email cue
  20% go to the NER tagger
        16% stop at the decision rule
         4% reach the LLM</code></pre>
<p><strong>1. Regexp pre-gate.</strong> It looks for a domain, an “at” word, an <code>@</code> or a “dot” word in several languages. On the filter test set it keeps 96% of the real addresses and sends only 20% of transcripts onward.</p>
<p><strong>2. NER tagger.</strong> A multilingual mDeBERTa-v3 model types every fragment of the transcript with 14 labels: local part, <code>@</code>, provider, TLD, spelled letter, phonetic mnemonic (“a wie Anton”), digits, separator, self-correction, and so on.</p>
<p>A simple rule on the predicted tags decides whether an address is really being dictated. On the same filter test set it keeps every address and lets only 4% of transcripts through to the LLM.</p>
<p><strong>3. Crop.</strong> Thanks to the tags, the LLM can focus on the part of the call that contains the email: it only sees the tagged region and a few words around it. A 1,000-word call becomes about 30 words, which shrinks the prompt and the prefill time of every LLM call. When two addresses are far apart, the transcript is split and each part is processed separately. About 9% of calls contain two addresses, which a classifier detects before the LLM.</p>
<p><strong>4. LLM reconstructor.</strong> It assembles the address from the cropped text and the typed fragments.</p>
<section id="training-the-tagger" class="level3">
<h3 class="anchored" data-anchor-id="training-the-tagger">Training the tagger</h3>
<p>The tagger is trained on the training targets above. Kimi K3 gets the transcript and the address, and marks which words produce each part of it; the marks become token labels. The first versions raised false alarms on website URLs, so we re-tagged the training set with a <code>WEBSITE</code> label (about 1,000 spans) to keep them out of the address. We then added a few hundred real transcripts that mention an email without giving an address, left untagged, as negatives. Together they <strong>cut the false-positive rate from 22% to 2%</strong>, a bigger gain than anything else we tried. The final tagger reaches a span F1 of 0.78 against the pseudo annotations.</p>
</section>
</section>
<section id="choosing-the-reconstructor" class="level2">
<h2 class="anchored" data-anchor-id="choosing-the-reconstructor">Choosing the reconstructor</h2>
<p>We compared nine models without fine-tuning (a selection is shown), all given the same cropped text and the tags predicted by the NER tagger, on exact match against the human annotation.</p>
<table class="caption-top table">
<thead>
<tr class="header">
<th>Model</th>
<th>Exact match</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Qwen3.5 0.8B</td>
<td>12%</td>
</tr>
<tr class="even">
<td>Qwen3.5 2B</td>
<td>28%</td>
</tr>
<tr class="odd">
<td>Qwen3.5 4B</td>
<td>35%</td>
</tr>
<tr class="even">
<td>Gemma3 12B</td>
<td>37%</td>
</tr>
<tr class="odd">
<td>Qwen3.5 9B</td>
<td>40%</td>
</tr>
<tr class="even">
<td>Qwen3.8 27B</td>
<td>43%</td>
</tr>
<tr class="odd">
<td>Kimi K3 (the target)</td>
<td>45%</td>
</tr>
</tbody>
</table>
<p>Accuracy climbs with size up to about 9B and then flattens. Fine-tuning small models brought little, and could even hurt, so we stayed with prompting. Our baseline prompts were optimized with DSPy’s MIPROv2, which tunes the instruction and the few-shot demonstrations, on 200 balanced multilingual examples (40 per language) scored against the pseudo annotations.</p>
<section id="the-smallest-model-that-works-is-not-the-cheapest" class="level3">
<h3 class="anchored" data-anchor-id="the-smallest-model-that-works-is-not-the-cheapest">The smallest model that works is not the cheapest</h3>
<p>The obvious pick is the smallest model that is accurate enough. That was our initial choice: a 9B model that reasons in a chain of thought. It wrote about 565 tokens per call, and sometimes ran out before reaching the answer. Output tokens dominate the cost and latency of a call, so we compared the options in accuracy and in tokens:</p>
<table class="caption-top table">
<colgroup>
<col style="width: 33%">
<col style="width: 33%">
<col style="width: 33%">
</colgroup>
<thead>
<tr class="header">
<th>Reconstructor</th>
<th>Exact match</th>
<th>Tokens per call</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Kimi K3 (the target)</td>
<td>45%</td>
<td>167</td>
</tr>
<tr class="even">
<td>9B, chain of thought</td>
<td>39%</td>
<td>565</td>
</tr>
<tr class="odd">
<td>27B, rules only, no reasoning</td>
<td>35%</td>
<td>12</td>
</tr>
<tr class="even">
<td>27B, rules only, native reasoning</td>
<td>41%</td>
<td>450</td>
</tr>
<tr class="odd">
<td>27B, chain-of-thought prompt with harvested reasoning, native thinking off</td>
<td>43%</td>
<td>245</td>
</tr>
<tr class="even">
<td>27B, answer-first prompt, native thinking off</td>
<td>42%</td>
<td>12</td>
</tr>
</tbody>
</table>
<p>With the right prompt, a 27B model is more accurate than the 9B and writes about 45 times fewer output tokens. The next section shows how we got there.</p>
</section>
<section id="teaching-the-model-to-reason-without-paying-for-it" class="level3">
<h3 class="anchored" data-anchor-id="teaching-the-model-to-reason-without-paying-for-it">Teaching the model to reason without paying for it</h3>
<p><strong>Step 0: rules only.</strong> The prompt is a list of decoding rules and an instruction to output only the address:</p>
<pre><code>Reconstruct the EXACT email address dictated in an ASR phone transcript,
using the typed NER spans. Apply these rules in order:
1. SPELLED LETTERS OVERRIDE: a spelled sequence ("d u p o n d") gives the exact
   letters and REPLACES the spoken word it clarifies.
3. DOUBLING: "with two l" doubles that letter, or confirms it is already double.
4. KEYBOARD IDIOMS: "tiret du 8" -&gt; '_'. NEVER keep the digit.
5. NO CONVENTION DOT: join name parts with no separator unless a separator word
   is spoken. A '.' only when a dot-word is said.
...
Output the final lowercase email address.</code></pre>
<p>Without reasoning, the model scores only 35%: it is fragile on a few dictation conventions:</p>
<ul>
<li>a spelled name overrides the spoken one (“dupont… d u p o n d” gives <code>dupond</code>)</li>
<li>“tiret du 8” means the underscore key</li>
<li>“michel with two l” implies a trailing e: <code>michelle</code></li>
<li>separators: models invent a dot between first and last name, or drop one that was spoken</li>
</ul>
<p><strong>Native thinking handles them and brings accuracy to 41%, but it costs 450 tokens per call.</strong></p>
<p><strong>Step 1: harvest the reasoning.</strong> We wrote 8 short dictations by hand, each exercising one of these idioms (spelled override, mnemonic letter, doubling, keyboard idiom, concatenation), ran the model on them with native thinking on, and kept only the reasoning traces that led to the correct address. Because they come from the model itself, the reasoning matches its own style. The prompt changes in two places: the instruction now asks for a short reasoning before the address, and the harvested traces are added as few-shot demonstrations of a classic chain of thought. <strong>Native thinking is switched off:</strong></p>
<pre><code>Transcript: c est dupont épelé d u p o n d arobase gmail point com
NER spans: LOCAL=dupont épelé | SPELLING=d u p o n d | AT=arobase | PROVIDER=gmail | SEP=point | TLD=com

reasoning: "dupont épelé d u p o n d": by rule 1 the spelling overrides the spoken
word, so the local part is "dupond". "arobase" -&gt; @, "point" -&gt; '.'.
email: dupond@gmail.com</code></pre>
<p>Accuracy went up to 43% and the output fell from 450 to 245 tokens.</p>
<p><strong>Step 2: answer first.</strong> The demonstrations keep the same harvested reasoning, but the order is inverted, and the instruction changes accordingly:</p>
<pre><code>FIRST output the final lowercase email address, THEN on the next line write
'reason:' followed by a brief reason.</code></pre>
<pre><code>dupond@gmail.com
reason: "dupont épelé d u p o n d": by rule 1 the spelling overrides the spoken
word, so the local part is "dupond". "arobase" -&gt; @, "point" -&gt; '.'.</code></pre>
<p>At inference the model writes the address first and generation is stopped right after it, so the reason is never generated. It only lives in the prompt, where it teaches the rule by example. That removes the thinking tokens: only the 12 tokens of the address remain, for a one-point loss in accuracy, and the hard idioms stay stable.</p>
<p><strong>LLM-based reconstruction limitation.</strong> LLMs read tokens, not letters, which is why they famously cannot count the “r” in strawberry. The same blind spot limits how well they fix a spelling, for instance deciding that “Remi” is written with a Y. With real reasoning a model can work around it by first writing the word letter by letter, and native thinking does this to some extent. Our answer-first prompt gives up that step, and we observed it is significantly worse on these cases. We deemed the balance to be in favour of the no-thinking version: such samples are rare in our real data, and even with thinking on the model is far from perfect.</p>
</section>
</section>
<section id="results" class="level2">
<h2 class="anchored" data-anchor-id="results">Results</h2>
<p>End to end, with the NER predicting its own tags, exact match against the human annotation on the 576 calls:</p>
<table class="caption-top table">
<thead>
<tr class="header">
<th>Language</th>
<th>Regexp</th>
<th>Our cascade</th>
<th>Kimi K3 (target)</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>French</td>
<td>10%</td>
<td>38%</td>
<td>41%</td>
</tr>
<tr class="even">
<td>German</td>
<td>17%</td>
<td>38%</td>
<td>41%</td>
</tr>
<tr class="odd">
<td>Spanish</td>
<td>26%</td>
<td>37%</td>
<td>40%</td>
</tr>
<tr class="even">
<td>Portuguese</td>
<td>31%</td>
<td>39%</td>
<td>42%</td>
</tr>
<tr class="odd">
<td>Italian</td>
<td>32%</td>
<td>47%</td>
<td>50%</td>
</tr>
<tr class="even">
<td>English</td>
<td>51%</td>
<td>60%</td>
<td>63%</td>
</tr>
<tr class="odd">
<td><strong>All</strong></td>
<td><strong>26%</strong></td>
<td><strong>42%</strong></td>
<td><strong>45%</strong></td>
</tr>
</tbody>
</table>
<p>The cascade is 16 points above the regexp and 3 below the target. The gain is largest where spelling conventions are hardest and a regexp does worst: French goes from 10% to 38%.</p>
</section>
<section id="inline-replacement" class="level2">
<h2 class="anchored" data-anchor-id="inline-replacement">Inline replacement</h2>
<p>Because the tagger gives the position of every fragment, the reconstructed address replaces only the dictated words in the transcript, and the rest of the call is untouched. On calls without any email (averaging 10 minutes), the change in word error rate is 0.003%, and only 0.1% of them get a wrong replacement. On calls with an email, the spelled fragments, about 4 words at the median, collapse into one address token.</p>


</section>

<div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">BibTeX citation:</div><div class="code-copy-outer-scaffold"><pre class="sourceCode quarto-appendix-bibtex code-with-copy"><code class="sourceCode bibtex">@online{hays2026,
  author = {Hays, Bruno},
  title = {How to Fix Dictated Email Addresses Lost in Real Transcripts,
    at the Cost of a Few Tokens Per Address},
  date = {2026-08-20},
  url = {https://bruno-hays.github.io/posts/email-reconstruction-cascade/},
  langid = {en}
}
</code></pre></div><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-hays2026" class="csl-entry quarto-appendix-citeas">
Hays, Bruno. 2026. <span>“How to Fix Dictated Email Addresses Lost in
Real Transcripts, at the Cost of a Few Tokens Per Address.”</span>
August 20. <a href="https://bruno-hays.github.io/posts/email-reconstruction-cascade/">https://bruno-hays.github.io/posts/email-reconstruction-cascade/</a>.
</div></div></section></div> ]]></description>
  <guid>https://bruno-hays.github.io/posts/email-reconstruction-cascade/</guid>
  <pubDate>Wed, 19 Aug 2026 22:00:00 GMT</pubDate>
</item>
<item>
  <title>Real-time multilingual ASR: route between small models</title>
  <dc:creator>Bruno Hays</dc:creator>
  <link>https://bruno-hays.github.io/posts/realtime-multilingual-asr-router/</link>
  <description><![CDATA[ 





<p>Real-time speech recognition struggles with language switches. After a switch, models tend to produce gibberish until they register the new language, translate instead of transcribing, or drop whole passages. The usual fix is a bigger multilingual model, but every added language pushes it further out of reach of CPU-only deployments.</p>
<p>This is a small proof of concept that goes the other way: <strong>route between small monolingual streaming models</strong> and let a coordinator deal with the switches. Code: <a href="https://github.com/gladiaio/realtime-multilingual-asr-router">realtime-multilingual-asr-router</a>.</p>
<p>Demo video: <a href="https://www.youtube.com/watch?v=zNds-EIDwWo">watch the walkthrough</a>, with the live demo at <a href="https://www.youtube.com/watch?v=zNds-EIDwWo&amp;t=190s">3:10</a>.</p>
<section id="architecture" class="level2">
<h2 class="anchored" data-anchor-id="architecture">Architecture</h2>
<p>Three open-source pieces, all lightweight and built to run on edge devices:</p>
<ul>
<li><strong>Streaming ASR</strong>: Zipformer transducers of about 100M parameters each. The models come from <a href="https://huggingface.co/Banafo/Kroko-ASR/tree/main">KrokoAI</a> for en/fr/es/de/it/pt/nl, plus a Vosk-based model for Russian, all run through sherpa-onnx.</li>
<li><strong>VAD</strong>: Silero, to find speech boundaries.</li>
<li><strong>Language ID (LID)</strong>: SpeechBrain ECAPA-TDNN (VoxLingua107), also small and CPU-friendly.</li>
</ul>
<p>Because every component is that light, this is a way to get multilingual real-time transcription on edge hardware, with no GPU and no large model to fit in memory.</p>
<p>The coordinator keeps the audio buffered, watches boundaries, and can re-run a segment when the language changes.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="https://raw.githubusercontent.com/gladiaio/realtime-multilingual-asr-router/main/assets/01_baseline_black_frame.svg" class="img-fluid figure-img"></p>
<figcaption>Architecture of the router: streaming ASR models, VAD, language ID and the coordinator that keeps the audio buffered.</figcaption>
</figure>
</div>
</section>
<section id="rollback" class="level2">
<h2 class="anchored" data-anchor-id="rollback">Rollback</h2>
<ol type="1">
<li>Audio goes straight to the current ASR model. We never wait for language ID before showing text.</li>
<li>In the background, LID runs on growing windows of audio since the last VAD boundary.</li>
<li>If the detected language differs from the current one and confidence crosses a threshold, swap the ASR model, <strong>roll back to the last VAD boundary</strong>, and re-infer the buffered audio.</li>
<li>After a set duration of silence, emit a final, always produced by the right model.</li>
</ol>
<p>The price is a few wrong-language partials that get replaced within moments. Finals have clean language boundaries. Rollback is cheap because the models are tiny and the buffer never spans more than one segment.</p>
</section>
<section id="results" class="level2">
<h2 class="anchored" data-anchor-id="results">Results</h2>
<p>The table shows word error rate in percent, so lower is better. Deepgram and ElevenLabs are mature production cloud APIs. The only open alternative I compared against is Voxtral Mini 4B Realtime, which has about 40 times more parameters than the models used here.</p>
<table class="caption-top table">
<colgroup>
<col style="width: 20%">
<col style="width: 20%">
<col style="width: 20%">
<col style="width: 20%">
<col style="width: 20%">
</colgroup>
<thead>
<tr class="header">
<th></th>
<th>Voxtral Mini 4B</th>
<th>Deepgram Nova-3</th>
<th>ElevenLabs Scribe v2</th>
<th>This work</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Monolingual (FLEURS, avg)</td>
<td>6.5</td>
<td>9.7</td>
<td>4.4</td>
<td>9.8</td>
</tr>
<tr class="even">
<td>Code-switching between utterances</td>
<td>21.3</td>
<td>14.3</td>
<td>13.6</td>
<td><strong>13.2</strong></td>
</tr>
<tr class="odd">
<td>Code-switching inside an utterance (Miami)</td>
<td>76.3</td>
<td>28.6</td>
<td>26.5</td>
<td>41.0</td>
</tr>
</tbody>
</table>
<p>On monolingual speech, ElevenLabs and Voxtral are stronger and Deepgram is on par, which is what to expect from models of about 100M parameters. On switches <em>between</em> utterances, the router is ahead of every system tested, because it transcribes each side with its own specialist model and re-runs a segment as soon as the language changes.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="https://raw.githubusercontent.com/gladiaio/realtime-multilingual-asr-router/main/assets/code-switching.png" class="img-fluid figure-img"></p>
<figcaption>Word error rate on code-switching test sets for the router and the compared systems.</figcaption>
</figure>
</div>
</section>
<section id="where-it-breaks" class="level2">
<h2 class="anchored" data-anchor-id="where-it-breaks">Where it breaks</h2>
<p>Language switches inside a sentence, like Spanglish, happen faster than the VAD can find a boundary. Rollback rarely fires, so the wrong model is often used, which explains the 41% above. That is still far ahead of the open alternative, Voxtral, at 76%, even if the cloud APIs do better. I think these cases need their own specialized models, one for Spanglish, one for Singlish, and so on, rather than a smarter router.</p>
</section>
<section id="scaling-to-more-languages" class="level2">
<h2 class="anchored" data-anchor-id="scaling-to-more-languages">Scaling to more languages</h2>
<p>Adding a language only means dropping in another public model. Any online transducer supported by sherpa-onnx works, so the approach can cover many languages without growing any single model or its per-stream CPU cost.</p>


</section>

<div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">BibTeX citation:</div><div class="code-copy-outer-scaffold"><pre class="sourceCode quarto-appendix-bibtex code-with-copy"><code class="sourceCode bibtex">@online{hays2026,
  author = {Hays, Bruno},
  title = {Real-Time Multilingual {ASR:} Route Between Small Models},
  date = {2026-05-29},
  url = {https://bruno-hays.github.io/posts/realtime-multilingual-asr-router/},
  langid = {en}
}
</code></pre></div><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-hays2026" class="csl-entry quarto-appendix-citeas">
Hays, Bruno. 2026. <span>“Real-Time Multilingual ASR: Route Between
Small Models.”</span> May 29. <a href="https://bruno-hays.github.io/posts/realtime-multilingual-asr-router/">https://bruno-hays.github.io/posts/realtime-multilingual-asr-router/</a>.
</div></div></section></div> ]]></description>
  <guid>https://bruno-hays.github.io/posts/realtime-multilingual-asr-router/</guid>
  <pubDate>Thu, 28 May 2026 22:00:00 GMT</pubDate>
  <media:content url="https://raw.githubusercontent.com/gladiaio/realtime-multilingual-asr-router/main/assets/code-switching.png" medium="image" type="image/png"/>
</item>
</channel>
</rss>
