asahi417 commited on
Commit
9814043
·
verified ·
1 Parent(s): bc603fa

Upload KotobaWhisperPipeline

Browse files
Files changed (1) hide show
  1. kotoba_whisper.py +1 -1
kotoba_whisper.py CHANGED
@@ -123,7 +123,7 @@ class KotobaWhisperPipeline(AutomaticSpeechRecognitionPipeline):
123
  }
124
  postprocess_params = {"add_punctuation": add_punctuation, "return_timestamps": True, "return_language": False}
125
  forward_params = {} if generate_kwargs is None else generate_kwargs
126
- forward_params.update({"max_new_tokens": max_new_tokens, "return_timestamps": True})
127
  return preprocess_params, forward_params, postprocess_params
128
 
129
  def preprocess(self,
 
123
  }
124
  postprocess_params = {"add_punctuation": add_punctuation, "return_timestamps": True, "return_language": False}
125
  forward_params = {} if generate_kwargs is None else generate_kwargs
126
+ forward_params.update({"max_new_tokens": max_new_tokens, "return_timestamps": True, "language": "ja", "task": "transcribe"})
127
  return preprocess_params, forward_params, postprocess_params
128
 
129
  def preprocess(self,