Go to Map Courses Lab Glossary How it works Troubleshooting Start →
ITEN
← Course 03 · Listening (Lesson 03.04 · 16 minutes · Microphone · For everyone)

From voice to text, and back.

Dictating a message and having a page read to you are two models that travel the same road in opposite directions. Here you'll follow Whisper from the spectrogram to the words, learn to count its mistakes, and try what runs on your phone without a network.

What you learn
  1. How a model turns voice into text, one word at a time
  2. How you measure how often a transcription is wrong
  3. How the road back works, from text to voice
  4. What runs on the phone and what stays in the cloud
You need to know

If you don't remember one of these, the link takes you to the chapter that explains it.

How do you want to follow it
Preparing the scene…
  1. 01 Transcription

    From voice to text, word by word.

    You dictate a message and the phone writes it down. This task is called transcription, or speech recognition. It's much harder than keyword spotting03.03. There are tens of thousands of possible words and endless sentences, and everyone speaks with their own voice and their own accent.

    In practice. An app with a few fixed commands doesn't need full transcription. A model that recognizes just those few commands is smaller and faster, and it makes fewer mistakes.

01 / 07
(Go deeper)

A few more numbers.


(01)

The sizes of Whisper

Whisper comes in five sizes. They all use the same mel spectrogram and the same way of writing, and only the number of layers and weights changes. The small size makes more mistakes but is much faster, and the big one does the opposite.

For the phone, the first two sizes are the ones that count, plus the third if you have a bit of patience. Quantized versions, with the weights written in fewer bits, take up less space and run faster, at the cost of a few more mistakes.

SizeWeightsOn the phone
tiny39 millionYes, even in real time
base74 millionYes
small244 millionWith effort, on recent phones
medium769 millionNo, you need a computer
large1.55 billionNo, you need a powerful computer
(02)

How to count the WER

The correct text is “turn on the kitchen light”, five words. The model writes “turn on kitchen lights”. The word “the” is missing, and “light” has turned into “lights”. That's two mistakes out of five words, so the WER is 40 percent.

The count is done with an automatic alignment that looks for the way to get from one text to the other with the fewest changes. Watch out for formatting details. If the model writes 100 and the correct text says one hundred, the WER counts it as a mistake even though the transcription is right. Before counting, you bring the two texts into the same form.

WER = (changed words + missing words + extra words) / words in the correct text
(03)

The voice of this course

You can listen to the lessons in The Basics in English, with a voice made by Kokoro on the computer of the person who writes the course. For acronyms there's a small lexicon, which says for example to read SoC letter by letter.

Then Whisper listens to each lesson again, and the text it hears is compared with the script, word by word. Across the five lessons, less than one percent of the words are different, and almost all of them are numbers written as digits instead of words. Only one was really wrong, epoch, which sounded like epic, and it was fixed in the lexicon.

(Try it on your phone)

Voice in airplane mode


Put the phone in airplane mode and try these features. The ones that still respond transcribe or speak inside the phone, and the others need the network.

  1. (01) Dictate a message with the keyboard microphone
  2. (02) Turn on automatic captions and play a video saved on the phone
  3. (03) Record a voice memo and ask for the transcript
  4. (04) Have the phone read a page aloud with its reading feature
  5. (05) Ask the voice assistant what time it is

Some offline features reach other languages later than English. If one doesn't work, look in the keyboard or accessibility settings for a language to download.

(Quiz)

4 questions to close the lesson.

When you have answered them all, the lesson counts as done and its stone on the map turns yellow. Answering is what counts, not the score.


  1. (01)

    Why is transcribing much harder than recognizing a keyword?

  2. (02)

    The correct text is “turn on the kitchen light”. The model writes “turn on kitchen lights”. What's the WER?

  3. (03)

    Dictation works even in airplane mode. What does that mean?

  4. (04)

    What does a synthetic voice get wrong most often?

(Next lesson · 04.01) The phone senses motion