from config.language_mapping import LANGUAGE_VOICE_MAPPING def validate_input(text, language): if not text.strip(): raise ValueError("Input text cannot be empty.") if language not in LANGUAGE_VOICE_MAPPING: raise ValueError(f"Language {language} is not supported.")