vineelpratap
commited on
Commit
•
71996b7
1
Parent(s):
e628248
Update lid.py
Browse files
lid.py
CHANGED
@@ -25,9 +25,9 @@ def identify(audio_data):
|
|
25 |
# microphone
|
26 |
sr, audio_samples = audio_data
|
27 |
audio_samples = (audio_samples / 32768.0).astype(np.float32)
|
28 |
-
if sr !=
|
29 |
audio_samples = librosa.resample(
|
30 |
-
audio_samples, orig_sr=sr, target_sr=
|
31 |
)
|
32 |
else:
|
33 |
# file upload
|
|
|
25 |
# microphone
|
26 |
sr, audio_samples = audio_data
|
27 |
audio_samples = (audio_samples / 32768.0).astype(np.float32)
|
28 |
+
if sr != LID_SAMPLING_RATE:
|
29 |
audio_samples = librosa.resample(
|
30 |
+
audio_samples, orig_sr=sr, target_sr=LID_SAMPLING_RATE
|
31 |
)
|
32 |
else:
|
33 |
# file upload
|