CLAUDE LABJP
SONNET — Claude Sonnet 5 is now the default model in Claude Code, with a native 1M-token context window and introductory pricing through August 31CHROME — Claude in Chrome reaches general availability, letting you hand browser work directly to ClaudeCOWORK — Cowork expands to mobile and web so sessions and files follow you across devices, starting in beta for Max usersDATAVIZ — Claude Code adds a /dataviz skill offering guidance for designing charts and dashboardsAGENTS — Agent workflows gain background notifications, draft PR handoff, and improved failoverENTERPRISE — Claude Enterprise adds richer admin analytics, model-level entitlements, and spend alertsSONNET — Claude Sonnet 5 is now the default model in Claude Code, with a native 1M-token context window and introductory pricing through August 31CHROME — Claude in Chrome reaches general availability, letting you hand browser work directly to ClaudeCOWORK — Cowork expands to mobile and web so sessions and files follow you across devices, starting in beta for Max usersDATAVIZ — Claude Code adds a /dataviz skill offering guidance for designing charts and dashboardsAGENTS — Agent workflows gain background notifications, draft PR handoff, and improved failoverENTERPRISE — Claude Enterprise adds richer admin analytics, model-level entitlements, and spend alerts
Articles/API & SDK
API & SDK/2026-07-11Advanced

When Whisper Wrote 'Thanks for Watching' Into the Silence — Measuring and Killing Japanese Transcription Hallucinations

Whisper inserts phantom boilerplate into silent or noisy segments of Japanese audio. Here is how to measure hallucinations with no_speech_prob and avg_logprob, strip silence with VAD, and have Claude validate what remains — with the implementation and the routine that pulled it back.

Claude API111WhispertranscriptionJapanesevoice AIquality measurement

Premium Article

One day, while running a pipeline that auto-generates meeting minutes, an unfamiliar line appeared in the output: "Thanks for watching." It was an internal recurring meeting. Nobody said that.

Replaying the audio at that timestamp, it was a few seconds of silence while the presenter switched slides. Whisper had written words that did not exist into a stretch where nothing was spoken.

This is a well-known behavior in Whisper's Japanese transcription. On silence, noise, or music-only stretches, it emits boilerplate common in its training data — "Thanks for watching," "Please subscribe" — like a phantom. In English this is called hallucination.

What follows is how I handle this when embedding Whisper in an audio pipeline built with Rork or Cowork: measure the hallucination, then kill it with thresholds, preprocessing, and Claude validation. Not "it feels gone now," but a record of pulling the insertion rate back while tracking it as a number.

Why Whisper adds words to silence

Whisper splits audio into 30-second chunks and tries to turn each into "some text." The problem is a model that struggles to choose "no output" even when the input is silent.

Its training data includes huge amounts of YouTube audio, where boilerplate recurs at the ends and silent parts of videos. As a result, the model has learned a skewed mapping: "low audio information equals boilerplate."

Segment stateTypical Whisper behaviorCommon inserted phrase
Full silenceRepeats the prior sentence, or boilerplateThanks for watching
Music / noise onlyMeaningless fragments or boilerplatePlease subscribe
A faint backchannel onlyBalloons into an over-long sentence(repeat of prior speech)

So this is not "mishearing." It is "filling a gap when information is scarce." The countermeasure, then, is not to make the audio clearer — it is to detect and drop the segments where gap-filling happened.

First, measure it — get per-segment confidence

Measure before you act. Whisper's verbose_json response carries confidence hints per segment. Without logging these, you cannot see where hallucination occurs.

Two signals matter.

SignalMeaningSign of hallucination
no_speech_probProbability the segment is silenceHigh (over 0.6) yet text was produced
avg_logprobAverage log-probability of output tokens (confidence)Low (below -1.0) = close to guessing

High no_speech_prob with text present, and a low avg_logprob on top — a segment where both overlap is the most typical shape of hallucination.

from openai import OpenAI
 
client = OpenAI(api_key="YOUR_API_KEY")
 
def transcribe_with_confidence(audio_path):
    with open(audio_path, "rb") as f:
        result = client.audio.transcriptions.create(
            model="whisper-1",
            file=f,
            language="ja",
            response_format="verbose_json",
            # get per-segment confidence
            timestamp_granularities=["segment"],
        )
 
    flagged = []
    for seg in result.segments:
        # record segments strongly suspected of hallucination
        suspicious = seg.no_speech_prob > 0.6 and seg.avg_logprob < -1.0
        if suspicious:
            flagged.append({
                "start": round(seg.start, 1),
                "text": seg.text.strip(),
                "no_speech_prob": round(seg.no_speech_prob, 3),
                "avg_logprob": round(seg.avg_logprob, 3),
            })
 
    return result, flagged

Start by counting flagged. In my minutes pipeline, one hour of meeting audio averaged about 12 hits, most of them the boilerplate or a repeat of the prior sentence. Knowing the number first lets you compare whether later fixes actually work.

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
Why Whisper inserts boilerplate on silence and noise, and how to measure hallucinations per segment with no_speech_prob and avg_logprob
A two-stage implementation: VAD preprocessing plus threshold filtering, then Claude validating the transcript for context fit
A measured drop from ~12 to ~2 insertions per hour of audio, plus a weekly routine that avoids over-deletion
Secure payment via Stripe · Cancel anytime

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

Related Articles

API & SDK2026-07-10
Don't Trust the Confidence Score: Per-Class Calibration and Abstain Routing for Vision Classification
Overall accuracy looked fine while individual categories quietly collapsed. Here is how I calibrated Claude Vision's self-reported confidence per class and routed abstentions to a human queue.
API & SDK2026-07-10
My Nightly Batch Was Quietly Running on a Bigger Model — Declaring Per-Task Model Ceilings and Enforcing Them
Scatter model names through your code and a cheap batch job will eventually run on an expensive model. Here is a manifest that declares a ceiling per task, a deny-by-default resolver, and a morning audit that catches drift — with working code.
API & SDK2026-07-09
When the RAG Started Being Confidently Wrong — Field Notes on Measuring Retrieval Misses With Groundedness
In a Claude API RAG, the answers stay fluent while the facts drift. Often the cause is a silent recall decay on the retrieval side, missing the document that holds the answer. Field notes on measuring groundedness and retrieval hit rate and walking the system back, with working code and real numbers.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →