Spaces:
Edmond98
/
Running on A100

vineelpratap commited on
Commit
a5b1a23
1 Parent(s): d4e3aaf

Update asr.py

Browse files
Files changed (1) hide show
  1. asr.py +1 -0
asr.py CHANGED
@@ -71,6 +71,7 @@ def transcribe(audio_data, lang="eng (English)"):
71
  if isinstance(audio_data, tuple):
72
  # microphone
73
  sr, audio_samples = audio_data
 
74
  print("case1", audio_samples[:5])
75
  assert sr == ASR_SAMPLING_RATE, "Invalid sampling rate"
76
  else:
 
71
  if isinstance(audio_data, tuple):
72
  # microphone
73
  sr, audio_samples = audio_data
74
+ audio_samples = (audio_samples/32768.0).astype(np.float)
75
  print("case1", audio_samples[:5])
76
  assert sr == ASR_SAMPLING_RATE, "Invalid sampling rate"
77
  else: