facebook / mms-lid-126

huggingface.co
Total runs: 100.4K
24-hour runs: 0
7-day runs: -11.5K
30-day runs: -207.3K
Model's Last Updated: June 13 2023
audio-classification

Introduction of mms-lid-126

Model Details of mms-lid-126

Massively Multilingual Speech (MMS) - Finetuned LID

This checkpoint is a model fine-tuned for speech language identification (LID) and part of Facebook's Massive Multilingual Speech project . This checkpoint is based on the Wav2Vec2 architecture and classifies raw audio input to a probability distribution over 126 output classes (each class representing a language). The checkpoint consists of 1 billion parameters and has been fine-tuned from facebook/mms-1b on 126 languages.

Table Of Content
Example

This MMS checkpoint can be used with Transformers to identify the spoken language of an audio. It can recognize the following 126 languages .

Let's look at a simple example.

First, we install transformers and some other libraries

pip install torch accelerate torchaudio datasets
pip install --upgrade transformers

Note : In order to use MMS you need to have at least transformers >= 4.30 installed. If the 4.30 version is not yet available on PyPI make sure to install transformers from source:

pip install git+https://github.com/huggingface/transformers.git

Next, we load a couple of audio samples via datasets . Make sure that the audio data is sampled to 16000 kHz.

from datasets import load_dataset, Audio

# English
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "en", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
en_sample = next(iter(stream_data))["audio"]["array"]

# Arabic
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "ar", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
ar_sample = next(iter(stream_data))["audio"]["array"]

Next, we load the model and processor

from transformers import Wav2Vec2ForSequenceClassification, AutoFeatureExtractor
import torch

model_id = "facebook/mms-lid-126"

processor = AutoFeatureExtractor.from_pretrained(model_id)
model = Wav2Vec2ForSequenceClassification.from_pretrained(model_id)

Now we process the audio data, pass the processed audio data to the model to classify it into a language, just like we usually do for Wav2Vec2 audio classification models such as ehcalabres/wav2vec2-lg-xlsr-en-speech-emotion-recognition

# English
inputs = processor(en_sample, sampling_rate=16_000, return_tensors="pt")

with torch.no_grad():
    outputs = model(**inputs).logits

lang_id = torch.argmax(outputs, dim=-1)[0].item()
detected_lang = model.config.id2label[lang_id]
# 'eng'

# Arabic
inputs = processor(ar_sample, sampling_rate=16_000, return_tensors="pt")

with torch.no_grad():
    outputs = model(**inputs).logits

lang_id = torch.argmax(outputs, dim=-1)[0].item()
detected_lang = model.config.id2label[lang_id]
# 'ara'

To see all the supported languages of a checkpoint, you can print out the language ids as follows:

processor.id2label.values()

For more details, about the architecture please have a look at the official docs .

Supported Languages

This model supports 126 languages. Unclick the following to toogle all supported languages of this checkpoint in ISO 639-3 code . You can find more details about the languages and their ISO 649-3 codes in the MMS Language Coverage Overview .

Click to toggle
  • ara
  • cmn
  • eng
  • spa
  • fra
  • mlg
  • swe
  • por
  • vie
  • ful
  • sun
  • asm
  • ben
  • zlm
  • kor
  • ind
  • hin
  • tuk
  • urd
  • aze
  • slv
  • mon
  • hau
  • tel
  • swh
  • bod
  • rus
  • tur
  • heb
  • mar
  • som
  • tgl
  • tat
  • tha
  • cat
  • ron
  • mal
  • bel
  • pol
  • yor
  • nld
  • bul
  • hat
  • afr
  • isl
  • amh
  • tam
  • hun
  • hrv
  • lit
  • cym
  • fas
  • mkd
  • ell
  • bos
  • deu
  • sqi
  • jav
  • nob
  • uzb
  • snd
  • lat
  • nya
  • grn
  • mya
  • orm
  • lin
  • hye
  • yue
  • pan
  • jpn
  • kaz
  • npi
  • kat
  • guj
  • kan
  • tgk
  • ukr
  • ces
  • lav
  • bak
  • khm
  • fao
  • glg
  • ltz
  • lao
  • mlt
  • sin
  • sna
  • ita
  • srp
  • mri
  • nno
  • pus
  • eus
  • ory
  • lug
  • bre
  • luo
  • slk
  • fin
  • dan
  • yid
  • est
  • ceb
  • war
  • san
  • kir
  • oci
  • wol
  • haw
  • kam
  • umb
  • xho
  • epo
  • zul
  • ibo
  • abk
  • ckb
  • nso
  • gle
  • kea
  • ast
  • sco
  • glv
  • ina
Model details
  • Developed by: Vineel Pratap et al.

  • Model type: Multi-Lingual Automatic Speech Recognition model

  • Language(s): 126 languages, see supported languages

  • License: CC-BY-NC 4.0 license

  • Num parameters : 1 billion

  • Audio sampling rate : 16,000 kHz

  • Cite as:

    @article{pratap2023mms,
      title={Scaling Speech Technology to 1,000+ Languages},
      author={Vineel Pratap and Andros Tjandra and Bowen Shi and Paden Tomasello and Arun Babu and Sayani Kundu and Ali Elkahky and Zhaoheng Ni and Apoorv Vyas and Maryam Fazel-Zarandi and Alexei Baevski and Yossi Adi and Xiaohui Zhang and Wei-Ning Hsu and Alexis Conneau and Michael Auli},
    journal={arXiv},
    year={2023}
    }
    
Additional Links

Runs of facebook mms-lid-126 on huggingface.co

100.4K
Total runs
0
24-hour runs
3.7K
3-day runs
-11.5K
7-day runs
-207.3K
30-day runs

More Information About mms-lid-126 huggingface.co Model

More mms-lid-126 license Visit here:

https://choosealicense.com/licenses/cc-by-nc-4.0

mms-lid-126 huggingface.co

mms-lid-126 huggingface.co is an AI model on huggingface.co that provides mms-lid-126's model effect (), which can be used instantly with this facebook mms-lid-126 model. huggingface.co supports a free trial of the mms-lid-126 model, and also provides paid use of the mms-lid-126. Support call mms-lid-126 model through api, including Node.js, Python, http.

mms-lid-126 huggingface.co Url

https://huggingface.co/facebook/mms-lid-126

facebook mms-lid-126 online free

mms-lid-126 huggingface.co is an online trial and call api platform, which integrates mms-lid-126's modeling effects, including api services, and provides a free online trial of mms-lid-126, you can try mms-lid-126 online for free by clicking the link below.

facebook mms-lid-126 online free url in huggingface.co:

https://huggingface.co/facebook/mms-lid-126

mms-lid-126 install

mms-lid-126 is an open source model from GitHub that offers a free installation service, and any user can find mms-lid-126 on GitHub to install. At the same time, huggingface.co provides the effect of mms-lid-126 install, users can directly use mms-lid-126 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

mms-lid-126 install url in huggingface.co:

https://huggingface.co/facebook/mms-lid-126

Url of mms-lid-126

mms-lid-126 huggingface.co Url

Provider of mms-lid-126 huggingface.co

facebook
ORGANIZATIONS

Other API from facebook

huggingface.co

Total runs: 8.0M
Run Growth: 18.9K
Growth Rate: 0.24%
Updated:January 20 2022
huggingface.co

Total runs: 7.9M
Run Growth: -9.0M
Growth Rate: -113.24%
Updated:September 15 2023
huggingface.co

Total runs: 3.7M
Run Growth: -956.9K
Growth Rate: -25.81%
Updated:September 06 2023
huggingface.co

Total runs: 3.3M
Run Growth: 881.3K
Growth Rate: 27.28%
Updated:January 17 2024
huggingface.co

Total runs: 2.8M
Run Growth: -596.8K
Growth Rate: -21.95%
Updated:December 28 2021
huggingface.co

