generate_local_lan / utils /input_validation.py
abhishekrajpurohit's picture
Upload 9 files
f34acd1 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.")