How to load language model
I want to load mms as an ASR pipeline for a specific language.
This can be done like this:
self.pipeline = pipeline(
"automatic-speech-recognition",
model=model,
decoder=decoder,
torch_dtype=torch.float16,
device=self.device
)
Where decoder is a manually initialized BeamSearchDecoderCTC object. For this I need to manually download the 5gram model from this repo and then instantiate it.
Is there a way to load the model directly using a HF interface?
Something similar to Wav2Vec2ProcessorWithLM.from_pretrained('facebook/mms-cclms')
Okay, I guess there is no other way than the method commented out in https://huggingface.co/spaces/mms-meta/MMS/blob/main/asr.py