import{s as ee,o as te,n as ae}from"../chunks/scheduler.25b97de1.js";import{S as ne,i as se,g as l,s as i,r as C,A as ie,h as p,f as a,c as r,j as Y,u as y,x as T,k as Z,y as re,a as n,v as M,d as R,t as H,w as W}from"../chunks/index.d9030fc9.js";import{T as oe}from"../chunks/Tip.baa67368.js";import{H as F,E as le}from"../chunks/EditOnGithub.91d95064.js";function pe(S){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=p(o,"P",{"data-svelte-h":!0}),T(s)!=="svelte-1fm5txi"&&(s.innerHTML=c)},m(o,L){n(o,s,L)},p:ae,d(o){o&&a(s)}}}function me(S){let s,c,o,L,f,P,h,V,u,G=`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.`,k,d,I="The abstract from the paper is the following:",A,v,N=`<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>.',E,$,J='Note: Meta (FAIR) released a new version of <a href="https://huggingface.co/docs/transformers/en/model_doc/wav2vec2-bert" rel="nofollow">Wav2Vec2-BERT 2.0</a> - it’s pretrained on 4.5M hours of audio. We especially recommend using it for fine-tuning tasks, e.g. as per <a href="https://huggingface.co/blog/fine-tune-w2v2-bert" rel="nofollow">this guide</a>.',z,w,q,b,K=`<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/pr_30962/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer">Wav2Vec2CTCTokenizer</a>.</li>`,O,m,U,_,B,x,j;return f=new F({props:{title:"XLSR-Wav2Vec2",local:"xlsr-wav2vec2",headingTag:"h1"}}),h=new F({props:{title:"Overview",local:"overview",headingTag:"h2"}}),w=new F({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),m=new oe({props:{$$slots:{default:[pe]},$$scope:{ctx:S}}}),_=new le({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"),L=i(),C(f.$$.fragment),P=i(),C(h.$$.fragment),V=i(),u=l("p"),u.innerHTML=G,k=i(),d=l("p"),d.textContent=I,A=i(),v=l("p"),v.innerHTML=N,X=i(),g=l("p"),g.innerHTML=D,E=i(),$=l("p"),$.innerHTML=J,z=i(),C(w.$$.fragment),q=i(),b=l("ul"),b.innerHTML=K,O=i(),C(m.$$.fragment),U=i(),C(_.$$.fragment),B=i(),x=l("p"),this.h()},l(e){const t=ie("svelte-u9bgzb",document.head);s=p(t,"META",{name:!0,content:!0}),t.forEach(a),c=r(e),o=p(e,"P",{}),Y(o).forEach(a),L=r(e),y(f.$$.fragment,e),P=r(e),y(h.$$.fragment,e),V=r(e),u=p(e,"P",{"data-svelte-h":!0}),T(u)!=="svelte-nw8zv9"&&(u.innerHTML=G),k=r(e),d=p(e,"P",{"data-svelte-h":!0}),T(d)!=="svelte-vfdo9a"&&(d.textContent=I),A=r(e),v=p(e,"P",{"data-svelte-h":!0}),T(v)!=="svelte-8kgyjh"&&(v.innerHTML=N),X=r(e),g=p(e,"P",{"data-svelte-h":!0}),T(g)!=="svelte-12gzw10"&&(g.innerHTML=D),E=r(e),$=p(e,"P",{"data-svelte-h":!0}),T($)!=="svelte-1bqdtpc"&&($.innerHTML=J),z=r(e),y(w.$$.fragment,e),q=r(e),b=p(e,"UL",{"data-svelte-h":!0}),T(b)!=="svelte-4dqy4w"&&(b.innerHTML=K),O=r(e),y(m.$$.fragment,e),U=r(e),y(_.$$.fragment,e),B=r(e),x=p(e,"P",{}),Y(x).forEach(a),this.h()},h(){Z(s,"name","hf:doc:metadata"),Z(s,"content",ce)},m(e,t){re(document.head,s),n(e,c,t),n(e,o,t),n(e,L,t),M(f,e,t),n(e,P,t),M(h,e,t),n(e,V,t),n(e,u,t),n(e,k,t),n(e,d,t),n(e,A,t),n(e,v,t),n(e,X,t),n(e,g,t),n(e,E,t),n(e,$,t),n(e,z,t),M(w,e,t),n(e,q,t),n(e,b,t),n(e,O,t),M(m,e,t),n(e,U,t),M(_,e,t),n(e,B,t),n(e,x,t),j=!0},p(e,[t]){const Q={};t&2&&(Q.$$scope={dirty:t,ctx:e}),m.$set(Q)},i(e){j||(R(f.$$.fragment,e),R(h.$$.fragment,e),R(w.$$.fragment,e),R(m.$$.fragment,e),R(_.$$.fragment,e),j=!0)},o(e){H(f.$$.fragment,e),H(h.$$.fragment,e),H(w.$$.fragment,e),H(m.$$.fragment,e),H(_.$$.fragment,e),j=!1},d(e){e&&(a(c),a(o),a(L),a(P),a(V),a(u),a(k),a(d),a(A),a(v),a(X),a(g),a(E),a($),a(z),a(q),a(b),a(O),a(U),a(B),a(x)),a(s),W(f,e),W(h,e),W(w,e),W(m,e),W(_,e)}}}const ce='{"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 fe(S){return te(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ge extends ne{constructor(s){super(),se(this,s,fe,me,ee,{})}}export{ge as component};
