Skip to content

Commit

Permalink
fix latest transformers asr error (#1177)
Browse files Browse the repository at this point in the history
Co-authored-by: lvliang-intel <liang1.lv@intel.com>
  • Loading branch information
Spycsh and lvliang-intel committed Jan 26, 2024
1 parent 4a78bab commit 09ddade
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ def audio2text(self, audio_path):
else:
self.forced_decoder_ids = self.processor.get_decoder_prompt_ids(language=self.language,
task="transcribe")
predicted_ids = self.model.generate(inputs, forced_decoder_ids=self.forced_decoder_ids)
self.model.config.forced_decoder_ids = self.forced_decoder_ids
predicted_ids = self.model.generate(inputs)
# pylint: disable=E1101
result = self.processor.tokenizer.batch_decode(
predicted_ids, skip_special_tokens=True, normalize=True)[0]
Expand Down

0 comments on commit 09ddade

Please sign in to comment.