Skip to Content
Recodocs

11 · Adapt expressive speech

Listen to matched speech outputs and decide whether a decoder adapter changes delivery while preserving the script.

11 min read
Part 3
Adapt models
Model
parler-tts/parler-tts-mini-v1
Data
LibriTTS-R filtered at 8980d6531fa6404290be3ff52aeb55b95b9c8c93 with descriptions at 0ffbb79e07eaea6d9b191ac93a430f9264b3131d (both CC BY 4.0), joined on stable utterance IDs and split by speaker.
Hardware
Tesla T4, in Google Colab

Would you send the voice message?

You review recorded payment reminders. “Your balance is due on Friday” can sound measured and reassuring or brisk and matter-of-fact. The delivery can change. The customer still needs to hear Friday. Before auditioning for style, check whether the recording delivers the whole script.

The lab uses audiobook clips with known transcripts in place of payment reminders. Start with “He dropped back heavily into his chair by the fire.” The two model outputs received the same words and delivery description. Listen to the three recordings below. Which ones would you pass to a delivery review?

Same words, three recordings

He dropped back heavily into his chair by the fire.

Delivery description A female speaker delivers her very monotone and slightly low-pitch words quickly in a nearly quiet environment. The recording captures her speech with exceptional clarity.

Recorded reference2.320 s

Frozen Parler3.855 s

Adapted Parler3.855 s

Source · LibriTTS-R audio, CC BY 4.0, and two Lab 11 generations. Waveforms use the same amplitude and 3.855-second time scales.
Check what the recogniser heard in all three recordings

Whisper recovered the complete sentence from the recorded reference. On each generated clip it returned “He dropped.” The screening rule rejects both clips. Replaying them lets you check what was audible yourself.

He dropped back heavily into his chair by the fire.

Recorded reference · Whisper
He dropped back heavily into his chair by the fire.
Frozen Parler · Whisper
He dropped.
Adapted Parler · Whisper
He dropped.

Both generated arms left 16 of 19 words unmatched

Pooled word error rate · two held-out speakers · 0–100% scale

1
Recorded reference0.0% · 0/19
Frozen Parler84.2% · 16/19
Adapted Parler84.2% · 16/19
Source · Verified Lab 11 outputs on a Tesla T4.

1. Pair the script with a delivery description

The words and their delivery are separate aspects of speech. Even when the transcript is identical, pace, emphasis and pauses can affect how a listener receives it. Evaluate intelligibility and delivery separately.

Parler accepts two inputs. The script specifies the words to speak. The separate description specifies delivery and recording attributes. Lyth and King applied synthetic descriptions of speaker, style and recording conditions to their training corpus. Here we hold the description and script fixed across both model variants, including the “quickly” cue in the opening clip. Lyth and King paper · Parler Mini v1 model card

The notebook joins the filtered LibriTTS-R recordings to description rows and checks the utterance IDs. Four recordings from speakers 730 and 2007 provide the training examples. Speakers 4446 and 1188 are held out. The LibriTTS-R authors restored recordings from the LibriTTS corpus and used listener judgements to assess the sound. Keeping the reference here gives you a recording to compare with in addition to the intended words. LibriTTS-R paper · Filtered audio · Description data · Run’s input manifest

A useful review screen keeps the delivery cue and the script in separate fields. If a reviewer hears a voice that sounds hurried, the cue tells them whether that was requested. If they hear an incomplete message, the script tells them exactly which words to look for. In the opening recording the description calls for a monotone, slightly low-pitched voice speaking quickly in a nearly quiet environment. That combination gives the reviewer specific properties to listen for after checking that the sentence made it through.

The notebook uses independent text fields all the way through tokenisation. A model trained with the description as part of the spoken prompt would be learning a different task. Keeping the inputs visibly separate also makes it easy to compare the same script with a revised description without accidentally changing the expected transcript.

def prompt_fields(clip):
    # Encode the delivery guidance and the spoken text separately.
    description = tokenizer(clip["description"], return_tensors="pt").to(device)
    prompt = tokenizer(clip["text"], return_tensors="pt").to(device)
    return {"input_ids": description.input_ids, "attention_mask": description.attention_mask,
            "prompt_input_ids": prompt.input_ids, "prompt_attention_mask": prompt.attention_mask}

