Spaces:
Runtime error
Runtime error
Update asr.py
Browse files
asr.py
CHANGED
|
@@ -82,7 +82,8 @@ def transcribe(audio_data=None, lang="eng (English)"):
|
|
| 82 |
else:
|
| 83 |
# file upload
|
| 84 |
|
| 85 |
-
isinstance(audio_data, str)
|
|
|
|
| 86 |
audio_samples = librosa.load(audio_data, sr=ASR_SAMPLING_RATE, mono=True)[0]
|
| 87 |
|
| 88 |
lang_code = lang.split()[0]
|
|
|
|
| 82 |
else:
|
| 83 |
# file upload
|
| 84 |
|
| 85 |
+
if not isinstance(audio_data, str):
|
| 86 |
+
return "<<ERROR: Invalid Audio Input Instance: {}>>".format(type(audio_data))
|
| 87 |
audio_samples = librosa.load(audio_data, sr=ASR_SAMPLING_RATE, mono=True)[0]
|
| 88 |
|
| 89 |
lang_code = lang.split()[0]
|