luckyt commited on
Commit
9619c90
1 Parent(s): e506013

Fix example code for current version of huggingface

Browse files
Files changed (1) hide show
  1. README.md +1 -6
README.md CHANGED
@@ -63,12 +63,7 @@ def transcribe(audio_path: str) -> str:
63
  language="Chinese",
64
  ).input_features.to(DEVICE)
65
 
66
- forced_decoder_ids = processor.get_decoder_prompt_ids(
67
- language="Chinese", task="transcribe"
68
- )
69
- predicted_ids = model.generate(
70
- input_features, forced_decoder_ids=forced_decoder_ids
71
- )
72
  transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True)[0]
73
  return transcription
74
 
 
63
  language="Chinese",
64
  ).input_features.to(DEVICE)
65
 
66
+ predicted_ids = model.generate(input_features)
 
 
 
 
 
67
  transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True)[0]
68
  return transcription
69