[Examples] Generalise Seq2Seq ASR to handle Whisper
Author: sanchit-gandhi
Pull request: yes

# What does this PR do?

Generalises `run_speech_recognition_seq2seq.py` to handle Whisper.

To train the "tiny.en" model on LibriSpeech dummy:
<details>
<summary> Bash script </summary>

```
#!/usr/bin/env bash
CUDA_VISIBLE_DEVICES=0 python run_speech_recognition_seq2seq.py \
        --dataset_name="hf-internal-testing/librispeech_asr_dummy" \
        --model_name_or_path="openai/whisper-tiny.en" \
        --dataset_config_name="clean" \
        --train_split_name="validation" \
        --eval_split_name="validation" \
        --output_dir="./" \
        --preprocessing_num_workers="1" \
        --length_column_name="input_length" \
        --overwrite_output_dir \
        --num_train_epochs="1" \
        --per_device_train_batch_size="8" \
        --per_device_eval_batch_size="8" \
        --learning_rate="3e-4" \
        --warmup_steps="500" \
        --evaluation_strategy="steps" \
        --text_column_name="text" \
        --save_strategy="no" \
        --evaluation_strategy="epoch" \
        --logging_steps="10" \
        --save_total_limit="1" \
        --generation_max_length="40" \
        --generation_num_beams="1" \
        --fp16 \
        --gradient_checkpointing \
        --group_by_length \
        --predict_with_generate \
        --do_train --do_eval \
        --do_lower_case
```

</details>

To train the "medium.en" model on LibriSpeech 960h:
<details>
<summary> Bash script </summary>

```
#!/usr/bin/env bash
CUDA_VISIBLE_DEVICES=0 python run_speech_recognition_seq2seq.py \
    --model_name_or_path="openai/whisper-medium.en" \
    --dataset_name="librispeech_asr" \
    --dataset_config_name="all" \
    --train_split_name="train.clean.100+train.clean.360+train.other.500" \
    --eval_split_name="validation.clean" \
    --max_steps="5000" \
    --output_dir="./" \
    --run_name="whisper-librispeech" \
    --per_device_train_batch_size="64" \
    --per_device_eval_batch_size="16" \
    --logging_steps="25" \
    --learning_rate="1e-4" \
    --warmup_steps="500" \
    --report_to="wandb" \
    --preprocessing_num_workers="16" \
    --evaluation_strategy="steps" \
    --eval_steps="1000" \
    --save_strategy="steps" \
    --save_steps="1000" \
    --generation_max_length="224" \
    --generation_num_beams="1" \
    --length_column_name="input_length" \
    --gradient_checkpointing \
    --group_by_length \
    --freeze_encoder \
    --fp16 \
    --overwrite_output_dir \
    --do_train \
    --do_eval \
    --predict_with_generate \
    --use_auth_token
```

</details>

## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [ ] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#start-contributing-pull-requests),
      Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?


## Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

<!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @

 If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
 Please tag fewer than 3 people.

Models:

- albert, bert, xlm: @LysandreJik
- blenderbot, bart, marian, pegasus, encoderdecoder,  t5: @patrickvonplaten, @patil-suraj
- longformer, reformer, transfoxl, xlnet: @patrickvonplaten
- fsmt: @stas00
- funnel: @sgugger
- gpt2: @patrickvonplaten, @LysandreJik
- rag: @patrickvonplaten, @lhoestq
- tensorflow: @LysandreJik

Library:

- benchmarks: @patrickvonplaten
- deepspeed: @stas00
- ray/raytune: @richardliaw, @amogkam
- text generation: @patrickvonplaten
- tokenizers: @n1t0, @LysandreJik
- trainer: @sgugger
- pipelines: @LysandreJik

Documentation: @sgugger

HF projects:

- datasets: [different repo](https://github.com/huggingface/datasets)
- rust tokenizers: [different repo](https://github.com/huggingface/tokenizers)

Examples:

- maintained examples (not research project or legacy): @sgugger, @patil-suraj
- research_projects/bert-loses-patience: @JetRunner
- research_projects/distillation: @VictorSanh

 -->


Comments:
The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_19519). All of your documentation changes will be reflected on that endpoint.

The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_19519). All of your documentation changes will be reflected on that endpoint.

The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_19519). All of your documentation changes will be reflected on that endpoint.

@sgugger this one's ready to go! Just an FYI in-case you wanted to take a look :)

The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_19519). All of your documentation changes will be reflected on that endpoint.