aifree.dev

How does it turn my voice into text?

Speech-to-text: spectrograms and audio tokens (Whisper) · Beginner · 5 min · tokens, transformer · after Tokens, Vision: images as tokens

A speech-to-text model like Whisper turns sound into a picture (a spectrogram of pitch over time), cuts it into audio tokens, one every 20 ms, and a decoder then writes the text token by token, like a chatbot.

Before you start: could you explain this to a friend?

1 = not at all · 5 = easily

  1. 1 Guess first

    You send OpenAI’s Whisper a 30-second voice memo. How many pieces does its encoder, the half that listens, work with?
  2. 2 Look

    From your voice to text

    1 / 4

    1 s of your voice = 16,000 numbers

    A microphone measures air pressure; Whisper re-samples every recording to 16,000 measurements a second. No words, no letters: just numbers going up and down.

    Whisper: OpenAI’s whisper/audio.py and Radford et al. 2022 §2.2 · checked 2026-10-23

    Sound arrives as numbers: 16,000 a second, nothing that looks like a word.

    The model never hears words: sound becomes numbers, then a picture of pitch over time, then 1,500 audio tokens, and only then does a decoder write text.

  3. This is the same trick as vision: turn the input into a grid, cut the grid into tokens, and let a transformer read them. The decoder is a language model that listens: it predicts the next text token from the audio tokens and the text so far. When the sound is unclear, it picks the likeliest words.

  4. 4 You are the model

    You are Whisper’s input stage. For four recordings, decide how many audio tokens each one becomes.

    you are Whisper’s input stage · 30-second windows · one audio token per 20 ms

    3-second “yes, sounds good”: how many audio tokens?

    Whisper: OpenAI’s whisper/audio.py and Radford et al. 2022 §2.2 · checked 2026-10-23

    You are the input stage. How many audio tokens does this clip become?
  5. 5 Check

    A 45-second voice message goes into Whisper. How many audio tokens?
  6. Two habits help. Tell it the language: it is one token in the prompt, and guessing it can go wrong. And watch silence and window edges: the Whisper paper lists repeat loops, missing first or last words of a segment, and “complete hallucination” of text that was never said.

  7. 7 Say it back

  8. 8 Mission · 5 min

    With Groq’s free plan, send a 10-second voice memo to whisper-large-v3-turbo, once with language set to your language and once set to a different one. Then send 15 seconds of silence. Does the wrong language token change the text, and does the silence come back empty or with words?

Three quick ones

Drawn at random from this lesson's pool; different next time.

Done?

Now: could you explain this to a friend?

1 = not at all · 5 = easily

Answer the three quick ones first.

Sources

  • https://arxiv.org/abs/2212.04356 (Radford et al. 2022, checked 2026-10-23): §2.2 audio re-sampled to 16,000 Hz, 80-channel log-magnitude Mel spectrogram on 25-millisecond windows with a stride of 10 milliseconds; stem of two convolution layers, the second with a stride of two; GPT-2 byte-level BPE for the English-only models
  • Same paper: §2.1 30-second segments; §2.3 <|startoftranscript|>, a language token (99 languages), <|transcribe|> or <|translate|>, <|notimestamps|>, timestamps quantized to 20 milliseconds; §3.8 trained on 30-second chunks, long audio transcribed by consecutive 30-second segments; abstract 680,000 hours; §6 limitations: repeat loops, not transcribing the first or last few words of a segment, “complete hallucination … entirely unrelated to the actual audio”
  • https://github.com/openai/whisper/blob/main/whisper/audio.py (checked 2026-10-23): SAMPLE_RATE 16000, HOP_LENGTH 160, CHUNK_LENGTH 30, N_SAMPLES 480000, N_FRAMES 3000, N_SAMPLES_PER_TOKEN = HOP_LENGTH * 2 (“the initial convolutions has stride 2”), TOKENS_PER_SECOND 50 (“20ms per audio token”), pad_or_trim to N_SAMPLES
  • https://huggingface.co/openai/whisper-large-v3 (checked 2026-10-23): “uses 128 Mel frequency bins instead of 80”; trained on 1 million hours of weakly labeled audio and 4 million hours of pseudo-labeled audio
  • Window arithmetic (3 s, 30 s → 1,500; 45 s → 3,000; 130 s → 7,500 audio tokens) and the memo’s 72 text tokens (55 words, full GPT-2 BPE) from scripts/explain-data/speech-to-text.ts, run 2026-10-23; the memo was written for the lesson
  • https://console.groq.com/docs/speech-to-text (checked 2026-10-23): whisper-large-v3 and whisper-large-v3-turbo, audio downsampled to 16 kHz mono, a 10-second minimum billed per request, `language` parameter in ISO-639-1; aifree.dev catalog groq-free-tier (verified 2026-10-12) and /learn/free-groq-api-key: Whisper on the Free plan at 20 RPM, 2,000 RPD, 7,200 audio seconds per hour

Published Oct 23, 2026 · updated Oct 23, 2026

Embed this

Paste this into a blog post or course page: the lesson's main picture in an iframe, with a link back to the full lesson.

<iframe src="https://aifree.dev/embed/explain/speech-to-text" width="100%" height="620" style="border:0;max-width:720px" title="How does it turn my voice into text? (aifree.dev Explain)" loading="lazy"></iframe>
<p><a href="https://aifree.dev/explain/speech-to-text">How does it turn my voice into text? Interactive lesson on aifree.dev</a></p>

Never miss new offers and news

New tools, credits, and AI news are added regularly. Pick how you want to hear about them.

Telegram channel
Join @aifree_dev and get new free AI offers and news right in your Telegram feed.
Browser notifications
Turn on push notifications and get an alert on this device whenever something new is posted. No account needed.
Email newsletter
A weekly digest of new, changed and expiring free AI offers. Double opt-in, one-click unsubscribe.

Unsubscribe anytime. Privacy

Frequently asked questions

What is aifree.dev?

aifree.dev helps everyone access AI through a curated directory of free AI tools, API credits, free tiers, and startup programs for coding, image, voice, video, and students - verified regularly.

How are offers presented?

Each offer includes its access details, free models when available, and expiration information when provided. Limited-time deals stay visible so they are easy to compare.

Do education and startup programs need verification?

Yes. Providers usually ask students to verify their status with a school email, student ID, or a program like the GitHub Student Pack, and ask startups to verify company details such as age, funding, or website. Check each offer’s claim page for the exact requirements.

What kinds of free AI offers are listed?

Free tiers and free trials from AI providers, free API credits, startup and student programs, and free tools for coding, image generation, voice, and video.

How can I suggest a tool or report a broken link?

Use the submit form: paste the offer page URL and a short note. A person checks every submission before anything is listed. Broken links and changed terms go through the same form.

+

Know a good one?

Tell us about an AI tool worth knowing. Found a broken link? We want to hear that too.

Submit an offer