Whisper's Tokenizer encoding function is not user-friendly
Author: patrickvonplaten
Pull request: no

### System Info

- `transformers` version: 4.23.0.dev0
- Platform: Linux-5.3.0-64-generic-x86_64-with-glibc2.17
- Python version: 3.8.12
- Huggingface_hub version: 0.10.0
- PyTorch version (GPU?): 1.12.1+cu102 (True)
- Tensorflow version (GPU?): 2.9.1 (True)
- Flax version (CPU?/GPU?/TPU?): 0.4.1 (cpu)
- Jax version: 0.3.14
- JaxLib version: 0.3.14
- Using GPU in script?: <fill in>
- Using distributed or parallel set-up in script?: <fill in>


### Who can help?

Text encoded by Whisper should by default have a EOS token in the end (just like any sequence-to-sequence transformer model) and also include the correct other tokens if necessary. Also it should **not** return the `attention_mask` as Whisper never uses an `attention_mask`.

**Note**: Encoding of text tokens is only needed for fine-tuning the model, not for inference, so this bug/feature request is not relevant for inference.

Currently when doing:

```python
from transformers import WhisperTokenizer
tokenizer = WhisperTokenizer.from_pretrained("openai/whisper-small")

tokenizer("hey")
```
One gets:
```
{'input_ids': [17230], 'attention_mask': [1]}
```

There are multiple problems with this:
- The EOS token is not appended, but whisper **always** needs an EOS for training
- There should be the following config parameters for the whisper tokenizer:
  - Set a language id so that the tokenizer automatically adds the lang id prefix
  - Set a "use_timestamps" true/false flag to the tokenizer that decides whether the "notimesteps" token should be added or not
  - Remove this line: https://github.com/huggingface/transformers/blob/371337a95b5d82cc9376c2595ed2022a5eb2ee6e/src/transformers/models/whisper/tokenization_whisper.py#L119 as this is not relevant for whisper and a copy-paste from GPT2 -> whisper should never set the EOS token as the BOS token IMO (@sanchit-gandhi we did this for our paper, but this was more a lucky bug than a solid case)
- Whisper should **not** return the `attention_mask`

=> Let's try to make whisper as user-friendly as possible for fine-tuning. Say I'd like to fine-tune on a multi-lingual language

If I remember correctly the format for the **labels** to fine-tune whisper on multi-lingual is:

```
<lang-id>
 ... text ... <eos>
```

@ArthurZucker or is it first `
` and then `<lang-id>` and then <eos> ? 

The `decoder_input_ids` should then just add `<|startoftranscript>` and remove `<eos>` which happens automatically in the shift function.

Now I should be able to get this encoding behavior by default when doing:

```
from transformers import WhisperTokenizer
tokenizer = WhisperTokenizer.from_pretrained("openai/whisper-small", lang_id="dv", predict_timestamps=False)

tokenizer("hey")
```

### Information

- [X] The official example scripts
- [ ] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

from transformers import WhisperTokenizer
tokenizer = WhisperTokenizer.from_pretrained("openai/whisper-small", lang_id="dv", predict_timestamps=False)

tokenizer("hey")

### Expected behavior

```
<lang-id>
 ... text ... <eos>
```

Comments:
@ArthurZucker @sanchit-gandhi could you take a look here? 

Agree with all of the above **other** than the attention mask: the Whisper tokeniser **should** return an attention mask. This attention mask is not used to mask hidden-states (as is done with the Whisper feature-extractor), but rather mask padded token ids in the computation of the C.E. loss. We require the attention mask to inform the system where the padded tokens reside, and thus where to ignore terms in the loss computation.