{"version":3,"file":"exceptions.mjs","names":[],"sources":["../../../../src/batteries/tts/transformers_js/exceptions.ts"],"sourcesContent":["/**\n * Battery-scoped exception constructors for the transformers.js TTS adapter.\n *\n * @module @nhtio/adk/batteries/tts/transformers_js/exceptions\n *\n * @remarks\n * Battery-scoped exception classes for the transformers.js (`@huggingface/transformers`)\n * text-to-speech adapter, minted via `createException` from `@nhtio/adk/factories`. Categories mirror\n * the transformers.js STT battery one-to-one — only the engine-specific failure differs.\n */\n\nimport { createException } from '@nhtio/adk/factories'\n\n/**\n * Thrown when the resolved adapter options fail validation against\n * `transformersJsTtsOptionsSchema` — e.g. a missing/empty `model` or an unknown option key.\n * Fatal: config bugs fail loud, not at synthesize time.\n */\nexport const E_INVALID_TRANSFORMERS_JS_TTS_OPTIONS = createException<[string]>(\n  'E_INVALID_TRANSFORMERS_JS_TTS_OPTIONS',\n  'Invalid transformers.js TTS adapter options: %s',\n  'E_INVALID_TRANSFORMERS_JS_TTS_OPTIONS',\n  529,\n  true\n)\n\n/**\n * Thrown when the transformers.js pipeline fails to load (e.g. the `@huggingface/transformers` peer\n * is not installed) or the `text-to-speech` call throws/returns a malformed result. Non-fatal.\n * Printf arg: `[detail]`.\n */\nexport const E_TRANSFORMERS_JS_TTS_ENGINE_ERROR = createException<[string]>(\n  'E_TRANSFORMERS_JS_TTS_ENGINE_ERROR',\n  'transformers.js TTS engine error: %s',\n  'E_TRANSFORMERS_JS_TTS_ENGINE_ERROR',\n  502,\n  false\n)\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,IAAa,wCAAwC,gBACnD,yCACA,mDACA,yCACA,KACA,IACF;;;;;;AAOA,IAAa,qCAAqC,gBAChD,sCACA,wCACA,sCACA,KACA,KACF"}