facebook / mms-lid-512

huggingface.co
Total runs: 212
24-hour runs: 2
7-day runs: 188
30-day runs: -50
Model's Last Updated: Juin 13 2023
audio-classification

Introduction of mms-lid-512

Model Details of mms-lid-512

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 512 output classes (each class representing a language). The checkpoint consists of 1 billion parameters and has been fine-tuned from facebook/mms-1b on 512 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 512 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-512"

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 512 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
  • kmr
  • nob
  • uzb
  • snd
  • lat
  • nya
  • grn
  • mya
  • orm
  • lin
  • hye
  • yue
  • pan
  • jpn
  • kaz
  • npi
  • kik
  • kat
  • guj
  • kan
  • tgk
  • ukr
  • ces
  • lav
  • bak
  • khm
  • cak
  • fao
  • glg
  • ltz
  • xog
  • lao
  • mlt
  • sin
  • aka
  • sna
  • che
  • mam
  • ita
  • quc
  • srp
  • mri
  • tuv
  • nno
  • pus
  • eus
  • kbp
  • ory
  • lug
  • bre
  • luo
  • nhx
  • slk
  • ewe
  • fin
  • rif
  • dan
  • yid
  • yao
  • mos
  • quh
  • hne
  • xon
  • new
  • quy
  • est
  • dyu
  • ttq
  • bam
  • pse
  • uig
  • sck
  • ngl
  • tso
  • mup
  • dga
  • seh
  • lis
  • wal
  • ctg
  • bfz
  • bxk
  • ceb
  • kru
  • war
  • khg
  • bbc
  • thl
  • vmw
  • zne
  • sid
  • tpi
  • nym
  • bgq
  • bfy
  • hlb
  • teo
  • fon
  • kfx
  • bfa
  • mag
  • ayr
  • any
  • mnk
  • adx
  • ava
  • hyw
  • san
  • kek
  • chv
  • kri
  • btx
  • nhy
  • dnj
  • lon
  • men
  • ium
  • nga
  • nsu
  • prk
  • kir
  • bom
  • run
  • hwc
  • mnw
  • ubl
  • kin
  • rkt
  • xmm
  • iba
  • gux
  • ses
  • wsg
  • tir
  • gbm
  • mai
  • nyy
  • nan
  • nyn
  • gog
  • ngu
  • hoc
  • nyf
  • sus
  • bcc
  • hak
  • grt
  • suk
  • nij
  • kaa
  • bem
  • rmy
  • nus
  • ach
  • awa
  • dip
  • rim
  • nhe
  • pcm
  • kde
  • tem
  • quz
  • bba
  • kbr
  • taj
  • dik
  • dgo
  • bgc
  • xnr
  • kac
  • laj
  • dag
  • ktb
  • mgh
  • shn
  • oci
  • zyb
  • alz
  • wol
  • guw
  • nia
  • bci
  • sba
  • kab
  • nnb
  • ilo
  • mfe
  • xpe
  • bcl
  • haw
  • mad
  • ljp
  • gmv
  • nyo
  • kxm
  • nod
  • sag
  • sas
  • myx
  • sgw
  • mak
  • kfy
  • jam
  • lgg
  • nhi
  • mey
  • sgj
  • hay
  • pam
  • heh
  • nhw
  • yua
  • shi
  • mrw
  • hil
  • pag
  • cce
  • npl
  • ace
  • kam
  • min
  • pko
  • toi
  • ncj
  • umb
  • hno
  • ban
  • syl
  • bxg
  • nse
  • xho
  • mkw
  • nch
  • mas
  • bum
  • mww
  • epo
  • tzm
  • zul
  • lrc
  • ibo
  • abk
  • azz
  • guz
  • ksw
  • lus
  • ckb
  • mer
  • pov
  • rhg
  • knc
  • tum
  • nso
  • bho
  • ndc
  • ijc
  • qug
  • lub
  • srr
  • mni
  • zza
  • dje
  • tiv
  • gle
  • lua
  • swk
  • ada
  • lic
  • skr
  • mfa
  • bto
  • unr
  • hdy
  • kea
  • glk
  • ast
  • nup
  • sat
  • ktu
  • bhb
  • sgc
  • dks
  • ncl
  • emk
  • urh
  • tsc
  • idu
  • igb
  • its
  • kng
  • kmb
  • tsn
  • bin
  • gom
  • ven
  • sef
  • sco
  • trp
  • glv
  • haq
  • kha
  • rmn
  • sot
  • sou
  • gno
  • igl
  • efi
  • nde
  • rki
  • kjg
  • fan
  • wci
  • bjn
  • pmy
  • bqi
  • ina
  • hni
  • the
  • nuz
  • ajg
  • ymm
  • fmu
  • nyk
  • snk
  • esg
  • thq
  • pht
  • wes
  • pnb
  • phr
  • mui
  • tkt
  • bug
  • mrr
  • kas
  • zgb
  • lir
  • vah
  • ssw
  • iii
  • brx
  • rwr
  • kmc
  • dib
  • pcc
  • zyn
  • hea
  • hms
  • thr
  • wbr
  • bfb
  • wtm
  • blk
  • dhd
  • swv
  • zzj
  • niq
  • mtr
  • gju
  • kjp
  • haz
  • shy
  • nbl
  • aii
  • sjp
  • bns
  • brh
  • msi
  • tsg
  • tcy
  • kbl
  • noe
  • tyz
  • ahr
  • aar
  • wuu
  • kbd
  • bca
  • pwr
  • hsn
  • kua
  • tdd
  • bgp
  • abs
  • zlj
  • ebo
  • bra
  • nhp
  • tts
  • zyj
  • lmn
  • cqd
  • dcc
  • cjk
  • bfr
  • bew
  • arg
  • drs
  • chw
  • bej
  • bjj
  • ibb
  • tig
  • nut
  • jax
  • tdg
  • nlv
  • pch
  • fvr
  • mlq
  • kfr
  • nhn
  • tji
  • hoj
  • cpx
  • cdo
  • bgn
  • btm
  • trf
  • daq
  • max
  • nba
  • mut
  • hnd
  • ryu
  • abr
  • sop
  • odk
  • nap
  • gbr
  • czh
  • vls
  • gdx
  • yaf
  • sdh
  • anw
  • ttj
  • nhg
  • cgg
  • ifm
  • mdh
  • scn
  • lki
  • luz
  • stv
  • kmz
  • nds
  • mtq
  • knn
  • mnp
  • bar
  • mzn
  • gsw
  • fry
