gorkemgoknar commited on
Commit
8e7eadf
1 Parent(s): 0e33a67

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -41,11 +41,10 @@ def stt_record(audio_record_buffer):
41
 
42
  if type(audio_record_buffer)!=tuple:
43
  y, sr = librosa.load(audio_record_buffer)
44
- y = y.astype(np.int16)
45
  else:
46
  sr, y = audio_record_buffer
47
 
48
- y = librosa.resample(y, orig_sr=sr, target_sr=16000)
49
 
50
  scorer = True # use scorer
51
  if scorer:
 
41
 
42
  if type(audio_record_buffer)!=tuple:
43
  y, sr = librosa.load(audio_record_buffer)
 
44
  else:
45
  sr, y = audio_record_buffer
46
 
47
+ y = librosa.resample(y, orig_sr=sr, target_sr=16000).astype(np.float)
48
 
49
  scorer = True # use scorer
50
  if scorer: