Wrong glossary terms in streaming speech translation: no more than offline
A speech translation system for talks is often given a glossary: a list of the talk’s terms with the Chinese form the speaker or the organiser wants. Glossaries are written by people and some entries are wrong. A model that follows the glossary will then write the wrong term. In simultaneous speech translation the model also has to commit to text before the sentence is over, while it has heard only part of the audio. My worry was that a model working from a half-heard sentence leans harder on the glossary, and so copies a wrong entry more often than when it hears the whole sentence.
I measured it on Qwen2.5-Omni-7B, translating English talks from ACL 60/60 into Chinese. The short answer is no. Of 116 sentences, the wrong glossary term ended up in the final translation of 11 offline and 12 streaming. I had fixed the bar in advance at 10% of the items (11.6 sentences); the 95% interval of the difference reaches at most 5.2%. The streaming decoder does put the wrong term into its intermediate hypotheses more often (31 sentences), but most of those are dropped before they are committed, and none is committed before the speaker has said the term. On everyday read speech the same decoder does sometimes commit a sentence the speaker never said; I show one below.
What I measured
Sentences and terms. ACL 60/60 has English talks from ACL 2022 with reference Chinese translations in which technical terms are marked. I took 116 sentences from its dev and eval sets, from 10 talks, each containing one term (for example tagger, whose reference form is 标记器). Each sentence is one item.
Four glossary conditions. The glossary for an item is the list of its talk’s terms, 7 to 20 entries (median 13),
one line per term in the form tagger → 标记器. Only the line of the item’s term changes between conditions:
| Condition | The term’s line | What it shows |
|---|---|---|
| none | no glossary at all | the model on its own |
| correct | tagger → 标记器 |
whether the model uses the glossary |
| wrong | tagger → 分类器 |
how often the model copies a wrong form |
| irrelevant | the line is replaced by an entry for a term that is not in the sentence | how often the wrong form appears with nothing pointing to it |
The wrong form is the correct Chinese for a different term of the same kind from another talk (分类器 means classifier). It is never an acceptable translation of the spoken term. The prompt puts the audio first, then the glossary, then the instruction:
1 | <audio>Glossary: |
What I count. An item counts as an insertion if its final translation contains the wrong form under the wrong glossary. From that I subtract the items whose translation contains the same form under the irrelevant glossary, where nothing in the prompt suggests it. The result is the insertion count: the number of sentences in which the wrong entry put the wrong term into the translation. Han forms are matched as substrings, Latin forms on word boundaries. Each match was then read in its context, with the condition hidden, and judged as either the model’s rendering of the spoken term or something else (another sense, part of a longer word, a copy of the glossary list). All 23 matches below (11 offline, 12 streaming) were judged renderings of the term.
Two ways to decode, same model and prompt. Greedy decoding, at most 256 new tokens, one RTX 4090.
- Offline: the model gets the whole sentence’s audio and translates once. The segments are 2.1 to 22 s long, median 7.4 s.
- Streaming: the model gets the first 1.0 s of audio, then the first 2.0 s, and so on, until the full segment. The output is built with local agreement over two consecutive steps (LA-2; Liu, Spanakis and Niehues 2020, used for simultaneous speech translation by Polák et al. 2022). At each step, the text committed so far is forced as the start of the model’s answer and the model continues from it. The longest common prefix of the last two steps’ continuations is committed and can no longer change. At the last step, with the full audio, the whole continuation is committed.
The prompt, the glossary and the weights are the same in both. The only difference is whether the model sees the whole audio at once or growing prefixes of it.
How simultaneous is the streaming output? I measured latency on the audio clock (compute time not included), with each Chinese character timed at the step that committed it. Under the wrong glossary, LAAL (Papi et al. 2022) is 2.4 s and AL (Ma et al. 2019) is 2.2 s, on sentences whose median length is 7.4 s.
Why the baseline is low to begin with
The speech LLMs I tested were already reluctant to copy a wrong glossary entry offline. The same prompt and the same 116 items, with the counts on the same definition:
| Model | Input | Insertion count, of 116 |
|---|---|---|
| Qwen2.5-7B-Instruct (text-only LLM) | gold English transcript | 59 |
| Qwen2-Audio-7B-Instruct | gold English transcript | 4 |
| Qwen2.5-Omni-7B | gold English transcript | 7 |
| Qwen2.5-Omni-7B | audio, offline | 11 |
A text-only LLM given the transcript writes the wrong term in about half the sentences. The speech LLMs do it in a handful, from text and from audio alike. Qwen2-Audio uses correct glossary entries and declines wrong ones even when told to use the glossary. So the question for streaming is whether partial audio pushes a speech LLM from the low row towards the high one.
The model does read the glossary while streaming: in the correct condition, 10 of 10 sampled streaming outputs used the glossary’s form for the term.
Streaming against offline
| Offline | Streaming (LA-2, 1.0 s steps) | |
|---|---|---|
| Wrong form in the output, wrong glossary | 11 | 12 |
| Wrong form in the output, irrelevant glossary | 0 | 0 |
| Insertion count | 11 | 12 |
The difference is +1 sentence. Three sentences have the wrong term only in the streaming output, two only in the offline output; the other nine have it in both.
To get an interval I resampled the 10 talks with replacement 9,999 times, because sentences from one talk share a speaker and a glossary. The 95% interval of the difference, as a share of the 116 items, is −0.035 to 0.052. Its upper end, about 6 sentences, is below the 10% bar (11.6 sentences) I set before decoding. A rise of a few sentences is not excluded; a rise of 10% of the items is.
The five sentences that differ are worth reading, because they are not one effect:
| Sentence | Term → correct / wrong form | Offline | Streaming |
|---|---|---|---|
| dev 119 | oracle → 甲骨文 / 可解释性 | 可解释的 (“interpretable”) | 可解释性 (“interpretability”) |
| dev 147 | tagger → 标记器 / 分类器 | 分词器 (“tokenizer”) | a sentence assembled from the glossary, below |
| eval 185 | VALSE → VALSE / MAWPS | VALSE | VALSE(MAWPS) |
| dev 44 | OOV → OOV / API | API | OOV |
| eval 251 | extractor → 提取器 / 解码器 | 文本解码器 (“text decoder”) | 提取器 |
In dev 119 both outputs follow the wrong entry; the offline one changed one character and so escaped the string match. Eval 185 is a real streaming insertion: the model kept the correct name and attached the wrong one in brackets. Dev 44 and eval 251 go the other way: offline copied the wrong entry and streaming did not. Dev 147 is the interesting one; it is the next section.
A sentence written from the glossary
Dev 147 is a sentence about a part-of-speech tagger. At 2.0 s the model had heard seven words. It wrote a complete sentence out of the talk’s glossary, with the wrong entry for tagger (分类器, classifier) in it. The next step repeated that sentence word for word, so LA-2 committed it, and the committed text could not change after that. Offline, under the same glossary, the model translated the sentence and did not use 分类器. If dev 147 is counted as a glossary copy rather than an insertion, the difference between streaming and offline is 0 instead of +1.
Dev 147 is itself about language models, so in it the glossary’s words and the speaker’s words are hard to tell apart. To see the same thing on everyday speech, I ran the streaming decoder, with the same model, prompt and LA-2 policy, on FLEURS: English sentences from Wikipedia, Wikivoyage and Wikinews, read aloud, with the Chinese translations of FLoRes-200. Each source article plays the role of a talk. Its glossary lists the article’s names and terms with their Chinese forms from the reference translation (listed by Qwen2.5-7B-Instruct), and each sentence again gets one wrong entry, the form of a term of the same kind from another article. I left out articles about computing and language technology. That gives 225 sentences of 8 to 30 s.
Before decoding I fixed what counts as a sentence written from the glossary: one step commits the Chinese forms of at least two glossary terms that the speaker has not said yet, and that text stays in the final translation. Under the wrong glossary 37 of the 225 sentences meet this rule; under the correct and the irrelevant glossaries, 42 and 32. In some of them the model only translated words the speaker said a moment later. In others the committed text is not in the sentence at all.
Test 1676 is one of the second kind. It comes from the Wikivoyage article on Kruger National Park: “As with all South
African National Parks, there are daily conservation and entry fees for the park.” (9.4 s). Its glossary has eight
entries: Kruger National Park, KNP, Mozambique, Zimbabwe, Crocodile River, South Africa, South African National Parks
and Wild Card. In the wrong glossary the line for the sentence’s term reads South African National Parks → 总统委员会
(“Presidential Commission”). In the forced alignment, South African National Parks is spoken from 1.64 to 3.44 s.
Here is what the streaming decoder did under the wrong glossary:
| Audio heard | Hypothesis at this step | Committed after this step |
|---|---|---|
| 1.0 s: the first word, not finished | 克鲁格国家公园位于南非,是非洲最大的国家公园之一。它横跨莫桑比克和津巴布韦的边界… (“Kruger National Park is in South Africa and is one of Africa’s largest national parks. It straddles the border of Mozambique and Zimbabwe …”) | nothing |
| 2.0 s: “As with all” | 克鲁格国家公园位于南非,是总统委员会管理的国家公园之一。 (“Kruger National Park is in South Africa and is one of the national parks run by the Presidential Commission.”) | 克鲁格国家公园位于南非,是 (“Kruger National Park is in South Africa and is”) |
| 3.0 s: “… South African National” | the same sentence + 它与莫桑比克和津巴布韦接壤。… (“It borders Mozambique and Zimbabwe. …”) | + 总统委员会管理的国家公园之一 (“one of the national parks run by the Presidential Commission”) |
| 4.0 to 6.0 s: “… Parks, there are daily conservation” | the sentence of 2.0 s | no change |
| 7.0 s: “… and entry fees” | the same + 与其他南非国家公园一样,克鲁格国家公园设有每日保护和入场费。 (“Like other South African national parks, Kruger National Park has daily conservation and entry fees.”) | no change |
| 8.0 s: “… for the” | the same | + 。与其他南非国家公园一样,克鲁格国家公园设有每日 |
| 9.0 s: “… park.” | the same | no change |
| 9.4 s, full audio | the same | + 保护和入场费。 |
At 2.0 s the model had heard three words. It wrote a sentence the speaker never says, built from glossary entries: Kruger National Park (克鲁格国家公园), South Africa (南非) and the wrong entry 总统委员会. With the correct entry the sentence would be true, since South African National Parks runs the park. LA-2 committed the part that the 1.0 s and 2.0 s hypotheses share. At 3.0 s the model wrote the 2.0 s sentence again, so the rest of it, with 总统委员会, was committed too. At that moment the speaker was in the middle of Parks. Kruger is never named in the audio. From 7.0 s the model translated what was said and appended it after the committed sentence. The final translation is: “Kruger National Park is in South Africa and is one of the national parks run by the Presidential Commission. Like other South African national parks, Kruger National Park has daily conservation and entry fees.” The second sentence is the translation. The first one was written from the glossary.
Under the correct glossary the decoder committed “克鲁格国家公园位于南非,是非洲最大的国家公园之一” (“Kruger National Park is in South Africa and is one of Africa’s largest national parks”) at 2.0 s. Its final translation goes on about the park’s area, lions and elephants, and never mentions the fees. Under the irrelevant glossary it committed “克鲁格国家公园的悲剧事故” (“the tragic accident at Kruger National Park”, from the irrelevant entry this tragic accident) by 3.0 s, and then translated the sentence after it.
So local agreement is a filter only against hypotheses that change from step to step. A sentence the model writes twice from the glossary gets committed, whatever the audio says next. On the ACL 60/60 talks no wrong form was committed before the speaker had said the term. On these FLEURS sentences it happened: under the wrong glossary the wrong form reached the final translation of 44 of the 225 sentences, and in 6 of them it was committed before the speaker had finished the term. I did not decode the FLEURS sentences offline, so these counts do not compare streaming with offline.
Wrong forms that appear and are dropped
Each streaming step writes a full hypothesis, of which only the agreed prefix is committed. Counting the wrong form in any hypothesis, committed or not:
| Wrong glossary (its wrong form) | Irrelevant glossary (its unrelated entry’s form) | |
|---|---|---|
| Items where the form appears in some hypothesis | 31 | 23 |
| Items where it is in the final output | 12 | 1 |
| … committed before the spoken term ends | 0 of 12 | 0 of 1 |
The wrong form showed up in a hypothesis of 31 sentences and stayed in 12; in the other 19 it was only in uncommitted text that a later step replaced. The irrelevant glossary’s form, for a term nobody said, showed up in 23 and stayed in 1, so a glossary entry leaking into a partial hypothesis is common whether or not the term is spoken. None of the 12 wrong forms was committed before the alignment says the speaker finished saying the term. Wrong commitments made in anticipation of the speaker were not a source of insertions here.
Holding back the full stop
One design choice in the streaming policy matters more than it looks. The committed text is forced as the start of the model’s answer. If the commit ends with a sentence-final mark such as 。, the model ends its answer right there at every later step, however much audio is left.
I therefore hold back a trailing sentence-final mark or closing quote: while the committed text would end in one, it is shortened by whole tokens, and the mark is committed later together with the text that follows it, or at the last step. Over the 696 streaming outputs (116 items, four conditions, the no-glossary condition decoded three times):
| Policy | Outputs that stop with 3 s or more of audio left |
|---|---|
| plain LA-2 | 36 of 696 |
| LA-2 with the sentence-final mark held back | 1 of 696 |
In all 36 stops under plain LA-2, the committed text ended in 。 and every later step generated nothing. The one remaining stop is dev 147 above: the model kept repeating its glossary sentence, whose 。 was held back, and added nothing.
Scope
Qwen2.5-Omni-7B, English to Chinese on 116 sentences from 10 ACL 60/60 talks, one wrong glossary entry per sentence, greedy decoding, LA-2 on 1.0 s steps of audio. At this size, a true rise of about 15 sentences would be detected in about four of five repetitions of the experiment; a rise of 5 almost never.
Reproduce
The code, the model outputs and the hand codes are in rockyshi-dev/streaming-st-glossary. Every number in this post comes from a few commands that need only Python 3 and a CPU and finish in seconds:
1 | git clone https://github.com/rockyshi-dev/streaming-st-glossary && cd streaming-st-glossary |
To decode again, you need the ACL 60/60 audio (948 MB, downloaded from the ACL Anthology), the model weights at the revisions listed in the README, and one 24 GB GPU. On an RTX 4090 the offline decodes take about 7 minutes and the streaming decodes about 32 minutes; the README gives the commands and the step that compares new outputs with the published ones, for the ACL 60/60 decodes and for the FLEURS example, which takes about an hour on the same GPU.