/** * Machine readable identifiers attached to every {@link VoxShotError}. */ export type VoxShotErrorCode = "UNKNOWN" | "DEVICE_UNAVAILABLE" | "NO_VOICE" | "VOICE_NOT_FOUND" | "INVALID_INPUT" | "AUDIO_DECODE_FAILED" | "LOAD_STALLED" | "DISPOSED"; /** * Base class for every error thrown by VoxShot. * * Consumers can branch on {@link VoxShotError.code} instead of matching * message strings, which keeps error handling stable across releases. */ export declare class VoxShotError extends Error { readonly code: VoxShotErrorCode; constructor(message: string, code?: VoxShotErrorCode, options?: ErrorOptions); } /** The requested inference device is not available in this environment. */ export declare class DeviceUnavailableError extends VoxShotError { readonly device: string; constructor(device: string, options?: ErrorOptions); } /** Synthesis was requested before a voice was cloned or selected. */ export declare class NoVoiceError extends VoxShotError { constructor(options?: ErrorOptions); } /** A saved voice was requested but does not exist in the voice store. */ export declare class VoiceNotFoundError extends VoxShotError { readonly voiceName: string; constructor(voiceName: string, options?: ErrorOptions); } /** An argument did not satisfy the documented contract. */ export declare class InvalidInputError extends VoxShotError { constructor(message: string, options?: ErrorOptions); } /** Reference audio could not be decoded into PCM samples. */ export declare class AudioDecodeError extends VoxShotError { constructor(message: string, options?: ErrorOptions); } /** * Model loading produced no progress for the configured stall timeout. * * A hung transfer does not reject on its own — the underlying promise simply * never settles — so without this the caller would wait forever with no way to * tell "still loading" from "dead". */ export declare class LoadStalledError extends VoxShotError { /** The stall threshold that was exceeded, in milliseconds. */ readonly stallTimeoutMs: number; constructor(stallTimeoutMs: number, options?: ErrorOptions); } /** The instance was used after {@link VoxShot.dispose} was called. */ export declare class DisposedError extends VoxShotError { constructor(options?: ErrorOptions); } /** Type guard narrowing an unknown thrown value to a {@link VoxShotError}. */ export declare function isVoxShotError(value: unknown): value is VoxShotError; //# sourceMappingURL=errors.d.ts.map