Model details
  • Developed by: Vineel Pratap et al.

  • Model type: Multi-Lingual Automatic Speech Recognition model

  • Language(s): 512 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-512 on huggingface.co

212
Total runs
2
24-hour runs
4
3-day runs
188
7-day runs
-50
30-day runs

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

More mms-lid-512 license Visit here:

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

mms-lid-512 huggingface.co

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

mms-lid-512 huggingface.co Url

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

facebook mms-lid-512 online free

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

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

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

mms-lid-512 install

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

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

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

Url of mms-lid-512

mms-lid-512 huggingface.co Url

Provider of mms-lid-512 huggingface.co

facebook
ORGANIZATIONS

Other API from facebook

huggingface.co

Total runs: 14.6M
Run Growth: 5.4M
Growth Rate: 37.01%
Updated: Janvier 17 2024
huggingface.co

Total runs: 6.2M
Run Growth: 1.2M
Growth Rate: 18.54%
Updated: Septembre 15 2023
huggingface.co

Total runs: 4.4M
Run Growth: 3.6M
Growth Rate: 83.60%
Updated: Mars 22 2023
huggingface.co

Total runs: 2.6M
Run Growth: 258.2K
Growth Rate: 9.76%
Updated: Novembre 16 2022
huggingface.co

Total runs: 2.2M
Run Growth: 2.1M
Growth Rate: 96.61%
Updated: Novembre 13 2023
huggingface.co

Total runs: 1.2M
Run Growth: -16.0K
Growth Rate: -1.29%
Updated: Février 29 2024
huggingface.co

Total runs: 1.1M
Run Growth: 451.7K
Growth Rate: 40.86%
Updated: Juillet 25 2023
huggingface.co

Total runs: 1.0M
Run Growth: 388.6K
Growth Rate: 38.15%
Updated: Septembre 06 2023
huggingface.co

