import{S as lp,i as sp,s as op,e as r,k as h,w as u,t as l,M as rp,c as n,d as t,m as d,a as i,x as m,h as s,b as c,G as a,g as p,y as f,q as y,o as M,B as b,v as np,L as ip}from"../../chunks/vendor-hf-doc-builder.js";import{T as pp}from"../../chunks/Tip-hf-doc-builder.js";import{I as F}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{C as J}from"../../chunks/CodeBlock-hf-doc-builder.js";function cp(za){let v,K,j,T,R;return T=new J({props:{code:"U29tZSUyMHdlaWdodHMlMjBvZiUyMFdhdjJWZWMyRm9yQ1RDJTIwd2VyZSUyMG5vdCUyMGluaXRpYWxpemVkJTIwZnJvbSUyMHRoZSUyMG1vZGVsJTIwY2hlY2twb2ludCUyMGF0JTIwZmFjZWJvb2slMkZtbXMtMWItYWxsJTIwYW5kJTIwYXJlJTIwbmV3bHklMjBpbml0aWFsaXplZCUyMGJlY2F1c2UlMjB0aGUlMjBzaGFwZXMlMjBkaWQlMjBub3QlMjBtYXRjaCUzQSUwQS0lMjBsbV9oZWFkLmJpYXMlM0ElMjBmb3VuZCUyMHNoYXBlJTIwdG9yY2guU2l6ZSglNUIxNTQlNUQpJTIwaW4lMjB0aGUlMjBjaGVja3BvaW50JTIwYW5kJTIwdG9yY2guU2l6ZSglNUIzMTQlNUQpJTIwaW4lMjB0aGUlMjBtb2RlbCUyMGluc3RhbnRpYXRlZCUwQS0lMjBsbV9oZWFkLndlaWdodCUzQSUyMGZvdW5kJTIwc2hhcGUlMjB0b3JjaC5TaXplKCU1QjE1NCUyQyUyMDEyODAlNUQpJTIwaW4lMjB0aGUlMjBjaGVja3BvaW50JTIwYW5kJTIwdG9yY2guU2l6ZSglNUIzMTQlMkMlMjAxMjgwJTVEKSUyMGluJTIwdGhlJTIwbW9kZWwlMjBpbnN0YW50aWF0ZWQlMEFZb3UlMjBzaG91bGQlMjBwcm9iYWJseSUyMFRSQUlOJTIwdGhpcyUyMG1vZGVsJTIwb24lMjBhJTIwZG93bi1zdHJlYW0lMjB0YXNrJTIwdG8lMjBiZSUyMGFibGUlMjB0byUyMHVzZSUyMGl0JTIwZm9yJTIwcHJlZGljdGlvbnMlMjBhbmQlMjBpbmZlcmVuY2Uu",highlighted:`Some weights of Wav2Vec2ForCTC were not initialized from the model checkpoint at facebook/mms-1b-all and are newly initialized because the shapes did not match:
- lm_head.bias: found shape torch.Size([154]) in the checkpoint and torch.Size([314]) in the model instantiated
- lm_head.weight: found shape torch.Size([154, 1280]) in the checkpoint and torch.Size([314, 1280]) in the model instantiated
You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.`}}),{c(){v=r("p"),K=l("You can safely ignore a warning such as:"),j=h(),u(T.$$.fragment)},l(w){v=n(w,"P",{});var B=i(v);K=s(B,"You can safely ignore a warning such as:"),B.forEach(t),j=d(w),m(T.$$.fragment,w)},m(w,B){p(w,v,B),a(v,K),p(w,j,B),f(T,w,B),R=!0},p:ip,i(w){R||(y(T.$$.fragment,w),R=!0)},o(w){M(T.$$.fragment,w),R=!1},d(w){w&&t(v),w&&t(j),b(T,w)}}}function hp(za){let v,K,j,T,R,w,B,Pt,ws,Fa,S,O,Lt,ve,Js,Dt,gs,Sa,ee,vs,Te,Ts,js,Qa,gt,Us,Aa,vt,Kt,ks,Ya,X,Es,je,_s,Ws,Ot,Zs,Is,Ha,Q,te,ea,Ue,Rs,ta,Bs,qa,U,Xs,ke,Vs,$s,Ee,Cs,Ns,_e,Gs,zs,aa,Fs,Ss,xa,Tt,Qs,Pa,V,We,As,jt,Ys,Hs,qs,Ze,xs,Ut,Ps,Ls,Ds,Ie,Ks,kt,Os,eo,La,A,ae,la,Re,to,sa,ao,Da,E,lo,oa,so,oo,ra,ro,no,na,io,po,Ka,Be,Oa,le,el,Et,co,tl,Xe,al,Y,se,ia,Ve,ho,pa,uo,ll,$,mo,ca,fo,yo,$e,Mo,bo,sl,Ce,ol,_t,wo,rl,Ne,nl,oe,Jo,Wt,go,vo,il,Ge,pl,_,To,Zt,jo,Uo,It,ko,Eo,ha,_o,Wo,cl,ze,hl,Rt,Zo,dl,Fe,ul,Bt,Io,ml,re,Ro,Se,Bo,Xo,fl,H,ne,da,Qe,Vo,ua,$o,yl,C,Co,Ae,No,Go,Ye,zo,Fo,Ml,q,ie,ma,He,So,fa,Qo,bl,Xt,Ao,wl,qe,Jl,Vt,Yo,gl,$t,ya,Ho,vl,xe,Tl,pe,qo,Ma,xo,Po,jl,Pe,Ul,Ct,Lo,kl,Le,El,ce,Do,De,ba,Ko,Oo,_l,W,er,wa,tr,ar,Ja,lr,sr,ga,or,rr,Wl,Ke,Zl,N,nr,va,ir,pr,Ta,cr,hr,Il,he,dr,ja,ur,mr,Rl,Oe,Bl,G,fr,Ua,yr,Mr,ka,br,wr,Xl,et,Vl,Nt,Ea,Jr,$l,de,I,gr,_a,vr,Tr,Wa,jr,Ur,Za,kr,Er,_r,x,Wr,Ia,Zr,Ir,Ra,Rr,Br,Cl,tt,Nl,P,ue,Ba,at,Xr,Xa,Vr,Gl,g,$r,lt,Cr,Nr,st,Gr,zr,ot,Fr,Sr,rt,Qr,Ar,nt,Yr,Hr,it,qr,xr,zl,L,me,Va,pt,Pr,$a,Lr,Fl,ct,Sl,fe,Dr,Ca,Kr,Or,Ql,ht,Al,Gt,en,Yl,dt,Hl,ut,tn,mt,an,ql,ft,xl,zt,ln,Pl,yt,Ll,D,ye,Na,Mt,sn,Ga,on,Dl,Z,rn,bt,nn,pn,wt,cn,hn,Ft,dn,un,Kl;return w=new F({}),ve=new F({}),Ue=new F({}),Re=new F({}),Be=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFdhdjJWZWMyRm9yQ1RDJTJDJTIwQXV0b1Byb2Nlc3NvciUwQSUwQW1vZGVsX2lkJTIwJTNEJTIwJTIyZmFjZWJvb2slMkZtbXMtMWItYWxsJTIyJTBBdGFyZ2V0X2xhbmclMjAlM0QlMjAlMjJmcmElMjIlMEElMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZChtb2RlbF9pZCUyQyUyMHRhcmdldF9sYW5nJTNEdGFyZ2V0X2xhbmcpJTBBbW9kZWwlMjAlM0QlMjBXYXYyVmVjMkZvckNUQy5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWQlMkMlMjB0YXJnZXRfbGFuZyUzRHRhcmdldF9sYW5nJTJDJTIwaWdub3JlX21pc21hdGNoZWRfc2l6ZXMlM0RUcnVlKQ==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Wav2Vec2ForCTC, AutoProcessor

model_id = <span class="hljs-string">&quot;facebook/mms-1b-all&quot;</span>
target_lang = <span class="hljs-string">&quot;fra&quot;</span>

processor = AutoProcessor.from_pretrained(model_id, target_lang=target_lang)
model = Wav2Vec2ForCTC.from_pretrained(model_id, target_lang=target_lang, ignore_mismatched_sizes=<span class="hljs-literal">True</span>)`}}),le=new pp({props:{$$slots:{default:[cp]},$$scope:{ctx:za}}}),Xe=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBbW9kZWxfaWQlMjAlM0QlMjAlMjJmYWNlYm9vayUyRm1tcy0xYi1hbGwlMjIlMEF0YXJnZXRfbGFuZyUyMCUzRCUyMCUyMmZyYSUyMiUwQSUwQXBpcGUlMjAlM0QlMjBwaXBlbGluZShtb2RlbCUzRG1vZGVsX2lkJTJDJTIwbW9kZWxfa3dhcmdzJTNEJTdCJTIydGFyZ2V0X2xhbmclMjIlM0ElMjAlMjJmcmElMjIlMkMlMjAlMjJpZ25vcmVfbWlzbWF0Y2hlZF9zaXplcyUyMiUzQSUyMFRydWUlN0Qp",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline

model_id = <span class="hljs-string">&quot;facebook/mms-1b-all&quot;</span>
target_lang = <span class="hljs-string">&quot;fra&quot;</span>

pipe = pipeline(model=model_id, model_kwargs={<span class="hljs-string">&quot;target_lang&quot;</span>: <span class="hljs-string">&quot;fra&quot;</span>, <span class="hljs-string">&quot;ignore_mismatched_sizes&quot;</span>: <span class="hljs-literal">True</span>})`}}),Ve=new F({}),Ce=new J({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTJDJTIwQXVkaW8lMEElMEElMjMlMjBFbmdsaXNoJTBBc3RyZWFtX2RhdGElMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIybW96aWxsYS1mb3VuZGF0aW9uJTJGY29tbW9uX3ZvaWNlXzEzXzAlMjIlMkMlMjAlMjJlbiUyMiUyQyUyMHNwbGl0JTNEJTIydGVzdCUyMiUyQyUyMHN0cmVhbWluZyUzRFRydWUpJTBBc3RyZWFtX2RhdGElMjAlM0QlMjBzdHJlYW1fZGF0YS5jYXN0X2NvbHVtbiglMjJhdWRpbyUyMiUyQyUyMEF1ZGlvKHNhbXBsaW5nX3JhdGUlM0QxNjAwMCkpJTBBZW5fc2FtcGxlJTIwJTNEJTIwbmV4dChpdGVyKHN0cmVhbV9kYXRhKSklNUIlMjJhdWRpbyUyMiU1RCU1QiUyMmFycmF5JTIyJTVEJTBBJTBBJTIzJTIwRnJlbmNoJTBBc3RyZWFtX2RhdGElMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIybW96aWxsYS1mb3VuZGF0aW9uJTJGY29tbW9uX3ZvaWNlXzEzXzAlMjIlMkMlMjAlMjJmciUyMiUyQyUyMHNwbGl0JTNEJTIydGVzdCUyMiUyQyUyMHN0cmVhbWluZyUzRFRydWUpJTBBc3RyZWFtX2RhdGElMjAlM0QlMjBzdHJlYW1fZGF0YS5jYXN0X2NvbHVtbiglMjJhdWRpbyUyMiUyQyUyMEF1ZGlvKHNhbXBsaW5nX3JhdGUlM0QxNjAwMCkpJTBBZnJfc2FtcGxlJTIwJTNEJTIwbmV4dChpdGVyKHN0cmVhbV9kYXRhKSklNUIlMjJhdWRpbyUyMiU1RCU1QiUyMmFycmF5JTIyJTVE",highlighted:`<span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset, Audio

<span class="hljs-comment"># English</span>
stream_data = load_dataset(<span class="hljs-string">&quot;mozilla-foundation/common_voice_13_0&quot;</span>, <span class="hljs-string">&quot;en&quot;</span>, split=<span class="hljs-string">&quot;test&quot;</span>, streaming=<span class="hljs-literal">True</span>)
stream_data = stream_data.cast_column(<span class="hljs-string">&quot;audio&quot;</span>, Audio(sampling_rate=<span class="hljs-number">16000</span>))
en_sample = <span class="hljs-built_in">next</span>(<span class="hljs-built_in">iter</span>(stream_data))[<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>]

<span class="hljs-comment"># French</span>
stream_data = load_dataset(<span class="hljs-string">&quot;mozilla-foundation/common_voice_13_0&quot;</span>, <span class="hljs-string">&quot;fr&quot;</span>, split=<span class="hljs-string">&quot;test&quot;</span>, streaming=<span class="hljs-literal">True</span>)
stream_data = stream_data.cast_column(<span class="hljs-string">&quot;audio&quot;</span>, Audio(sampling_rate=<span class="hljs-number">16000</span>))
fr_sample = <span class="hljs-built_in">next</span>(<span class="hljs-built_in">iter</span>(stream_data))[<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>]`}}),Ne=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFdhdjJWZWMyRm9yQ1RDJTJDJTIwQXV0b1Byb2Nlc3NvciUwQWltcG9ydCUyMHRvcmNoJTBBJTBBbW9kZWxfaWQlMjAlM0QlMjAlMjJmYWNlYm9vayUyRm1tcy0xYi1hbGwlMjIlMEElMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZChtb2RlbF9pZCklMEFtb2RlbCUyMCUzRCUyMFdhdjJWZWMyRm9yQ1RDLmZyb21fcHJldHJhaW5lZChtb2RlbF9pZCk=",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Wav2Vec2ForCTC, AutoProcessor
<span class="hljs-keyword">import</span> torch

model_id = <span class="hljs-string">&quot;facebook/mms-1b-all&quot;</span>

processor = AutoProcessor.from_pretrained(model_id)
model = Wav2Vec2ForCTC.from_pretrained(model_id)`}}),Ge=new J({props:{code:"aW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGVuX3NhbXBsZSUyQyUyMHNhbXBsaW5nX3JhdGUlM0QxNl8wMDAlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQWlkcyUyMCUzRCUyMHRvcmNoLmFyZ21heChvdXRwdXRzJTJDJTIwZGltJTNELTEpJTVCMCU1RCUwQXRyYW5zY3JpcHRpb24lMjAlM0QlMjBwcm9jZXNzb3IuZGVjb2RlKGlkcyklMEElMjMlMjAnam9lJTIwa2V0b24lMjBkaXNhcHByb3ZlZCUyMG9mJTIwZmlsbXMlMjBhbmQlMjBidXN0ZXIlMjBhbHNvJTIwaGFkJTIwcmVzZXJ2YXRpb25zJTIwYWJvdXQlMjB0aGUlMjBtZWRpYSc=",highlighted:`inputs = processor(en_sample, sampling_rate=<span class="hljs-number">16_000</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-keyword">with</span> torch.no_grad():
    outputs = model(**inputs).logits

ids = torch.argmax(outputs, dim=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>]
transcription = processor.decode(ids)
<span class="hljs-comment"># &#x27;joe keton disapproved of films and buster also had reservations about the media&#x27;</span>`}}),ze=new J({props:{code:"cHJvY2Vzc29yLnRva2VuaXplci5zZXRfdGFyZ2V0X2xhbmcoJTIyZnJhJTIyKSUwQW1vZGVsLmxvYWRfYWRhcHRlciglMjJmcmElMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGZyX3NhbXBsZSUyQyUyMHNhbXBsaW5nX3JhdGUlM0QxNl8wMDAlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQWlkcyUyMCUzRCUyMHRvcmNoLmFyZ21heChvdXRwdXRzJTJDJTIwZGltJTNELTEpJTVCMCU1RCUwQXRyYW5zY3JpcHRpb24lMjAlM0QlMjBwcm9jZXNzb3IuZGVjb2RlKGlkcyklMEElMjMlMjAlMjJjZSUyMGRlcm5pZXIlMjBlc3QlMjB2b2wlQzMlQTklMjB0b3V0JTIwYXUlMjBsb25nJTIwZGUlMjBsJ2hpc3RvaXJlJTIwcm9tYWluZSUyMg==",highlighted:`processor.tokenizer.set_target_lang(<span class="hljs-string">&quot;fra&quot;</span>)
model.load_adapter(<span class="hljs-string">&quot;fra&quot;</span>)

inputs = processor(fr_sample, sampling_rate=<span class="hljs-number">16_000</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-keyword">with</span> torch.no_grad():
    outputs = model(**inputs).logits

ids = torch.argmax(outputs, dim=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>]
transcription = processor.decode(ids)
<span class="hljs-comment"># &quot;ce dernier est vol\xE9 tout au long de l&#x27;histoire romaine&quot;</span>`}}),Fe=new J({props:{code:"cHJvY2Vzc29yLnRva2VuaXplci52b2NhYi5rZXlzKCk=",highlighted:"processor.tokenizer.vocab.keys()"}}),Qe=new F({}),He=new F({}),qe=new J({props:{code:"cGlwJTIwaW5zdGFsbCUyMC0tdXBncmFkZSUyMHRyYW5zZm9ybWVycyUyMGFjY2VsZXJhdGU=",highlighted:"pip install --upgrade transformers accelerate"}}),xe=new J({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwVml0c1Rva2VuaXplciUyQyUyMFZpdHNNb2RlbCUyQyUyMHNldF9zZWVkJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwVml0c1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtbXMtdHRzLWVuZyUyMiklMEFtb2RlbCUyMCUzRCUyMFZpdHNNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtbXMtdHRzLWVuZyUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIodGV4dCUzRCUyMkhlbGxvJTIwLSUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEFzZXRfc2VlZCg1NTUpJTIwJTIwJTIzJTIwbWFrZSUyMGRldGVybWluaXN0aWMlMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQXdhdmVmb3JtJTIwJTNEJTIwb3V0cHV0cy53YXZlZm9ybSU1QjAlNUQ=",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> VitsTokenizer, VitsModel, set_seed

tokenizer = VitsTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mms-tts-eng&quot;</span>)
model = VitsModel.from_pretrained(<span class="hljs-string">&quot;facebook/mms-tts-eng&quot;</span>)

inputs = tokenizer(text=<span class="hljs-string">&quot;Hello - my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

set_seed(<span class="hljs-number">555</span>)  <span class="hljs-comment"># make deterministic</span>

<span class="hljs-keyword">with</span> torch.no_grad():
   outputs = model(**inputs)

waveform = outputs.waveform[<span class="hljs-number">0</span>]`}}),Pe=new J({props:{code:"aW1wb3J0JTIwc2NpcHklMEElMEFzY2lweS5pby53YXZmaWxlLndyaXRlKCUyMnN5bnRoZXNpemVkX3NwZWVjaC53YXYlMjIlMkMlMjByYXRlJTNEbW9kZWwuY29uZmlnLnNhbXBsaW5nX3JhdGUlMkMlMjBkYXRhJTNEd2F2ZWZvcm0p",highlighted:`<span class="hljs-keyword">import</span> scipy

scipy.io.wavfile.write(<span class="hljs-string">&quot;synthesized_speech.wav&quot;</span>, rate=model.config.sampling_rate, data=waveform)`}}),Le=new J({props:{code:"ZnJvbSUyMElQeXRob24uZGlzcGxheSUyMGltcG9ydCUyMEF1ZGlvJTBBJTBBQXVkaW8od2F2ZWZvcm0lMkMlMjByYXRlJTNEbW9kZWwuY29uZmlnLnNhbXBsaW5nX3JhdGUp",highlighted:`<span class="hljs-keyword">from</span> IPython.display <span class="hljs-keyword">import</span> Audio

Audio(waveform, rate=model.config.sampling_rate)`}}),Ke=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFZpdHNUb2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBWaXRzVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm1tcy10dHMtZW5nJTIyKSUwQXByaW50KHRva2VuaXplci5pc191cm9tYW4p",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> VitsTokenizer

tokenizer = VitsTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mms-tts-eng&quot;</span>)
<span class="hljs-built_in">print</span>(tokenizer.is_uroman)`}}),Oe=new J({props:{code:"Z2l0JTIwY2xvbmUlMjBodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZpc2ktbmxwJTJGdXJvbWFuLmdpdCUwQWNkJTIwdXJvbWFuJTBBZXhwb3J0JTIwVVJPTUFOJTNEJTI0KHB3ZCk=",highlighted:`git <span class="hljs-built_in">clone</span> https://github.com/isi-nlp/uroman.git
<span class="hljs-built_in">cd</span> uroman
<span class="hljs-built_in">export</span> UROMAN=$(<span class="hljs-built_in">pwd</span>)`}}),et=new J({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwVml0c1Rva2VuaXplciUyQyUyMFZpdHNNb2RlbCUyQyUyMHNldF9zZWVkJTBBaW1wb3J0JTIwb3MlMEFpbXBvcnQlMjBzdWJwcm9jZXNzJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwVml0c1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtbXMtdHRzLWtvciUyMiklMEFtb2RlbCUyMCUzRCUyMFZpdHNNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtbXMtdHRzLWtvciUyMiklMEElMEFkZWYlMjB1cm9tYW5pemUoaW5wdXRfc3RyaW5nJTJDJTIwdXJvbWFuX3BhdGgpJTNBJTBBJTIwJTIwJTIwJTIwJTIyJTIyJTIyQ29udmVydCUyMG5vbi1Sb21hbiUyMHN0cmluZ3MlMjB0byUyMFJvbWFuJTIwdXNpbmclMjB0aGUlMjAlNjB1cm9tYW4lNjAlMjBwZXJsJTIwcGFja2FnZS4lMjIlMjIlMjIlMEElMjAlMjAlMjAlMjBzY3JpcHRfcGF0aCUyMCUzRCUyMG9zLnBhdGguam9pbih1cm9tYW5fcGF0aCUyQyUyMCUyMmJpbiUyMiUyQyUyMCUyMnVyb21hbi5wbCUyMiklMEElMEElMjAlMjAlMjAlMjBjb21tYW5kJTIwJTNEJTIwJTVCJTIycGVybCUyMiUyQyUyMHNjcmlwdF9wYXRoJTVEJTBBJTBBJTIwJTIwJTIwJTIwcHJvY2VzcyUyMCUzRCUyMHN1YnByb2Nlc3MuUG9wZW4oY29tbWFuZCUyQyUyMHN0ZGluJTNEc3VicHJvY2Vzcy5QSVBFJTJDJTIwc3Rkb3V0JTNEc3VicHJvY2Vzcy5QSVBFJTJDJTIwc3RkZXJyJTNEc3VicHJvY2Vzcy5QSVBFKSUwQSUyMCUyMCUyMCUyMCUyMyUyMEV4ZWN1dGUlMjB0aGUlMjBwZXJsJTIwY29tbWFuZCUwQSUyMCUyMCUyMCUyMHN0ZG91dCUyQyUyMHN0ZGVyciUyMCUzRCUyMHByb2Nlc3MuY29tbXVuaWNhdGUoaW5wdXQlM0RpbnB1dF9zdHJpbmcuZW5jb2RlKCkpJTBBJTBBJTIwJTIwJTIwJTIwaWYlMjBwcm9jZXNzLnJldHVybmNvZGUlMjAhJTNEJTIwMCUzQSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHJhaXNlJTIwVmFsdWVFcnJvcihmJTIyRXJyb3IlMjAlN0Jwcm9jZXNzLnJldHVybmNvZGUlN0QlM0ElMjAlN0JzdGRlcnIuZGVjb2RlKCklN0QlMjIpJTBBJTBBJTIwJTIwJTIwJTIwJTIzJTIwUmV0dXJuJTIwdGhlJTIwb3V0cHV0JTIwYXMlMjBhJTIwc3RyaW5nJTIwYW5kJTIwc2tpcCUyMHRoZSUyMG5ldy1saW5lJTIwY2hhcmFjdGVyJTIwYXQlMjB0aGUlMjBlbmQlMEElMjAlMjAlMjAlMjByZXR1cm4lMjBzdGRvdXQuZGVjb2RlKCklNUIlM0EtMSU1RCUwQSUwQXRleHQlMjAlM0QlMjAlMjIlRUMlOUQlQjQlRUIlQjQlOTAlMjAlRUIlQUMlQjQlRUMlOEElQTglMjAlRUMlOUQlQkMlRUMlOUQlQjQlRUMlOTUlQkMlMjIlMEF1cm9tYWl6ZWRfdGV4dCUyMCUzRCUyMHVyb21hbml6ZSh0ZXh0JTJDJTIwdXJvbWFuX3BhdGglM0Rvcy5lbnZpcm9uJTVCJTIyVVJPTUFOJTIyJTVEKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplcih0ZXh0JTNEdXJvbWFpemVkX3RleHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXNldF9zZWVkKDU1NSklMjAlMjAlMjMlMjBtYWtlJTIwZGV0ZXJtaW5pc3RpYyUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoaW5wdXRzJTVCJTIyaW5wdXRfaWRzJTIyJTVEKSUwQSUwQXdhdmVmb3JtJTIwJTNEJTIwb3V0cHV0cy53YXZlZm9ybSU1QjAlNUQ=",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> VitsTokenizer, VitsModel, set_seed
<span class="hljs-keyword">import</span> os
<span class="hljs-keyword">import</span> subprocess

tokenizer = VitsTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mms-tts-kor&quot;</span>)
model = VitsModel.from_pretrained(<span class="hljs-string">&quot;facebook/mms-tts-kor&quot;</span>)

<span class="hljs-keyword">def</span> <span class="hljs-title function_">uromanize</span>(<span class="hljs-params">input_string, uroman_path</span>):
    <span class="hljs-string">&quot;&quot;&quot;Convert non-Roman strings to Roman using the \`uroman\` perl package.&quot;&quot;&quot;</span>
    script_path = os.path.join(uroman_path, <span class="hljs-string">&quot;bin&quot;</span>, <span class="hljs-string">&quot;uroman.pl&quot;</span>)

    command = [<span class="hljs-string">&quot;perl&quot;</span>, script_path]

    process = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    <span class="hljs-comment"># Execute the perl command</span>
    stdout, stderr = process.communicate(<span class="hljs-built_in">input</span>=input_string.encode())

    <span class="hljs-keyword">if</span> process.returncode != <span class="hljs-number">0</span>:
        <span class="hljs-keyword">raise</span> ValueError(<span class="hljs-string">f&quot;Error <span class="hljs-subst">{process.returncode}</span>: <span class="hljs-subst">{stderr.decode()}</span>&quot;</span>)

    <span class="hljs-comment"># Return the output as a string and skip the new-line character at the end</span>
    <span class="hljs-keyword">return</span> stdout.decode()[:-<span class="hljs-number">1</span>]

text = <span class="hljs-string">&quot;\uC774\uBD10 \uBB34\uC2A8 \uC77C\uC774\uC57C&quot;</span>
uromaized_text = uromanize(text, uroman_path=os.environ[<span class="hljs-string">&quot;UROMAN&quot;</span>])

inputs = tokenizer(text=uromaized_text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

set_seed(<span class="hljs-number">555</span>)  <span class="hljs-comment"># make deterministic</span>
<span class="hljs-keyword">with</span> torch.no_grad():
   outputs = model(inputs[<span class="hljs-string">&quot;input_ids&quot;</span>])

waveform = outputs.waveform[<span class="hljs-number">0</span>]`}}),tt=new J({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwVml0c1Rva2VuaXplciUyQyUyMFZpdHNNb2RlbCUyQyUyMHNldF9zZWVkJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwVml0c1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtbXMtdHRzLWVuZyUyMiklMEFtb2RlbCUyMCUzRCUyMFZpdHNNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtbXMtdHRzLWVuZyUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIodGV4dCUzRCUyMkhlbGxvJTIwLSUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEElMjMlMjBtYWtlJTIwZGV0ZXJtaW5pc3RpYyUwQXNldF9zZWVkKDU1NSklMjAlMjAlMEElMEElMjMlMjBtYWtlJTIwc3BlZWNoJTIwZmFzdGVyJTIwYW5kJTIwbW9yZSUyMG5vaXN5JTBBbW9kZWwuc3BlYWtpbmdfcmF0ZSUyMCUzRCUyMDEuNSUwQW1vZGVsLm5vaXNlX3NjYWxlJTIwJTNEJTIwMC44JTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMG91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyk=",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> VitsTokenizer, VitsModel, set_seed

tokenizer = VitsTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mms-tts-eng&quot;</span>)
model = VitsModel.from_pretrained(<span class="hljs-string">&quot;facebook/mms-tts-eng&quot;</span>)

inputs = tokenizer(text=<span class="hljs-string">&quot;Hello - my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-comment"># make deterministic</span>
set_seed(<span class="hljs-number">555</span>)  

<span class="hljs-comment"># make speech faster and more noisy</span>
model.speaking_rate = <span class="hljs-number">1.5</span>
model.noise_scale = <span class="hljs-number">0.8</span>

<span class="hljs-keyword">with</span> torch.no_grad():
   outputs = model(**inputs)`}}),at=new F({}),pt=new F({}),ct=new J({props:{code:"cGlwJTIwaW5zdGFsbCUyMHRvcmNoJTIwYWNjZWxlcmF0ZSUyMGRhdGFzZXRzJTVCYXVkaW8lNUQlMEFwaXAlMjBpbnN0YWxsJTIwLS11cGdyYWRlJTIwdHJhbnNmb3JtZXJz",highlighted:`pip install torch accelerate datasets[audio]
pip install --upgrade transformers`}}),ht=new J({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTJDJTIwQXVkaW8lMEElMEElMjMlMjBFbmdsaXNoJTBBc3RyZWFtX2RhdGElMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIybW96aWxsYS1mb3VuZGF0aW9uJTJGY29tbW9uX3ZvaWNlXzEzXzAlMjIlMkMlMjAlMjJlbiUyMiUyQyUyMHNwbGl0JTNEJTIydGVzdCUyMiUyQyUyMHN0cmVhbWluZyUzRFRydWUpJTBBc3RyZWFtX2RhdGElMjAlM0QlMjBzdHJlYW1fZGF0YS5jYXN0X2NvbHVtbiglMjJhdWRpbyUyMiUyQyUyMEF1ZGlvKHNhbXBsaW5nX3JhdGUlM0QxNjAwMCkpJTBBZW5fc2FtcGxlJTIwJTNEJTIwbmV4dChpdGVyKHN0cmVhbV9kYXRhKSklNUIlMjJhdWRpbyUyMiU1RCU1QiUyMmFycmF5JTIyJTVEJTBBJTBBJTIzJTIwQXJhYmljJTBBc3RyZWFtX2RhdGElMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIybW96aWxsYS1mb3VuZGF0aW9uJTJGY29tbW9uX3ZvaWNlXzEzXzAlMjIlMkMlMjAlMjJhciUyMiUyQyUyMHNwbGl0JTNEJTIydGVzdCUyMiUyQyUyMHN0cmVhbWluZyUzRFRydWUpJTBBc3RyZWFtX2RhdGElMjAlM0QlMjBzdHJlYW1fZGF0YS5jYXN0X2NvbHVtbiglMjJhdWRpbyUyMiUyQyUyMEF1ZGlvKHNhbXBsaW5nX3JhdGUlM0QxNjAwMCkpJTBBYXJfc2FtcGxlJTIwJTNEJTIwbmV4dChpdGVyKHN0cmVhbV9kYXRhKSklNUIlMjJhdWRpbyUyMiU1RCU1QiUyMmFycmF5JTIyJTVE",highlighted:`<span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset, Audio

<span class="hljs-comment"># English</span>
stream_data = load_dataset(<span class="hljs-string">&quot;mozilla-foundation/common_voice_13_0&quot;</span>, <span class="hljs-string">&quot;en&quot;</span>, split=<span class="hljs-string">&quot;test&quot;</span>, streaming=<span class="hljs-literal">True</span>)
stream_data = stream_data.cast_column(<span class="hljs-string">&quot;audio&quot;</span>, Audio(sampling_rate=<span class="hljs-number">16000</span>))
en_sample = <span class="hljs-built_in">next</span>(<span class="hljs-built_in">iter</span>(stream_data))[<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>]

<span class="hljs-comment"># Arabic</span>
stream_data = load_dataset(<span class="hljs-string">&quot;mozilla-foundation/common_voice_13_0&quot;</span>, <span class="hljs-string">&quot;ar&quot;</span>, split=<span class="hljs-string">&quot;test&quot;</span>, streaming=<span class="hljs-literal">True</span>)
stream_data = stream_data.cast_column(<span class="hljs-string">&quot;audio&quot;</span>, Audio(sampling_rate=<span class="hljs-number">16000</span>))
ar_sample = <span class="hljs-built_in">next</span>(<span class="hljs-built_in">iter</span>(stream_data))[<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>]`}}),dt=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFdhdjJWZWMyRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbiUyQyUyMEF1dG9GZWF0dXJlRXh0cmFjdG9yJTBBaW1wb3J0JTIwdG9yY2glMEElMEFtb2RlbF9pZCUyMCUzRCUyMCUyMmZhY2Vib29rJTJGbW1zLWxpZC0xMjYlMjIlMEElMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvRmVhdHVyZUV4dHJhY3Rvci5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWQpJTBBbW9kZWwlMjAlM0QlMjBXYXYyVmVjMkZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKG1vZGVsX2lkKQ==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Wav2Vec2ForSequenceClassification, AutoFeatureExtractor
<span class="hljs-keyword">import</span> torch

model_id = <span class="hljs-string">&quot;facebook/mms-lid-126&quot;</span>

processor = AutoFeatureExtractor.from_pretrained(model_id)
model = Wav2Vec2ForSequenceClassification.from_pretrained(model_id)`}}),ft=new J({props:{code:"JTIzJTIwRW5nbGlzaCUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3Nvcihlbl9zYW1wbGUlMkMlMjBzYW1wbGluZ19yYXRlJTNEMTZfMDAwJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEFsYW5nX2lkJTIwJTNEJTIwdG9yY2guYXJnbWF4KG91dHB1dHMlMkMlMjBkaW0lM0QtMSklNUIwJTVELml0ZW0oKSUwQWRldGVjdGVkX2xhbmclMjAlM0QlMjBtb2RlbC5jb25maWcuaWQybGFiZWwlNUJsYW5nX2lkJTVEJTBBJTIzJTIwJ2VuZyclMEElMEElMjMlMjBBcmFiaWMlMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoYXJfc2FtcGxlJTJDJTIwc2FtcGxpbmdfcmF0ZSUzRDE2XzAwMCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMG91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBbGFuZ19pZCUyMCUzRCUyMHRvcmNoLmFyZ21heChvdXRwdXRzJTJDJTIwZGltJTNELTEpJTVCMCU1RC5pdGVtKCklMEFkZXRlY3RlZF9sYW5nJTIwJTNEJTIwbW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCbGFuZ19pZCU1RCUwQSUyMyUyMCdhcmEn",highlighted:`<span class="hljs-comment"># English</span>
inputs = processor(en_sample, sampling_rate=<span class="hljs-number">16_000</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-keyword">with</span> torch.no_grad():
    outputs = model(**inputs).logits

lang_id = torch.argmax(outputs, dim=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>].item()
detected_lang = model.config.id2label[lang_id]
<span class="hljs-comment"># &#x27;eng&#x27;</span>

<span class="hljs-comment"># Arabic</span>
inputs = processor(ar_sample, sampling_rate=<span class="hljs-number">16_000</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-keyword">with</span> torch.no_grad():
    outputs = model(**inputs).logits

lang_id = torch.argmax(outputs, dim=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>].item()
detected_lang = model.config.id2label[lang_id]
<span class="hljs-comment"># &#x27;ara&#x27;</span>`}}),yt=new J({props:{code:"cHJvY2Vzc29yLmlkMmxhYmVsLnZhbHVlcygp",highlighted:"processor.id2label.values()"}}),Mt=new F({}),{c(){v=r("meta"),K=h(),j=r("h1"),T=r("a"),R=r("span"),u(w.$$.fragment),B=h(),Pt=r("span"),ws=l("MMS"),Fa=h(),S=r("h2"),O=r("a"),Lt=r("span"),u(ve.$$.fragment),Js=h(),Dt=r("span"),gs=l("Overview"),Sa=h(),ee=r("p"),vs=l("The MMS model was proposed in "),Te=r("a"),Ts=l("Scaling Speech Technology to 1,000+ Languages"),js=l(`
by Vineel Pratap, Andros Tjandra, Bowen Shi, Paden Tomasello, Arun Babu, Sayani Kundu, Ali Elkahky, Zhaoheng Ni, Apoorv Vyas, Maryam Fazel-Zarandi, Alexei Baevski, Yossi Adi, Xiaohui Zhang, Wei-Ning Hsu, Alexis Conneau, Michael Auli`),Qa=h(),gt=r("p"),Us=l("The abstract from the paper is the following:"),Aa=h(),vt=r("p"),Kt=r("em"),ks=l(`Expanding the language coverage of speech technology has the potential to improve access to information for many more people.
However, current speech technology is restricted to about one hundred languages which is a small fraction of the over 7,000
languages spoken around the world.
The Massively Multilingual Speech (MMS) project increases the number of supported languages by 10-40x, depending on the task.
The main ingredients are a new dataset based on readings of publicly available religious texts and effectively leveraging
self-supervised learning. We built pre-trained wav2vec 2.0 models covering 1,406 languages,
a single multilingual automatic speech recognition model for 1,107 languages, speech synthesis models
for the same number of languages, as well as a language identification model for 4,017 languages.
Experiments show that our multilingual speech recognition model more than halves the word error rate of
Whisper on 54 languages of the FLEURS benchmark while being trained on a small fraction of the labeled data.`),Ya=h(),X=r("p"),Es=l("Here are the different models open sourced in the MMS project. The models and code are originally released "),je=r("a"),_s=l("here"),Ws=l(". We have add them to the "),Ot=r("code"),Zs=l("transformers"),Is=l(" framework, making them easier to use."),Ha=h(),Q=r("h3"),te=r("a"),ea=r("span"),u(Ue.$$.fragment),Rs=h(),ta=r("span"),Bs=l("Automatic Speech Recognition (ASR)"),qa=h(),U=r("p"),Xs=l("The ASR model checkpoints  can be found here : "),ke=r("a"),Vs=l("mms-1b-fl102"),$s=l(", "),Ee=r("a"),Cs=l("mms-1b-l1107"),Ns=l(", "),_e=r("a"),Gs=l("mms-1b-all"),zs=l(". For best accuracy, use the "),aa=r("code"),Fs=l("mms-1b-all"),Ss=l(" model."),xa=h(),Tt=r("p"),Qs=l("Tips:"),Pa=h(),V=r("ul"),We=r("li"),As=l("All ASR models accept a float array corresponding to the raw waveform of the speech signal. The raw waveform should be pre-processed with "),jt=r("a"),Ys=l("Wav2Vec2FeatureExtractor"),Hs=l("."),qs=h(),Ze=r("li"),xs=l(`The models were trained using connectionist temporal classification (CTC) so the model output has to be decoded using
`),Ut=r("a"),Ps=l("Wav2Vec2CTCTokenizer"),Ls=l("."),Ds=h(),Ie=r("li"),Ks=l("You can load different language adapter weights for different languages via "),kt=r("a"),Os=l("load_adapter()"),eo=l(`. Language adapters only consists of roughly 2 million parameters
and can therefore be efficiently loaded on the fly when needed.`),La=h(),A=r("h4"),ae=r("a"),la=r("span"),u(Re.$$.fragment),to=h(),sa=r("span"),ao=l("Loading"),Da=h(),E=r("p"),lo=l(`By default MMS loads adapter weights for English. If you want to load adapter weights of another language
make sure to specify `),oa=r("code"),so=l("target_lang=<your-chosen-target-lang>"),oo=l(" as well as "),ra=r("code"),ro=l('"ignore_mismatched_sizes=True'),no=l(`.
The `),na=r("code"),io=l("ignore_mismatched_sizes=True"),po=l(` keyword has to be passed to allow the language model head to be resized according
to the vocabulary of the specified language.
Similarly, the processor should be loaded with the same target language`),Ka=h(),u(Be.$$.fragment),Oa=h(),u(le.$$.fragment),el=h(),Et=r("p"),co=l("If you want to use the ASR pipeline, you can load your chosen target language as such:"),tl=h(),u(Xe.$$.fragment),al=h(),Y=r("h4"),se=r("a"),ia=r("span"),u(Ve.$$.fragment),ho=h(),pa=r("span"),uo=l("Inference"),ll=h(),$=r("p"),mo=l("Next, let\u2019s look at how we can run MMS in inference and change adapter layers after having called "),ca=r("code"),fo=l("~PretrainedModel.from_pretrained"),yo=l(`
First, we load audio data in different languages using the `),$e=r("a"),Mo=l("Datasets"),bo=l("."),sl=h(),u(Ce.$$.fragment),ol=h(),_t=r("p"),wo=l("Next, we load the model and processor"),rl=h(),u(Ne.$$.fragment),nl=h(),oe=r("p"),Jo=l(`Now we process the audio data, pass the processed audio data to the model and transcribe the model output,
just like we usually do for `),Wt=r("a"),go=l("Wav2Vec2ForCTC"),vo=l("."),il=h(),u(Ge.$$.fragment),pl=h(),_=r("p"),To=l(`We can now keep the same model in memory and simply switch out the language adapters by
calling the convenient `),Zt=r("a"),jo=l("load_adapter()"),Uo=l(" function for the model and "),It=r("a"),ko=l("set_target_lang()"),Eo=l(` for the tokenizer.
We pass the target language as an input - `),ha=r("code"),_o=l('"fra"'),Wo=l(" for French."),cl=h(),u(ze.$$.fragment),hl=h(),Rt=r("p"),Zo=l("In the same way the language can be switched out for all other supported languages. Please have a look at:"),dl=h(),u(Fe.$$.fragment),ul=h(),Bt=r("p"),Io=l("to see all supported languages."),ml=h(),re=r("p"),Ro=l("To further improve performance from ASR models, language model decoding can be used. See the documentation "),Se=r("a"),Bo=l("here"),Xo=l(" for further details."),fl=h(),H=r("h3"),ne=r("a"),da=r("span"),u(Qe.$$.fragment),Vo=h(),ua=r("span"),$o=l("Speech Synthesis (TTS)"),yl=h(),C=r("p"),Co=l(`MMS-TTS uses the same model architecture as VITS, which was added to \u{1F917} Transformers in v4.33. MMS trains a separate
model checkpoint for each of the 1100+ languages in the project. All available checkpoints can be found on the Hugging
Face Hub: `),Ae=r("a"),No=l("facebook/mms-tts"),Go=l(`, and the inference
documentation under `),Ye=r("a"),zo=l("VITS"),Fo=l("."),Ml=h(),q=r("h4"),ie=r("a"),ma=r("span"),u(He.$$.fragment),So=h(),fa=r("span"),Qo=l("Inference"),bl=h(),Xt=r("p"),Ao=l("To use the MMS model, first update to the latest version of the Transformers library:"),wl=h(),u(qe.$$.fragment),Jl=h(),Vt=r("p"),Yo=l(`Since the flow-based model in VITS is non-deterministic, it is good practice to set a seed to ensure reproducibility of
the outputs.`),gl=h(),$t=r("ul"),ya=r("li"),Ho=l(`For languages with a Roman alphabet, such as English or French, the tokenizer can be used directly to
pre-process the text inputs. The following code example runs a forward pass using the MMS-TTS English checkpoint:`),vl=h(),u(xe.$$.fragment),Tl=h(),pe=r("p"),qo=l("The resulting waveform can be saved as a "),Ma=r("code"),xo=l(".wav"),Po=l(" file:"),jl=h(),u(Pe.$$.fragment),Ul=h(),Ct=r("p"),Lo=l("Or displayed in a Jupyter Notebook / Google Colab:"),kl=h(),u(Le.$$.fragment),El=h(),ce=r("p"),Do=l("For certain languages with non-Roman alphabets, such as Arabic, Mandarin or Hindi, the "),De=r("a"),ba=r("code"),Ko=l("uroman"),Oo=l(`
perl package is required to pre-process the text inputs to the Roman alphabet.`),_l=h(),W=r("p"),er=l("You can check whether you require the "),wa=r("code"),tr=l("uroman"),ar=l(" package for your language by inspecting the "),Ja=r("code"),lr=l("is_uroman"),sr=l(` attribute of
the pre-trained `),ga=r("code"),or=l("tokenizer"),rr=l(":"),Wl=h(),u(Ke.$$.fragment),Zl=h(),N=r("p"),nr=l("If required, you should apply the uroman package to your text inputs "),va=r("strong"),ir=l("prior"),pr=l(" to passing them to the "),Ta=r("code"),cr=l("VitsTokenizer"),hr=l(`,
since currently the tokenizer does not support performing the pre-processing itself.`),Il=h(),he=r("p"),dr=l("To do this, first clone the uroman repository to your local machine and set the bash variable "),ja=r("code"),ur=l("UROMAN"),mr=l(" to the local path:"),Rl=h(),u(Oe.$$.fragment),Bl=h(),G=r("p"),fr=l(`You can then pre-process the text input using the following code snippet. You can either rely on using the bash variable
`),Ua=r("code"),yr=l("UROMAN"),Mr=l(" to point to the uroman repository, or you can pass the uroman directory as an argument to the "),ka=r("code"),br=l("uromaize"),wr=l(" function:"),Xl=h(),u(et.$$.fragment),Vl=h(),Nt=r("p"),Ea=r("strong"),Jr=l("Tips:"),$l=h(),de=r("ul"),I=r("li"),gr=l("The MMS-TTS checkpoints are trained on lower-cased, un-punctuated text. By default, the "),_a=r("code"),vr=l("VitsTokenizer"),Tr=h(),Wa=r("em"),jr=l("normalizes"),Ur=l(" the inputs by removing any casing and punctuation, to avoid passing out-of-vocabulary characters to the model. Hence, the model is agnostic to casing and punctuation, so these should be avoided in the text prompt. You can disable normalisation by setting "),Za=r("code"),kr=l("noramlize=False"),Er=l(" in the call to the tokenizer, but this will lead to un-expected behaviour and is discouraged."),_r=h(),x=r("li"),Wr=l("The speaking rate can be varied by setting the attribute "),Ia=r("code"),Zr=l("model.speaking_rate"),Ir=l(" to a chosen value. Likewise, the randomness of the noise is controlled by "),Ra=r("code"),Rr=l("model.noise_scale"),Br=l(":"),Cl=h(),u(tt.$$.fragment),Nl=h(),P=r("h3"),ue=r("a"),Ba=r("span"),u(at.$$.fragment),Xr=h(),Xa=r("span"),Vr=l("Language Identification (LID)"),Gl=h(),g=r("p"),$r=l("Different LID models are available based on the number of languages they can recognize - "),lt=r("a"),Cr=l("126"),Nr=l(", "),st=r("a"),Gr=l("256"),zr=l(", "),ot=r("a"),Fr=l("512"),Sr=l(", "),rt=r("a"),Qr=l("1024"),Ar=l(", "),nt=r("a"),Yr=l("2048"),Hr=l(", "),it=r("a"),qr=l("4017"),xr=l("."),zl=h(),L=r("h4"),me=r("a"),Va=r("span"),u(pt.$$.fragment),Pr=h(),$a=r("span"),Lr=l("Inference"),Fl=l(`

First, we install transformers and some other libraries

	`),u(ct.$$.fragment),Sl=h(),fe=r("p"),Dr=l("Next, we load a couple of audio samples via "),Ca=r("code"),Kr=l("datasets"),Or=l(". Make sure that the audio data is sampled to 16000 kHz."),Ql=h(),u(ht.$$.fragment),Al=h(),Gt=r("p"),en=l("Next, we load the model and processor"),Yl=h(),u(dt.$$.fragment),Hl=h(),ut=r("p"),tn=l("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 "),mt=r("a"),an=l("ehcalabres/wav2vec2-lg-xlsr-en-speech-emotion-recognition"),ql=h(),u(ft.$$.fragment),xl=h(),zt=r("p"),ln=l("To see all the supported languages of a checkpoint, you can print out the language ids as follows:"),Pl=h(),u(yt.$$.fragment),Ll=h(),D=r("h3"),ye=r("a"),Na=r("span"),u(Mt.$$.fragment),sn=h(),Ga=r("span"),on=l("Audio Pretrained Models"),Dl=h(),Z=r("p"),rn=l("Pretrained models are available for two different sizes - "),bt=r("a"),nn=l("300M"),pn=l(" , "),wt=r("a"),cn=l("1Bil"),hn=l(". The architecture is based on the Wav2Vec2 model, so one can refer to "),Ft=r("a"),dn=l("Wav2Vec2\u2019s documentation page"),un=l(" for further details on how to finetune with models for various downstream tasks."),this.h()},l(e){const o=rp('[data-svelte="svelte-1phssyn"]',document.head);v=n(o,"META",{name:!0,content:!0}),o.forEach(t),K=d(e),j=n(e,"H1",{class:!0});var Jt=i(j);T=n(Jt,"A",{id:!0,class:!0,href:!0});var fn=i(T);R=n(fn,"SPAN",{});var yn=i(R);m(w.$$.fragment,yn),yn.forEach(t),fn.forEach(t),B=d(Jt),Pt=n(Jt,"SPAN",{});var Mn=i(Pt);ws=s(Mn,"MMS"),Mn.forEach(t),Jt.forEach(t),Fa=d(e),S=n(e,"H2",{class:!0});var Ol=i(S);O=n(Ol,"A",{id:!0,class:!0,href:!0});var bn=i(O);Lt=n(bn,"SPAN",{});var wn=i(Lt);m(ve.$$.fragment,wn),wn.forEach(t),bn.forEach(t),Js=d(Ol),Dt=n(Ol,"SPAN",{});var Jn=i(Dt);gs=s(Jn,"Overview"),Jn.forEach(t),Ol.forEach(t),Sa=d(e),ee=n(e,"P",{});var es=i(ee);vs=s(es,"The MMS model was proposed in "),Te=n(es,"A",{href:!0,rel:!0});var gn=i(Te);Ts=s(gn,"Scaling Speech Technology to 1,000+ Languages"),gn.forEach(t),js=s(es,`
by Vineel Pratap, Andros Tjandra, Bowen Shi, Paden Tomasello, Arun Babu, Sayani Kundu, Ali Elkahky, Zhaoheng Ni, Apoorv Vyas, Maryam Fazel-Zarandi, Alexei Baevski, Yossi Adi, Xiaohui Zhang, Wei-Ning Hsu, Alexis Conneau, Michael Auli`),es.forEach(t),Qa=d(e),gt=n(e,"P",{});var vn=i(gt);Us=s(vn,"The abstract from the paper is the following:"),vn.forEach(t),Aa=d(e),vt=n(e,"P",{});var Tn=i(vt);Kt=n(Tn,"EM",{});var jn=i(Kt);ks=s(jn,`Expanding the language coverage of speech technology has the potential to improve access to information for many more people.
However, current speech technology is restricted to about one hundred languages which is a small fraction of the over 7,000
languages spoken around the world.
The Massively Multilingual Speech (MMS) project increases the number of supported languages by 10-40x, depending on the task.
The main ingredients are a new dataset based on readings of publicly available religious texts and effectively leveraging
self-supervised learning. We built pre-trained wav2vec 2.0 models covering 1,406 languages,
a single multilingual automatic speech recognition model for 1,107 languages, speech synthesis models
for the same number of languages, as well as a language identification model for 4,017 languages.
Experiments show that our multilingual speech recognition model more than halves the word error rate of
Whisper on 54 languages of the FLEURS benchmark while being trained on a small fraction of the labeled data.`),jn.forEach(t),Tn.forEach(t),Ya=d(e),X=n(e,"P",{});var St=i(X);Es=s(St,"Here are the different models open sourced in the MMS project. The models and code are originally released "),je=n(St,"A",{href:!0,rel:!0});var Un=i(je);_s=s(Un,"here"),Un.forEach(t),Ws=s(St,". We have add them to the "),Ot=n(St,"CODE",{});var kn=i(Ot);Zs=s(kn,"transformers"),kn.forEach(t),Is=s(St," framework, making them easier to use."),St.forEach(t),Ha=d(e),Q=n(e,"H3",{class:!0});var ts=i(Q);te=n(ts,"A",{id:!0,class:!0,href:!0});var En=i(te);ea=n(En,"SPAN",{});var _n=i(ea);m(Ue.$$.fragment,_n),_n.forEach(t),En.forEach(t),Rs=d(ts),ta=n(ts,"SPAN",{});var Wn=i(ta);Bs=s(Wn,"Automatic Speech Recognition (ASR)"),Wn.forEach(t),ts.forEach(t),qa=d(e),U=n(e,"P",{});var z=i(U);Xs=s(z,"The ASR model checkpoints  can be found here : "),ke=n(z,"A",{href:!0,rel:!0});var Zn=i(ke);Vs=s(Zn,"mms-1b-fl102"),Zn.forEach(t),$s=s(z,", "),Ee=n(z,"A",{href:!0,rel:!0});var In=i(Ee);Cs=s(In,"mms-1b-l1107"),In.forEach(t),Ns=s(z,", "),_e=n(z,"A",{href:!0,rel:!0});var Rn=i(_e);Gs=s(Rn,"mms-1b-all"),Rn.forEach(t),zs=s(z,". For best accuracy, use the "),aa=n(z,"CODE",{});var Bn=i(aa);Fs=s(Bn,"mms-1b-all"),Bn.forEach(t),Ss=s(z," model."),z.forEach(t),xa=d(e),Tt=n(e,"P",{});var Xn=i(Tt);Qs=s(Xn,"Tips:"),Xn.forEach(t),Pa=d(e),V=n(e,"UL",{});var Qt=i(V);We=n(Qt,"LI",{});var as=i(We);As=s(as,"All ASR models accept a float array corresponding to the raw waveform of the speech signal. The raw waveform should be pre-processed with "),jt=n(as,"A",{href:!0});var Vn=i(jt);Ys=s(Vn,"Wav2Vec2FeatureExtractor"),Vn.forEach(t),Hs=s(as,"."),as.forEach(t),qs=d(Qt),Ze=n(Qt,"LI",{});var ls=i(Ze);xs=s(ls,`The models were trained using connectionist temporal classification (CTC) so the model output has to be decoded using
`),Ut=n(ls,"A",{href:!0});var $n=i(Ut);Ps=s($n,"Wav2Vec2CTCTokenizer"),$n.forEach(t),Ls=s(ls,"."),ls.forEach(t),Ds=d(Qt),Ie=n(Qt,"LI",{});var ss=i(Ie);Ks=s(ss,"You can load different language adapter weights for different languages via "),kt=n(ss,"A",{href:!0});var Cn=i(kt);Os=s(Cn,"load_adapter()"),Cn.forEach(t),eo=s(ss,`. Language adapters only consists of roughly 2 million parameters
and can therefore be efficiently loaded on the fly when needed.`),ss.forEach(t),Qt.forEach(t),La=d(e),A=n(e,"H4",{class:!0});var os=i(A);ae=n(os,"A",{id:!0,class:!0,href:!0});var Nn=i(ae);la=n(Nn,"SPAN",{});var Gn=i(la);m(Re.$$.fragment,Gn),Gn.forEach(t),Nn.forEach(t),to=d(os),sa=n(os,"SPAN",{});var zn=i(sa);ao=s(zn,"Loading"),zn.forEach(t),os.forEach(t),Da=d(e),E=n(e,"P",{});var Me=i(E);lo=s(Me,`By default MMS loads adapter weights for English. If you want to load adapter weights of another language
make sure to specify `),oa=n(Me,"CODE",{});var Fn=i(oa);so=s(Fn,"target_lang=<your-chosen-target-lang>"),Fn.forEach(t),oo=s(Me," as well as "),ra=n(Me,"CODE",{});var Sn=i(ra);ro=s(Sn,'"ignore_mismatched_sizes=True'),Sn.forEach(t),no=s(Me,`.
The `),na=n(Me,"CODE",{});var Qn=i(na);io=s(Qn,"ignore_mismatched_sizes=True"),Qn.forEach(t),po=s(Me,` keyword has to be passed to allow the language model head to be resized according
to the vocabulary of the specified language.
Similarly, the processor should be loaded with the same target language`),Me.forEach(t),Ka=d(e),m(Be.$$.fragment,e),Oa=d(e),m(le.$$.fragment,e),el=d(e),Et=n(e,"P",{});var An=i(Et);co=s(An,"If you want to use the ASR pipeline, you can load your chosen target language as such:"),An.forEach(t),tl=d(e),m(Xe.$$.fragment,e),al=d(e),Y=n(e,"H4",{class:!0});var rs=i(Y);se=n(rs,"A",{id:!0,class:!0,href:!0});var Yn=i(se);ia=n(Yn,"SPAN",{});var Hn=i(ia);m(Ve.$$.fragment,Hn),Hn.forEach(t),Yn.forEach(t),ho=d(rs),pa=n(rs,"SPAN",{});var qn=i(pa);uo=s(qn,"Inference"),qn.forEach(t),rs.forEach(t),ll=d(e),$=n(e,"P",{});var At=i($);mo=s(At,"Next, let\u2019s look at how we can run MMS in inference and change adapter layers after having called "),ca=n(At,"CODE",{});var xn=i(ca);fo=s(xn,"~PretrainedModel.from_pretrained"),xn.forEach(t),yo=s(At,`
First, we load audio data in different languages using the `),$e=n(At,"A",{href:!0,rel:!0});var Pn=i($e);Mo=s(Pn,"Datasets"),Pn.forEach(t),bo=s(At,"."),At.forEach(t),sl=d(e),m(Ce.$$.fragment,e),ol=d(e),_t=n(e,"P",{});var Ln=i(_t);wo=s(Ln,"Next, we load the model and processor"),Ln.forEach(t),rl=d(e),m(Ne.$$.fragment,e),nl=d(e),oe=n(e,"P",{});var ns=i(oe);Jo=s(ns,`Now we process the audio data, pass the processed audio data to the model and transcribe the model output,
just like we usually do for `),Wt=n(ns,"A",{href:!0});var Dn=i(Wt);go=s(Dn,"Wav2Vec2ForCTC"),Dn.forEach(t),vo=s(ns,"."),ns.forEach(t),il=d(e),m(Ge.$$.fragment,e),pl=d(e),_=n(e,"P",{});var be=i(_);To=s(be,`We can now keep the same model in memory and simply switch out the language adapters by
calling the convenient `),Zt=n(be,"A",{href:!0});var Kn=i(Zt);jo=s(Kn,"load_adapter()"),Kn.forEach(t),Uo=s(be," function for the model and "),It=n(be,"A",{href:!0});var On=i(It);ko=s(On,"set_target_lang()"),On.forEach(t),Eo=s(be,` for the tokenizer.
We pass the target language as an input - `),ha=n(be,"CODE",{});var ei=i(ha);_o=s(ei,'"fra"'),ei.forEach(t),Wo=s(be," for French."),be.forEach(t),cl=d(e),m(ze.$$.fragment,e),hl=d(e),Rt=n(e,"P",{});var ti=i(Rt);Zo=s(ti,"In the same way the language can be switched out for all other supported languages. Please have a look at:"),ti.forEach(t),dl=d(e),m(Fe.$$.fragment,e),ul=d(e),Bt=n(e,"P",{});var ai=i(Bt);Io=s(ai,"to see all supported languages."),ai.forEach(t),ml=d(e),re=n(e,"P",{});var is=i(re);Ro=s(is,"To further improve performance from ASR models, language model decoding can be used. See the documentation "),Se=n(is,"A",{href:!0,rel:!0});var li=i(Se);Bo=s(li,"here"),li.forEach(t),Xo=s(is," for further details."),is.forEach(t),fl=d(e),H=n(e,"H3",{class:!0});var ps=i(H);ne=n(ps,"A",{id:!0,class:!0,href:!0});var si=i(ne);da=n(si,"SPAN",{});var oi=i(da);m(Qe.$$.fragment,oi),oi.forEach(t),si.forEach(t),Vo=d(ps),ua=n(ps,"SPAN",{});var ri=i(ua);$o=s(ri,"Speech Synthesis (TTS)"),ri.forEach(t),ps.forEach(t),yl=d(e),C=n(e,"P",{});var Yt=i(C);Co=s(Yt,`MMS-TTS uses the same model architecture as VITS, which was added to \u{1F917} Transformers in v4.33. MMS trains a separate
model checkpoint for each of the 1100+ languages in the project. All available checkpoints can be found on the Hugging
Face Hub: `),Ae=n(Yt,"A",{href:!0,rel:!0});var ni=i(Ae);No=s(ni,"facebook/mms-tts"),ni.forEach(t),Go=s(Yt,`, and the inference
documentation under `),Ye=n(Yt,"A",{href:!0,rel:!0});var ii=i(Ye);zo=s(ii,"VITS"),ii.forEach(t),Fo=s(Yt,"."),Yt.forEach(t),Ml=d(e),q=n(e,"H4",{class:!0});var cs=i(q);ie=n(cs,"A",{id:!0,class:!0,href:!0});var pi=i(ie);ma=n(pi,"SPAN",{});var ci=i(ma);m(He.$$.fragment,ci),ci.forEach(t),pi.forEach(t),So=d(cs),fa=n(cs,"SPAN",{});var hi=i(fa);Qo=s(hi,"Inference"),hi.forEach(t),cs.forEach(t),bl=d(e),Xt=n(e,"P",{});var di=i(Xt);Ao=s(di,"To use the MMS model, first update to the latest version of the Transformers library:"),di.forEach(t),wl=d(e),m(qe.$$.fragment,e),Jl=d(e),Vt=n(e,"P",{});var ui=i(Vt);Yo=s(ui,`Since the flow-based model in VITS is non-deterministic, it is good practice to set a seed to ensure reproducibility of
the outputs.`),ui.forEach(t),gl=d(e),$t=n(e,"UL",{});var mi=i($t);ya=n(mi,"LI",{});var fi=i(ya);Ho=s(fi,`For languages with a Roman alphabet, such as English or French, the tokenizer can be used directly to
pre-process the text inputs. The following code example runs a forward pass using the MMS-TTS English checkpoint:`),fi.forEach(t),mi.forEach(t),vl=d(e),m(xe.$$.fragment,e),Tl=d(e),pe=n(e,"P",{});var hs=i(pe);qo=s(hs,"The resulting waveform can be saved as a "),Ma=n(hs,"CODE",{});var yi=i(Ma);xo=s(yi,".wav"),yi.forEach(t),Po=s(hs," file:"),hs.forEach(t),jl=d(e),m(Pe.$$.fragment,e),Ul=d(e),Ct=n(e,"P",{});var Mi=i(Ct);Lo=s(Mi,"Or displayed in a Jupyter Notebook / Google Colab:"),Mi.forEach(t),kl=d(e),m(Le.$$.fragment,e),El=d(e),ce=n(e,"P",{});var ds=i(ce);Do=s(ds,"For certain languages with non-Roman alphabets, such as Arabic, Mandarin or Hindi, the "),De=n(ds,"A",{href:!0,rel:!0});var bi=i(De);ba=n(bi,"CODE",{});var wi=i(ba);Ko=s(wi,"uroman"),wi.forEach(t),bi.forEach(t),Oo=s(ds,`
perl package is required to pre-process the text inputs to the Roman alphabet.`),ds.forEach(t),_l=d(e),W=n(e,"P",{});var we=i(W);er=s(we,"You can check whether you require the "),wa=n(we,"CODE",{});var Ji=i(wa);tr=s(Ji,"uroman"),Ji.forEach(t),ar=s(we," package for your language by inspecting the "),Ja=n(we,"CODE",{});var gi=i(Ja);lr=s(gi,"is_uroman"),gi.forEach(t),sr=s(we,` attribute of
the pre-trained `),ga=n(we,"CODE",{});var vi=i(ga);or=s(vi,"tokenizer"),vi.forEach(t),rr=s(we,":"),we.forEach(t),Wl=d(e),m(Ke.$$.fragment,e),Zl=d(e),N=n(e,"P",{});var Ht=i(N);nr=s(Ht,"If required, you should apply the uroman package to your text inputs "),va=n(Ht,"STRONG",{});var Ti=i(va);ir=s(Ti,"prior"),Ti.forEach(t),pr=s(Ht," to passing them to the "),Ta=n(Ht,"CODE",{});var ji=i(Ta);cr=s(ji,"VitsTokenizer"),ji.forEach(t),hr=s(Ht,`,
since currently the tokenizer does not support performing the pre-processing itself.`),Ht.forEach(t),Il=d(e),he=n(e,"P",{});var us=i(he);dr=s(us,"To do this, first clone the uroman repository to your local machine and set the bash variable "),ja=n(us,"CODE",{});var Ui=i(ja);ur=s(Ui,"UROMAN"),Ui.forEach(t),mr=s(us," to the local path:"),us.forEach(t),Rl=d(e),m(Oe.$$.fragment,e),Bl=d(e),G=n(e,"P",{});var qt=i(G);fr=s(qt,`You can then pre-process the text input using the following code snippet. You can either rely on using the bash variable
`),Ua=n(qt,"CODE",{});var ki=i(Ua);yr=s(ki,"UROMAN"),ki.forEach(t),Mr=s(qt," to point to the uroman repository, or you can pass the uroman directory as an argument to the "),ka=n(qt,"CODE",{});var Ei=i(ka);br=s(Ei,"uromaize"),Ei.forEach(t),wr=s(qt," function:"),qt.forEach(t),Xl=d(e),m(et.$$.fragment,e),Vl=d(e),Nt=n(e,"P",{});var _i=i(Nt);Ea=n(_i,"STRONG",{});var Wi=i(Ea);Jr=s(Wi,"Tips:"),Wi.forEach(t),_i.forEach(t),$l=d(e),de=n(e,"UL",{});var ms=i(de);I=n(ms,"LI",{});var Je=i(I);gr=s(Je,"The MMS-TTS checkpoints are trained on lower-cased, un-punctuated text. By default, the "),_a=n(Je,"CODE",{});var Zi=i(_a);vr=s(Zi,"VitsTokenizer"),Zi.forEach(t),Tr=d(Je),Wa=n(Je,"EM",{});var Ii=i(Wa);jr=s(Ii,"normalizes"),Ii.forEach(t),Ur=s(Je," the inputs by removing any casing and punctuation, to avoid passing out-of-vocabulary characters to the model. Hence, the model is agnostic to casing and punctuation, so these should be avoided in the text prompt. You can disable normalisation by setting "),Za=n(Je,"CODE",{});var Ri=i(Za);kr=s(Ri,"noramlize=False"),Ri.forEach(t),Er=s(Je," in the call to the tokenizer, but this will lead to un-expected behaviour and is discouraged."),Je.forEach(t),_r=d(ms),x=n(ms,"LI",{});var xt=i(x);Wr=s(xt,"The speaking rate can be varied by setting the attribute "),Ia=n(xt,"CODE",{});var Bi=i(Ia);Zr=s(Bi,"model.speaking_rate"),Bi.forEach(t),Ir=s(xt," to a chosen value. Likewise, the randomness of the noise is controlled by "),Ra=n(xt,"CODE",{});var Xi=i(Ra);Rr=s(Xi,"model.noise_scale"),Xi.forEach(t),Br=s(xt,":"),xt.forEach(t),ms.forEach(t),Cl=d(e),m(tt.$$.fragment,e),Nl=d(e),P=n(e,"H3",{class:!0});var fs=i(P);ue=n(fs,"A",{id:!0,class:!0,href:!0});var Vi=i(ue);Ba=n(Vi,"SPAN",{});var $i=i(Ba);m(at.$$.fragment,$i),$i.forEach(t),Vi.forEach(t),Xr=d(fs),Xa=n(fs,"SPAN",{});var Ci=i(Xa);Vr=s(Ci,"Language Identification (LID)"),Ci.forEach(t),fs.forEach(t),Gl=d(e),g=n(e,"P",{});var k=i(g);$r=s(k,"Different LID models are available based on the number of languages they can recognize - "),lt=n(k,"A",{href:!0,rel:!0});var Ni=i(lt);Cr=s(Ni,"126"),Ni.forEach(t),Nr=s(k,", "),st=n(k,"A",{href:!0,rel:!0});var Gi=i(st);Gr=s(Gi,"256"),Gi.forEach(t),zr=s(k,", "),ot=n(k,"A",{href:!0,rel:!0});var zi=i(ot);Fr=s(zi,"512"),zi.forEach(t),Sr=s(k,", "),rt=n(k,"A",{href:!0,rel:!0});var Fi=i(rt);Qr=s(Fi,"1024"),Fi.forEach(t),Ar=s(k,", "),nt=n(k,"A",{href:!0,rel:!0});var Si=i(nt);Yr=s(Si,"2048"),Si.forEach(t),Hr=s(k,", "),it=n(k,"A",{href:!0,rel:!0});var Qi=i(it);qr=s(Qi,"4017"),Qi.forEach(t),xr=s(k,"."),k.forEach(t),zl=d(e),L=n(e,"H4",{class:!0});var ys=i(L);me=n(ys,"A",{id:!0,class:!0,href:!0});var Ai=i(me);Va=n(Ai,"SPAN",{});var Yi=i(Va);m(pt.$$.fragment,Yi),Yi.forEach(t),Ai.forEach(t),Pr=d(ys),$a=n(ys,"SPAN",{});var Hi=i($a);Lr=s(Hi,"Inference"),Hi.forEach(t),ys.forEach(t),Fl=s(e,`

First, we install transformers and some other libraries

	`),m(ct.$$.fragment,e),Sl=d(e),fe=n(e,"P",{});var Ms=i(fe);Dr=s(Ms,"Next, we load a couple of audio samples via "),Ca=n(Ms,"CODE",{});var qi=i(Ca);Kr=s(qi,"datasets"),qi.forEach(t),Or=s(Ms,". Make sure that the audio data is sampled to 16000 kHz."),Ms.forEach(t),Ql=d(e),m(ht.$$.fragment,e),Al=d(e),Gt=n(e,"P",{});var xi=i(Gt);en=s(xi,"Next, we load the model and processor"),xi.forEach(t),Yl=d(e),m(dt.$$.fragment,e),Hl=d(e),ut=n(e,"P",{});var mn=i(ut);tn=s(mn,"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 "),mt=n(mn,"A",{href:!0,rel:!0});var Pi=i(mt);an=s(Pi,"ehcalabres/wav2vec2-lg-xlsr-en-speech-emotion-recognition"),Pi.forEach(t),mn.forEach(t),ql=d(e),m(ft.$$.fragment,e),xl=d(e),zt=n(e,"P",{});var Li=i(zt);ln=s(Li,"To see all the supported languages of a checkpoint, you can print out the language ids as follows:"),Li.forEach(t),Pl=d(e),m(yt.$$.fragment,e),Ll=d(e),D=n(e,"H3",{class:!0});var bs=i(D);ye=n(bs,"A",{id:!0,class:!0,href:!0});var Di=i(ye);Na=n(Di,"SPAN",{});var Ki=i(Na);m(Mt.$$.fragment,Ki),Ki.forEach(t),Di.forEach(t),sn=d(bs),Ga=n(bs,"SPAN",{});var Oi=i(Ga);on=s(Oi,"Audio Pretrained Models"),Oi.forEach(t),bs.forEach(t),Dl=d(e),Z=n(e,"P",{});var ge=i(Z);rn=s(ge,"Pretrained models are available for two different sizes - "),bt=n(ge,"A",{href:!0,rel:!0});var ep=i(bt);nn=s(ep,"300M"),ep.forEach(t),pn=s(ge," , "),wt=n(ge,"A",{href:!0,rel:!0});var tp=i(wt);cn=s(tp,"1Bil"),tp.forEach(t),hn=s(ge,". The architecture is based on the Wav2Vec2 model, so one can refer to "),Ft=n(ge,"A",{href:!0});var ap=i(Ft);dn=s(ap,"Wav2Vec2\u2019s documentation page"),ap.forEach(t),un=s(ge," for further details on how to finetune with models for various downstream tasks."),ge.forEach(t),this.h()},h(){c(v,"name","hf:doc:metadata"),c(v,"content",JSON.stringify(dp)),c(T,"id","mms"),c(T,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(T,"href","#mms"),c(j,"class","relative group"),c(O,"id","overview"),c(O,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(O,"href","#overview"),c(S,"class","relative group"),c(Te,"href","https://arxiv.org/abs/2305.13516"),c(Te,"rel","nofollow"),c(je,"href","https://github.com/facebookresearch/fairseq/tree/main/examples/mms"),c(je,"rel","nofollow"),c(te,"id","automatic-speech-recognition-asr"),c(te,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(te,"href","#automatic-speech-recognition-asr"),c(Q,"class","relative group"),c(ke,"href","https://huggingface.co/facebook/mms-1b-fl102"),c(ke,"rel","nofollow"),c(Ee,"href","https://huggingface.co/facebook/mms-1b-l1107"),c(Ee,"rel","nofollow"),c(_e,"href","https://huggingface.co/facebook/mms-1b-all"),c(_e,"rel","nofollow"),c(jt,"href","/docs/transformers/v4.33.0/en/model_doc/wav2vec2#transformers.Wav2Vec2FeatureExtractor"),c(Ut,"href","/docs/transformers/v4.33.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer"),c(kt,"href","/docs/transformers/v4.33.0/en/model_doc/wav2vec2#transformers.Wav2Vec2ForCTC.load_adapter"),c(ae,"id","loading"),c(ae,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(ae,"href","#loading"),c(A,"class","relative group"),c(se,"id","inference"),c(se,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(se,"href","#inference"),c(Y,"class","relative group"),c($e,"href","https://github.com/huggingface/datasets"),c($e,"rel","nofollow"),c(Wt,"href","/docs/transformers/v4.33.0/en/model_doc/wav2vec2#transformers.Wav2Vec2ForCTC"),c(Zt,"href","/docs/transformers/v4.33.0/en/model_doc/wav2vec2#transformers.Wav2Vec2ForCTC.load_adapter"),c(It,"href","/docs/transformers/v4.33.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.set_target_lang"),c(Se,"href","https://huggingface.co/facebook/mms-1b-all"),c(Se,"rel","nofollow"),c(ne,"id","speech-synthesis-tts"),c(ne,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(ne,"href","#speech-synthesis-tts"),c(H,"class","relative group"),c(Ae,"href","https://huggingface.co/models?sort=trending&search=facebook%2Fmms-tts"),c(Ae,"rel","nofollow"),c(Ye,"href","https://huggingface.co/docs/transformers/main/en/model_doc/vits"),c(Ye,"rel","nofollow"),c(ie,"id","inference"),c(ie,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(ie,"href","#inference"),c(q,"class","relative group"),c(De,"href","https://github.com/isi-nlp/uroman"),c(De,"rel","nofollow"),c(ue,"id","language-identification-lid"),c(ue,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(ue,"href","#language-identification-lid"),c(P,"class","relative group"),c(lt,"href","https://huggingface.co/facebook/mms-lid-126"),c(lt,"rel","nofollow"),c(st,"href","https://huggingface.co/facebook/mms-lid-256"),c(st,"rel","nofollow"),c(ot,"href","https://huggingface.co/facebook/mms-lid-512"),c(ot,"rel","nofollow"),c(rt,"href","https://huggingface.co/facebook/mms-lid-1024"),c(rt,"rel","nofollow"),c(nt,"href","https://huggingface.co/facebook/mms-lid-2048"),c(nt,"rel","nofollow"),c(it,"href","https://huggingface.co/facebook/mms-lid-4017"),c(it,"rel","nofollow"),c(me,"id","inference"),c(me,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(me,"href","#inference"),c(L,"class","relative group"),c(mt,"href","https://huggingface.co/harshit345/xlsr-wav2vec-speech-emotion-recognition"),c(mt,"rel","nofollow"),c(ye,"id","audio-pretrained-models"),c(ye,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(ye,"href","#audio-pretrained-models"),c(D,"class","relative group"),c(bt,"href","https://huggingface.co/facebook/mms-300m"),c(bt,"rel","nofollow"),c(wt,"href","https://huggingface.co/facebook/mms-1b"),c(wt,"rel","nofollow"),c(Ft,"href","wav2vec2")},m(e,o){a(document.head,v),p(e,K,o),p(e,j,o),a(j,T),a(T,R),f(w,R,null),a(j,B),a(j,Pt),a(Pt,ws),p(e,Fa,o),p(e,S,o),a(S,O),a(O,Lt),f(ve,Lt,null),a(S,Js),a(S,Dt),a(Dt,gs),p(e,Sa,o),p(e,ee,o),a(ee,vs),a(ee,Te),a(Te,Ts),a(ee,js),p(e,Qa,o),p(e,gt,o),a(gt,Us),p(e,Aa,o),p(e,vt,o),a(vt,Kt),a(Kt,ks),p(e,Ya,o),p(e,X,o),a(X,Es),a(X,je),a(je,_s),a(X,Ws),a(X,Ot),a(Ot,Zs),a(X,Is),p(e,Ha,o),p(e,Q,o),a(Q,te),a(te,ea),f(Ue,ea,null),a(Q,Rs),a(Q,ta),a(ta,Bs),p(e,qa,o),p(e,U,o),a(U,Xs),a(U,ke),a(ke,Vs),a(U,$s),a(U,Ee),a(Ee,Cs),a(U,Ns),a(U,_e),a(_e,Gs),a(U,zs),a(U,aa),a(aa,Fs),a(U,Ss),p(e,xa,o),p(e,Tt,o),a(Tt,Qs),p(e,Pa,o),p(e,V,o),a(V,We),a(We,As),a(We,jt),a(jt,Ys),a(We,Hs),a(V,qs),a(V,Ze),a(Ze,xs),a(Ze,Ut),a(Ut,Ps),a(Ze,Ls),a(V,Ds),a(V,Ie),a(Ie,Ks),a(Ie,kt),a(kt,Os),a(Ie,eo),p(e,La,o),p(e,A,o),a(A,ae),a(ae,la),f(Re,la,null),a(A,to),a(A,sa),a(sa,ao),p(e,Da,o),p(e,E,o),a(E,lo),a(E,oa),a(oa,so),a(E,oo),a(E,ra),a(ra,ro),a(E,no),a(E,na),a(na,io),a(E,po),p(e,Ka,o),f(Be,e,o),p(e,Oa,o),f(le,e,o),p(e,el,o),p(e,Et,o),a(Et,co),p(e,tl,o),f(Xe,e,o),p(e,al,o),p(e,Y,o),a(Y,se),a(se,ia),f(Ve,ia,null),a(Y,ho),a(Y,pa),a(pa,uo),p(e,ll,o),p(e,$,o),a($,mo),a($,ca),a(ca,fo),a($,yo),a($,$e),a($e,Mo),a($,bo),p(e,sl,o),f(Ce,e,o),p(e,ol,o),p(e,_t,o),a(_t,wo),p(e,rl,o),f(Ne,e,o),p(e,nl,o),p(e,oe,o),a(oe,Jo),a(oe,Wt),a(Wt,go),a(oe,vo),p(e,il,o),f(Ge,e,o),p(e,pl,o),p(e,_,o),a(_,To),a(_,Zt),a(Zt,jo),a(_,Uo),a(_,It),a(It,ko),a(_,Eo),a(_,ha),a(ha,_o),a(_,Wo),p(e,cl,o),f(ze,e,o),p(e,hl,o),p(e,Rt,o),a(Rt,Zo),p(e,dl,o),f(Fe,e,o),p(e,ul,o),p(e,Bt,o),a(Bt,Io),p(e,ml,o),p(e,re,o),a(re,Ro),a(re,Se),a(Se,Bo),a(re,Xo),p(e,fl,o),p(e,H,o),a(H,ne),a(ne,da),f(Qe,da,null),a(H,Vo),a(H,ua),a(ua,$o),p(e,yl,o),p(e,C,o),a(C,Co),a(C,Ae),a(Ae,No),a(C,Go),a(C,Ye),a(Ye,zo),a(C,Fo),p(e,Ml,o),p(e,q,o),a(q,ie),a(ie,ma),f(He,ma,null),a(q,So),a(q,fa),a(fa,Qo),p(e,bl,o),p(e,Xt,o),a(Xt,Ao),p(e,wl,o),f(qe,e,o),p(e,Jl,o),p(e,Vt,o),a(Vt,Yo),p(e,gl,o),p(e,$t,o),a($t,ya),a(ya,Ho),p(e,vl,o),f(xe,e,o),p(e,Tl,o),p(e,pe,o),a(pe,qo),a(pe,Ma),a(Ma,xo),a(pe,Po),p(e,jl,o),f(Pe,e,o),p(e,Ul,o),p(e,Ct,o),a(Ct,Lo),p(e,kl,o),f(Le,e,o),p(e,El,o),p(e,ce,o),a(ce,Do),a(ce,De),a(De,ba),a(ba,Ko),a(ce,Oo),p(e,_l,o),p(e,W,o),a(W,er),a(W,wa),a(wa,tr),a(W,ar),a(W,Ja),a(Ja,lr),a(W,sr),a(W,ga),a(ga,or),a(W,rr),p(e,Wl,o),f(Ke,e,o),p(e,Zl,o),p(e,N,o),a(N,nr),a(N,va),a(va,ir),a(N,pr),a(N,Ta),a(Ta,cr),a(N,hr),p(e,Il,o),p(e,he,o),a(he,dr),a(he,ja),a(ja,ur),a(he,mr),p(e,Rl,o),f(Oe,e,o),p(e,Bl,o),p(e,G,o),a(G,fr),a(G,Ua),a(Ua,yr),a(G,Mr),a(G,ka),a(ka,br),a(G,wr),p(e,Xl,o),f(et,e,o),p(e,Vl,o),p(e,Nt,o),a(Nt,Ea),a(Ea,Jr),p(e,$l,o),p(e,de,o),a(de,I),a(I,gr),a(I,_a),a(_a,vr),a(I,Tr),a(I,Wa),a(Wa,jr),a(I,Ur),a(I,Za),a(Za,kr),a(I,Er),a(de,_r),a(de,x),a(x,Wr),a(x,Ia),a(Ia,Zr),a(x,Ir),a(x,Ra),a(Ra,Rr),a(x,Br),p(e,Cl,o),f(tt,e,o),p(e,Nl,o),p(e,P,o),a(P,ue),a(ue,Ba),f(at,Ba,null),a(P,Xr),a(P,Xa),a(Xa,Vr),p(e,Gl,o),p(e,g,o),a(g,$r),a(g,lt),a(lt,Cr),a(g,Nr),a(g,st),a(st,Gr),a(g,zr),a(g,ot),a(ot,Fr),a(g,Sr),a(g,rt),a(rt,Qr),a(g,Ar),a(g,nt),a(nt,Yr),a(g,Hr),a(g,it),a(it,qr),a(g,xr),p(e,zl,o),p(e,L,o),a(L,me),a(me,Va),f(pt,Va,null),a(L,Pr),a(L,$a),a($a,Lr),p(e,Fl,o),f(ct,e,o),p(e,Sl,o),p(e,fe,o),a(fe,Dr),a(fe,Ca),a(Ca,Kr),a(fe,Or),p(e,Ql,o),f(ht,e,o),p(e,Al,o),p(e,Gt,o),a(Gt,en),p(e,Yl,o),f(dt,e,o),p(e,Hl,o),p(e,ut,o),a(ut,tn),a(ut,mt),a(mt,an),p(e,ql,o),f(ft,e,o),p(e,xl,o),p(e,zt,o),a(zt,ln),p(e,Pl,o),f(yt,e,o),p(e,Ll,o),p(e,D,o),a(D,ye),a(ye,Na),f(Mt,Na,null),a(D,sn),a(D,Ga),a(Ga,on),p(e,Dl,o),p(e,Z,o),a(Z,rn),a(Z,bt),a(bt,nn),a(Z,pn),a(Z,wt),a(wt,cn),a(Z,hn),a(Z,Ft),a(Ft,dn),a(Z,un),Kl=!0},p(e,[o]){const Jt={};o&2&&(Jt.$$scope={dirty:o,ctx:e}),le.$set(Jt)},i(e){Kl||(y(w.$$.fragment,e),y(ve.$$.fragment,e),y(Ue.$$.fragment,e),y(Re.$$.fragment,e),y(Be.$$.fragment,e),y(le.$$.fragment,e),y(Xe.$$.fragment,e),y(Ve.$$.fragment,e),y(Ce.$$.fragment,e),y(Ne.$$.fragment,e),y(Ge.$$.fragment,e),y(ze.$$.fragment,e),y(Fe.$$.fragment,e),y(Qe.$$.fragment,e),y(He.$$.fragment,e),y(qe.$$.fragment,e),y(xe.$$.fragment,e),y(Pe.$$.fragment,e),y(Le.$$.fragment,e),y(Ke.$$.fragment,e),y(Oe.$$.fragment,e),y(et.$$.fragment,e),y(tt.$$.fragment,e),y(at.$$.fragment,e),y(pt.$$.fragment,e),y(ct.$$.fragment,e),y(ht.$$.fragment,e),y(dt.$$.fragment,e),y(ft.$$.fragment,e),y(yt.$$.fragment,e),y(Mt.$$.fragment,e),Kl=!0)},o(e){M(w.$$.fragment,e),M(ve.$$.fragment,e),M(Ue.$$.fragment,e),M(Re.$$.fragment,e),M(Be.$$.fragment,e),M(le.$$.fragment,e),M(Xe.$$.fragment,e),M(Ve.$$.fragment,e),M(Ce.$$.fragment,e),M(Ne.$$.fragment,e),M(Ge.$$.fragment,e),M(ze.$$.fragment,e),M(Fe.$$.fragment,e),M(Qe.$$.fragment,e),M(He.$$.fragment,e),M(qe.$$.fragment,e),M(xe.$$.fragment,e),M(Pe.$$.fragment,e),M(Le.$$.fragment,e),M(Ke.$$.fragment,e),M(Oe.$$.fragment,e),M(et.$$.fragment,e),M(tt.$$.fragment,e),M(at.$$.fragment,e),M(pt.$$.fragment,e),M(ct.$$.fragment,e),M(ht.$$.fragment,e),M(dt.$$.fragment,e),M(ft.$$.fragment,e),M(yt.$$.fragment,e),M(Mt.$$.fragment,e),Kl=!1},d(e){t(v),e&&t(K),e&&t(j),b(w),e&&t(Fa),e&&t(S),b(ve),e&&t(Sa),e&&t(ee),e&&t(Qa),e&&t(gt),e&&t(Aa),e&&t(vt),e&&t(Ya),e&&t(X),e&&t(Ha),e&&t(Q),b(Ue),e&&t(qa),e&&t(U),e&&t(xa),e&&t(Tt),e&&t(Pa),e&&t(V),e&&t(La),e&&t(A),b(Re),e&&t(Da),e&&t(E),e&&t(Ka),b(Be,e),e&&t(Oa),b(le,e),e&&t(el),e&&t(Et),e&&t(tl),b(Xe,e),e&&t(al),e&&t(Y),b(Ve),e&&t(ll),e&&t($),e&&t(sl),b(Ce,e),e&&t(ol),e&&t(_t),e&&t(rl),b(Ne,e),e&&t(nl),e&&t(oe),e&&t(il),b(Ge,e),e&&t(pl),e&&t(_),e&&t(cl),b(ze,e),e&&t(hl),e&&t(Rt),e&&t(dl),b(Fe,e),e&&t(ul),e&&t(Bt),e&&t(ml),e&&t(re),e&&t(fl),e&&t(H),b(Qe),e&&t(yl),e&&t(C),e&&t(Ml),e&&t(q),b(He),e&&t(bl),e&&t(Xt),e&&t(wl),b(qe,e),e&&t(Jl),e&&t(Vt),e&&t(gl),e&&t($t),e&&t(vl),b(xe,e),e&&t(Tl),e&&t(pe),e&&t(jl),b(Pe,e),e&&t(Ul),e&&t(Ct),e&&t(kl),b(Le,e),e&&t(El),e&&t(ce),e&&t(_l),e&&t(W),e&&t(Wl),b(Ke,e),e&&t(Zl),e&&t(N),e&&t(Il),e&&t(he),e&&t(Rl),b(Oe,e),e&&t(Bl),e&&t(G),e&&t(Xl),b(et,e),e&&t(Vl),e&&t(Nt),e&&t($l),e&&t(de),e&&t(Cl),b(tt,e),e&&t(Nl),e&&t(P),b(at),e&&t(Gl),e&&t(g),e&&t(zl),e&&t(L),b(pt),e&&t(Fl),b(ct,e),e&&t(Sl),e&&t(fe),e&&t(Ql),b(ht,e),e&&t(Al),e&&t(Gt),e&&t(Yl),b(dt,e),e&&t(Hl),e&&t(ut),e&&t(ql),b(ft,e),e&&t(xl),e&&t(zt),e&&t(Pl),b(yt,e),e&&t(Ll),e&&t(D),b(Mt),e&&t(Dl),e&&t(Z)}}}const dp={local:"mms",sections:[{local:"overview",sections:[{local:"automatic-speech-recognition-asr",sections:[{local:"loading",title:"Loading"},{local:"inference",title:"Inference"}],title:"Automatic Speech Recognition (ASR)"},{local:"speech-synthesis-tts",sections:[{local:"inference",title:"Inference"}],title:"Speech Synthesis (TTS)"},{local:"language-identification-lid",sections:[{local:"inference",title:"Inference"}],title:"Language Identification (LID)"},{local:"audio-pretrained-models",title:"Audio Pretrained Models"}],title:"Overview"}],title:"MMS"};function up(za){return np(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class bp extends lp{constructor(v){super();sp(this,v,up,hp,op,{})}}export{bp as default,dp as metadata};