Check the join before looking at the sound. A description from the wrong utterance can give a plausible cue while teaching the model to associate that cue with the wrong recording. The manifest makes it possible to check the speaker, transcript and description together. The speaker split keeps recordings from those held-out speakers out of the adapter fit. The upstream checkpoint's training data includes LibriTTS-R, so the split describes the adapter comparison. For a deployment question about genuinely new voices, collect a separate, licensed set whose relationship to the base checkpoint is documented.

2. Train the decoder on codes from the real recording

Parler’s frozen codec turns the reference waveform into discrete codes. Descript’s codec stacks quantisers that encode successive residuals. The notebook uses the model’s nine codebooks and pinned delay-mask routine to prepare labels for the decoder. On the training line “[The moon] I gazed with a kind of wonder,” the resulting tensor has shape [1, 260, 9]. Its first codebook begins with token 548. The ninth begins with eight start symbols before token 645. DAC paper · Pinned Parler training source

Each codebook starts one step later

First 12 positions of the saved longest training sequence · 260 positions × 9 codebooks

2
Book 1
Book 2
Book 3
Book 4
Book 5
Book 6
Book 7
Book 8
Book 9

Book 1 starts with token 548. Book 9 starts with eight leading symbols, then token 645.

Source · Lab 11 codec-labels.pt, clip 730_358_000003_000002. Grey marks leading start symbols, token ID 1025.

The text encoder and codec stay frozen. The trainable weights are rank-eight low-rank adapters on the decoder’s cross-attention query and value projections. This is the update path from the notebook. Its up projection starts at zero, so the initial adapter contribution vanishes. The longest-clip preflight applied an update and restored the initial adapter weights before the scored fit.

nn.init.zeros_(self.up.weight)
self.scale = alpha / rank

def forward(self, hidden):
    return self.base(hidden) + self.scale * self.up(self.down(hidden))

The update uses AdamW at 0.00005 in FP32. The first scored example was “He was not a moneyed man.” Its codec-token loss was 4.238. Each update used a different clip, so the four loss readings describe the fit and the held-out generations decide whether to keep it. Training log

Four updates, four different recordings

Token cross-entropy for each scored update · scale 0–5

3
Step 14.238
Step 24.850
Step 34.722
Step 44.858
Source · Lab 11 per-update training log.

The delayed label lets different codebooks start at different positions. The labels retain a time axis and a codebook axis. If you flatten those axes prematurely, a decoder position can end up learning from the wrong stream. Check both the shape and an actual row of code tokens. In the example above, the first and ninth codebooks start with different amounts of padding. The schedule is visible in the figure, so you can diagnose a spacing or axis error before paying to fit the model.

The update path leaves most of the model fixed and lets the decoder adjust which conditioning it reads. A zero-initialised up projection establishes a clear comparison: the adapter starts by contributing zero, and the measured updates create the later differences. The longest prepared clip ran through the same kind of update for the memory check. Restoring its starting weights and using a fresh optimiser keeps that check out of the measured fit. If you raise the clip duration, repeat the profile on the longest prepared input rather than inferring a memory bound from the shorter examples.

An individual loss value describes probability assigned to the supplied codec targets. Open the decline in loss beside the train log before calling it a learning curve: successive points may represent different speakers, text, or audio lengths. The held-out losses give a closer pair because they score the same target recordings. The generated clips in the next section put both decoders through the harder task of choosing their own continuation.

3. Check the duration before interpreting the rate

The opening reference is 2.320 seconds. Both generated clips are 3.855 seconds and reach the 340-step limit. Across both speakers, mean absolute duration error was 1.295 seconds in either generated arm. The notebook’s approximate rate divides the script’s word count by audio duration, even when the clip omits words. For the opening generation, ten planned words in 3.855 seconds gives about 156 script words per minute. Whisper recovered two words, so the rate estimate cannot establish how fast the full sentence was spoken.

Both models hit the cap on both clips

