Can't load tokenizer for 'facebook/hubert-base-ls960'
Author: harrypotter90
Pull request: no

## Environment info
<!-- You can run the command `transformers-cli env` and copy-and-paste its output below.
     Don't forget to fill out the missing fields in that output! -->

- `transformers` version: 4.12.2
- Platform: Mac
- Python version: 3.7
- PyTorch version (GPU?): 1.9
- Tensorflow version (GPU?): No
- Using GPU in script?: No
- Using distributed or parallel set-up in script?: No

I just run simple code to load Hubert pretrained base model 

```
from transformers import Wav2Vec2Processor, HubertForCTC
import torch
import librosa
PROCESSOR = Wav2Vec2Processor.from_pretrained('facebook/hubert-base-ls960')
model = HubertForCTC.from_pretrained('facebook/hubert-base-ls960')
```


And i got error trace:



```
Traceback (most recent call last):
  File "/Users/
    PROCESSOR = Wav2Vec2Processor.from_pretrained('facebook/hubert-base-ls960')
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/transformers/models/wav2vec2/processing_wav2vec2.py", line 105, in from_pretrained
    tokenizer = Wav2Vec2CTCTokenizer.from_pretrained(pretrained_model_name_or_path, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 1733, in from_pretrained
    raise EnvironmentError(msg)
OSError: Can't load tokenizer for 'facebook/hubert-base-ls960'. Make sure that:

- 'facebook/hubert-base-ls960' is a correct model identifier listed on 'https://huggingface.co/models'
  (make sure 'facebook/hubert-base-ls960' is not a path to a local directory with something else, in that case)

- or 'facebook/hubert-base-ls960' is the correct path to a directory containing relevant tokenizer files
```

Comments:
Hey @harrypotter90,

Note that `facebook/hubert-base-ls960` is just the pretrained model and therefore does not have a tokenizer yet. You can create one yourself as shown in this blog post: https://huggingface.co/blog/fine-tune-wav2vec2-english



Thanks for the clarification @patrickvonplaten. The documentation is a bit misleading, since it has some references to loading a processor for `facebook/hubert-base-ls960`. (This also made me second-guess whether the model was fine-tuned at all.) Example: https://huggingface.co/transformers/model_doc/hubert.html#transformers.HubertForCTC

Can you update the documentation to use a different model that supports the tokenizer, such as `facebook/hubert-large-ls960-ft`?

Hey @kroq-gar78,

Ah yeah, that's great feedback! I'll change that asap. The documentation should definitely use a model that has a tokenizer! 

Also I've updated the model card: https://huggingface.co/facebook/hubert-base-ls960 leaving a big note to make it clearer.

Thanks!

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md) are likely to be ignored.

I'm running through the same issue as above. I followed through this [blog-post](https://huggingface.co/blog/fine-tune-xlsr-wav2vec2) but instead of saving the model to Hugging Face hub, I saved in my local directory. There is a checkpoint folder there with the preprocessor while the main directory has turkish-tokenizer_config.json file. However, when I load the model for evaluation, its still giving the tokenizer not found error. I would appreciate any help @patrickvonplaten. Thanks. 
![Screen Shot 2022-09-08 at 10 48 49 AM](https://user-images.githubusercontent.com/11674667/189153827-49325856-acee-41d5-bc5e-5f304dbad7ff.png)


Hey @dmatekenya,

Could you post a reproducible code snippet ? I cannot reproduce the error just from a screenshot sadly

@patrickvonplaten, greetings!
I followed the `Emotion recognition in Greek speech using Wav2Vec2.ipynb` which is in turn somehow based on your notebook. [here](https://colab.research.google.com/github/m3hrdadfi/soxan/blob/main/notebooks/Emotion_recognition_in_Greek_speech_using_Wav2Vec2.ipynb#scrollTo=AZjDSmBRGqr6)
After finishing training on my own data, I am getting the following error when trying to load the processor with 

```
processor = Wav2Vec2Processor.from_pretrained(model_name_or_path)
```
The error:
```
OSError: Can't load tokenizer for '[/path/to/model/]checkpoint-860/'. If you were trying to load it from 'https://huggingface.co/models',
Otherwise, make sure '[/path/to/model/]checkpoint-860/' is the correct path to a directory containing all relevant files for a Wav2Vec2CTCTokenizer tokenizer.
```



Checking the `checkpoint` folder, there is no tokenizer file in there, am I missing something? This is the content of the mentioned folder:
![image](https://user-images.githubusercontent.com/10247930/190679871-31917b3b-5bd6-48fb-9636-ff31de423a41.png)

PD: the model loads correctly with `model = Wav2Vec2ForSpeechClassification.from_pretrained(model_name)`


Hey @jvel07,

Note that emotion recognition models don't have a tokenizer, so you should load it with:

```python
from transformers import Wav2Vec2FeatureExtractor

feature_extractor = Wav2Vec2FeatureExtractor.from_pretrained(model_name_or_path)
```