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", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Should the `language` for transformers.pipeline be set as `yue` instead of `zh`?
#8
by JinchaoLove - opened
As copied from part of the README
lang = 'zh'
pipe.model.config.forced_decoder_ids = pipe.tokenizer.get_decoder_prompt_ids(language=lang, task="transcribe")
# [(1, 50260), (2, 50359), (3, 50363)]
pipe.tokenizer.get_decoder_prompt_ids(language='yue', task="transcribe")
# [(1, 50358), (2, 50359), (3, 50363)]
Should the language be set as zh or yue, or either of them is okay?
yue is added for whisper v3 if I remember correctly, so I don't think yue would work
其实用「jyut」更好,不明白为何要要用另一种语言的拼法。