filipzawadka commited on
Commit
c132e74
1 Parent(s): 170edeb
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -5,11 +5,8 @@ import numpy as np
5
  transcriber = pipeline("automatic-speech-recognition", model="filipzawadka/whisper-small-pl-2")
6
 
7
  def transcribe(audio):
8
- sr, y = audio
9
- y = y.astype(np.float32)
10
- y /= np.max(np.abs(y))
11
-
12
- return transcriber({"sampling_rate": sr, "raw": y})["text"]
13
 
14
 
15
  demo = gr.Interface(
 
5
  transcriber = pipeline("automatic-speech-recognition", model="filipzawadka/whisper-small-pl-2")
6
 
7
  def transcribe(audio):
8
+ print(audio)
9
+ return transcriber(audio)["text"]
 
 
 
10
 
11
 
12
  demo = gr.Interface(