Macalinao StudioLearnAll enriched lessons ↗
College path · 7 sectionsSwitch to high school ↗

College / LONGER LESSON 26s

Speech synthesis: from text to a waveform

Trace pronunciation, acoustic representation and waveform generation as separate stages.

Preparation: Sampling, time and basic signal quantities.

Plan 20–35 minutes with the activities; this is a study estimate, not a timed requirement. Both paths have complete narration. Your notes and progress are kept separately for each level.

Section 01 / 07

Text needs a pronunciation plan

College path. Trace pronunciation, acoustic representation and waveform generation as separate stages.

Preparation: Sampling, time and basic signal quantities. Work through one section at a time. Predict the experiment result before changing its controls, then explain what the example leaves out.

Written symbols do not uniquely determine pronunciation. Numbers, abbreviations, names and punctuation need interpretation before a speech system can render them intelligibly. Text normalization, grapheme-to-phoneme conversion or learned text representations vary by model. Record language and pronunciation controls rather than assuming every architecture exposes the same stages.

Worked step 1. Write Dr. Lee has 12 samples.

Worked step 2. Decide the intended expansion and emphasis.

Worked step 3. Check the actual spoken result.

Try it yourself. Can punctuation alone guarantee the desired prosody?

Pause the recording and write your reasoning before continuing. The worked solution follows.

Reveal worked solution

Worked solution. No. It is one cue; model behavior and explicit controls need listening tests.

Section 02 / 07

A waveform is a sequence of samples

Digital audio stores measurements over time. Sample rate counts samples per second; bit depth and channels affect uncompressed storage. These are not the same as neural codec tokens. For PCM, bytes equal sample rate times duration times channels times bits per sample divided by eight. Compressed codecs have different accounting and may use variable rates.

PCM bytes = sample-rate × seconds × channels × bits/8

Worked step 1. Ten seconds at 24,000 samples per second has 240,000 mono samples.

Worked step 2. At 16 bits each, that is 480,000 bytes.

Try it yourself. Are those 240,000 text tokens?

Pause the recording and write your reasoning before continuing. The worked solution follows.

Reveal worked solution

Worked solution. No. They are waveform samples. Text tokens and codec tokens represent different objects.

Section 03 / 07

Respect the sampling limit

Sampling requires controlling frequencies above half the sample rate to avoid aliasing. A higher sample rate increases representable bandwidth but does not repair poor pronunciation or a noisy reference. The Nyquist limit is half the sample rate under band-limited sampling assumptions. Anti-alias filtering is part of proper resampling; naive sample dropping can introduce artifacts.

Worked step 1. At 24 kilohertz, Nyquist frequency is 12 kilohertz.

Worked step 2. At 48 kilohertz, it is 24 kilohertz.

Try it yourself. Does doubling sample rate guarantee twice the perceived quality?

Pause the recording and write your reasoning before continuing. The worked solution follows.

Reveal worked solution

Worked solution. No. Source quality, model, codec, playback and perceptual relevance all matter.

Section 04 / 07

Acoustic features are not the final sound

Some systems predict an acoustic representation such as a mel spectrogram and use a vocoder to produce waveform samples. Other systems predict codec tokens or use different architectures. Tacotron 2 combines a sequence-to-sequence acoustic model with a modified WaveNet vocoder. Do not describe every modern TTS system as using that exact pipeline.

Worked step 1. Text becomes a time-varying acoustic representation.

Worked step 2. A waveform generator renders samples.

Worked step 3. Listen for errors introduced at either stage.

Try it yourself. Is a spectrogram already a playable PCM waveform?

Pause the recording and write your reasoning before continuing. The worked solution follows.

Reveal worked solution

Worked solution. No. It is a time-frequency representation; waveform reconstruction or generation is another step.

Section 05 / 07

Timing carries meaning

Pauses, stress and duration affect intelligibility and interpretation. A technically clean recording can still rush an equation or place emphasis on the wrong word. Evaluate alignment and prosody separately from speaker similarity. Duration controls and forced aligners have model-specific behavior; timestamps should be checked against the actual waveform.

Worked step 1. Read a practice prompt.

Worked step 2. Insert a deliberate pause before its solution.

Worked step 3. Verify the pause is long enough for the intended learner action.

Try it yourself. Does waveform normalization fix rushed teaching?

Pause the recording and write your reasoning before continuing. The worked solution follows.

Reveal worked solution

Worked solution. No. Loudness and pedagogical pacing are separate properties.

Section 06 / 07

Evaluate with listening and text checks

Test names, numbers, formulas and long passages, not only a friendly greeting. Keep readable text available and provide playback speed and pause controls. Use pronunciation error logs, listening samples, loudness and clipping checks, and timing validation. Automatic transcription can help detect omissions but does not fully measure naturalness or correctness.

Worked step 1. Compare the script with the recording.

Worked step 2. Check a difficult abbreviation and a number.

Worked step 3. Verify the complete ending is present.

Try it yourself. Does successful audio decoding prove correct narration?

Pause the recording and write your reasoning before continuing. The worked solution follows.

Reveal worked solution

Worked solution. No. It proves the file is readable by the decoder, not that every word is spoken correctly.

Section 07 / 07

Mastery and transfer

Bring the pieces together. First answer the checkpoint without the worked solutions. Then explain the mechanism in your own words, using one numerical example from this lesson.

At 24,000 samples per second, ten seconds of mono audio has… Option 1: 240,000 samples. Option 2: 24,000 text tokens. Option 3: A guaranteed file size regardless of codec.

Pause here and choose an answer before continuing. The checkpoint explanation follows.

Reveal worked solution

The correct choice is option 1: 240,000 samples. Sample count follows duration times sample rate; storage also depends on format.

Transfer task. Change one assumption in the worked example. State your prediction, calculate or test it in Workbench, then explain whether the result supports your prediction.

Reveal worked solution

Self-check rubric. Name the changed assumption, keep the other inputs fixed, show at least one intermediate calculation, and distinguish what the toy example guarantees from what would require a trained model or a real measurement.

Sources and scope

Original worked examples and teaching text, grounded in these primary references. Numerical fixtures explain mechanisms; model quality and hardware performance require separate measurements. Both levels share key examples, with different explanations and checkpoints.

Reset this college path?

This removes only this path’s notes, progress and experiments from this browser.