moeru-ai/airi · warning

[Hearing] Confidence filter is enabled but the provider did

Error message

[Hearing] Confidence filter is enabled but the provider did not return verbose_json segments. Filtering has no effect.

What it means

With the hearing confidence filter enabled (confidenceThreshold above the disabled sentinel), the module requests responseFormat 'verbose_json' from the transcription provider. Some OpenAI-compatible endpoints accept verbose_json but return a payload without a segments array; when response.segments is missing, the confidence filter cannot run, verboseJsonNotSupported is flagged for the UI, and the unfiltered normalizeGeneratedTranscriptionText fallback text is returned instead.

Source

Thrown at packages/stage-ui/src/stores/modules/hearing.ts:523

        file: normalizedInput.file,
        fileName: resolveTranscriptionFileName(normalizedInput.file, normalizedInput.fileName),
        responseFormat: useVerboseJson ? 'verbose_json' : format,
      })

      if (useVerboseJson) {
        if (response.segments) {
          verboseJsonNotSupported.value = false
          const filteredText = filterTranscriptionByConfidence(response.segments, confidenceThreshold.value)
          emitSucceeded(filteredText.length, false)
          return {
            mode: 'generate',
            ...response,
            text: filteredText,
          }
        }
        else {
          verboseJsonNotSupported.value = true
          console.warn('[Hearing] Confidence filter is enabled but the provider did not return verbose_json segments. Filtering has no effect.')
        }
      }

      const fallbackText = normalizeGeneratedTranscriptionText(response)
      emitSucceeded(fallbackText.length, false)
      return {
        mode: 'generate',
        ...response,
        text: fallbackText,
      }
    }
    catch (err) {
      emitFailed(err)
      throw err
    }
  }

  return {

View on GitHub (pinned to f679616c34)

Solutions

  1. Use a provider that honors response_format=verbose_json (e.g. the OpenAI Whisper API) when confidence filtering matters
  2. Upgrade the local whisper server to a build that emits segments in verbose_json
  3. Disable the confidence threshold in hearing settings - useVerboseJson then becomes false and the warning stops
  4. Surface verboseJsonNotSupported in the UI so users see the filter is inert instead of only a console warn

Example fix

// before: endpoint ignores verbose_json, segments undefined
const response = await generateTranscription({ ...request, responseFormat: 'verbose_json' })
filterTranscriptionByConfidence(response.segments ?? [], threshold)

// after: capability-check before filtering
if (useVerboseJson && Array.isArray(response.segments)) {
  return { ...response, text: filterTranscriptionByConfidence(response.segments, threshold) }
}
verboseJsonNotSupported.value = true
return { ...response, text: normalizeGeneratedTranscriptionText(response) }
Defensive patterns

Strategy: validation

Validate before calling

const probe = await generateTranscription({ ...request, responseFormat: 'verbose_json' })
if (!Array.isArray(probe.segments)) {
  verboseJsonNotSupported.value = true
  // disable the confidence filter for this provider
}

Type guard

interface SegmentedTranscription {
  segments?: Array<{ text: string, avg_logprob?: number }>
}
function hasVerboseSegments(r: SegmentedTranscription): r is SegmentedTranscription & { segments: NonNullable<SegmentedTranscription['segments']> } {
  return Array.isArray(r.segments) && r.segments.length > 0
}

Prevention

When it happens

Trigger: Using an OpenAI-compatible provider whose /audio/transcriptions endpoint ignores response_format=verbose_json (local whisper.cpp / faster-whisper shims, gateways that rewrite responses); providers that omit segments for very short clips; any generateTranscription response lacking segments while useVerboseJson is true.

Common situations: Self-hosted whisper servers with partial OpenAI API compatibility; third-party proxies normalizing verbose_json to plain text; provider upgrades dropping segments support; confidence slider enabled against such a provider.

Related errors


AI-assisted analysis of moeru-ai/airi@f679616c34 (2026-08-18). Data as JSON: /api/errors/c82baa36cc473f13. Report an issue: GitHub.