Update lid.py
Browse files
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
|