badrex commited on
Commit
c6bd35b
·
verified ·
1 Parent(s): 04ac83f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -23,13 +23,13 @@ def transcribe(audio):
23
  y = y.mean(axis=1)
24
 
25
  # resample to 16kHz if needed
26
- if sr != 16000:
27
- y = librosa.resample(y, orig_sr=sr, target_sr=16000)
28
 
29
  y = y.astype(np.float32)
30
  y /= np.max(np.abs(y))
31
 
32
- return transcriber({"sampling_rate": 16000, "raw": y})["text"]
33
 
34
  examples = []
35
  examples_dir = "examples"
 
23
  y = y.mean(axis=1)
24
 
25
  # resample to 16kHz if needed
26
+ #if sr != 16000:
27
+ # y = librosa.resample(y, orig_sr=sr, target_sr=16000)
28
 
29
  y = y.astype(np.float32)
30
  y /= np.max(np.abs(y))
31
 
32
+ return transcriber({"sampling_rate": sr, "raw": y})["text"]
33
 
34
  examples = []
35
  examples_dir = "examples"