romsyflux commited on
Commit
30ed343
1 Parent(s): 635887b

Fixed typo

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -89,9 +89,9 @@ def transcribe(sr, data):
89
  processed_data = np.array(data).astype(np.float32) / 32767.0
90
  # results from the pipeline
91
  transcription_res = pipe({"sampling_rate": sr, "raw": processed_data},return_timestamps=True)
92
- inputs = processor(processed_data, return_tensors="pt")
93
  input_features = inputs.input_features
94
- generated_ids = model.generate(inputs=input_features,truncation=False, padding="longest", return_attention_mask=True, sampling_rate=sr,return_token_timestamps=True,return_timestamps=True)
95
  transcription = processor.batch_decode(generated_ids, skip_special_tokens=False)
96
  print(transcription)
97
  return transcription_res
 
89
  processed_data = np.array(data).astype(np.float32) / 32767.0
90
  # results from the pipeline
91
  transcription_res = pipe({"sampling_rate": sr, "raw": processed_data},return_timestamps=True)
92
+ inputs = processor(processed_data, sampling_rate=sr, return_tensors="pt")
93
  input_features = inputs.input_features
94
+ generated_ids = model.generate(inputs=input_features,return_token_timestamps=True,return_timestamps=True)
95
  transcription = processor.batch_decode(generated_ids, skip_special_tokens=False)
96
  print(transcription)
97
  return transcription_res