asahi417 commited on
Commit
685aafd
1 Parent(s): cc828b8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -67,6 +67,8 @@ def transcribe(inputs: str, prompt):
67
  with open(inputs, "rb") as f:
68
  inputs = f.read()
69
  inputs = ffmpeg_read(inputs, pipe.feature_extractor.sampling_rate)
 
 
70
  inputs = {"array": inputs, "sampling_rate": pipe.feature_extractor.sampling_rate}
71
  return get_prediction(inputs, prompt)
72
 
 
67
  with open(inputs, "rb") as f:
68
  inputs = f.read()
69
  inputs = ffmpeg_read(inputs, pipe.feature_extractor.sampling_rate)
70
+ array_pad = np.zeros(int(pipe.feature_extractor.sampling_rate * 0.5))
71
+ inputs = np.concatenate([inputs, inputs, inputs])
72
  inputs = {"array": inputs, "sampling_rate": pipe.feature_extractor.sampling_rate}
73
  return get_prediction(inputs, prompt)
74