how to get n-best list generated by Whisper.

#153
by louisguo - opened

I set my pipeline like this.

    beam_width = 5
    pipe = pipeline(
        "automatic-speech-recognition",
        model=model,
        tokenizer=processor.tokenizer,
        feature_extractor=processor.feature_extractor,
        torch_dtype=torch_dtype,
        device=device,
        generate_kwargs={"num_beams": beam_width, "num_return_sequences": beam_width}
    )

It does take me more time and storage on inference, but returned only one result

Hi, did you ever manage to figure out how to do it? I'm trying to do the same thing.

Your need to confirm your account before you can post a new comment.

Sign up or log in to comment