Seconds of audio · outputs share the 340-step limit · 0–4 s scale

4

He dropped back heavily into his chair by the fire.

Recorded reference2.320 s
Frozen Parler3.855 s
Adapted Parler3.855 s

Only, there are two sorts of cloud and fire.

Recorded reference2.800 s
Frozen Parler3.855 s
Adapted Parler3.855 s
Source · Verified Lab 11 outputs on a Tesla T4.
# Use the same greedy decoding rule and ceiling for both arms.
generated = model.generate(
    **fields, do_sample=False, max_new_tokens=LIMITS["max_new_tokens"],
    return_dict_in_generate=True, output_scores=True,
)
Script excerptFrozen and adapted duration (s)Recorded duration (s)Edits in each generated clip
He dropped back heavily into his chair by the fire.3.85451247165532872.328
Only, there are two sorts of cloud and fire.3.85451247165532872.88

The two durations tell you something different from the two edit counts. Each generated clip lasts longer than the corresponding reference, yet neither yielded the whole script in the recogniser. A duration budget alone would therefore pass the wrong evidence to the pacing review. Look at the duration beside the cap flag. Hitting the ceiling tells you generation exhausted its allowance. It leaves open whether the decoder could finish with a longer allowance or would continue producing unhelpful audio. The saved outputs answer the former screening question. The latter is a follow-up you can test by changing the ceiling alone.

The saved teacher-forced codec loss changes slightly on the opening recording, from 4.625109 to 4.625021. In this calculation, each prediction can condition on the preceding reference tokens. Play the generated outputs to see what happens when the decoder has to continue from its own tokens. Both outputs yield the same recognised fragment. Per-clip scores

4. Replay the second speaker before accepting the result

On the second sentence Whisper transcribed both generated clips as “Only.” and recovered the full sentence from the recorded reference. The lab uses one frozen recogniser, based on the released Whisper checkpoint, and applies the same normalised word-edit calculation to all three arms. The reference’s zero edits check that it could recover the text from these two recordings. Whisper paper

Listen for the words after “Only”

Only, there are two sorts of cloud and fire.

Delivery description A man speaks with a very monotone tone, maintaining a moderate pace but with a slightly noisy background. His voice is slightly low-pitched and very close-sounding.

Recorded reference2.800 s

Frozen Parler3.855 s

Adapted Parler3.855 s

Source · LibriTTS-R audio, CC BY 4.0, and two Lab 11 generations. Waveforms use the same amplitude and 3.855-second time scales.
Reveal the three transcripts for the second speaker

Only, there are two sorts of cloud and fire.

Recorded reference · Whisper
Only there are two sorts of cloud and fire.
Frozen Parler · Whisper
Only.
Adapted Parler · Whisper
Only.

For the first clip the two model variants each contributed eight deletions over ten words. For the second they each contributed eight deletions over nine. Pool substitutions, deletions and insertions, then divide by the number of words in the normalised scripts.

WER⁡=S+D+IN\operatorname{WER}=\frac{S+D+I}{N}

The score is 16/19, or 84.2%, per generated arm, a change of 0.0 points after fitting. The notebook samples two speakers and one seed, so the tie applies to these outputs.

The two speakers lost different amounts of the script

Word edits over intended words, scored by frozen Whisper

5
Opening wordsRecorded referenceFrozen ParlerAdapted Parler
He dropped …0/108/108/10
Only, there …0/98/98/9
Source · Verified Lab 11 outputs on a Tesla T4.
Scoring signalFrozenAdaptedRecorded reference
Pooled WER0.84210526315789470.84210526315789470.0
Mean absolute duration error (s)1.2945124716553291.2945124716553290.0
Generated clips at the ceiling22—

WER is a transcription check with a known recogniser. It can miss flaws that listeners hear and can penalise harmless acoustic variation. The decision also depends on which words go missing. In the reminder example, a lost due date changes what the customer can do even if the rest of the recording sounds clear. Let a listener replay ambiguous cases. Record the disputed words alongside the recogniser text so the next review can distinguish a synthesis fault from a recognition fault.

