Free How much of your firm runs on you? Take the 2-minute Key Man Score.
Lesson reading
0%

Lesson 1 / Unit 1: Audio Foundations

Waveform Basics

Read a real recording, check its sample rate, and establish exactly what this small recognizer will learn.

We will train a recognizer to return short digit strings from audio. Its weights start randomly; its vocabulary is deliberately restricted to 0 through 9. It will not transcribe ordinary conversation.

The lab uses recorded digits joined into synthetic sequences. This makes the alignment problem visible without pretending we have collected natural phone calls. Every lesson builds on the same downloadable experiment.

Run Setup

Download the lab, extract it, and open a terminal in its folder. Python, basic tensors and familiarity with a training loop are the prerequisites. The recorded run used Python 3.14 and PyTorch 2.14.1 on an ARM Mac CPU. Other supported platforms can have different timings and results.

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
git clone https://github.com/Jakobovski/free-spoken-digit-dataset.git fsdd
git -C fsdd checkout 26eb9aaf76e81b692f806f9140c2d2777410d7a1
python lab.py --data fsdd --out my-run --epochs 60

The ZIP includes source, logs and a checkpoint. Downloading and running it happens on your machine; the browser examples do not upload microphone audio or train a model.

Inspect Audio

Run this after the dataset download:

from scipy.io import wavfile
rate, pcm = wavfile.read('fsdd/recordings/0_jackson_0.wav')
assert pcm.ndim == 1 and str(pcm.dtype) == 'int16'
audio = pcm.astype('float32') / 32768
print(rate, len(audio) / rate, audio.min(), audio.max())

Dividing the sample count by the header rate gives duration. Changing the header without changing samples changes playback speed and pitch; it is not resampling. Keep the original file so every later transform can be reproduced.

Held-out digit sequence

A sequence assembled from FSDD recordings, with a short silence between digits. Labels and source filenames are in the lab manifest.

Course Boundary

The FSDD source documents the recordings and their attribution/share-alike licence. Our split and sequence construction are custom, so our scores must not be presented as the dataset’s standard benchmark.

Continue with Speech Features, then define your Transcript Policy before training.

We do this work for teams shipping voice agents: Self-Hosted Voice Agent .

Edit this lesson on GitHub ↗

Discussion

Questions, corrections and war stories welcome. Sign in with GitHub to comment.

Free guide

Be The 10x Entrepreneur

Get the firm out of your head.

  • 8 chapters
  • 7 worksheets
  • 30 day plan