

TITLE
Add error message to Wav2Vec2 & Hubert if labels > vocab_size

COMMENTS
5

REACTIONS
+1: 0
-1: 0
laugh: 0
hooray: 0
heart: 1
rocket: 0
eyes: 0

BODY
# 🚀 Feature request

Add better error message to `HubertForCTC`, `Wav2Vec2ForCTC` if labels are bigger than vocab size.

## Motivation

Following this issue: https://github.com/huggingface/transformers/issues/12264 it is clear that an error message should be thrown if any of the any of the labels are > `self.config.vocab_size` or else silent errors can sneak into the training script.

So we should modify: `Wav2Vec2ForCTC`, `TFWav2Vec2ForCTC`, and `HubertForCTC` to add a nice error message in this case.

## Your contribution

This is a first good issue and should be rather easy to accomplish. I'm happy to give more guidance if needed.
