Skip to content

轉錄幻覺過濾 Phase 2:confidence-gated (full) 模式 #100

Description

@kiki830621

Problem / Motivation

Phase A (#98) shipped a backend-agnostic denylist hallucination filter (--hallucination-filter <off|denylist>). Denylist catches known-boilerplate strings but can't catch novel silent-segment hallucinations. Whisper emits per-segment signals — no_speech_prob and compression_ratio — that flag hallucinated segments generically (high no-speech probability, abnormal compression ratio from repetition), independent of the exact text.

Type

feature

Expected

A full mode (--hallucination-filter full) that, on top of the denylist, drops cues by confidence signals:

  • no_speech_prob > threshold (silent-segment hallucination)
  • compression_ratio > threshold (repetition hallucination)
  • optionally avg_logprob < threshold

Blocked-by / Prerequisite

The segment model currently carries only confidence (WhisperKit's avgLogprob). no_speech_prob / compression_ratio are computed by WhisperKit but dropped at the engine boundary. full mode requires:

  1. Plumbing these fields through RawSegmentTranscriptSegment.
  2. Each engine populating them, with a per-backend fallback — whisper.cpp / Parakeet may not provide them, in which case full degrades to denylist for that backend.

Scope note

HallucinationFilterMode already exists (off | denylist); this adds a full case. The MVP deliberately shipped <off|denylist> only (no stub full) to avoid a misleading contract.

Source: deferred from #98 (Phase 2), filed at /idd-close time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions