generate_local_lan / input_validation.py
abhishekrajpurohit's picture
Upload 39 files
195bb33 verified
raw
history blame contribute delete
291 Bytes
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.")