Using pipeline with language and task set
#54
by
jonfv
- opened
Hello!
How to usepipe = pipeline("automatic-speech-recognition", model="openai/whisper-large-v2")
and setmodel.config.forced_decoder_ids = WhisperProcessor.get_decoder_prompt_ids(language="portuguese", task="transcribe")
when I try to do this, return this error:TypeError: WhisperProcessor.get_decoder_prompt_ids() missing 1 required positional argument: 'self'
Thx a lot!!!
Solution:
pipe = pipeline(
"automatic-speech-recognition",
model="openai/whisper-large-v2",
generate_kwargs={"language": "br", "task": "transcribe"},
device="cpu",
chunk_length_s=60
)
jonfv
changed discussion status to
closed