Generative AI · Advanced level

Advanced level · Module 9: Audio and Speech AI Applications · Lesson 1 of 3

Speech Recognition and Audio Classification

Learners transcribe recordings with Whisper through Transformers pipelines, measure word error rate and classify audio events.

In this lesson you will

  • Transcribe audio with a pretrained model
  • Classify audio and measure accuracy

Key concepts

automatic-speech-recognition pipelineWhisperword error rateaudio-classificationnoise and accents

The lesson

pipeline('automatic-speech-recognition', model='openai/whisper-small') transcribes audio (Whisper small is Apache-2.0). Measure word error rate (WER) against human transcripts. The NLP programme covers ASR evaluation in more depth.

Audio classification labels sounds or speech types, for example detecting whether a recording contains speech or music.

Quality drops with noise, accents and languages poorly represented in training; the Whisper small model card does not list South Sudanese languages, so do not rely on it for them without evaluation.

Step by step

  1. Transcribe five consented recordings.
  2. Compute WER against reference transcripts.
  3. Classify ten audio clips.
  4. Record conditions that cause errors.

Practice activity

Evaluate transcription and classification on consented recordings.

Expected result: WER and accuracy results with failure conditions noted.

Check your understanding

  1. What does WER measure?

    Show answer

    Word errors (substitutions, deletions, insertions) relative to the reference transcript.

  2. Should Whisper be relied on for Dinka without testing?

    Show answer

    No. It must be evaluated first.

Further learning

Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.