Sign in to save

Bookmark this page so you can find it later.

Sign in to save

Bookmark this page so you can find it later.

Voice assistants turn spoken language into useful computer actions, such as setting a timer, answering a question, or controlling a light. This matters because speech is a natural human interface, but computers cannot directly understand pressure waves in air. A voice assistant must convert sound into data, identify words, interpret meaning, and choose a response.

Each step uses ideas from signal processing, probability, linguistics, and machine learning.

The process begins when a microphone samples the air pressure changes in your voice and stores them as numbers. Software cleans the signal, extracts features, and sends them to an automatic speech recognition model that predicts likely words. A natural language understanding system then maps those words to an intent, such as play music, and often extracts details called entities, such as the song name.

Finally, the assistant performs the action and may use text-to-speech to generate a spoken reply.

Key Facts

  • Sampling converts a continuous sound wave into discrete numbers at a rate such as 16,000 samples per second.
  • Nyquist rule: sampling rate must be at least twice the highest frequency, fs >= 2fmax.
  • Speech recognition estimates the most likely word sequence: W* = argmax P(W | X), where X is the audio features.
  • Bayes idea used in recognition: P(W | X) is proportional to P(X | W)P(W).
  • Intent classification maps a sentence to a goal, such as set_alarm or get_weather.
  • Wake word detection runs continuously and listens for a short trigger phrase before sending a full request for processing.

Vocabulary

Sampling
Sampling is the process of measuring a sound wave at regular time intervals so it can be stored and processed as digital data.
Automatic Speech Recognition
Automatic speech recognition is software that converts audio features from speech into a sequence of written words.
Feature Extraction
Feature extraction transforms raw audio into useful measurements, such as frequency patterns, that help a model recognize speech.
Intent
An intent is the action or goal the user wants the assistant to perform.
Entity
An entity is a specific detail in a command, such as a time, location, contact name, or song title.

Common Mistakes to Avoid

  • Thinking the assistant understands sound directly: the computer first converts sound waves into numerical data, then uses models to infer words and meaning.
  • Ignoring background noise: noise can change the recorded signal and make feature extraction or word prediction less accurate.
  • Confusing speech recognition with language understanding: speech recognition finds words, while language understanding decides what the words mean as a command.
  • Assuming the highest confidence answer is always correct: machine learning models choose probable outputs, so unclear speech or unusual phrasing can still produce errors.

Practice Questions

  1. 1 A microphone samples speech at 16,000 samples per second for 3.5 seconds. How many samples are recorded?
  2. 2 A voice assistant needs to capture speech frequencies up to 7,000 Hz. Using the Nyquist rule, what is the minimum sampling rate needed?
  3. 3 A user says, 'Set a timer for 12 minutes.' Identify the likely intent and the entity in the command, and explain why speech recognition alone is not enough to complete the task.