vineelpratap
commited on
Commit
•
bcdaadd
1
Parent(s):
450b719
Update asr.py
Browse files
asr.py
CHANGED
@@ -71,7 +71,7 @@ def transcribe(audio_data, lang="eng (English)"):
|
|
71 |
if isinstance(audio_data, tuple):
|
72 |
# microphone
|
73 |
sr, audio_samples = audio_data
|
74 |
-
audio_samples = (audio_samples / 32768.0).astype(np.
|
75 |
assert sr == ASR_SAMPLING_RATE, "Invalid sampling rate"
|
76 |
else:
|
77 |
# file upload
|
|
|
71 |
if isinstance(audio_data, tuple):
|
72 |
# microphone
|
73 |
sr, audio_samples = audio_data
|
74 |
+
audio_samples = (audio_samples / 32768.0).astype(np.float32)
|
75 |
assert sr == ASR_SAMPLING_RATE, "Invalid sampling rate"
|
76 |
else:
|
77 |
# file upload
|