{"record":{"id":"246ff8432034270c","repo":"home-assistant/core","slug":"stt-stream-failed","errorCode":"stt-stream-failed","errorMessage":"Unexpected error during speech-to-text","messagePattern":"Unexpected error during speech-to-text","errorType":"exception","errorClass":"SpeechToTextError","httpStatus":null,"severity":"error","filePath":"homeassistant/components/assist_pipeline/pipeline.py","lineNumber":972,"sourceCode":"            ):\n                stt_vad = VoiceCommandSegmenter(\n                    silence_seconds=self.audio_settings.silence_seconds\n                )\n\n            result = await self.stt_provider.async_process_audio_stream(\n                metadata,\n                self._speech_to_text_stream(audio_stream=stream, stt_vad=stt_vad),\n            )\n        except asyncio.CancelledError, TimeoutError:\n            raise  # expected\n        except hass_nabucasa.auth.Unauthenticated as src_error:\n            raise SpeechToTextError(\n                code=\"cloud-auth-failed\",\n                message=\"Home Assistant Cloud authentication failed\",\n            ) from src_error\n        except Exception as src_error:\n            _LOGGER.exception(\"Unexpected error during speech-to-text\")\n            raise SpeechToTextError(\n                code=\"stt-stream-failed\",\n                message=\"Unexpected error during speech-to-text\",\n            ) from src_error\n\n        _LOGGER.debug(\"speech-to-text result %s\", result)\n\n        if result.result != stt.SpeechResultState.SUCCESS:\n            raise SpeechToTextError(\n                code=\"stt-stream-failed\",\n                message=\"speech-to-text failed\",\n            )\n\n        if not result.text:\n            raise SpeechToTextError(\n                code=\"stt-no-text-recognized\", message=\"No text recognized\"\n            )\n\n        self.process_event(","sourceCodeStart":954,"sourceCodeEnd":990,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/assist_pipeline/pipeline.py#L954-L990","documentation":"SpeechToTextError with code stt-stream-failed wraps any unexpected exception thrown while streaming audio to the STT provider (async_process_audio_stream or the internal _speech_to_text_stream generator). The original traceback is logged via _LOGGER.exception before rethrowing, so the underlying cause is visible in the logs but hidden behind this generic pipeline error.","triggerScenarios":"Any non-auth, non-timeout exception during STT: the Wyoming connection drops mid-stream, the provider process crashes, a malformed audio chunk breaks the stream generator, or a custom provider raises a bug.","commonSituations":"Whisper add-on/container running out of memory or restarting mid-request, network interruption to a remote STT service, bugs in custom stt provider integrations, or audio streams that end prematurely.","solutions":["Check the Home Assistant log for the 'Unexpected error during speech-to-text' traceback — the chained source exception names the real failure.","Restart the STT backend (e.g. Wyoming Whisper add-on) and confirm it stays healthy during a request.","If the traceback points at audio handling, verify the stream yields chunks in the announced format until a clean end-of-stream.","For recurring provider crashes, inspect the provider's own logs (add-on logs) for OOM or model-load errors."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"from homeassistant.components.assist_pipeline.error import SpeechToTextError\ntry:\n    await pipeline_job.run()\nexcept SpeechToTextError as err:\n    if err.code == \"stt-stream-failed\":\n        _LOGGER.error(\"STT failed: %s\", err.__cause__)  # original traceback is in logs\n        # optionally retry once after provider restart\n        ...","preventionTips":["Watch STT backend (add-on/container) health and restart it on crash loops.","Always log err.__cause__ context; the real failure is the chained exception.","Keep Whisper models within the host's memory budget."],"tags":["assist-pipeline","stt","streaming","debugging"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}