§11.4Multimodal Transformers: Speech-to-Text

Part III NLPT pp. 91–94 · ~3 min read

  • multimodal
  • automatic speech recognition

So far we’ve extended transformers to one new modality at a time. True multimodal models combine two at once. We start with the most natural human interface after text: speech.

Speech-to-text

Talking is easier than typing for most people — and essential for accessibility — which is why assistants like Siri and Alexa keep spreading. The core task is automatic speech recognition (ASR): turning spoken audio into text.

The wav2vec 2.0 family is a landmark. It pairs a CNN (to digest the raw waveform) with a transformer (to contextualize the audio), and — crucially — pretrains on huge amounts of unlabeled audio, so it needs only a few minutes of labeled speech to adapt to a new language:

Click a stage to see what it does. Data flows left → right; each stage transforms its input for the next.

Figure 11-12 (recreated). wav2vec 2.0 — a CNN turns raw audio into features, a transformer contextualizes them, and the model decodes text.

Using it is the same familiar pipeline. Feeding it a clip from the SUPERB benchmark transcribes it perfectly:

raw speech (16 kHz)ASRMISTER QUILTER IS THE APOSTLEOF THE MIDDLE CLASSES…
wav2vec 2.0 transcribing a SUPERB clip. Punctuation is missing (hard to infer from audio) but the words are exact.
from datasets import load_dataset
asr = pipeline("automatic-speech-recognition")
ds = load_dataset("superb", "asr", split="validation[:1]")
pred = asr(ds[0]["speech"])
# {'text': 'MISTER QUILTER IS THE APOSTLE OF THE MIDDLE CLASSES AND WE ARE
#           GLAD TO WELCOME HIS GOSPEL'}

Note — dropping the labels entirely

Building a new language still needs a little labeled audio, which is scarce for low-resource languages. wav2vec-U removes even that: with clever clustering plus GAN training, it learns speech-to-text from independent unlabeled speech and unlabeled text — no aligned pairs at all — opening ASR to far more languages.

Transformers can now “read” text and “hear” audio. Can they also see? Yes — the final frontier of this excerpt is vision-and-text models.

Check yourself: speech-to-text

1.What distinguishes a genuinely multimodal model from the single-modality extensions (ViT, TAPAS)?

2.What is automatic speech recognition (ASR)?

3.How is wav2vec 2.0 architected?

4.Why does wav2vec 2.0 need only a few minutes of labeled speech to adapt to a new language?

5.What does wav2vec-U achieve beyond wav2vec 2.0?

5 questions