mirror of
https://github.com/denizsafak/abogen.git
synced 2026-07-18 05:40:26 +02:00
- Add .gitattributes with text=auto eol=lf for all text files - Renormalize all files in index to LF line endings - Fixes massive whitespace-only diffs between main and feature branch
63 lines
1.2 KiB
Python
63 lines
1.2 KiB
Python
"""Error hierarchy for the TTS Plugin Architecture.
|
|
|
|
This module defines typed exceptions that engines raise.
|
|
Engines should never raise raw exceptions; they must use EngineError or its subtypes.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
|
|
class EngineError(Exception):
|
|
"""Base exception for all engine errors.
|
|
|
|
All engine operations that can fail should raise EngineError or one of its subtypes.
|
|
After dispose(), all methods except dispose() raise EngineError.
|
|
"""
|
|
|
|
pass
|
|
|
|
|
|
class ModelNotFoundError(EngineError):
|
|
"""Raised when a required model is not found."""
|
|
|
|
pass
|
|
|
|
|
|
class ModelLoadError(EngineError):
|
|
"""Raised when a model fails to load."""
|
|
|
|
pass
|
|
|
|
|
|
class NetworkError(EngineError):
|
|
"""Raised when a network operation fails."""
|
|
|
|
pass
|
|
|
|
|
|
class InvalidInputError(EngineError):
|
|
"""Raised when invalid input is provided to the engine."""
|
|
|
|
pass
|
|
|
|
|
|
class ConfigurationError(EngineError):
|
|
"""Raised when there is a configuration error."""
|
|
|
|
pass
|
|
|
|
|
|
class CancelledError(EngineError):
|
|
"""Raised when an operation is cancelled.
|
|
|
|
This is raised by synthesize() when cancel() is called during synthesis.
|
|
"""
|
|
|
|
pass
|
|
|
|
|
|
class InternalError(EngineError):
|
|
"""Raised when an internal engine error occurs."""
|
|
|
|
pass
|