import{s as Q,o as Y,n as Z}from"../chunks/scheduler.25b97de1.js";import{S as ee,i as te,g as l,s as i,r as x,A as ae,h as m,f as a,c as r,j as K,u as C,x as T,k as N,y as ne,a as n,v as y,d as M,t as R,w as S}from"../chunks/index.d9030fc9.js";import{T as se}from"../chunks/Tip.baa67368.js";import{H as j,E as ie}from"../chunks/EditOnGithub.91d95064.js";function re(H){let s,c='XLSR-Wav2Vec2’s architecture is based on the Wav2Vec2 model, so one can refer to <a href="wav2vec2">Wav2Vec2’s documentation page</a>.';return{c(){s=l("p"),s.innerHTML=c},l(o){s=m(o,"P",{"data-svelte-h":!0}),T(s)!=="svelte-1fm5txi"&&(s.innerHTML=c)},m(o,_){n(o,s,_)},p:Z,d(o){o&&a(s)}}}function oe(H){let s,c,o,_,f,W,h,P,u,B=`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,d,F="The abstract from the paper is the following:",k,v,G=`<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>`,X,g,D='The original code can be found <a href="https://github.com/pytorch/fairseq/tree/master/fairseq/models/wav2vec" rel="nofollow">here</a>.',A,$,z,w,I=`<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/main/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer">Wav2Vec2CTCTokenizer</a>.</li>`,E,p,O,b,U,L,q;return f=new j({props:{title:"XLSR-Wav2Vec2",local:"xlsr-wav2vec2",headingTag:"h1"}}),h=new j({props:{title:"Overview",local:"overview",headingTag:"h2"}}),$=new j({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),p=new se({props:{$$slots:{default:[re]},$$scope:{ctx:H}}}),b=new ie({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/xlsr_wav2vec2.md"}}),{c(){s=l("meta"),c=i(),o=l("p"),_=i(),x(f.$$.fragment),W=i(),x(h.$$.fragment),P=i(),u=l("p"),u.innerHTML=B,V=i(),d=l("p"),d.textContent=F,k=i(),v=l("p"),v.innerHTML=G,X=i(),g=l("p"),g.innerHTML=D,A=i(),x($.$$.fragment),z=i(),w=l("ul"),w.innerHTML=I,E=i(),x(p.$$.fragment),O=i(),x(b.$$.fragment),U=i(),L=l("p"),this.h()},l(e){const t=ae("svelte-u9bgzb",document.head);s=m(t,"META",{name:!0,content:!0}),t.forEach(a),c=r(e),o=m(e,"P",{}),K(o).forEach(a),_=r(e),C(f.$$.fragment,e),W=r(e),C(h.$$.fragment,e),P=r(e),u=m(e,"P",{"data-svelte-h":!0}),T(u)!=="svelte-nw8zv9"&&(u.innerHTML=B),V=r(e),d=m(e,"P",{"data-svelte-h":!0}),T(d)!=="svelte-vfdo9a"&&(d.textContent=F),k=r(e),v=m(e,"P",{"data-svelte-h":!0}),T(v)!=="svelte-8kgyjh"&&(v.innerHTML=G),X=r(e),g=m(e,"P",{"data-svelte-h":!0}),T(g)!=="svelte-12gzw10"&&(g.innerHTML=D),A=r(e),C($.$$.fragment,e),z=r(e),w=m(e,"UL",{"data-svelte-h":!0}),T(w)!=="svelte-xbotwm"&&(w.innerHTML=I),E=r(e),C(p.$$.fragment,e),O=r(e),C(b.$$.fragment,e),U=r(e),L=m(e,"P",{}),K(L).forEach(a),this.h()},h(){N(s,"name","hf:doc:metadata"),N(s,"content",le)},m(e,t){ne(document.head,s),n(e,c,t),n(e,o,t),n(e,_,t),y(f,e,t),n(e,W,t),y(h,e,t),n(e,P,t),n(e,u,t),n(e,V,t),n(e,d,t),n(e,k,t),n(e,v,t),n(e,X,t),n(e,g,t),n(e,A,t),y($,e,t),n(e,z,t),n(e,w,t),n(e,E,t),y(p,e,t),n(e,O,t),y(b,e,t),n(e,U,t),n(e,L,t),q=!0},p(e,[t]){const J={};t&2&&(J.$$scope={dirty:t,ctx:e}),p.$set(J)},i(e){q||(M(f.$$.fragment,e),M(h.$$.fragment,e),M($.$$.fragment,e),M(p.$$.fragment,e),M(b.$$.fragment,e),q=!0)},o(e){R(f.$$.fragment,e),R(h.$$.fragment,e),R($.$$.fragment,e),R(p.$$.fragment,e),R(b.$$.fragment,e),q=!1},d(e){e&&(a(c),a(o),a(_),a(W),a(P),a(u),a(V),a(d),a(k),a(v),a(X),a(g),a(A),a(z),a(w),a(E),a(O),a(U),a(L)),a(s),S(f,e),S(h,e),S($,e),S(p,e),S(b,e)}}}const le='{"title":"XLSR-Wav2Vec2","local":"xlsr-wav2vec2","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Usage tips","local":"usage-tips","sections":[],"depth":2}],"depth":1}';function me(H){return Y(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ue extends ee{constructor(s){super(),te(this,s,me,oe,Q,{})}}export{ue as component};