Total runs: 2.3M
Run Growth: 210.2K
Growth Rate: 9.50%
Updated:March 23 2023
huggingface.co

Total runs: 2.2M
Run Growth: 468.2K
Growth Rate: 20.84%
Updated:January 25 2024
huggingface.co

Total runs: 1.9M
Run Growth: -434.9K
Growth Rate: -23.25%
Updated:November 21 2025
huggingface.co

Total runs: 821.6K
Run Growth: -184.9K
Growth Rate: -25.05%
Updated:September 06 2023
huggingface.co

Total runs: 473.6K
Run Growth: -142.4K
Growth Rate: -29.96%
Updated:May 22 2023
huggingface.co

Total runs: 452.0K
Run Growth: 75.0K
Growth Rate: 16.95%
Updated:February 29 2024
huggingface.co

Total runs: 426.2K
Run Growth: -69.0K
Growth Rate: -16.06%
Updated:March 17 2025
huggingface.co

Total runs: 381.8K
Run Growth: -206.1K
Growth Rate: -53.73%
Updated:January 12 2024
huggingface.co

Total runs: 333.7K
Run Growth: -73.3K
Growth Rate: -22.19%
Updated:January 12 2024
huggingface.co

Total runs: 311.3K
Run Growth: -64.5K
Growth Rate: -20.98%
Updated:September 06 2023
huggingface.co

Total runs: 308.1K
Run Growth: 32.9K
Growth Rate: 10.65%
Updated:September 15 2023
huggingface.co

Total runs: 288.5K
Run Growth: 53.5K
Growth Rate: 19.03%
Updated:June 15 2023
huggingface.co

Total runs: 286.2K
Run Growth: -37.1K
Growth Rate: -13.19%
Updated:November 17 2022
huggingface.co

Total runs: 258.8K
Run Growth: 165.2K
Growth Rate: 63.55%
Updated:May 22 2023
huggingface.co

Total runs: 236.9K
Run Growth: 14.3K
Growth Rate: 6.02%
Updated:July 23 2024
huggingface.co

Total runs: 211.3K
Run Growth: -148.8K
Growth Rate: -70.85%
Updated:July 25 2023
huggingface.co

Total runs: 187.2K
Run Growth: 78.9K
Growth Rate: 42.04%
Updated:February 12 2023
huggingface.co

Total runs: 179.6K
Run Growth: 74.8K
Growth Rate: 42.42%
Updated:September 06 2023
huggingface.co

Total runs: 168.2K
Run Growth: -207.4K
Growth Rate: -122.30%
Updated:November 17 2023
huggingface.co

Total runs: 162.8K
Run Growth: -984
Growth Rate: -0.60%
Updated:September 01 2023
huggingface.co

Total runs: 146.1K
Run Growth: 107.3K
Growth Rate: 72.91%
Updated:November 16 2023
huggingface.co

Total runs: 119.7K
Run Growth: -6.4K
Growth Rate: -5.35%
Updated:June 03 2022
huggingface.co

Total runs: 113.7K
Run Growth: 26.5K
Growth Rate: 24.14%
Updated:November 20 2023
huggingface.co

Total runs: 112.9K
Run Growth: 26.2K
Growth Rate: 23.95%
Updated:January 25 2023
huggingface.co

Total runs: 108.3K
Run Growth: -10.3K
Growth Rate: -9.51%
Updated:September 15 2023
huggingface.co

Total runs: 105.2K
Run Growth: -12.9K
Growth Rate: -12.29%
Updated:June 13 2023
huggingface.co

Total runs: 87.8K
Run Growth: 60.8K
Growth Rate: 70.16%
Updated:February 12 2023
huggingface.co

Total runs: 61.7K
Run Growth: -17.5K
Growth Rate: -28.31%
Updated:March 28 2026
huggingface.co

Total runs: 59.5K
Run Growth: 16.8K
Growth Rate: 28.34%
Updated:January 25 2023
huggingface.co

Total runs: 48.5K
Run Growth: -19.8K
Growth Rate: -39.48%
Updated:January 29 2026