import{s as fe,n as de,o as we}from"../chunks/scheduler.9bc65507.js";import{S as ge,i as xe,g as s,s as o,u as ie,A as _e,h as r,f as t,c as l,j as d,v as he,y as v,k as i,o as u,a as n,w as ce,d as pe,t as ve,x as ue}from"../chunks/index.78c82d43.js";import{I as me}from"../chunks/IconCopyLink.bedaa44d.js";function Ce(D){let h,R,k,H,c,m,P,w,F,S,G="XLSR-Wav2Vec2",W,p,f,A,g,J,$,K="Overview",E,x,Q=`The XLSR-Wav2Vec2 model was proposed in <a href="https://arxiv.org/abs/2006.13979" rel="nofollow">Unsupervised Cross-Lingual Representation Learning For Speech Recognition</a> by Alexis Conneau, Alexei Baevski, Ronan Collobert, Abdelrahman Mohamed, Michael
Auli.`,V,_,Y="The abstract from the paper is the following:",X,C,Z=`<em>This paper presents XLSR which learns cross-lingual speech representations by pretraining a single model from the raw
waveform of speech in multiple languages. We build on wav2vec 2.0 which is trained by solving a contrastive task over
masked latent speech representations and jointly learns a quantization of the latents shared across languages. The
resulting model is fine-tuned on labeled data and experiments show that cross-lingual pretraining significantly
outperforms monolingual pretraining. On the CommonVoice benchmark, XLSR shows a relative phoneme error rate reduction
of 72% compared to the best known results. On BABEL, our approach improves word error rate by 16% relative compared to
a comparable system. Our approach enables a single multilingual speech recognition model which is competitive to strong
individual models. Analysis shows that the latent discrete speech representations are shared across languages with
increased sharing for related languages. We hope to catalyze research in low-resource speech understanding by releasing
XLSR-53, a large model pretrained in 53 languages.</em>`,z,y,ee="Tips:",O,L,te=`<li>XLSR-Wav2Vec2 is a speech model that accepts a float array corresponding to the raw waveform of the speech signal.</li> <li>XLSR-Wav2Vec2 model was trained using connectionist temporal classification (CTC) so the model output has to be
decoded using <a href="/docs/transformers/v4.34.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer">Wav2Vec2CTCTokenizer</a>.</li>`,N,b,ae='XLSR-Wav2Vec2’s architecture is based on the Wav2Vec2 model, so one can refer to <a href="wav2vec2">Wav2Vec2’s documentation page</a>.',j,T,ne='The original code can be found <a href="https://github.com/pytorch/fairseq/tree/master/fairseq/models/wav2vec" rel="nofollow">here</a>.',q,M,B;return w=new me({}),g=new me({}),{c(){h=s("meta"),R=o(),k=s("p"),H=o(),c=s("h1"),m=s("a"),P=s("span"),ie(w.$$.fragment),F=o(),S=s("span"),S.textContent=G,W=o(),p=s("h2"),f=s("a"),A=s("span"),ie(g.$$.fragment),J=o(),$=s("span"),$.textContent=K,E=o(),x=s("p"),x.innerHTML=Q,V=o(),_=s("p"),_.textContent=Y,X=o(),C=s("p"),C.innerHTML=Z,z=o(),y=s("p"),y.textContent=ee,O=o(),L=s("ul"),L.innerHTML=te,N=o(),b=s("p"),b.innerHTML=ae,j=o(),T=s("p"),T.innerHTML=ne,q=o(),M=s("p"),this.h()},l(e){const a=_e("svelte-1phssyn",document.head);h=r(a,"META",{name:!0,content:!0}),a.forEach(t),R=l(e),k=r(e,"P",{}),d(k).forEach(t),H=l(e),c=r(e,"H1",{class:!0});var U=d(c);m=r(U,"A",{id:!0,class:!0,href:!0});var se=d(m);P=r(se,"SPAN",{});var re=d(P);he(w.$$.fragment,re),re.forEach(t),se.forEach(t),F=l(U),S=r(U,"SPAN",{"data-svelte-h":!0}),v(S)!=="svelte-1uh77ab"&&(S.textContent=G),U.forEach(t),W=l(e),p=r(e,"H2",{class:!0});var I=d(p);f=r(I,"A",{id:!0,class:!0,href:!0});var oe=d(f);A=r(oe,"SPAN",{});var le=d(A);he(g.$$.fragment,le),le.forEach(t),oe.forEach(t),J=l(I),$=r(I,"SPAN",{"data-svelte-h":!0}),v($)!=="svelte-1jsw1pg"&&($.textContent=K),I.forEach(t),E=l(e),x=r(e,"P",{"data-svelte-h":!0}),v(x)!=="svelte-nw8zv9"&&(x.innerHTML=Q),V=l(e),_=r(e,"P",{"data-svelte-h":!0}),v(_)!=="svelte-vfdo9a"&&(_.textContent=Y),X=l(e),C=r(e,"P",{"data-svelte-h":!0}),v(C)!=="svelte-8kgyjh"&&(C.innerHTML=Z),z=l(e),y=r(e,"P",{"data-svelte-h":!0}),v(y)!=="svelte-axv494"&&(y.textContent=ee),O=l(e),L=r(e,"UL",{"data-svelte-h":!0}),v(L)!=="svelte-864s4o"&&(L.innerHTML=te),N=l(e),b=r(e,"P",{"data-svelte-h":!0}),v(b)!=="svelte-1fm5txi"&&(b.innerHTML=ae),j=l(e),T=r(e,"P",{"data-svelte-h":!0}),v(T)!=="svelte-12gzw10"&&(T.innerHTML=ne),q=l(e),M=r(e,"P",{}),d(M).forEach(t),this.h()},h(){i(h,"name","hf:doc:metadata"),i(h,"content",JSON.stringify(ye)),i(m,"id","xlsrwav2vec2"),i(m,"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"),i(m,"href","#xlsrwav2vec2"),i(c,"class","relative group"),i(f,"id","overview"),i(f,"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"),i(f,"href","#overview"),i(p,"class","relative group")},m(e,a){u(document.head,h),n(e,R,a),n(e,k,a),n(e,H,a),n(e,c,a),u(c,m),u(m,P),ce(w,P,null),u(c,F),u(c,S),n(e,W,a),n(e,p,a),u(p,f),u(f,A),ce(g,A,null),u(p,J),u(p,$),n(e,E,a),n(e,x,a),n(e,V,a),n(e,_,a),n(e,X,a),n(e,C,a),n(e,z,a),n(e,y,a),n(e,O,a),n(e,L,a),n(e,N,a),n(e,b,a),n(e,j,a),n(e,T,a),n(e,q,a),n(e,M,a),B=!0},p:de,i(e){B||(pe(w.$$.fragment,e),pe(g.$$.fragment,e),B=!0)},o(e){ve(w.$$.fragment,e),ve(g.$$.fragment,e),B=!1},d(e){e&&(t(R),t(k),t(H),t(c),t(W),t(p),t(E),t(x),t(V),t(_),t(X),t(C),t(z),t(y),t(O),t(L),t(N),t(b),t(j),t(T),t(q),t(M)),t(h),ue(w),ue(g)}}}const ye={local:"xlsrwav2vec2",sections:[{local:"overview",title:"Overview"}],title:"XLSR-Wav2Vec2"};function Le(D){return we(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class $e extends ge{constructor(h){super(),xe(this,h,Le,Ce,fe,{})}}export{$e as component};
