SpireLab commited on
Commit
0c44772
·
verified ·
1 Parent(s): 6ea2e7a

Update API_Main.py

Browse files
Files changed (1) hide show
  1. API_Main.py +3 -2
API_Main.py CHANGED
@@ -58,8 +58,9 @@ async def Inference(text : str, lang : str, speaker_wav : UploadFile):
58
  if not speaker_wav:
59
  return JSONResponse({"comment" : "Speaker file not provided."}, status_code = 422)
60
 
61
- if lan not in languageCODE or lan not in languageCODE.values():
62
- return JSONResponse({"comment" : "Language not present in the system."}, status_code = 422)
 
63
 
64
  random_string = ''.join(random.choices(string.ascii_letters + string.digits, k=5))
65
 
 
58
  if not speaker_wav:
59
  return JSONResponse({"comment" : "Speaker file not provided."}, status_code = 422)
60
 
61
+ if lan not in languageCODE:
62
+ if lan not in languageCODE.values():
63
+ return JSONResponse({"comment" : "Language not present in the system."}, status_code = 422)
64
 
65
  random_string = ''.join(random.choices(string.ascii_letters + string.digits, k=5))
66