S-Fry commited on
Commit
109fb39
1 Parent(s): 715bca3

Update handler.py

Browse files
Files changed (1) hide show
  1. 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, sample_rate=16000)
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)