Total runs: 793.7K
Run Growth: -300.5K
Growth Rate: -37.53%
Updated: Décembre 28 2021
huggingface.co

Total runs: 729.4K
Run Growth: 558.8K
Growth Rate: 76.46%
Updated: Juin 15 2023
huggingface.co

Total runs: 707.3K
Run Growth: 134.3K
Growth Rate: 19.23%
Updated: Janvier 11 2024
huggingface.co

Total runs: 632.6K
Run Growth: 295.5K
Growth Rate: 49.81%
Updated: Septembre 06 2023
huggingface.co

Total runs: 624.6K
Run Growth: 546.1K
Growth Rate: 87.44%
Updated: Novembre 16 2023
huggingface.co

Total runs: 498.0K
Run Growth: 54.9K
Growth Rate: 11.36%
Updated: Septembre 01 2023
huggingface.co

Total runs: 404.2K
Run Growth: 115.6K
Growth Rate: 28.61%
Updated: Janvier 25 2024
huggingface.co

Total runs: 399.4K
Run Growth: 50.6K
Growth Rate: 12.66%
Updated: Janvier 19 2022
huggingface.co

Total runs: 337.7K
Run Growth: 143.7K
Growth Rate: 42.56%
Updated: Septembre 15 2023
huggingface.co

Total runs: 331.8K
Run Growth: 206.9K
Growth Rate: 63.82%
Updated: Janvier 11 2024
huggingface.co

Total runs: 233.4K
Run Growth: 136.2K
Growth Rate: 58.33%
Updated: Juin 03 2022
huggingface.co

Total runs: 230.7K
Run Growth: 72.3K
Growth Rate: 30.84%
Updated: Mai 22 2023
huggingface.co

Total runs: 225.7K
Run Growth: 137.6K
Growth Rate: 60.96%
Updated: Septembre 06 2023
huggingface.co

Total runs: 174.0K
Run Growth: -75.8K
Growth Rate: -43.54%
Updated: Septembre 04 2023
huggingface.co

Total runs: 140.3K
Run Growth: 49.1K
Growth Rate: 35.02%
Updated: Septembre 15 2023
huggingface.co

Total runs: 74.9K
Run Growth: -1.6K
Growth Rate: -1.73%
Updated: Janvier 11 2024
huggingface.co

Total runs: 71.0K
Run Growth: -2.3K
Growth Rate: -44.21%
Updated: Octobre 16 2024
huggingface.co

Total runs: 61.2K
Run Growth: 27.5K
Growth Rate: 44.90%
Updated: Septembre 15 2023
huggingface.co

Total runs: 50.7K
Run Growth: -5.2M
Growth Rate: -10244.95%
Updated: Juin 13 2023
huggingface.co

Total runs: 47.6K
Run Growth: 27.2K
Growth Rate: 56.47%
Updated: Mai 22 2023
huggingface.co

Total runs: 44.9K
Run Growth: -1.1K
Growth Rate: -2.55%
Updated: Janvier 24 2023
huggingface.co

Total runs: 35.4K
Run Growth: 6.9K
Growth Rate: 19.47%
Updated: Juin 05 2023
huggingface.co

Total runs: 27.8K
Run Growth: 5.6K
Growth Rate: 20.00%
Updated: Février 11 2023
huggingface.co

Total runs: 27.1K
Run Growth: 11.6K
Growth Rate: 42.64%
Updated: Janvier 24 2023
huggingface.co

Total runs: 24.2K
Run Growth: -40.9K
Growth Rate: -176.80%
Updated: Mars 13 2024
huggingface.co

Total runs: 22.5K
Run Growth: -3.9K
Growth Rate: -16.89%
Updated: Septembre 06 2023
huggingface.co

Total runs: 22.1K
Run Growth: 12.2K
Growth Rate: 55.06%
Updated: Juillet 23 2024
huggingface.co

Total runs: 19.8K
Run Growth: -5.1K
Growth Rate: -24.41%
Updated: Septembre 15 2023
huggingface.co

Total runs: 19.4K
Run Growth: 17.2K
Growth Rate: 88.46%
Updated: Janvier 24 2023