Speech-to-Speech Translation › Latency and Streaming

Michael BrenndoerferNovember 25, 20266 min read
Language AI HandbookAll chapters
Part 27 of 67Machine Translation and Speech Translation
Chapter 196Speech-to-Speech Translation › Latency and Streaming
Reading section 7 of 14 · Latency and Streaming · 6 minSection 7 of 14 · 6 min

Section 7 of 14 · 6 min read

Reading settings

Definitions

Choose how many terms have tooltips.

Article links

Make inline references clickable

Notes & comments

For a serialized cascade, add the non-overlapping time spent buffering and running each model. This accounts for a processing budget within specified boundaries. A streaming system can overlap stages, so measure output timestamps for the complete system.

Ltotal=Lbuffer+LASR+LMT+LTTSL_{\text{total}} = L_{\text{buffer}} + L_{\text{ASR}} + L_{\text{MT}} + L_{\text{TTS}}

where:

  • LbufferL_{\text{buffer}}: the time spent waiting for enough audio to reduce ambiguity
  • LASRL_{\text{ASR}}: the ASR stage delay
  • LMTL_{\text{MT}}: the MT stage delay
  • LTTSL_{\text{TTS}}: the TTS stage delay
  • LtotalL_{\text{total}} is the serialized buffer-plus-processing budget. Playback, transport, and queueing are additional if they fall outside that measurement.

Natural conversation often turns over within a fraction of a second, and timing varies across communities and contexts. Use separate measurements for the delay to the first audible translation and the difference between source and target completion times. A product's acceptable delay depends on the task and interaction design. Stivers et al. (2009)

Buffering contributes delay before the next stage starts. Measure how much time the system spends waiting for source audio or a stable segment separately from the time each model spends processing it.

Offline vs. Streaming S2ST

An offline system can use the complete utterance to plan a translation. In dubbing produced before playback, it can also plan segment boundaries and timing. A streaming system accepts partial input and can begin emitting translation before the source utterance ends.

Offline systems can wait for a complete utterance before choosing a translation. A streaming system has to decide how much input to wait for and whether it can revise output that has already been emitted. Compare the quality and latency under the same evaluation setup, since the latency metric for translated speech can differ from the metric for translated text.

Simultaneous MT: Wait-k Policy

One fixed-lag policy for simultaneous text translation is wait-k. The translator reads kk source tokens before its first write, or reads the entire source if it ends sooner. It then reads one additional source token between writes until the input is exhausted. Ma et al. (2019)

yi∼p(⋅∣x≤min⁡(m, i+k−1), y<i)y_i \sim p\big(\cdot \mid x_{\leq \min(m,\ i+k-1)},\ y_{<i}\big)

where:

  • ii: the one-based position of the next target token yiy_i
  • mm: the total number of source tokens
  • x≤min⁡(m, i+k−1)x_{\leq \min(m,\ i+k-1)}: the source prefix available before that write
  • y<iy_{<i}: the target tokens already generated
  • kk: the number of source tokens the policy initially waits to read if available

For k=4k=4, the first three writes can use 4, 5, and 6 source tokens if the input is long enough. After all source tokens have arrived, the model writes the rest of the target while keeping the source prefix fixed. Increasing kk gives the model more context before it commits, at the cost of a longer initial wait. A token count is a read schedule. The delay in seconds depends on how fast input arrives and how fast the model produces each output.

kk controls the initial source-token wait. The example assumes a fixed token arrival interval and uses a saturating curve chosen to illustrate diminishing returns. Compare quality and elapsed latency on your own model and data.

PythonIn [11]
CollapseExpand
import numpy as np


def wait_k_reads(source_length, target_position, k):
    """Source tokens available at the given one-based target position."""
    return min(source_length, target_position + k - 1)


wait_k = np.arange(1, 13)
quality = 0.95 * (1.0 - np.exp(-wait_k / 4.0))
seconds_per_token = 0.2
initial_wait = seconds_per_token * wait_k
wait_k_annotations = [
    (wait_k[index], quality[index], initial_wait[index]) for index in (1, 3, 7)
]
VisualizationOut [12]
CollapseExpand
Line plot of translation quality as wait-k lag increases.
Illustrative wait-k tradeoff under a fixed source arrival time of 0.2 seconds per token. The modeled quality gains taper as initial wait increases.

A cascaded streaming design can read chunks of audio, update its ASR transcript, translate stable text, and synthesize committed segments. The 0.5–1.0 second chunk range below belongs to the illustration. Audio chunks and source text tokens are different units: an ASR hypothesis may change as more audio arrives.

Chunk-Merge-Cascade

One cascaded streaming design uses these steps:

  1. Receive source audio in chunks. Choose the interval for the model and latency budget.
  2. ASR produces partial transcripts per chunk.
  3. When a sentence boundary is detected (via punctuation prediction from the ASR or a separate segmenter), commit that span to MT.
  4. MT streams back the translation.
  5. TTS synthesizes committed target segments.

Commitment risk is the risk of emitting a translation before the source has supplied a cue that would change it. Once speech has played, a later correction cannot undo what listeners heard. Word-order differences can affect which cues arrive in time. CMU’s IWSLT 2023 system translated English speech to German text incrementally and used VITS to synthesize spoken German.

The illustration below assumes that waiting for a longer audio buffer also delays commitment and gives the system more source context. A sentence-commitment policy can instead wait for several recognition updates, so you can choose the update size and the commitment rule independently.

PythonIn [13]
CollapseExpand
import numpy as np

chunk_seconds = np.linspace(0.2, 3.0, 120)
latency_norm = chunk_seconds / 3.0
commitment_error_norm = np.exp(-chunk_seconds / 0.8)
VisualizationOut [14]
CollapseExpand
Line plot of latency and commitment error versus audio chunk size.
Illustrative chunk-size tradeoff for a streaming cascade. The modeled commitment risk falls with longer chunks while buffering delay rises. The shaded area highlights example chunk lengths from 0.5 to 1 second.

A partial transcript can be grammatical and still leave a translation choice open. One example of an adaptive policy is the text decoder in SeamlessStreaming. It uses the available source features and earlier target tokens to choose whether to emit a token or read more input.

Streaming Direct S2ST

SeamlessStreaming adapts SeamlessM4T v2 for streaming. Its text decoder uses Efficient Monotonic Multihead Attention to decide whether to emit the next target text token or read more input audio. The policy estimates readiness from the available acoustic representation and the partial target text.

SeamlessStreaming still produces an internal target text sequence. Its text-to-unit model consumes text-decoder states, and the vocoder emits speech once enough predicted units are available. This introduces an acoustic-unit buffer in addition to the text decoder's read/write decision. Streaming inference algorithm.

Comments

Add to the conversation

A question, a correction, or an example from your own work.

No comments yet. Be the first to share your thoughts!

Newsletter

Stay up to date

Get new articles, book updates, and notes on AI and technology.

Unsubscribe at any time. Privacy policy