Lesson 1 of 2 Speech Recognition and Synthesis Concepts

Converting Speech to Text with Speech Recognition

This lesson explains speech recognition, or speech to text (STT), which converts spoken language into text. It powers transcription, captions, voice commands and the input side of voice assistants.

Learning outcomes

After completing this lesson, you will be able to:

  • Explain how acoustic and language models recognize speech.
  • Distinguish real-time, fast and batch transcription.
  • Identify recognition features such as speaker diarization and phrase lists.

How speech recognition works

Recognition traditionally uses two models. An acoustic model converts the audio signal into phonemes, the distinct sounds of a language. A language model maps sequences of phonemes to the most likely words and sentences, using context to choose between words that sound alike (their and there). Modern systems often use a single neural network trained end to end, but the two ideas remain useful for understanding errors: noisy audio challenges the acoustic side, and unusual vocabulary challenges the language side.

The following diagram shows the two stages of recognition and what challenges each.

How speech recognition works. The audio signal goes to an acoustic model, which converts it into phonemes, the distinct sounds of a language. A language model maps sequences of phonemes to the most likely words, using context to choose between words that sound alike. Noisy audio challenges the acoustic side, and unusual vocabulary, such as product names, challenges the language side.
Knowing which side struggles points to the right fix.

Recognition modes

Azure Speech offers three ways to transcribe. Real-time recognition streams audio from a microphone or stream and returns text as the person speaks, with interim results, which suits live captions and voice commands. Fast transcription transcribes a recorded file synchronously and quickly. Batch transcription processes large numbers of stored recordings asynchronously, which suits call-centre archives.

Features

Useful features include automatic punctuation and formatting of numbers and dates, word-level timestamps, speaker diarization (labelling which speaker said each phrase), language identification, profanity masking, phrase lists that boost recognition of specific words such as product names at run time, and custom speech models trained with domain text and audio for consistently difficult vocabulary or acoustic conditions. Transcription models such as gpt-4o-mini-transcribe and audio-capable multimodal models also convert speech to text.

Scenario questions

Improve the transcript

Exam skills 1.3.3

Choose the speech recognition feature that solves each problem.

Log in to try this activity Interactive activities are free with an account.

Choosing a recognition mode

The recognition mode follows from when the text is needed and where the audio comes from. Live audio that must be shown or acted on while the person is speaking needs real-time recognition. A recording that someone is waiting for suits fast transcription, and large archives that can be processed overnight suit batch transcription. The following table gives examples.

ScenarioMode
Live captions for a webinarReal-time recognition
Voice commands in an applicationReal-time recognition
Transcribing a recorded interview for a journalistFast transcription
Transcribing a year of recorded support callsBatch transcription

Accuracy problems usually point to a specific fix. Product names or jargon that are misrecognized can be added as a phrase list, and consistently difficult audio, such as a noisy factory floor or strong regional accents, may justify a custom speech model.

Sort into groups

Choose the recognition mode

Exam skills 1.3.3

Choose the transcription mode from when the text is needed and where the audio comes from.

Log in to try this activity Interactive activities are free with an account.
Worked example

Choosing recognition features

A clinic records doctor-patient consultations and needs a written record that shows who said what, including the names of medicines that general recognition often gets wrong.

Showing who said what requires speaker diarization; improving medicine names requires a phrase list or, for a large vocabulary, a custom speech model.

Speech synthesis is the wrong direction, and a larger language model applied after transcription cannot reliably recover words the recognizer did not capture.

Check yourself

What does speaker diarization do?

Show answer

It labels which speaker said each part of the transcript.

Exam Tips

Remember for the exam

  • Acoustic models map audio to phonemes; language models map phonemes to words.
  • Real-time for live audio, fast transcription for single files, batch for large archives.
  • Speaker diarization labels who spoke; phrase lists and custom speech improve domain vocabulary.