Build1 distinct publisher3 min readPublished
The pipeline cut at segments[-1].end, which is the end of the file once the transcriber puts the hallucinated tail in its own segment. So the fallback built for tail hallucinations only ever ran on clips that did not need it.
The Engineer · Build desk

Compiled by The EngineerSomething wrong?How this is made
`segments[-1].end` answers a different question from the one the trimmer was asking. It reports where the audio stops being speech. The code needed where the script stops being spoken. In clip base_11 those two timestamps are 1.60 seconds apart: the script ends at 3.50s, the extra segment runs to 5.10s, and 5.10s is the end of the file [12][17].
So the call trimmed a 5.10-second clip down to 5.10 seconds, plus 40ms of padding it had no room for [11][13]. The one thing it deleted reliably was trailing silence that was harming nobody. The transcript comparison then ran again, failed again, and the clip was excluded [13].
The second reproduction makes the geometry plainer. The script ends at 2.50s, the hallucination starts at 3.98s and runs to 5.84s [14]. That is 3.34 seconds of audio past the script with a 1.48-second silence sitting in the middle of it [18]. A gap that size is cheap to detect, but the trimmer never examined gaps; it had already committed to an array index.
When the transcriber returns one segment, `segments[-1]` is `segments[0]`, and cutting there removes trailing silence harmlessly. The author notes the intent was clear and unit tests would pass [15]. That is the clean path, and it was the only path the function was ever exercised on.
Detection came from the batch, not from the code. Twenty and eighteen rejections against a zero-to-ten band across the other voices [4]; on a 65-sentence base corpus at one clip per sentence, that is 31% and 28% against a worst healthy case of 15%, about double [5][19]. Ten sound voices are what made two bad ones legible [20]. A single-voice run would have produced a number nobody questioned.
Two conditions have to hold before this is your bug. Your TTS has to be deterministic for a fixed caption and seed, which is what turned an intermittent artifact into the same failure on every rerun [9]. And your transcriber has to split the tail into its own segment [12]. If yours folds the hallucination into a single segment, `segments[-1].end` is the correct expression and this failure mode never appears. Note also that with determinism in place, only one rung of the three-level ladder could change the audio at all: re-rolling `num_steps` with caption and seed pinned [10].
The mora correlation is suggestive rather than established. The five named rejections run 14 to 17 mora against a corpus median of 21 and a minimum of 13 [5][6], so all five sit 4 to 7 below the median and the shortest is one mora off the floor [21]. Five samples are not a curve across 65 sentences. If length is the driver, rejection rate should fall as mora count rises, and that is a plot the pipeline already has the data to draw.
The boundary the trimmer needed was in the payload the whole time: the end of the last segment whose text still matches the script, 3.50s in the first clip and 2.50s in the second [12][14]. The narrow lesson is about fixtures. A fallback that indexes into output produced by the very failure it handles has to be tested against that output, and a two-segment transcript is four lines of JSON.
Ranked by verification strength, evidence, and original report placement.
The published dev.to text breaks off mid-sentence as it begins to state the fix: 'The correct approach isn't to use "the end of the last se'.
The author operates a pipeline that generates training corpora for voice synthesis models: TTS reads text, Whisper transcribes it, the transcription is compared to the script, and only clips that pass the quality check are saved as training material.
While running a batch to produce 12 voices, two presenters failed to generate properly.
The failure surfaced as an error reading 'Too many rejected base corpus clips' listing base_07, base_11, base_46, base_51 and base_55.
The two failing presenters had 20 and 18 rejected clips respectively, while other voices had only 0 to 10 rejections.
The base corpus consists of 65 sentences with mora counts ranging from 13 minimum to 33 maximum, with a median of 21.
Distinct publishers with included, body-backed reporting in this cluster.
dev.to
1 article · September 2, 2026
Follow any of these and your For You feed starts watching them — no settings page required.
build
A RAG stack lived seven hours before a hosted embedding endpoint returned 4041 distinct publisher
build
Whisper's exact-match gate selected the flattest take in an emotion-TTS corpus1 distinct publisher
build
DOMPurify's svg profile strips the foreignObject carrying Mermaid labels in four of five diagram types1 distinct publisher
build
Your .ai viewer is a pdf.js problem, and its worst bugs never throw1 distinct publisher
Evidence-backed comparisons of source perspectives and observed adoption signals. Read the methodology
Which Builder, Operator, and Investor concerns the observed source mix emphasized—not a truth score.
Evidence, demonstrated adoption, hype gap, incentives, and confidence are assessed independently, each on its own current evidence. How these are measured.
Shown in code and timestamps, witnessed by one person
The mechanism is demonstrated rather than asserted: printed segment boundaries, the exact call that hands segs[-1]['end'] to the trimmer, that function's own docstring, and three script-versus-transcription pairs where the gibberish starts after the sentence ends. What holds the score down is provenance, not rigour - every number comes from one operator's terminal, the transcriber build and the synthesis model go unnamed, and nobody has re-run any of it.
One pipeline, twelve voices, self-reported
Real use, of exactly one system. The pipeline is in service and the failure cost it two presenters out of twelve, which is more than a toy demonstration and far less than evidence of reach. No other operator reports the same boundary mistake, no consumer of these corpora appears, and the corrected helper has no usage record at all.
Sold as a personal slip, general as a pattern
Nothing in this write-up outruns what it shows; if anything the framing is too modest. A bug the author admits missing for months is presented as a confession, when the underlying trap - trimming at a transcriber's last segment boundary, which the tail hallucination itself moves to the end of the file - applies to any verification loop built this way. The unfinished ending mutes the payoff further: the strongest part, the match-ratio boundary, arrives just as the text runs out.
No vendor to flatter, an error to own
The author is also the publisher - Japanese original on his own site, English version on dev.to - and there is no product, model or sponsor in the frame; the centrepiece is his own months-long mistake, which is the opposite of a sales pitch. The residual pull is reputational and selective: a clean debugging arc reads better than a messy one, and every log excerpt was chosen by the person it embarrasses.
Coherent mechanism, single witness
Determinism is what makes this more than an anecdote - same caption, same seed, same hallucination - and the causal chain from two-segment output to inert trim is tight enough to follow line by line. Working against that: one account, unverified externally, whose text stops mid-function, and a short-sentence correlation drawn from five rejected sentences that reads as a pattern rather than a finding.