Automatic Speech Recognition
Transformers
PyTorch
Safetensors
Chinese
Yue Chinese
whisper
whisper-event
Generated from Trainer
Eval Results (legacy)
Instructions to use alvanlii/whisper-small-cantonese with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use alvanlii/whisper-small-cantonese with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="alvanlii/whisper-small-cantonese")# Load model directly from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq processor = AutoProcessor.from_pretrained("alvanlii/whisper-small-cantonese") model = AutoModelForSpeechSeq2Seq.from_pretrained("alvanlii/whisper-small-cantonese") - Notebooks
- Google Colab
- Kaggle
IndexError: index -2 is out of bounds for dimension 0 with size 0
#7
by hillman2000hk - opened
Any idea about
prev_start_of_text = suppress_tokens[-2] if suppress_tokens is not None else None
I think it's about the generation_config. While model.config is deprecated, using model.generation_config should do the trick. This works similarly for the pipeline modules in transformers.
Note that the generation config did not specify any suppress token and the index gets overflown, while checking the suppress tokens for other whisper models such as whisper-small, they give a long sequence of suppress tokens.
Let me try. Thank you.
alvanlii changed discussion status to closed