Update handler.py
Browse files- handler.py +1 -1
handler.py
CHANGED
@@ -19,7 +19,7 @@ class EndpointHandler():
|
|
19 |
#ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
|
20 |
#sample = ds[0]["audio"]
|
21 |
inputs = data.pop("inputs", data)
|
22 |
-
audio_nparray = ffmpeg_read(inputs,
|
23 |
audio_tensor = torch.from_numpy(audio_nparray)
|
24 |
|
25 |
prediction = pipe(audio_nparray, return_timestamps=True)
|
|
|
19 |
#ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
|
20 |
#sample = ds[0]["audio"]
|
21 |
inputs = data.pop("inputs", data)
|
22 |
+
audio_nparray = ffmpeg_read(inputs, 16000)
|
23 |
audio_tensor = torch.from_numpy(audio_nparray)
|
24 |
|
25 |
prediction = pipe(audio_nparray, return_timestamps=True)
|