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