For customer-facing audio, the reviewer can mark the required fields in the supplied script, check that those fields are audible, and then score the intended delivery. Keep the original approved recording available for situations where the generated message fails the script check. Audio quality and timing stay useful signals once the underlying message is usable. On these matched audiobook clips, neither decoder reached that review stage.

What to keep

Keep a script-completeness check before a review of pacing. Hold both test outputs for rework because a listener needs all the words. For the payment reminder, use the original approved recording while you test whether synthesis reliably retains the exact balance and due date on representative scripts.

CandidateWhat the saved clips showDecision for this review
Frozen decoderThe recogniser returned short fragments and both clips reached the ceiling.Hold for transcript review.
Adapted decoderSame fragments and word edits despite slightly lower teacher-forced losses.Keep the comparison evidence and hold the outputs.
Recorded referenceThe recogniser recovered both normalised scripts.Use as the listening anchor.
  • Check the whole script before delivery. Missing the due date in a payment reminder changes the instruction.
  • Listen against a matched reference. Use the same intended words and compare what is audible.
  • Inspect cap hits per clip. The aggregate duration cannot establish that the model reached a natural ending.
  • Keep fit and playback evidence together. A better score on supplied codec labels can coexist with incomplete speech.
  • Save the recogniser's actual words. They let reviewers locate the suspected omission independently of the WER.
  • Next to try, not tested here: compare a higher decoding ceiling under the same script, description and checkpoint.

How it was built

The fit took less than a second

One Tesla T4 · PyTorch allocator measurements

6
Longest training probe
0.726 s · 3.83 GiB reserved
Scored fit
0.686 s · four updates
Trainable weights
786,432 · 48 projections
Whole notebook
163.24 s · setup, fit, generation and scoring
Source · Verified Lab 11 outputs on a Tesla T4.
ItemSetting
Base modelParler-TTS Mini v1. Whisper base scores all audio arms.
DataFiltered LibriTTS-R audio joined with delivery descriptions by utterance ID.
TestTwo held-out speakers with matched scripts, descriptions and recordings.
MethodFreeze the codec and text encoder, adapt decoder cross-attention query and value projections.
TrainingRank 8, alpha 16, FP32, AdamW at 0.00005, four updates on four utterances.
DecodingGreedy on the same inputs, ceiling of 340 generation steps.
HardwareTesla T4 with CUDA 13.0 and PyTorch 2.14.1+cu130.

Time and cost. The receipt measures 163.237 seconds for notebook execution. The run report records 3.929688611000529 seconds for codec preparation and 0.6863759829993796 seconds for the fit. TTS peak allocation was 4,201,647,104 bytes and Whisper peak allocation was 189,413,376 bytes. These are separately observed allocator peaks. The notebook frees Parler before loading Whisper, so the figures describe successive phases.

The notebook used Parler-TTS Mini v1, Transformers 4.46.1, Datasets 3.6.0 and the pinned DAC wrapper with PyTorch 2.14.1+cu130. It generated greedily with a 340-step cap. Peak TTS allocation was 3.91 GiB. The playback controls serve the WAVs from the run, and the waveforms use the minimum and maximum recorded sample in each time bin. Run report · T4 profile · Execution receipt

Run it yourself

Open the notebook from the facts box or download the exact source used on the T4. Use the default profile and change one setting at a time.

The notebook’s Join the text, audio and delivery description section matches the conditioning section. Encode the training targets once and Adapt how the decoder reads its conditioning match the codec section. Score intelligibility and timing separately produces the rows in the duration check and speaker replay. The execution receipt records 163.237 seconds.

  1. Predict whether raising LIMITS["max_new_tokens"] lets the opening clip complete. Change only that ceiling, then inspect the cap flag, recognised words and duration in clips.csv for 4446_2275_000024_000000.
  2. Predict which words will still be audible if you change only the opening delivery description to “Measured and reassuring.” Replay both generated WAVs and compare the asr field before judging pacing.
  3. Predict how a narrower duration filter would change the longest prepared update. Change only the filter and inspect the input manifest and the T4 profile. Verify which held-out speaker IDs remain before comparing any scores.

How is this page?

Last updated on