Instructions to use utter-project/mHuBERT-147 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use utter-project/mHuBERT-147 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="utter-project/mHuBERT-147")# Load model directly from transformers import AutoProcessor, AutoModel processor = AutoProcessor.from_pretrained("utter-project/mHuBERT-147") model = AutoModel.from_pretrained("utter-project/mHuBERT-147") - Inference
- Notebooks
- Google Colab
- Kaggle
Error with loading tokenizer.
Hello,
I am using: AutoProcessor.from_pretrained("utter-project/mHuBERT-147")
I receive this error:
OSError: Can't load tokenizer for 'utter-project/mHuBERT-147'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure 'utter-project/mHuBERT-147' is the correct path to a directory containing all relevant files for a Wav2Vec2CTCTokenizer tokenizer.
Hello,
Thanks for the interest in using our model.
There is no tokenizer associated to this release, as mHuBERT-147 is not an ASR model. It is a speech representation model.
You can, however, use it to train an ASR system, if you want. :)
All the best,
Hello,
Thank you for your answer.
I don't use it as an ASR model.
So my question is:
self.feature_extractor = Wav2Vec2FeatureExtractor.from_pretrained("utter-project/mHuBERT-147")
self.hubert = HubertModel.from_pretrained("utter-project/mHuBERT-147")
Do I have to use it in this way?
I'm not sure what you want to do, but the code you sent is correct. It loads the pretrained model correctly!
I think they try to follow generic Hubert class documentation: https://huggingface.co/docs/transformers/en/model_doc/hubert#transformers.HubertModel.forward.example