{"record":{"id":"77488575b0d79384","repo":"moeru-ai/airi","slug":"hearing-pipeline-stream-input-not-supported","errorCode":null,"errorMessage":"[Hearing Pipeline] Stream input not supported","messagePattern":"\\[Hearing Pipeline\\] Stream input not supported","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/stage-ui/src/stores/modules/hearing.ts","lineNumber":988,"sourceCode":"\n    await vad.init()\n    if (!vad.loaded.value) {\n      throw new Error(vad.inferenceError.value || 'Failed to initialize voice activity detection.')\n    }\n\n    await vad.start(stream)\n  }\n\n  async function transcribeForMediaStream(stream: MediaStream, options: MediaStreamTranscriptionOptions) {\n    console.info('[Hearing Pipeline] transcribeForMediaStream called', {\n      supportsStreamInput: supportsStreamInput.value,\n      hasStream: !!stream,\n      providerId: activeTranscriptionProvider.value,\n      hasCallbacks: !!(options.onSentenceEnd || options.onSpeechEnd || options.onTranscriptionUpdate),\n    })\n\n    if (!supportsStreamInput.value) {\n      console.warn('[Hearing Pipeline] Stream input not supported')\n      return\n    }\n\n    error.value = undefined\n    let consumerRegistered = false\n\n    try {\n      const providerId = activeTranscriptionProvider.value\n      const providerError = resolveActiveTranscriptionProviderError(providerId)\n      if (providerError) {\n        error.value = providerError\n        console.error('[Hearing Pipeline]', providerError)\n        return\n      }\n\n      console.info('[Hearing Pipeline] Using provider:', providerId)\n\n      // Special handling for Web Speech API - it works directly with MediaStream","sourceCodeStart":970,"sourceCodeEnd":1006,"githubUrl":"https://github.com/moeru-ai/airi/blob/f679616c34f1cf6d282c8d64264242af944b3fed/packages/stage-ui/src/stores/modules/hearing.ts#L970-L1006","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Switch to a stream-capable transcription provider (local transformers.js whisper worker or the browser Web Speech API) for live transcription","For non-streaming providers, use the record-then-transcribe flow (file input) instead of media streams","Gate live-audio UI on supportsStreamInput so incompatible provider selections cannot enable it","Restart monitoring after switching providers so capabilities are re-resolved"],"exampleFix":"// before\nawait hearing.transcribeForMediaStream(stream, { onTranscriptionUpdate })\n\n// after\nif (!hearing.supportsStreamInput.value) {\n  showUserError('Selected provider cannot transcribe live audio')\n  return\n}\nawait hearing.transcribeForMediaStream(stream, { onTranscriptionUpdate })","handlingStrategy":"validation","validationCode":"if (!hearing.supportsStreamInput.value) {\n  showUserError('Selected provider cannot transcribe live audio')\n  return\n}\nawait hearing.transcribeForMediaStream(stream, callbacks)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Gate all live-audio features on supportsStreamInput before calling transcribeForMediaStream","Restart monitoring after switching providers so capabilities re-resolve","Prefer stream-capable local providers when live captions are required"],"tags":["hearing","transcription","streaming","provider-capability","no-op"],"backgroundTag":"streaming-not-supported","analyzedSha":"f679616c34f1cf6d282c8d64264242af944b3fed","analyzedAt":"2026-08-18T17:29:58.153Z","contentChangedAt":"2026-08-18T17:29:58.153Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}