moeru-ai/airi · warning

[Hearing Pipeline] Stream input not supported

Error message

[Hearing Pipeline] Stream input not supported

What it means

transcribeForMediaStream() is the hearing pipeline entry for live MediaStream transcription. If the active transcription provider's capabilities lack stream input (supportsStreamInput is false), the function logs this and returns immediately without registering a consumer - a deliberate no-op. Caller callbacks (onSentenceEnd, onSpeechEnd, onTranscriptionUpdate) never fire.

Source

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

    await vad.init()
    if (!vad.loaded.value) {
      throw new Error(vad.inferenceError.value || 'Failed to initialize voice activity detection.')
    }

    await vad.start(stream)
  }

  async function transcribeForMediaStream(stream: MediaStream, options: MediaStreamTranscriptionOptions) {
    console.info('[Hearing Pipeline] transcribeForMediaStream called', {
      supportsStreamInput: supportsStreamInput.value,
      hasStream: !!stream,
      providerId: activeTranscriptionProvider.value,
      hasCallbacks: !!(options.onSentenceEnd || options.onSpeechEnd || options.onTranscriptionUpdate),
    })

    if (!supportsStreamInput.value) {
      console.warn('[Hearing Pipeline] Stream input not supported')
      return
    }

    error.value = undefined
    let consumerRegistered = false

    try {
      const providerId = activeTranscriptionProvider.value
      const providerError = resolveActiveTranscriptionProviderError(providerId)
      if (providerError) {
        error.value = providerError
        console.error('[Hearing Pipeline]', providerError)
        return
      }

      console.info('[Hearing Pipeline] Using provider:', providerId)

      // Special handling for Web Speech API - it works directly with MediaStream

View on GitHub (pinned to f679616c34)

Solutions

  1. Switch to a stream-capable transcription provider (local transformers.js whisper worker or the browser Web Speech API) for live transcription
  2. For non-streaming providers, use the record-then-transcribe flow (file input) instead of media streams
  3. Gate live-audio UI on supportsStreamInput so incompatible provider selections cannot enable it
  4. Restart monitoring after switching providers so capabilities are re-resolved

Example fix

// before
await hearing.transcribeForMediaStream(stream, { onTranscriptionUpdate })

// after
if (!hearing.supportsStreamInput.value) {
  showUserError('Selected provider cannot transcribe live audio')
  return
}
await hearing.transcribeForMediaStream(stream, { onTranscriptionUpdate })
Defensive patterns

Strategy: validation

Validate before calling

if (!hearing.supportsStreamInput.value) {
  showUserError('Selected provider cannot transcribe live audio')
  return
}
await hearing.transcribeForMediaStream(stream, callbacks)

Prevention

When it happens

Trigger: Selecting a record-then-transcribe provider (OpenAI-compatible REST transcription) while the settings playground or a media feature calls transcribeForMediaStream; switching to a non-streaming provider mid-session; no transcription provider active at all so supportsStreamInput resolves false.

Common situations: Hearing settings playground with an OpenAI-compatible provider selected; expecting live captions from providers that only accept uploaded files; stale capability flags after switching providers without restarting monitoring.

Related errors


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