tts-openai / src /model /language.py
imseldrith's picture
Upload folder using huggingface_hub (#1)
2f07364 verified
raw
history blame contribute delete
300 Bytes
from pydantic import BaseModel, validator
class Language(BaseModel):
sourceLanguage: str
@validator('sourceLanguage', pre=True)
def blank_string_in_language(cls, value, field):
if value == "":
raise ValueError('sourceLanguage cannot be empty')
return value