Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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 |
|