Spaces:
Sleeping
Sleeping
File size: 1,808 Bytes
24dc421 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | """
Custom exceptions for the application.
"""
class VoiceTranslatorException(Exception):
"""Base exception for all application exceptions."""
pass
class ConfigurationError(VoiceTranslatorException):
"""Configuration related errors."""
pass
class ModelLoadError(VoiceTranslatorException):
"""Model loading errors."""
pass
class STTError(VoiceTranslatorException):
"""Speech-to-text errors."""
pass
class TranslationError(VoiceTranslatorException):
"""Translation errors."""
pass
class TTSError(VoiceTranslatorException):
"""Text-to-speech errors."""
pass
class AudioProcessingError(VoiceTranslatorException):
"""Audio processing errors."""
pass
class RoomError(VoiceTranslatorException):
"""Room management errors."""
pass
class RoomFullError(RoomError):
"""Room is at maximum capacity."""
pass
class RoomNotFoundError(RoomError):
"""Room does not exist."""
pass
class UserNotFoundError(VoiceTranslatorException):
"""User not found."""
pass
class ConnectionError(VoiceTranslatorException):
"""WebSocket connection errors."""
pass
class AuthenticationError(VoiceTranslatorException):
"""Authentication errors."""
pass
class RateLimitError(VoiceTranslatorException):
"""Rate limiting errors."""
pass
class ValidationError(VoiceTranslatorException):
"""Data validation errors."""
pass
class UnsupportedLanguageError(VoiceTranslatorException):
"""Unsupported language."""
pass
class PipelineError(VoiceTranslatorException):
"""Processing pipeline errors."""
pass
class WorkerError(VoiceTranslatorException):
"""Worker pool errors."""
pass
|