vineelpratap commited on
Commit
8a0a956
1 Parent(s): d3faf34

Update lid.py

Browse files
Files changed (1) hide show
  1. lid.py +4 -1
lid.py CHANGED
@@ -20,7 +20,10 @@ with open(f"data/lid/all_langs.tsv") as f:
20
  LID_LANGUAGES[iso] = name
21
 
22
 
23
- def identify(audio_data):
 
 
 
24
  if isinstance(audio_data, tuple):
25
  # microphone
26
  sr, audio_samples = audio_data
 
20
  LID_LANGUAGES[iso] = name
21
 
22
 
23
+ def identify(audio_data = None):
24
+ if not audio_data:
25
+ return "<<ERROR: Empty Audio Input>>"
26
+
27
  if isinstance(audio_data, tuple):
28
  # microphone
29
  sr, audio_samples = audio_data