import{S as uf,i as gf,s as _f,e as n,k as d,w as b,t as r,M as bf,c as s,d as o,m as c,a as i,x as k,h as a,b as l,G as e,g as f,y as v,q as y,o as w,B as M,v as kf,L as ls}from"../../chunks/vendor-hf-doc-builder.js";import{T as ss}from"../../chunks/Tip-hf-doc-builder.js";import{D as T}from"../../chunks/Docstring-hf-doc-builder.js";import{C as pt}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as A}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as is}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function vf(z){let p,$,_,g,B;return g=new pt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMkMlMjBCYXJrTW9kZWwlMEElMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJ5bGFjb21iZSUyRmJhcmstc21hbGwlMjIpJTBBbW9kZWwlMjAlM0QlMjBCYXJrTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMnlsYWNvbWJlJTJGYmFyay1zbWFsbCUyMiklMEElMEElMjMlMjBUbyUyMGFkZCUyMGElMjB2b2ljZSUyMHByZXNldCUyQyUyMHlvdSUyMGNhbiUyMHBhc3MlMjAlNjB2b2ljZV9wcmVzZXQlNjAlMjB0byUyMCU2MEJhcmtQcm9jZXNzb3IuX19jYWxsX18oLi4uKSU2MCUwQXZvaWNlX3ByZXNldCUyMCUzRCUyMCUyMnYyJTJGZW5fc3BlYWtlcl82JTIyJTBBJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMkMlMjBJJTIwbmVlZCUyMGhpbSUyMGluJTIwbXklMjBsaWZlJTIyJTJDJTIwdm9pY2VfcHJlc2V0JTNEdm9pY2VfcHJlc2V0KSUwQSUwQWF1ZGlvX2FycmF5JTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoKippbnB1dHMlMkMlMjBzZW1hbnRpY19tYXhfbmV3X3Rva2VucyUzRDEwMCklMEFhdWRpb19hcnJheSUyMCUzRCUyMGF1ZGlvX2FycmF5LmNwdSgpLm51bXB5KCkuc3F1ZWV6ZSgp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, BarkModel

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;ylacombe/bark-small&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BarkModel.from_pretrained(<span class="hljs-string">&quot;ylacombe/bark-small&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To add a voice preset, you can pass \`voice_preset\` to \`BarkProcessor.__call__(...)\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>voice_preset = <span class="hljs-string">&quot;v2/en_speaker_6&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(<span class="hljs-string">&quot;Hello, my dog is cute, I need him in my life&quot;</span>, voice_preset=voice_preset)

<span class="hljs-meta">&gt;&gt;&gt; </span>audio_array = model.generate(**inputs, semantic_max_new_tokens=<span class="hljs-number">100</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>audio_array = audio_array.cpu().numpy().squeeze()`}}),{c(){p=n("p"),$=r("Example:"),_=d(),b(g.$$.fragment)},l(m){p=s(m,"P",{});var u=i(p);$=a(u,"Example:"),u.forEach(o),_=c(m),k(g.$$.fragment,m)},m(m,u){f(m,p,u),e(p,$),f(m,_,u),v(g,m,u),B=!0},p:ls,i(m){B||(y(g.$$.fragment,m),B=!0)},o(m){w(g.$$.fragment,m),B=!1},d(m){m&&o(p),m&&o(_),M(g,m)}}}function yf(z){let p,$,_,g,B;return{c(){p=n("p"),$=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=n("code"),g=r("Module"),B=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(m){p=s(m,"P",{});var u=i(p);$=a(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s(u,"CODE",{});var J=i(_);g=a(J,"Module"),J.forEach(o),B=a(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(o)},m(m,u){f(m,p,u),e(p,$),e(p,_),e(_,g),e(p,B)},d(m){m&&o(p)}}}function wf(z){let p,$,_,g,B;return{c(){p=n("p"),$=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=n("code"),g=r("Module"),B=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(m){p=s(m,"P",{});var u=i(p);$=a(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s(u,"CODE",{});var J=i(_);g=a(J,"Module"),J.forEach(o),B=a(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(o)},m(m,u){f(m,p,u),e(p,$),e(p,_),e(_,g),e(p,B)},d(m){m&&o(p)}}}function Mf(z){let p,$,_,g,B;return{c(){p=n("p"),$=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=n("code"),g=r("Module"),B=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(m){p=s(m,"P",{});var u=i(p);$=a(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s(u,"CODE",{});var J=i(_);g=a(J,"Module"),J.forEach(o),B=a(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(o)},m(m,u){f(m,p,u),e(p,$),e(p,_),e(_,g),e(p,B)},d(m){m&&o(p)}}}function Bf(z){let p,$,_,g,B;return{c(){p=n("p"),$=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=n("code"),g=r("Module"),B=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(m){p=s(m,"P",{});var u=i(p);$=a(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=s(u,"CODE",{});var J=i(_);g=a(J,"Module"),J.forEach(o),B=a(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(o)},m(m,u){f(m,p,u),e(p,$),e(p,_),e(_,g),e(p,B)},d(m){m&&o(p)}}}function $f(z){let p,$,_,g,B;return g=new pt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEJhcmtDb2Fyc2VDb25maWclMkMlMjBCYXJrQ29hcnNlTW9kZWwlMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwQmFyayUyMHN1Yi1tb2R1bGUlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwQmFya0NvYXJzZUNvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwKHdpdGglMjByYW5kb20lMjB3ZWlnaHRzKSUyMGZyb20lMjB0aGUlMjBzdW5vJTJGYmFyayUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwQmFya0NvYXJzZU1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BarkCoarseConfig, BarkCoarseModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a Bark sub-module style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = BarkCoarseConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the suno/bark style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BarkCoarseModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){p=n("p"),$=r("Example:"),_=d(),b(g.$$.fragment)},l(m){p=s(m,"P",{});var u=i(p);$=a(u,"Example:"),u.forEach(o),_=c(m),k(g.$$.fragment,m)},m(m,u){f(m,p,u),e(p,$),f(m,_,u),v(g,m,u),B=!0},p:ls,i(m){B||(y(g.$$.fragment,m),B=!0)},o(m){w(g.$$.fragment,m),B=!1},d(m){m&&o(p),m&&o(_),M(g,m)}}}function Tf(z){let p,$,_,g,B;return g=new pt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEJhcmtGaW5lQ29uZmlnJTJDJTIwQmFya0ZpbmVNb2RlbCUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBCYXJrJTIwc3ViLW1vZHVsZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBCYXJrRmluZUNvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwKHdpdGglMjByYW5kb20lMjB3ZWlnaHRzKSUyMGZyb20lMjB0aGUlMjBzdW5vJTJGYmFyayUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwQmFya0ZpbmVNb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BarkFineConfig, BarkFineModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a Bark sub-module style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = BarkFineConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the suno/bark style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BarkFineModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){p=n("p"),$=r("Example:"),_=d(),b(g.$$.fragment)},l(m){p=s(m,"P",{});var u=i(p);$=a(u,"Example:"),u.forEach(o),_=c(m),k(g.$$.fragment,m)},m(m,u){f(m,p,u),e(p,$),f(m,_,u),v(g,m,u),B=!0},p:ls,i(m){B||(y(g.$$.fragment,m),B=!0)},o(m){w(g.$$.fragment,m),B=!1},d(m){m&&o(p),m&&o(_),M(g,m)}}}function Cf(z){let p,$,_,g,B;return g=new pt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEJhcmtTZW1hbnRpY0NvbmZpZyUyQyUyMEJhcmtTZW1hbnRpY01vZGVsJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMEJhcmslMjBzdWItbW9kdWxlJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMEJhcmtTZW1hbnRpY0NvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwKHdpdGglMjByYW5kb20lMjB3ZWlnaHRzKSUyMGZyb20lMjB0aGUlMjBzdW5vJTJGYmFyayUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwQmFya1NlbWFudGljTW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BarkSemanticConfig, BarkSemanticModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a Bark sub-module style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = BarkSemanticConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the suno/bark style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BarkSemanticModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){p=n("p"),$=r("Example:"),_=d(),b(g.$$.fragment)},l(m){p=s(m,"P",{});var u=i(p);$=a(u,"Example:"),u.forEach(o),_=c(m),k(g.$$.fragment,m)},m(m,u){f(m,p,u),e(p,$),f(m,_,u),v(g,m,u),B=!0},p:ls,i(m){B||(y(g.$$.fragment,m),B=!0)},o(m){w(g.$$.fragment,m),B=!1},d(m){m&&o(p),m&&o(_),M(g,m)}}}function Ef(z){let p,$,_,g,B,m,u,J,ds,Fa,oe,Ee,Pr,ut,cs,Ur,ms,Ga,ze,hs,gt,fs,ps,Va,Io,us,Aa,D,jo,Po,gs,_s,bs,Je,Uo,ks,vs,No,ys,ws,Ms,So,Wo,Bs,$s,Ts,_t,Cs,Zo,Es,zs,Da,Fo,Js,Xa,re,xe,Nr,bt,xs,Sr,Is,Ya,X,js,kt,Ps,Us,vt,Ns,Ss,yt,Ws,Zs,qa,wt,Oa,Ie,Fs,Wr,Gs,Vs,Ra,Mt,Ha,je,As,Zr,Ds,Xs,La,Bt,Qa,Go,Ys,Ka,$t,en,Y,qs,Tt,Os,Rs,Ct,Hs,Ls,Et,Qs,Ks,tn,ae,Pe,Fr,zt,ei,Gr,ti,on,x,Jt,oi,xt,ri,Vo,ai,ni,si,It,ii,jt,li,di,ci,ne,mi,Ao,hi,fi,Do,pi,ui,gi,Ue,Pt,_i,Ut,bi,Xo,ki,vi,yi,Ne,Nt,wi,St,Mi,Yo,Bi,$i,rn,se,Se,Vr,Wt,Ti,Ar,Ci,an,P,Zt,Ei,Dr,zi,Ji,We,Ft,xi,C,Ii,Xr,ji,Pi,Yr,Ui,Ni,qr,Si,Wi,Or,Zi,Fi,Rr,Gi,Vi,Hr,Ai,Di,Lr,Xi,Yi,qi,Ze,Gt,Oi,Qr,Ri,Hi,Fe,Vt,Li,At,Qi,qo,Ki,el,nn,ie,Ge,Kr,Dt,tl,ea,ol,sn,E,Xt,rl,ta,al,nl,R,Oo,Ro,sl,il,ll,Ve,Ho,dl,cl,oa,ml,hl,fl,Lo,Qo,pl,ul,gl,Yt,_l,Ko,bl,kl,vl,ra,yl,wl,qt,Ml,er,Bl,$l,Tl,Ot,Cl,Rt,El,zl,Jl,I,Ht,xl,Lt,Il,aa,jl,Pl,Ul,Qt,Nl,na,Sl,Wl,Zl,Kt,le,Fl,sa,Gl,Vl,ia,Al,Dl,Xl,N,Yl,la,ql,Ol,da,Rl,Hl,ca,Ll,Ql,ma,Kl,ed,td,ha,od,rd,Ae,ln,de,De,fa,eo,ad,pa,nd,dn,S,to,sd,oo,id,tr,ld,dd,cd,ro,md,ao,hd,fd,pd,H,no,ud,ce,gd,or,_d,bd,ua,kd,vd,yd,Xe,cn,me,Ye,ga,so,wd,_a,Md,mn,W,io,Bd,lo,$d,rr,Td,Cd,Ed,co,zd,mo,Jd,xd,Id,L,ho,jd,he,Pd,ar,Ud,Nd,ba,Sd,Wd,Zd,qe,hn,fe,Oe,ka,fo,Fd,va,Gd,fn,Z,po,Vd,pe,Ad,ya,Dd,Xd,nr,Yd,qd,Od,uo,Rd,go,Hd,Ld,Qd,Q,_o,Kd,ue,ec,sr,tc,oc,wa,rc,ac,nc,Re,pn,ge,He,Ma,bo,sc,Ba,ic,un,_e,ko,lc,K,vo,dc,be,cc,ir,mc,hc,$a,fc,pc,uc,Le,gn,ke,Qe,Ta,yo,gc,Ca,_c,_n,F,wo,bc,ve,kc,lr,vc,yc,Mo,wc,Mc,Bc,ye,$c,dr,Tc,Cc,cr,Ec,zc,Jc,Ke,bn,we,et,Ea,Bo,xc,za,Ic,kn,G,$o,jc,Me,Pc,mr,Uc,Nc,To,Sc,Wc,Zc,Be,Fc,hr,Gc,Vc,fr,Ac,Dc,Xc,tt,vn,$e,ot,Ja,Co,Yc,xa,qc,yn,V,Eo,Oc,Te,Rc,pr,Hc,Lc,zo,Qc,Kc,em,Ce,tm,ur,om,rm,gr,am,nm,sm,rt,wn;return m=new A({}),ut=new A({}),bt=new A({}),wt=new pt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMkMlMjBCYXJrTW9kZWwlMEElMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJzdW5vJTJGYmFyayUyMiklMEFtb2RlbCUyMCUzRCUyMEJhcmtNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyc3VubyUyRmJhcmslMjIpJTBBJTBBdm9pY2VfcHJlc2V0JTIwJTNEJTIwJTIydjIlMkZlbl9zcGVha2VyXzYlMjIlMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHZvaWNlX3ByZXNldCUzRHZvaWNlX3ByZXNldCklMEElMEFhdWRpb19hcnJheSUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKCoqaW5wdXRzKSUwQWF1ZGlvX2FycmF5JTIwJTNEJTIwYXVkaW9fYXJyYXkuY3B1KCkubnVtcHkoKS5zcXVlZXplKCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, BarkModel

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;suno/bark&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BarkModel.from_pretrained(<span class="hljs-string">&quot;suno/bark&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>voice_preset = <span class="hljs-string">&quot;v2/en_speaker_6&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, voice_preset=voice_preset)

<span class="hljs-meta">&gt;&gt;&gt; </span>audio_array = model.generate(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>audio_array = audio_array.cpu().numpy().squeeze()`}}),Mt=new pt({props:{code:"JTIzJTIwTXVsdGlsaW5ndWFsJTIwc3BlZWNoJTIwLSUyMHNpbXBsaWZpZWQlMjBDaGluZXNlJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKCUyMiVFNiU4MyU4QSVFNCVCQSVCQSVFNyU5QSU4NCVFRiVCQyU4MSVFNiU4OCU5MSVFNCVCQyU5QSVFOCVBRiVCNCVFNCVCOCVBRCVFNiU5NiU4NyUyMiklMEElMEElMjMlMjBNdWx0aWxpbmd1YWwlMjBzcGVlY2glMjAtJTIwRnJlbmNoJTIwLSUyMGxldCdzJTIwdXNlJTIwYSUyMHZvaWNlX3ByZXNldCUyMGFzJTIwd2VsbCUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3NvciglMjJJbmNyb3lhYmxlISUyMEplJTIwcGV1eCUyMGclQzMlQTluJUMzJUE5cmVyJTIwZHUlMjBzb24uJTIyJTJDJTIwdm9pY2VfcHJlc2V0JTNEJTIyZnJfc3BlYWtlcl81JTIyKSUwQSUwQSUyMyUyMEJhcmslMjBjYW4lMjBhbHNvJTIwZ2VuZXJhdGUlMjBtdXNpYy4lMjBZb3UlMjBjYW4lMjBoZWxwJTIwaXQlMjBvdXQlMjBieSUyMGFkZGluZyUyMG11c2ljJTIwbm90ZXMlMjBhcm91bmQlMjB5b3VyJTIwbHlyaWNzLiUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3NvciglMjIlRTIlOTklQUElMjBIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIwJUUyJTk5JUFBJTIyKSUwQSUwQWF1ZGlvX2FycmF5JTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoKippbnB1dHMpJTBBYXVkaW9fYXJyYXklMjAlM0QlMjBhdWRpb19hcnJheS5jcHUoKS5udW1weSgpLnNxdWVlemUoKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Multilingual speech - simplified Chinese</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(<span class="hljs-string">&quot;\u60CA\u4EBA\u7684\uFF01\u6211\u4F1A\u8BF4\u4E2D\u6587&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Multilingual speech - French - let&#x27;s use a voice_preset as well</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(<span class="hljs-string">&quot;Incroyable! Je peux g\xE9n\xE9rer du son.&quot;</span>, voice_preset=<span class="hljs-string">&quot;fr_speaker_5&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Bark can also generate music. You can help it out by adding music notes around your lyrics.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(<span class="hljs-string">&quot;\u266A Hello, my dog is cute \u266A&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>audio_array = model.generate(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>audio_array = audio_array.cpu().numpy().squeeze()`}}),Bt=new pt({props:{code:"JTIzJTIwQWRkaW5nJTIwbm9uLXNwZWVjaCUyMGN1ZXMlMjB0byUyMHRoZSUyMGlucHV0JTIwdGV4dCUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3NvciglMjJIZWxsbyUyMHVoJTIwLi4uJTIwJTVCY2xlYXJzJTIwdGhyb2F0JTVEJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjAlNUJsYXVnaHRlciU1RCUyMiklMEElMEFhdWRpb19hcnJheSUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKCoqaW5wdXRzKSUwQWF1ZGlvX2FycmF5JTIwJTNEJTIwYXVkaW9fYXJyYXkuY3B1KCkubnVtcHkoKS5zcXVlZXplKCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Adding non-speech cues to the input text</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(<span class="hljs-string">&quot;Hello uh ... [clears throat], my dog is cute [laughter]&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>audio_array = model.generate(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>audio_array = audio_array.cpu().numpy().squeeze()`}}),$t=new pt({props:{code:"ZnJvbSUyMHNjaXB5LmlvLndhdmZpbGUlMjBpbXBvcnQlMjB3cml0ZSUyMGFzJTIwd3JpdGVfd2F2JTBBJTBBJTIzJTIwc2F2ZSUyMGF1ZGlvJTIwdG8lMjBkaXNrJTJDJTIwYnV0JTIwZmlyc3QlMjB0YWtlJTIwdGhlJTIwc2FtcGxlJTIwcmF0ZSUyMGZyb20lMjB0aGUlMjBtb2RlbCUyMGNvbmZpZyUwQXNhbXBsZV9yYXRlJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGlvbl9jb25maWcuc2FtcGxlX3JhdGUlMEF3cml0ZV93YXYoJTIyYmFya19nZW5lcmF0aW9uLndhdiUyMiUyQyUyMHNhbXBsZV9yYXRlJTJDJTIwYXVkaW9fYXJyYXkp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> scipy.io.wavfile <span class="hljs-keyword">import</span> write <span class="hljs-keyword">as</span> write_wav

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># save audio to disk, but first take the sample rate from the model config</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>sample_rate = model.generation_config.sample_rate
<span class="hljs-meta">&gt;&gt;&gt; </span>write_wav(<span class="hljs-string">&quot;bark_generation.wav&quot;</span>, sample_rate, audio_array)`}}),zt=new A({}),Jt=new T({props:{name:"class transformers.BarkConfig",anchor:"transformers.BarkConfig",parameters:[{name:"semantic_config",val:": typing.Dict = None"},{name:"coarse_acoustics_config",val:": typing.Dict = None"},{name:"fine_acoustics_config",val:": typing.Dict = None"},{name:"codec_config",val:": typing.Dict = None"},{name:"initializer_range",val:" = 0.02"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BarkConfig.semantic_config",description:`<strong>semantic_config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/bark#transformers.BarkSemanticConfig">BarkSemanticConfig</a>, <em>optional</em>) &#x2014;
Configuration of the underlying semantic sub-model.`,name:"semantic_config"},{anchor:"transformers.BarkConfig.coarse_acoustics_config",description:`<strong>coarse_acoustics_config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/bark#transformers.BarkCoarseConfig">BarkCoarseConfig</a>, <em>optional</em>) &#x2014;
Configuration of the underlying coarse acoustics sub-model.`,name:"coarse_acoustics_config"},{anchor:"transformers.BarkConfig.fine_acoustics_config",description:`<strong>fine_acoustics_config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/bark#transformers.BarkFineConfig">BarkFineConfig</a>, <em>optional</em>) &#x2014;
Configuration of the underlying fine acoustics sub-model.`,name:"fine_acoustics_config"},{anchor:"transformers.BarkConfig.codec_config",description:`<strong>codec_config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/auto#transformers.AutoConfig">AutoConfig</a>, <em>optional</em>) &#x2014;
Configuration of the underlying codec sub-model.</p>
<p>Example &#x2014;`,name:"codec_config"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/bark/configuration_bark.py#L220"}}),Pt=new T({props:{name:"from_sub_model_configs",anchor:"transformers.BarkConfig.from_sub_model_configs",parameters:[{name:"semantic_config",val:": BarkSemanticConfig"},{name:"coarse_acoustics_config",val:": BarkCoarseConfig"},{name:"fine_acoustics_config",val:": BarkFineConfig"},{name:"codec_config",val:": AutoConfig"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/bark/configuration_bark.py#L310",returnDescription:`
<p>An instance of a configuration object</p>
`,returnType:`
<p><a
  href="/docs/transformers/v4.31.0/en/model_doc/bark#transformers.BarkConfig"
>BarkConfig</a></p>
`}}),Nt=new T({props:{name:"to_dict",anchor:"transformers.BarkConfig.to_dict",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/bark/configuration_bark.py#L333",returnDescription:`
<p>Dictionary of all the attributes that make up this configuration instance,</p>
`,returnType:`
<p><code>Dict[str, any]</code></p>
`}}),Wt=new A({}),Zt=new T({props:{name:"class transformers.BarkProcessor",anchor:"transformers.BarkProcessor",parameters:[{name:"tokenizer",val:""},{name:"speaker_embeddings",val:" = None"}],parametersDescription:[{anchor:"transformers.BarkProcessor.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.31.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
An instance of <a href="/docs/transformers/v4.31.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.`,name:"tokenizer"},{anchor:"transformers.BarkProcessor.speaker_embeddings",description:`<strong>speaker_embeddings</strong> (<code>Dict[Dict[str]]</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Optional nested speaker embeddings dictionary. The first level contains voice preset names (e.g
<code>&quot;en_speaker_4&quot;</code>). The second level contains <code>&quot;semantic_prompt&quot;</code>, <code>&quot;coarse_prompt&quot;</code> and <code>&quot;fine_prompt&quot;</code>
embeddings. The values correspond to the path of the corresponding <code>np.ndarray</code>. See
<a href="https://suno-ai.notion.site/8b8e8749ed514b0cbf3f699013548683?v=bc67cff786b04b50b3ceb756fd05f68c" rel="nofollow">here</a> for
a list of <code>voice_preset_names</code>.`,name:"speaker_embeddings"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/bark/processing_bark.py#L34"}}),Ft=new T({props:{name:"__call__",anchor:"transformers.BarkProcessor.__call__",parameters:[{name:"text",val:" = None"},{name:"voice_preset",val:" = None"},{name:"return_tensors",val:" = 'pt'"},{name:"max_length",val:" = 256"},{name:"add_special_tokens",val:" = False"},{name:"return_attention_mask",val:" = True"},{name:"return_token_type_ids",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BarkProcessor.__call__.text",description:`<strong>text</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>) &#x2014;
The sequence or batch of sequences to be encoded. Each sequence can be a string or a list of strings
(pretokenized string). If the sequences are provided as list of strings (pretokenized), you must set
<code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text"},{anchor:"transformers.BarkProcessor.__call__.voice_preset",description:`<strong>voice_preset</strong> (<code>str</code>, <code>Dict[np.ndarray]</code>) &#x2014;
The voice preset, i.e the speaker embeddings. It can either be a valid voice_preset name, e.g
<code>&quot;en_speaker_1&quot;</code>, or directly a dictionnary of <code>np.ndarray</code> embeddings for each submodel of <code>Bark</code>. Or
it can be a valid file name of a local <code>.npz</code> single voice preset.`,name:"voice_preset"},{anchor:"transformers.BarkProcessor.__call__.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <a href="/docs/transformers/v4.31.0/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>) &#x2014;
If set, will return tensors of a particular framework. Acceptable values are:</p>
<ul>
<li><code>&apos;pt&apos;</code>: Return PyTorch <code>torch.Tensor</code> objects.</li>
<li><code>&apos;np&apos;</code>: Return NumPy <code>np.ndarray</code> objects.</li>
</ul>`,name:"return_tensors"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/bark/processing_bark.py#L218",returnDescription:`
<p>A tuple composed of a <a
  href="/docs/transformers/v4.31.0/en/main_classes/tokenizer#transformers.BatchEncoding"
>BatchEncoding</a>, i.e the output of the
<code>tokenizer</code> and a <a
  href="/docs/transformers/v4.31.0/en/main_classes/feature_extractor#transformers.BatchFeature"
>BatchFeature</a>, i.e the voice preset with the right tensors type.</p>
`,returnType:`
<p>Tuple(<a
  href="/docs/transformers/v4.31.0/en/main_classes/tokenizer#transformers.BatchEncoding"
>BatchEncoding</a>, <a
  href="/docs/transformers/v4.31.0/en/main_classes/feature_extractor#transformers.BatchFeature"
>BatchFeature</a>)</p>
`}}),Gt=new T({props:{name:"from_pretrained",anchor:"transformers.BarkProcessor.from_pretrained",parameters:[{name:"pretrained_processor_name_or_path",val:""},{name:"speaker_embeddings_dict_path",val:" = 'speaker_embeddings_path.json'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BarkProcessor.from_pretrained.pretrained_model_name_or_path",description:`<strong>pretrained_model_name_or_path</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
This can be either:</p>
<ul>
<li>a string, the <em>model id</em> of a pretrained <a href="/docs/transformers/v4.31.0/en/model_doc/bark#transformers.BarkProcessor">BarkProcessor</a> hosted inside a model repo on
huggingface.co. Valid model ids can be located at the root-level, like <code>bert-base-uncased</code>, or
namespaced under a user or organization name, like <code>dbmdz/bert-base-german-cased</code>.</li>
<li>a path to a <em>directory</em> containing a processor saved using the <a href="/docs/transformers/v4.31.0/en/model_doc/bark#transformers.BarkProcessor.save_pretrained">save_pretrained()</a>
method, e.g., <code>./my_model_directory/</code>.</li>
</ul>`,name:"pretrained_model_name_or_path"},{anchor:"transformers.BarkProcessor.from_pretrained.speaker_embeddings_dict_path",description:`<strong>speaker_embeddings_dict_path</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;speaker_embeddings_path.json&quot;</code>) &#x2014;
The name of the <code>.json</code> file containing the speaker_embeddings dictionnary located in
<code>pretrained_model_name_or_path</code>. If <code>None</code>, no speaker_embeddings is loaded.
**kwargs &#x2014;
Additional keyword arguments passed along to both
<code>~tokenization_utils_base.PreTrainedTokenizer.from_pretrained</code>.`,name:"speaker_embeddings_dict_path"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/bark/processing_bark.py#L63"}}),Vt=new T({props:{name:"save_pretrained",anchor:"transformers.BarkProcessor.save_pretrained",parameters:[{name:"save_directory",val:""},{name:"speaker_embeddings_dict_path",val:" = 'speaker_embeddings_path.json'"},{name:"speaker_embeddings_directory",val:" = 'speaker_embeddings'"},{name:"push_to_hub",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BarkProcessor.save_pretrained.save_directory",description:`<strong>save_directory</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
Directory where the tokenizer files and the speaker embeddings will be saved (directory will be created
if it does not exist).`,name:"save_directory"},{anchor:"transformers.BarkProcessor.save_pretrained.speaker_embeddings_dict_path",description:`<strong>speaker_embeddings_dict_path</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;speaker_embeddings_path.json&quot;</code>) &#x2014;
The name of the <code>.json</code> file that will contains the speaker_embeddings nested path dictionnary, if it
exists, and that will be located in <code>pretrained_model_name_or_path/speaker_embeddings_directory</code>.`,name:"speaker_embeddings_dict_path"},{anchor:"transformers.BarkProcessor.save_pretrained.speaker_embeddings_directory",description:`<strong>speaker_embeddings_directory</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;speaker_embeddings/&quot;</code>) &#x2014;
The name of the folder in which the speaker_embeddings arrays will be saved.`,name:"speaker_embeddings_directory"},{anchor:"transformers.BarkProcessor.save_pretrained.push_to_hub",description:`<strong>push_to_hub</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to push your model to the Hugging Face model hub after saving it. You can specify the
repository you want to push to with <code>repo_id</code> (will default to the name of <code>save_directory</code> in your
namespace).
kwargs &#x2014;
Additional key word arguments passed along to the <a href="/docs/transformers/v4.31.0/en/internal/image_processing_utils#transformers.ImageProcessingMixin.push_to_hub">push_to_hub()</a> method.`,name:"push_to_hub"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/bark/processing_bark.py#L117"}}),Dt=new A({}),Xt=new T({props:{name:"class transformers.BarkModel",anchor:"transformers.BarkModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.BarkModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/bark#transformers.BarkConfig">BarkConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/bark/modeling_bark.py#L1365"}}),Ht=new T({props:{name:"generate",anchor:"transformers.BarkModel.generate",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"history_prompt",val:": typing.Union[typing.Dict[str, torch.Tensor], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BarkModel.generate.input_ids",description:`<strong>input_ids</strong> (<code>Optional[torch.Tensor]</code> of shape (batch_size, seq_len), <em>optional</em>) &#x2014;
Input ids. Will be truncated up to 256 tokens. Note that the output audios will be as long as the
longest generation among the batch.`,name:"input_ids"},{anchor:"transformers.BarkModel.generate.history_prompt",description:`<strong>history_prompt</strong> (<code>Optional[Dict[str,torch.Tensor]]</code>, <em>optional</em>) &#x2014;
Optional <code>Bark</code> speaker prompt. Note that for now, this model takes only one speaker prompt per batch.`,name:"history_prompt"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/bark/modeling_bark.py#L1389",returnDescription:`
<p>Output generated audio.</p>
`,returnType:`
<p>torch.LongTensor</p>
`}}),Ae=new is({props:{anchor:"transformers.BarkModel.generate.example",$$slots:{default:[vf]},$$scope:{ctx:z}}}),eo=new A({}),to=new T({props:{name:"class transformers.BarkSemanticModel",anchor:"transformers.BarkSemanticModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.BarkSemanticModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/bark#transformers.BarkSemanticConfig">BarkSemanticConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/bark/modeling_bark.py#L689"}}),no=new T({props:{name:"forward",anchor:"transformers.BarkSemanticModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"input_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.BarkSemanticModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it. Indices can be obtained using <a href="/docs/transformers/v4.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details. <a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.BarkSemanticModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.BarkSemanticModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.BarkSemanticModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.BarkSemanticModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.BarkSemanticModel.forward.input_embeds",description:`<strong>input_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, input_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation.
Here, due to <code>Bark</code> particularities, if <code>past_key_values</code> is used, <code>input_embeds</code> will be ignored and you
have to use <code>input_ids</code>. If <code>past_key_values</code> is not used and <code>use_cache</code> is set to <code>True</code>, <code>input_embeds</code>
is used in priority instead of <code>input_ids</code>.`,name:"input_embeds"},{anchor:"transformers.BarkSemanticModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.BarkSemanticModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.BarkSemanticModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.BarkSemanticModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/bark/modeling_bark.py#L506"}}),Xe=new ss({props:{$$slots:{default:[yf]},$$scope:{ctx:z}}}),so=new A({}),io=new T({props:{name:"class transformers.BarkCoarseModel",anchor:"transformers.BarkCoarseModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.BarkCoarseModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/bark#transformers.BarkCoarseConfig">BarkCoarseConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/bark/modeling_bark.py#L794"}}),ho=new T({props:{name:"forward",anchor:"transformers.BarkCoarseModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"input_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.BarkCoarseModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it. Indices can be obtained using <a href="/docs/transformers/v4.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details. <a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.BarkCoarseModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.BarkCoarseModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.BarkCoarseModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.BarkCoarseModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.BarkCoarseModel.forward.input_embeds",description:`<strong>input_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, input_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation.
Here, due to <code>Bark</code> particularities, if <code>past_key_values</code> is used, <code>input_embeds</code> will be ignored and you
have to use <code>input_ids</code>. If <code>past_key_values</code> is not used and <code>use_cache</code> is set to <code>True</code>, <code>input_embeds</code>
is used in priority instead of <code>input_ids</code>.`,name:"input_embeds"},{anchor:"transformers.BarkCoarseModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.BarkCoarseModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.BarkCoarseModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.BarkCoarseModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/bark/modeling_bark.py#L506"}}),qe=new ss({props:{$$slots:{default:[wf]},$$scope:{ctx:z}}}),fo=new A({}),po=new T({props:{name:"class transformers.BarkFineModel",anchor:"transformers.BarkFineModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.BarkFineModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/bark#transformers.BarkFineConfig">BarkFineConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/bark/modeling_bark.py#L1004"}}),_o=new T({props:{name:"forward",anchor:"transformers.BarkFineModel.forward",parameters:[{name:"codebook_idx",val:": int"},{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"input_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.BarkFineModel.forward.codebook_idx",description:`<strong>codebook_idx</strong> (<code>int</code>) &#x2014;
Index of the codebook that will be predicted.`,name:"codebook_idx"},{anchor:"transformers.BarkFineModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length, number_of_codebooks)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it. Initially, indices of the first two codebooks are obtained from the <code>coarse</code> sub-model. The rest is
predicted recursively by attending the previously predicted channels. The model predicts on windows of
length 1024.`,name:"input_ids"},{anchor:"transformers.BarkFineModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.BarkFineModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.BarkFineModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.BarkFineModel.forward.labels",description:"<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014; NOT IMPLEMENTED YET.",name:"labels"},{anchor:"transformers.BarkFineModel.forward.input_embeds",description:`<strong>input_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, input_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. If
<code>past_key_values</code> is used, optionally only the last <code>input_embeds</code> have to be input (see
<code>past_key_values</code>). This is useful if you want more control over how to convert <code>input_ids</code> indices into
associated vectors than the model&#x2019;s internal embedding lookup matrix.`,name:"input_embeds"},{anchor:"transformers.BarkFineModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.BarkFineModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.BarkFineModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/bark/modeling_bark.py#L1093"}}),Re=new ss({props:{$$slots:{default:[Mf]},$$scope:{ctx:z}}}),bo=new A({}),ko=new T({props:{name:"class transformers.BarkCausalModel",anchor:"transformers.BarkCausalModel",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/bark/modeling_bark.py#L425"}}),vo=new T({props:{name:"forward",anchor:"transformers.BarkCausalModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"input_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.BarkCausalModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it. Indices can be obtained using <a href="/docs/transformers/v4.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details. <a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.BarkCausalModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.BarkCausalModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.BarkCausalModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.BarkCausalModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.BarkCausalModel.forward.input_embeds",description:`<strong>input_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, input_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation.
Here, due to <code>Bark</code> particularities, if <code>past_key_values</code> is used, <code>input_embeds</code> will be ignored and you
have to use <code>input_ids</code>. If <code>past_key_values</code> is not used and <code>use_cache</code> is set to <code>True</code>, <code>input_embeds</code>
is used in priority instead of <code>input_ids</code>.`,name:"input_embeds"},{anchor:"transformers.BarkCausalModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.BarkCausalModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.BarkCausalModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.BarkCausalModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/bark/modeling_bark.py#L506"}}),Le=new ss({props:{$$slots:{default:[Bf]},$$scope:{ctx:z}}}),yo=new A({}),wo=new T({props:{name:"class transformers.BarkCoarseConfig",anchor:"transformers.BarkCoarseConfig",parameters:[{name:"block_size",val:" = 1024"},{name:"input_vocab_size",val:" = 10048"},{name:"output_vocab_size",val:" = 10048"},{name:"num_layers",val:" = 12"},{name:"num_heads",val:" = 12"},{name:"hidden_size",val:" = 768"},{name:"dropout",val:" = 0.0"},{name:"bias",val:" = True"},{name:"initializer_range",val:" = 0.02"},{name:"use_cache",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BarkCoarseConfig.block_size",description:`<strong>block_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"block_size"},{anchor:"transformers.BarkCoarseConfig.input_vocab_size",description:`<strong>input_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 10_048) &#x2014;
Vocabulary size of a Bark sub-model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.31.0/en/model_doc/bark#transformers.BarkCoarseModel">BarkCoarseModel</a>. Defaults to 10_048 but should be carefully thought with
regards to the chosen sub-model.`,name:"input_vocab_size"},{anchor:"transformers.BarkCoarseConfig.output_vocab_size",description:`<strong>output_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 10_048) &#x2014;
Output vocabulary size of a Bark sub-model. Defines the number of different tokens that can be represented
by the: <code>output_ids</code> when passing forward a <a href="/docs/transformers/v4.31.0/en/model_doc/bark#transformers.BarkCoarseModel">BarkCoarseModel</a>. Defaults to 10_048 but should be carefully thought
with regards to the chosen sub-model.`,name:"output_vocab_size"},{anchor:"transformers.BarkCoarseConfig.num_layers",description:`<strong>num_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the given sub-model.`,name:"num_layers"},{anchor:"transformers.BarkCoarseConfig.num_heads",description:`<strong>num_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer architecture.`,name:"num_heads"},{anchor:"transformers.BarkCoarseConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in the architecture.`,name:"hidden_size"},{anchor:"transformers.BarkCoarseConfig.dropout",description:`<strong>dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"dropout"},{anchor:"transformers.BarkCoarseConfig.bias",description:`<strong>bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to use bias in the linear layers and layer norm layers.`,name:"bias"},{anchor:"transformers.BarkCoarseConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.BarkCoarseConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/bark/configuration_bark.py#L183"}}),Ke=new is({props:{anchor:"transformers.BarkCoarseConfig.example",$$slots:{default:[$f]},$$scope:{ctx:z}}}),Bo=new A({}),$o=new T({props:{name:"class transformers.BarkFineConfig",anchor:"transformers.BarkFineConfig",parameters:[{name:"tie_word_embeddings",val:" = True"},{name:"n_codes_total",val:" = 8"},{name:"n_codes_given",val:" = 1"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BarkFineConfig.block_size",description:`<strong>block_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"block_size"},{anchor:"transformers.BarkFineConfig.input_vocab_size",description:`<strong>input_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 10_048) &#x2014;
Vocabulary size of a Bark sub-model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.31.0/en/model_doc/bark#transformers.BarkFineModel">BarkFineModel</a>. Defaults to 10_048 but should be carefully thought with
regards to the chosen sub-model.`,name:"input_vocab_size"},{anchor:"transformers.BarkFineConfig.output_vocab_size",description:`<strong>output_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 10_048) &#x2014;
Output vocabulary size of a Bark sub-model. Defines the number of different tokens that can be represented
by the: <code>output_ids</code> when passing forward a <a href="/docs/transformers/v4.31.0/en/model_doc/bark#transformers.BarkFineModel">BarkFineModel</a>. Defaults to 10_048 but should be carefully thought
with regards to the chosen sub-model.`,name:"output_vocab_size"},{anchor:"transformers.BarkFineConfig.num_layers",description:`<strong>num_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the given sub-model.`,name:"num_layers"},{anchor:"transformers.BarkFineConfig.num_heads",description:`<strong>num_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer architecture.`,name:"num_heads"},{anchor:"transformers.BarkFineConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in the architecture.`,name:"hidden_size"},{anchor:"transformers.BarkFineConfig.dropout",description:`<strong>dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"dropout"},{anchor:"transformers.BarkFineConfig.bias",description:`<strong>bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to use bias in the linear layers and layer norm layers.`,name:"bias"},{anchor:"transformers.BarkFineConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.BarkFineConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models).`,name:"use_cache"},{anchor:"transformers.BarkFineConfig.n_codes_total",description:`<strong>n_codes_total</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
The total number of audio codebooks predicted. Used in the fine acoustics sub-model.`,name:"n_codes_total"},{anchor:"transformers.BarkFineConfig.n_codes_given",description:`<strong>n_codes_given</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The number of audio codebooks predicted in the coarse acoustics sub-model. Used in the acoustics
sub-models.`,name:"n_codes_given"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/bark/configuration_bark.py#L210"}}),tt=new is({props:{anchor:"transformers.BarkFineConfig.example",$$slots:{default:[Tf]},$$scope:{ctx:z}}}),Co=new A({}),Eo=new T({props:{name:"class transformers.BarkSemanticConfig",anchor:"transformers.BarkSemanticConfig",parameters:[{name:"block_size",val:" = 1024"},{name:"input_vocab_size",val:" = 10048"},{name:"output_vocab_size",val:" = 10048"},{name:"num_layers",val:" = 12"},{name:"num_heads",val:" = 12"},{name:"hidden_size",val:" = 768"},{name:"dropout",val:" = 0.0"},{name:"bias",val:" = True"},{name:"initializer_range",val:" = 0.02"},{name:"use_cache",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BarkSemanticConfig.block_size",description:`<strong>block_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"block_size"},{anchor:"transformers.BarkSemanticConfig.input_vocab_size",description:`<strong>input_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 10_048) &#x2014;
Vocabulary size of a Bark sub-model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.31.0/en/model_doc/bark#transformers.BarkSemanticModel">BarkSemanticModel</a>. Defaults to 10_048 but should be carefully thought with
regards to the chosen sub-model.`,name:"input_vocab_size"},{anchor:"transformers.BarkSemanticConfig.output_vocab_size",description:`<strong>output_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 10_048) &#x2014;
Output vocabulary size of a Bark sub-model. Defines the number of different tokens that can be represented
by the: <code>output_ids</code> when passing forward a <a href="/docs/transformers/v4.31.0/en/model_doc/bark#transformers.BarkSemanticModel">BarkSemanticModel</a>. Defaults to 10_048 but should be carefully thought
with regards to the chosen sub-model.`,name:"output_vocab_size"},{anchor:"transformers.BarkSemanticConfig.num_layers",description:`<strong>num_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the given sub-model.`,name:"num_layers"},{anchor:"transformers.BarkSemanticConfig.num_heads",description:`<strong>num_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer architecture.`,name:"num_heads"},{anchor:"transformers.BarkSemanticConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in the architecture.`,name:"hidden_size"},{anchor:"transformers.BarkSemanticConfig.dropout",description:`<strong>dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"dropout"},{anchor:"transformers.BarkSemanticConfig.bias",description:`<strong>bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to use bias in the linear layers and layer norm layers.`,name:"bias"},{anchor:"transformers.BarkSemanticConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.BarkSemanticConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/bark/configuration_bark.py#L161"}}),rt=new is({props:{anchor:"transformers.BarkSemanticConfig.example",$$slots:{default:[Cf]},$$scope:{ctx:z}}}),{c(){p=n("meta"),$=d(),_=n("h1"),g=n("a"),B=n("span"),b(m.$$.fragment),u=d(),J=n("span"),ds=r("Bark"),Fa=d(),oe=n("h2"),Ee=n("a"),Pr=n("span"),b(ut.$$.fragment),cs=d(),Ur=n("span"),ms=r("Overview"),Ga=d(),ze=n("p"),hs=r("Bark is a transformer-based text-to-speech model proposed by Suno AI in "),gt=n("a"),fs=r("suno-ai/bark"),ps=r("."),Va=d(),Io=n("p"),us=r("Bark is made of 4 main models:"),Aa=d(),D=n("ul"),jo=n("li"),Po=n("a"),gs=r("BarkSemanticModel"),_s=r(" (also referred to as the \u2018text\u2019 model): a causal auto-regressive transformer model that takes as input tokenized text, and predicts semantic text tokens that capture the meaning of the text."),bs=d(),Je=n("li"),Uo=n("a"),ks=r("BarkCoarseModel"),vs=r(" (also referred to as the \u2018coarse acoustics\u2019 model): a causal autoregressive transformer, that takes as input the results of the "),No=n("a"),ys=r("BarkSemanticModel"),ws=r(" model. It aims at predicting the first two audio codebooks necessary for EnCodec."),Ms=d(),So=n("li"),Wo=n("a"),Bs=r("BarkFineModel"),$s=r(" (the \u2018fine acoustics\u2019 model), this time a non-causal autoencoder transformer, which iteratively predicts the last codebooks based on the sum of the previous codebooks embeddings."),Ts=d(),_t=n("li"),Cs=r("having predicted all the codebook channels from the "),Zo=n("a"),Es=r("EncodecModel"),zs=r(", Bark uses it to decode the output audio array."),Da=d(),Fo=n("p"),Js=r("It should be noted that each of the first three modules can support conditional speaker embeddings to condition the output sound according to specific predefined voice."),Xa=d(),re=n("h3"),xe=n("a"),Nr=n("span"),b(bt.$$.fragment),xs=d(),Sr=n("span"),Is=r("Tips:"),Ya=d(),X=n("p"),js=r("Suno offers a library of voice presets in a number of languages "),kt=n("a"),Ps=r("here"),Us=r(`.
These presets are also uploaded in the hub `),vt=n("a"),Ns=r("here"),Ss=r(" or "),yt=n("a"),Ws=r("here"),Zs=r("."),qa=d(),b(wt.$$.fragment),Oa=d(),Ie=n("p"),Fs=r("Bark can generate highly realistic, "),Wr=n("strong"),Gs=r("multilingual"),Vs=r(" speech as well as other audio - including music, background noise and simple sound effects."),Ra=d(),b(Mt.$$.fragment),Ha=d(),je=n("p"),As=r("The model can also produce "),Zr=n("strong"),Ds=r("nonverbal communications"),Xs=r(" like laughing, sighing and crying."),La=d(),b(Bt.$$.fragment),Qa=d(),Go=n("p"),Ys=r("To save the audio, simply take the sample rate from the model config and some scipy utility:"),Ka=d(),b($t.$$.fragment),en=d(),Y=n("p"),qs=r("This model was contributed by "),Tt=n("a"),Os=r("Yoach Lacombe (ylacombe)"),Rs=r(" and "),Ct=n("a"),Hs=r("Sanchit Gandhi (sanchit-gandhi)"),Ls=r(`.
The original code can be found `),Et=n("a"),Qs=r("here"),Ks=r("."),tn=d(),ae=n("h2"),Pe=n("a"),Fr=n("span"),b(zt.$$.fragment),ei=d(),Gr=n("span"),ti=r("BarkConfig"),on=d(),x=n("div"),b(Jt.$$.fragment),oi=d(),xt=n("p"),ri=r("This is the configuration class to store the configuration of a "),Vo=n("a"),ai=r("BarkModel"),ni=r(`. It is used to instantiate a Bark
model according to the specified sub-models configurations, defining the model architecture.`),si=d(),It=n("p"),ii=r(`Instantiating a configuration with the defaults will yield a similar configuration to that of the Bark
`),jt=n("a"),li=r("suno/bark"),di=r(" architecture."),ci=d(),ne=n("p"),mi=r("Configuration objects inherit from "),Ao=n("a"),hi=r("PretrainedConfig"),fi=r(` and can be used to control the model outputs. Read the
documentation from `),Do=n("a"),pi=r("PretrainedConfig"),ui=r(" for more information."),gi=d(),Ue=n("div"),b(Pt.$$.fragment),_i=d(),Ut=n("p"),bi=r("Instantiate a "),Xo=n("a"),ki=r("BarkConfig"),vi=r(" (or a derived class) from bark sub-models configuration."),yi=d(),Ne=n("div"),b(Nt.$$.fragment),wi=d(),St=n("p"),Mi=r("Serializes this instance to a Python dictionary. Override the default "),Yo=n("a"),Bi=r("to_dict()"),$i=r("."),rn=d(),se=n("h2"),Se=n("a"),Vr=n("span"),b(Wt.$$.fragment),Ti=d(),Ar=n("span"),Ci=r("BarkProcessor"),an=d(),P=n("div"),b(Zt.$$.fragment),Ei=d(),Dr=n("p"),zi=r("Constructs a Bark processor which wraps a text tokenizer and optional Bark voice presets into a single processor."),Ji=d(),We=n("div"),b(Ft.$$.fragment),xi=d(),C=n("p"),Ii=r("Main method to prepare for the model one or several sequences(s). This method forwards the "),Xr=n("code"),ji=r("text"),Pi=r(" and "),Yr=n("code"),Ui=r("kwargs"),Ni=r(`
arguments to the AutoTokenizer\u2019s `),qr=n("code"),Si=r("__call__()"),Wi=r(` to encode the text. The method also proposes a
voice preset which is a dictionary of arrays that conditions `),Or=n("code"),Zi=r("Bark"),Fi=r("\u2019s output. "),Rr=n("code"),Gi=r("kwargs"),Vi=r(` arguments are forwarded
to the tokenizer and to `),Hr=n("code"),Ai=r("cached_file"),Di=r(" method if "),Lr=n("code"),Xi=r("voice_preset"),Yi=r(" is a valid filename."),qi=d(),Ze=n("div"),b(Gt.$$.fragment),Oi=d(),Qr=n("p"),Ri=r("Instantiate a Bark processor associated with a pretrained model."),Hi=d(),Fe=n("div"),b(Vt.$$.fragment),Li=d(),At=n("p"),Qi=r(`Saves the attributes of this processor (tokenizer\u2026) in the specified directory so that it can be reloaded
using the `),qo=n("a"),Ki=r("from_pretrained()"),el=r(" method."),nn=d(),ie=n("h2"),Ge=n("a"),Kr=n("span"),b(Dt.$$.fragment),tl=d(),ea=n("span"),ol=r("BarkModel"),sn=d(),E=n("div"),b(Xt.$$.fragment),rl=d(),ta=n("p"),al=r("The full Bark model, a text-to-speech model composed of 4 sub-models:"),nl=d(),R=n("ul"),Oo=n("li"),Ro=n("a"),sl=r("BarkSemanticModel"),il=r(` (also referred to as the \u2018text\u2019 model): a causal auto-regressive transformer model that
takes
as input tokenized text, and predicts semantic text tokens that capture the meaning of the text.`),ll=d(),Ve=n("li"),Ho=n("a"),dl=r("BarkCoarseModel"),cl=r(` (also refered to as the \u2018coarse acoustics\u2019 model), also a causal autoregressive transformer,
that takes into input the results of the last model. It aims at regressing the first two audio codebooks necessary
to `),oa=n("code"),ml=r("encodec"),hl=r("."),fl=d(),Lo=n("li"),Qo=n("a"),pl=r("BarkFineModel"),ul=r(` (the \u2018fine acoustics\u2019 model), this time a non-causal autoencoder transformer, which iteratively
predicts the last codebooks based on the sum of the previous codebooks embeddings.`),gl=d(),Yt=n("li"),_l=r("having predicted all the codebook channels from the "),Ko=n("a"),bl=r("EncodecModel"),kl=r(`, Bark uses it to decode the output audio
array.`),vl=d(),ra=n("p"),yl=r(`It should be noted that each of the first three modules can support conditional speaker embeddings to condition the
output sound according to specific predefined voice.`),wl=d(),qt=n("p"),Ml=r("This model inherits from "),er=n("a"),Bl=r("PreTrainedModel"),$l=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Tl=d(),Ot=n("p"),Cl=r("This model is also a PyTorch "),Rt=n("a"),El=r("torch.nn.Module"),zl=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Jl=d(),I=n("div"),b(Ht.$$.fragment),xl=d(),Lt=n("p"),Il=r("Generates audio from an input prompt and an additional optional "),aa=n("code"),jl=r("Bark"),Pl=r(" speaker prompt."),Ul=d(),Qt=n("p"),Nl=r("kwargs ("),na=n("em"),Sl=r("optional"),Wl=r("): Remaining dictionary of keyword arguments. Keyword arguments are of two types:"),Zl=d(),Kt=n("ul"),le=n("li"),Fl=r("Without a prefix, they will be entered as "),sa=n("code"),Gl=r("**kwargs"),Vl=r(" for the "),ia=n("code"),Al=r("generate"),Dl=r(" method of each sub-model."),Xl=d(),N=n("li"),Yl=r("With a "),la=n("em"),ql=r("semantic_"),Ol=r(", "),da=n("em"),Rl=r("coarse_"),Hl=r(", "),ca=n("em"),Ll=r("fine_"),Ql=r(" prefix, they will be input for the "),ma=n("code"),Kl=r("generate"),ed=r(` method of the
semantic, coarse and fine respectively. It has the priority over the keywords without a prefix.`),td=d(),ha=n("p"),od=r("This means you can, for example, specify a generation strategy for all sub-models except one."),rd=d(),b(Ae.$$.fragment),ln=d(),de=n("h2"),De=n("a"),fa=n("span"),b(eo.$$.fragment),ad=d(),pa=n("span"),nd=r("BarkSemanticModel"),dn=d(),S=n("div"),b(to.$$.fragment),sd=d(),oo=n("p"),id=r(`Bark semantic (or text) model. It shares the same architecture as the coarse model.
It is a GPT-2 like autoregressive model with a language modeling head on top.
This model inherits from `),tr=n("a"),ld=r("PreTrainedModel"),dd=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),cd=d(),ro=n("p"),md=r("This model is also a PyTorch "),ao=n("a"),hd=r("torch.nn.Module"),fd=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),pd=d(),H=n("div"),b(no.$$.fragment),ud=d(),ce=n("p"),gd=r("The "),or=n("a"),_d=r("BarkCausalModel"),bd=r(" forward method, overrides the "),ua=n("code"),kd=r("__call__"),vd=r(" special method."),yd=d(),b(Xe.$$.fragment),cn=d(),me=n("h2"),Ye=n("a"),ga=n("span"),b(so.$$.fragment),wd=d(),_a=n("span"),Md=r("BarkCoarseModel"),mn=d(),W=n("div"),b(io.$$.fragment),Bd=d(),lo=n("p"),$d=r(`Bark coarse acoustics model.
It shares the same architecture as the semantic (or text) model. It is a GPT-2 like autoregressive model with a
language modeling head on top.
This model inherits from `),rr=n("a"),Td=r("PreTrainedModel"),Cd=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Ed=d(),co=n("p"),zd=r("This model is also a PyTorch "),mo=n("a"),Jd=r("torch.nn.Module"),xd=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Id=d(),L=n("div"),b(ho.$$.fragment),jd=d(),he=n("p"),Pd=r("The "),ar=n("a"),Ud=r("BarkCausalModel"),Nd=r(" forward method, overrides the "),ba=n("code"),Sd=r("__call__"),Wd=r(" special method."),Zd=d(),b(qe.$$.fragment),hn=d(),fe=n("h2"),Oe=n("a"),ka=n("span"),b(fo.$$.fragment),Fd=d(),va=n("span"),Gd=r("BarkFineModel"),fn=d(),Z=n("div"),b(po.$$.fragment),Vd=d(),pe=n("p"),Ad=r("Bark fine acoustics model. It is a non-causal GPT-like model with "),ya=n("code"),Dd=r("config.n_codes_total"),Xd=r(` embedding layers and
language modeling heads, one for each codebook.
This model inherits from `),nr=n("a"),Yd=r("PreTrainedModel"),qd=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Od=d(),uo=n("p"),Rd=r("This model is also a PyTorch "),go=n("a"),Hd=r("torch.nn.Module"),Ld=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Qd=d(),Q=n("div"),b(_o.$$.fragment),Kd=d(),ue=n("p"),ec=r("The "),sr=n("a"),tc=r("BarkFineModel"),oc=r(" forward method, overrides the "),wa=n("code"),rc=r("__call__"),ac=r(" special method."),nc=d(),b(Re.$$.fragment),pn=d(),ge=n("h2"),He=n("a"),Ma=n("span"),b(bo.$$.fragment),sc=d(),Ba=n("span"),ic=r("BarkCausalModel"),un=d(),_e=n("div"),b(ko.$$.fragment),lc=d(),K=n("div"),b(vo.$$.fragment),dc=d(),be=n("p"),cc=r("The "),ir=n("a"),mc=r("BarkCausalModel"),hc=r(" forward method, overrides the "),$a=n("code"),fc=r("__call__"),pc=r(" special method."),uc=d(),b(Le.$$.fragment),gn=d(),ke=n("h2"),Qe=n("a"),Ta=n("span"),b(yo.$$.fragment),gc=d(),Ca=n("span"),_c=r("BarkCoarseConfig"),_n=d(),F=n("div"),b(wo.$$.fragment),bc=d(),ve=n("p"),kc=r("This is the configuration class to store the configuration of a "),lr=n("a"),vc=r("BarkCoarseModel"),yc=r(`. It is used to instantiate the model
according to the specified arguments, defining the model architecture. Instantiating a configuration with the
defaults will yield a similar configuration to that of the Bark `),Mo=n("a"),wc=r("suno/bark"),Mc=r(`
architecture.`),Bc=d(),ye=n("p"),$c=r("Configuration objects inherit from "),dr=n("a"),Tc=r("PretrainedConfig"),Cc=r(` and can be used to control the model outputs. Read the
documentation from `),cr=n("a"),Ec=r("PretrainedConfig"),zc=r(" for more information."),Jc=d(),b(Ke.$$.fragment),bn=d(),we=n("h2"),et=n("a"),Ea=n("span"),b(Bo.$$.fragment),xc=d(),za=n("span"),Ic=r("BarkFineConfig"),kn=d(),G=n("div"),b($o.$$.fragment),jc=d(),Me=n("p"),Pc=r("This is the configuration class to store the configuration of a "),mr=n("a"),Uc=r("BarkFineModel"),Nc=r(`. It is used to instantiate the model
according to the specified arguments, defining the model architecture. Instantiating a configuration with the
defaults will yield a similar configuration to that of the Bark `),To=n("a"),Sc=r("suno/bark"),Wc=r(`
architecture.`),Zc=d(),Be=n("p"),Fc=r("Configuration objects inherit from "),hr=n("a"),Gc=r("PretrainedConfig"),Vc=r(` and can be used to control the model outputs. Read the
documentation from `),fr=n("a"),Ac=r("PretrainedConfig"),Dc=r(" for more information."),Xc=d(),b(tt.$$.fragment),vn=d(),$e=n("h2"),ot=n("a"),Ja=n("span"),b(Co.$$.fragment),Yc=d(),xa=n("span"),qc=r("BarkSemanticConfig"),yn=d(),V=n("div"),b(Eo.$$.fragment),Oc=d(),Te=n("p"),Rc=r("This is the configuration class to store the configuration of a "),pr=n("a"),Hc=r("BarkSemanticModel"),Lc=r(`. It is used to instantiate the model
according to the specified arguments, defining the model architecture. Instantiating a configuration with the
defaults will yield a similar configuration to that of the Bark `),zo=n("a"),Qc=r("suno/bark"),Kc=r(`
architecture.`),em=d(),Ce=n("p"),tm=r("Configuration objects inherit from "),ur=n("a"),om=r("PretrainedConfig"),rm=r(` and can be used to control the model outputs. Read the
documentation from `),gr=n("a"),am=r("PretrainedConfig"),nm=r(" for more information."),sm=d(),b(rt.$$.fragment),this.h()},l(t){const h=bf('[data-svelte="svelte-1phssyn"]',document.head);p=s(h,"META",{name:!0,content:!0}),h.forEach(o),$=c(t),_=s(t,"H1",{class:!0});var Jo=i(_);g=s(Jo,"A",{id:!0,class:!0,href:!0});var Ia=i(g);B=s(Ia,"SPAN",{});var ja=i(B);k(m.$$.fragment,ja),ja.forEach(o),Ia.forEach(o),u=c(Jo),J=s(Jo,"SPAN",{});var Pa=i(J);ds=a(Pa,"Bark"),Pa.forEach(o),Jo.forEach(o),Fa=c(t),oe=s(t,"H2",{class:!0});var xo=i(oe);Ee=s(xo,"A",{id:!0,class:!0,href:!0});var Ua=i(Ee);Pr=s(Ua,"SPAN",{});var Na=i(Pr);k(ut.$$.fragment,Na),Na.forEach(o),Ua.forEach(o),cs=c(xo),Ur=s(xo,"SPAN",{});var Sa=i(Ur);ms=a(Sa,"Overview"),Sa.forEach(o),xo.forEach(o),Ga=c(t),ze=s(t,"P",{});var Mn=i(ze);hs=a(Mn,"Bark is a transformer-based text-to-speech model proposed by Suno AI in "),gt=s(Mn,"A",{href:!0,rel:!0});var mm=i(gt);fs=a(mm,"suno-ai/bark"),mm.forEach(o),ps=a(Mn,"."),Mn.forEach(o),Va=c(t),Io=s(t,"P",{});var hm=i(Io);us=a(hm,"Bark is made of 4 main models:"),hm.forEach(o),Aa=c(t),D=s(t,"UL",{});var at=i(D);jo=s(at,"LI",{});var im=i(jo);Po=s(im,"A",{href:!0});var fm=i(Po);gs=a(fm,"BarkSemanticModel"),fm.forEach(o),_s=a(im," (also referred to as the \u2018text\u2019 model): a causal auto-regressive transformer model that takes as input tokenized text, and predicts semantic text tokens that capture the meaning of the text."),im.forEach(o),bs=c(at),Je=s(at,"LI",{});var Wa=i(Je);Uo=s(Wa,"A",{href:!0});var pm=i(Uo);ks=a(pm,"BarkCoarseModel"),pm.forEach(o),vs=a(Wa," (also referred to as the \u2018coarse acoustics\u2019 model): a causal autoregressive transformer, that takes as input the results of the "),No=s(Wa,"A",{href:!0});var um=i(No);ys=a(um,"BarkSemanticModel"),um.forEach(o),ws=a(Wa," model. It aims at predicting the first two audio codebooks necessary for EnCodec."),Wa.forEach(o),Ms=c(at),So=s(at,"LI",{});var lm=i(So);Wo=s(lm,"A",{href:!0});var gm=i(Wo);Bs=a(gm,"BarkFineModel"),gm.forEach(o),$s=a(lm," (the \u2018fine acoustics\u2019 model), this time a non-causal autoencoder transformer, which iteratively predicts the last codebooks based on the sum of the previous codebooks embeddings."),lm.forEach(o),Ts=c(at),_t=s(at,"LI",{});var Bn=i(_t);Cs=a(Bn,"having predicted all the codebook channels from the "),Zo=s(Bn,"A",{href:!0});var _m=i(Zo);Es=a(_m,"EncodecModel"),_m.forEach(o),zs=a(Bn,", Bark uses it to decode the output audio array."),Bn.forEach(o),at.forEach(o),Da=c(t),Fo=s(t,"P",{});var bm=i(Fo);Js=a(bm,"It should be noted that each of the first three modules can support conditional speaker embeddings to condition the output sound according to specific predefined voice."),bm.forEach(o),Xa=c(t),re=s(t,"H3",{class:!0});var $n=i(re);xe=s($n,"A",{id:!0,class:!0,href:!0});var km=i(xe);Nr=s(km,"SPAN",{});var vm=i(Nr);k(bt.$$.fragment,vm),vm.forEach(o),km.forEach(o),xs=c($n),Sr=s($n,"SPAN",{});var ym=i(Sr);Is=a(ym,"Tips:"),ym.forEach(o),$n.forEach(o),Ya=c(t),X=s(t,"P",{});var nt=i(X);js=a(nt,"Suno offers a library of voice presets in a number of languages "),kt=s(nt,"A",{href:!0,rel:!0});var wm=i(kt);Ps=a(wm,"here"),wm.forEach(o),Us=a(nt,`.
These presets are also uploaded in the hub `),vt=s(nt,"A",{href:!0,rel:!0});var Mm=i(vt);Ns=a(Mm,"here"),Mm.forEach(o),Ss=a(nt," or "),yt=s(nt,"A",{href:!0,rel:!0});var Bm=i(yt);Ws=a(Bm,"here"),Bm.forEach(o),Zs=a(nt,"."),nt.forEach(o),qa=c(t),k(wt.$$.fragment,t),Oa=c(t),Ie=s(t,"P",{});var Tn=i(Ie);Fs=a(Tn,"Bark can generate highly realistic, "),Wr=s(Tn,"STRONG",{});var $m=i(Wr);Gs=a($m,"multilingual"),$m.forEach(o),Vs=a(Tn," speech as well as other audio - including music, background noise and simple sound effects."),Tn.forEach(o),Ra=c(t),k(Mt.$$.fragment,t),Ha=c(t),je=s(t,"P",{});var Cn=i(je);As=a(Cn,"The model can also produce "),Zr=s(Cn,"STRONG",{});var Tm=i(Zr);Ds=a(Tm,"nonverbal communications"),Tm.forEach(o),Xs=a(Cn," like laughing, sighing and crying."),Cn.forEach(o),La=c(t),k(Bt.$$.fragment,t),Qa=c(t),Go=s(t,"P",{});var Cm=i(Go);Ys=a(Cm,"To save the audio, simply take the sample rate from the model config and some scipy utility:"),Cm.forEach(o),Ka=c(t),k($t.$$.fragment,t),en=c(t),Y=s(t,"P",{});var st=i(Y);qs=a(st,"This model was contributed by "),Tt=s(st,"A",{href:!0,rel:!0});var Em=i(Tt);Os=a(Em,"Yoach Lacombe (ylacombe)"),Em.forEach(o),Rs=a(st," and "),Ct=s(st,"A",{href:!0,rel:!0});var zm=i(Ct);Hs=a(zm,"Sanchit Gandhi (sanchit-gandhi)"),zm.forEach(o),Ls=a(st,`.
The original code can be found `),Et=s(st,"A",{href:!0,rel:!0});var Jm=i(Et);Qs=a(Jm,"here"),Jm.forEach(o),Ks=a(st,"."),st.forEach(o),tn=c(t),ae=s(t,"H2",{class:!0});var En=i(ae);Pe=s(En,"A",{id:!0,class:!0,href:!0});var xm=i(Pe);Fr=s(xm,"SPAN",{});var Im=i(Fr);k(zt.$$.fragment,Im),Im.forEach(o),xm.forEach(o),ei=c(En),Gr=s(En,"SPAN",{});var jm=i(Gr);ti=a(jm,"BarkConfig"),jm.forEach(o),En.forEach(o),on=c(t),x=s(t,"DIV",{class:!0});var q=i(x);k(Jt.$$.fragment,q),oi=c(q),xt=s(q,"P",{});var zn=i(xt);ri=a(zn,"This is the configuration class to store the configuration of a "),Vo=s(zn,"A",{href:!0});var Pm=i(Vo);ai=a(Pm,"BarkModel"),Pm.forEach(o),ni=a(zn,`. It is used to instantiate a Bark
model according to the specified sub-models configurations, defining the model architecture.`),zn.forEach(o),si=c(q),It=s(q,"P",{});var Jn=i(It);ii=a(Jn,`Instantiating a configuration with the defaults will yield a similar configuration to that of the Bark
`),jt=s(Jn,"A",{href:!0,rel:!0});var Um=i(jt);li=a(Um,"suno/bark"),Um.forEach(o),di=a(Jn," architecture."),Jn.forEach(o),ci=c(q),ne=s(q,"P",{});var _r=i(ne);mi=a(_r,"Configuration objects inherit from "),Ao=s(_r,"A",{href:!0});var Nm=i(Ao);hi=a(Nm,"PretrainedConfig"),Nm.forEach(o),fi=a(_r,` and can be used to control the model outputs. Read the
documentation from `),Do=s(_r,"A",{href:!0});var Sm=i(Do);pi=a(Sm,"PretrainedConfig"),Sm.forEach(o),ui=a(_r," for more information."),_r.forEach(o),gi=c(q),Ue=s(q,"DIV",{class:!0});var xn=i(Ue);k(Pt.$$.fragment,xn),_i=c(xn),Ut=s(xn,"P",{});var In=i(Ut);bi=a(In,"Instantiate a "),Xo=s(In,"A",{href:!0});var Wm=i(Xo);ki=a(Wm,"BarkConfig"),Wm.forEach(o),vi=a(In," (or a derived class) from bark sub-models configuration."),In.forEach(o),xn.forEach(o),yi=c(q),Ne=s(q,"DIV",{class:!0});var jn=i(Ne);k(Nt.$$.fragment,jn),wi=c(jn),St=s(jn,"P",{});var Pn=i(St);Mi=a(Pn,"Serializes this instance to a Python dictionary. Override the default "),Yo=s(Pn,"A",{href:!0});var Zm=i(Yo);Bi=a(Zm,"to_dict()"),Zm.forEach(o),$i=a(Pn,"."),Pn.forEach(o),jn.forEach(o),q.forEach(o),rn=c(t),se=s(t,"H2",{class:!0});var Un=i(se);Se=s(Un,"A",{id:!0,class:!0,href:!0});var Fm=i(Se);Vr=s(Fm,"SPAN",{});var Gm=i(Vr);k(Wt.$$.fragment,Gm),Gm.forEach(o),Fm.forEach(o),Ti=c(Un),Ar=s(Un,"SPAN",{});var Vm=i(Ar);Ci=a(Vm,"BarkProcessor"),Vm.forEach(o),Un.forEach(o),an=c(t),P=s(t,"DIV",{class:!0});var ee=i(P);k(Zt.$$.fragment,ee),Ei=c(ee),Dr=s(ee,"P",{});var Am=i(Dr);zi=a(Am,"Constructs a Bark processor which wraps a text tokenizer and optional Bark voice presets into a single processor."),Am.forEach(o),Ji=c(ee),We=s(ee,"DIV",{class:!0});var Nn=i(We);k(Ft.$$.fragment,Nn),xi=c(Nn),C=s(Nn,"P",{});var j=i(C);Ii=a(j,"Main method to prepare for the model one or several sequences(s). This method forwards the "),Xr=s(j,"CODE",{});var Dm=i(Xr);ji=a(Dm,"text"),Dm.forEach(o),Pi=a(j," and "),Yr=s(j,"CODE",{});var Xm=i(Yr);Ui=a(Xm,"kwargs"),Xm.forEach(o),Ni=a(j,`
arguments to the AutoTokenizer\u2019s `),qr=s(j,"CODE",{});var Ym=i(qr);Si=a(Ym,"__call__()"),Ym.forEach(o),Wi=a(j,` to encode the text. The method also proposes a
voice preset which is a dictionary of arrays that conditions `),Or=s(j,"CODE",{});var qm=i(Or);Zi=a(qm,"Bark"),qm.forEach(o),Fi=a(j,"\u2019s output. "),Rr=s(j,"CODE",{});var Om=i(Rr);Gi=a(Om,"kwargs"),Om.forEach(o),Vi=a(j,` arguments are forwarded
to the tokenizer and to `),Hr=s(j,"CODE",{});var Rm=i(Hr);Ai=a(Rm,"cached_file"),Rm.forEach(o),Di=a(j," method if "),Lr=s(j,"CODE",{});var Hm=i(Lr);Xi=a(Hm,"voice_preset"),Hm.forEach(o),Yi=a(j," is a valid filename."),j.forEach(o),Nn.forEach(o),qi=c(ee),Ze=s(ee,"DIV",{class:!0});var Sn=i(Ze);k(Gt.$$.fragment,Sn),Oi=c(Sn),Qr=s(Sn,"P",{});var Lm=i(Qr);Ri=a(Lm,"Instantiate a Bark processor associated with a pretrained model."),Lm.forEach(o),Sn.forEach(o),Hi=c(ee),Fe=s(ee,"DIV",{class:!0});var Wn=i(Fe);k(Vt.$$.fragment,Wn),Li=c(Wn),At=s(Wn,"P",{});var Zn=i(At);Qi=a(Zn,`Saves the attributes of this processor (tokenizer\u2026) in the specified directory so that it can be reloaded
using the `),qo=s(Zn,"A",{href:!0});var Qm=i(qo);Ki=a(Qm,"from_pretrained()"),Qm.forEach(o),el=a(Zn," method."),Zn.forEach(o),Wn.forEach(o),ee.forEach(o),nn=c(t),ie=s(t,"H2",{class:!0});var Fn=i(ie);Ge=s(Fn,"A",{id:!0,class:!0,href:!0});var Km=i(Ge);Kr=s(Km,"SPAN",{});var eh=i(Kr);k(Dt.$$.fragment,eh),eh.forEach(o),Km.forEach(o),tl=c(Fn),ea=s(Fn,"SPAN",{});var th=i(ea);ol=a(th,"BarkModel"),th.forEach(o),Fn.forEach(o),sn=c(t),E=s(t,"DIV",{class:!0});var U=i(E);k(Xt.$$.fragment,U),rl=c(U),ta=s(U,"P",{});var oh=i(ta);al=a(oh,"The full Bark model, a text-to-speech model composed of 4 sub-models:"),oh.forEach(o),nl=c(U),R=s(U,"UL",{});var it=i(R);Oo=s(it,"LI",{});var dm=i(Oo);Ro=s(dm,"A",{href:!0});var rh=i(Ro);sl=a(rh,"BarkSemanticModel"),rh.forEach(o),il=a(dm,` (also referred to as the \u2018text\u2019 model): a causal auto-regressive transformer model that
takes
as input tokenized text, and predicts semantic text tokens that capture the meaning of the text.`),dm.forEach(o),ll=c(it),Ve=s(it,"LI",{});var Za=i(Ve);Ho=s(Za,"A",{href:!0});var ah=i(Ho);dl=a(ah,"BarkCoarseModel"),ah.forEach(o),cl=a(Za,` (also refered to as the \u2018coarse acoustics\u2019 model), also a causal autoregressive transformer,
that takes into input the results of the last model. It aims at regressing the first two audio codebooks necessary
to `),oa=s(Za,"CODE",{});var nh=i(oa);ml=a(nh,"encodec"),nh.forEach(o),hl=a(Za,"."),Za.forEach(o),fl=c(it),Lo=s(it,"LI",{});var cm=i(Lo);Qo=s(cm,"A",{href:!0});var sh=i(Qo);pl=a(sh,"BarkFineModel"),sh.forEach(o),ul=a(cm,` (the \u2018fine acoustics\u2019 model), this time a non-causal autoencoder transformer, which iteratively
predicts the last codebooks based on the sum of the previous codebooks embeddings.`),cm.forEach(o),gl=c(it),Yt=s(it,"LI",{});var Gn=i(Yt);_l=a(Gn,"having predicted all the codebook channels from the "),Ko=s(Gn,"A",{href:!0});var ih=i(Ko);bl=a(ih,"EncodecModel"),ih.forEach(o),kl=a(Gn,`, Bark uses it to decode the output audio
array.`),Gn.forEach(o),it.forEach(o),vl=c(U),ra=s(U,"P",{});var lh=i(ra);yl=a(lh,`It should be noted that each of the first three modules can support conditional speaker embeddings to condition the
output sound according to specific predefined voice.`),lh.forEach(o),wl=c(U),qt=s(U,"P",{});var Vn=i(qt);Ml=a(Vn,"This model inherits from "),er=s(Vn,"A",{href:!0});var dh=i(er);Bl=a(dh,"PreTrainedModel"),dh.forEach(o),$l=a(Vn,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Vn.forEach(o),Tl=c(U),Ot=s(U,"P",{});var An=i(Ot);Cl=a(An,"This model is also a PyTorch "),Rt=s(An,"A",{href:!0,rel:!0});var ch=i(Rt);El=a(ch,"torch.nn.Module"),ch.forEach(o),zl=a(An,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),An.forEach(o),Jl=c(U),I=s(U,"DIV",{class:!0});var O=i(I);k(Ht.$$.fragment,O),xl=c(O),Lt=s(O,"P",{});var Dn=i(Lt);Il=a(Dn,"Generates audio from an input prompt and an additional optional "),aa=s(Dn,"CODE",{});var mh=i(aa);jl=a(mh,"Bark"),mh.forEach(o),Pl=a(Dn," speaker prompt."),Dn.forEach(o),Ul=c(O),Qt=s(O,"P",{});var Xn=i(Qt);Nl=a(Xn,"kwargs ("),na=s(Xn,"EM",{});var hh=i(na);Sl=a(hh,"optional"),hh.forEach(o),Wl=a(Xn,"): Remaining dictionary of keyword arguments. Keyword arguments are of two types:"),Xn.forEach(o),Zl=c(O),Kt=s(O,"UL",{});var Yn=i(Kt);le=s(Yn,"LI",{});var br=i(le);Fl=a(br,"Without a prefix, they will be entered as "),sa=s(br,"CODE",{});var fh=i(sa);Gl=a(fh,"**kwargs"),fh.forEach(o),Vl=a(br," for the "),ia=s(br,"CODE",{});var ph=i(ia);Al=a(ph,"generate"),ph.forEach(o),Dl=a(br," method of each sub-model."),br.forEach(o),Xl=c(Yn),N=s(Yn,"LI",{});var te=i(N);Yl=a(te,"With a "),la=s(te,"EM",{});var uh=i(la);ql=a(uh,"semantic_"),uh.forEach(o),Ol=a(te,", "),da=s(te,"EM",{});var gh=i(da);Rl=a(gh,"coarse_"),gh.forEach(o),Hl=a(te,", "),ca=s(te,"EM",{});var _h=i(ca);Ll=a(_h,"fine_"),_h.forEach(o),Ql=a(te," prefix, they will be input for the "),ma=s(te,"CODE",{});var bh=i(ma);Kl=a(bh,"generate"),bh.forEach(o),ed=a(te,` method of the
semantic, coarse and fine respectively. It has the priority over the keywords without a prefix.`),te.forEach(o),Yn.forEach(o),td=c(O),ha=s(O,"P",{});var kh=i(ha);od=a(kh,"This means you can, for example, specify a generation strategy for all sub-models except one."),kh.forEach(o),rd=c(O),k(Ae.$$.fragment,O),O.forEach(o),U.forEach(o),ln=c(t),de=s(t,"H2",{class:!0});var qn=i(de);De=s(qn,"A",{id:!0,class:!0,href:!0});var vh=i(De);fa=s(vh,"SPAN",{});var yh=i(fa);k(eo.$$.fragment,yh),yh.forEach(o),vh.forEach(o),ad=c(qn),pa=s(qn,"SPAN",{});var wh=i(pa);nd=a(wh,"BarkSemanticModel"),wh.forEach(o),qn.forEach(o),dn=c(t),S=s(t,"DIV",{class:!0});var lt=i(S);k(to.$$.fragment,lt),sd=c(lt),oo=s(lt,"P",{});var On=i(oo);id=a(On,`Bark semantic (or text) model. It shares the same architecture as the coarse model.
It is a GPT-2 like autoregressive model with a language modeling head on top.
This model inherits from `),tr=s(On,"A",{href:!0});var Mh=i(tr);ld=a(Mh,"PreTrainedModel"),Mh.forEach(o),dd=a(On,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),On.forEach(o),cd=c(lt),ro=s(lt,"P",{});var Rn=i(ro);md=a(Rn,"This model is also a PyTorch "),ao=s(Rn,"A",{href:!0,rel:!0});var Bh=i(ao);hd=a(Bh,"torch.nn.Module"),Bh.forEach(o),fd=a(Rn,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Rn.forEach(o),pd=c(lt),H=s(lt,"DIV",{class:!0});var kr=i(H);k(no.$$.fragment,kr),ud=c(kr),ce=s(kr,"P",{});var vr=i(ce);gd=a(vr,"The "),or=s(vr,"A",{href:!0});var $h=i(or);_d=a($h,"BarkCausalModel"),$h.forEach(o),bd=a(vr," forward method, overrides the "),ua=s(vr,"CODE",{});var Th=i(ua);kd=a(Th,"__call__"),Th.forEach(o),vd=a(vr," special method."),vr.forEach(o),yd=c(kr),k(Xe.$$.fragment,kr),kr.forEach(o),lt.forEach(o),cn=c(t),me=s(t,"H2",{class:!0});var Hn=i(me);Ye=s(Hn,"A",{id:!0,class:!0,href:!0});var Ch=i(Ye);ga=s(Ch,"SPAN",{});var Eh=i(ga);k(so.$$.fragment,Eh),Eh.forEach(o),Ch.forEach(o),wd=c(Hn),_a=s(Hn,"SPAN",{});var zh=i(_a);Md=a(zh,"BarkCoarseModel"),zh.forEach(o),Hn.forEach(o),mn=c(t),W=s(t,"DIV",{class:!0});var dt=i(W);k(io.$$.fragment,dt),Bd=c(dt),lo=s(dt,"P",{});var Ln=i(lo);$d=a(Ln,`Bark coarse acoustics model.
It shares the same architecture as the semantic (or text) model. It is a GPT-2 like autoregressive model with a
language modeling head on top.
This model inherits from `),rr=s(Ln,"A",{href:!0});var Jh=i(rr);Td=a(Jh,"PreTrainedModel"),Jh.forEach(o),Cd=a(Ln,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Ln.forEach(o),Ed=c(dt),co=s(dt,"P",{});var Qn=i(co);zd=a(Qn,"This model is also a PyTorch "),mo=s(Qn,"A",{href:!0,rel:!0});var xh=i(mo);Jd=a(xh,"torch.nn.Module"),xh.forEach(o),xd=a(Qn,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Qn.forEach(o),Id=c(dt),L=s(dt,"DIV",{class:!0});var yr=i(L);k(ho.$$.fragment,yr),jd=c(yr),he=s(yr,"P",{});var wr=i(he);Pd=a(wr,"The "),ar=s(wr,"A",{href:!0});var Ih=i(ar);Ud=a(Ih,"BarkCausalModel"),Ih.forEach(o),Nd=a(wr," forward method, overrides the "),ba=s(wr,"CODE",{});var jh=i(ba);Sd=a(jh,"__call__"),jh.forEach(o),Wd=a(wr," special method."),wr.forEach(o),Zd=c(yr),k(qe.$$.fragment,yr),yr.forEach(o),dt.forEach(o),hn=c(t),fe=s(t,"H2",{class:!0});var Kn=i(fe);Oe=s(Kn,"A",{id:!0,class:!0,href:!0});var Ph=i(Oe);ka=s(Ph,"SPAN",{});var Uh=i(ka);k(fo.$$.fragment,Uh),Uh.forEach(o),Ph.forEach(o),Fd=c(Kn),va=s(Kn,"SPAN",{});var Nh=i(va);Gd=a(Nh,"BarkFineModel"),Nh.forEach(o),Kn.forEach(o),fn=c(t),Z=s(t,"DIV",{class:!0});var ct=i(Z);k(po.$$.fragment,ct),Vd=c(ct),pe=s(ct,"P",{});var Mr=i(pe);Ad=a(Mr,"Bark fine acoustics model. It is a non-causal GPT-like model with "),ya=s(Mr,"CODE",{});var Sh=i(ya);Dd=a(Sh,"config.n_codes_total"),Sh.forEach(o),Xd=a(Mr,` embedding layers and
language modeling heads, one for each codebook.
This model inherits from `),nr=s(Mr,"A",{href:!0});var Wh=i(nr);Yd=a(Wh,"PreTrainedModel"),Wh.forEach(o),qd=a(Mr,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Mr.forEach(o),Od=c(ct),uo=s(ct,"P",{});var es=i(uo);Rd=a(es,"This model is also a PyTorch "),go=s(es,"A",{href:!0,rel:!0});var Zh=i(go);Hd=a(Zh,"torch.nn.Module"),Zh.forEach(o),Ld=a(es,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),es.forEach(o),Qd=c(ct),Q=s(ct,"DIV",{class:!0});var Br=i(Q);k(_o.$$.fragment,Br),Kd=c(Br),ue=s(Br,"P",{});var $r=i(ue);ec=a($r,"The "),sr=s($r,"A",{href:!0});var Fh=i(sr);tc=a(Fh,"BarkFineModel"),Fh.forEach(o),oc=a($r," forward method, overrides the "),wa=s($r,"CODE",{});var Gh=i(wa);rc=a(Gh,"__call__"),Gh.forEach(o),ac=a($r," special method."),$r.forEach(o),nc=c(Br),k(Re.$$.fragment,Br),Br.forEach(o),ct.forEach(o),pn=c(t),ge=s(t,"H2",{class:!0});var ts=i(ge);He=s(ts,"A",{id:!0,class:!0,href:!0});var Vh=i(He);Ma=s(Vh,"SPAN",{});var Ah=i(Ma);k(bo.$$.fragment,Ah),Ah.forEach(o),Vh.forEach(o),sc=c(ts),Ba=s(ts,"SPAN",{});var Dh=i(Ba);ic=a(Dh,"BarkCausalModel"),Dh.forEach(o),ts.forEach(o),un=c(t),_e=s(t,"DIV",{class:!0});var os=i(_e);k(ko.$$.fragment,os),lc=c(os),K=s(os,"DIV",{class:!0});var Tr=i(K);k(vo.$$.fragment,Tr),dc=c(Tr),be=s(Tr,"P",{});var Cr=i(be);cc=a(Cr,"The "),ir=s(Cr,"A",{href:!0});var Xh=i(ir);mc=a(Xh,"BarkCausalModel"),Xh.forEach(o),hc=a(Cr," forward method, overrides the "),$a=s(Cr,"CODE",{});var Yh=i($a);fc=a(Yh,"__call__"),Yh.forEach(o),pc=a(Cr," special method."),Cr.forEach(o),uc=c(Tr),k(Le.$$.fragment,Tr),Tr.forEach(o),os.forEach(o),gn=c(t),ke=s(t,"H2",{class:!0});var rs=i(ke);Qe=s(rs,"A",{id:!0,class:!0,href:!0});var qh=i(Qe);Ta=s(qh,"SPAN",{});var Oh=i(Ta);k(yo.$$.fragment,Oh),Oh.forEach(o),qh.forEach(o),gc=c(rs),Ca=s(rs,"SPAN",{});var Rh=i(Ca);_c=a(Rh,"BarkCoarseConfig"),Rh.forEach(o),rs.forEach(o),_n=c(t),F=s(t,"DIV",{class:!0});var mt=i(F);k(wo.$$.fragment,mt),bc=c(mt),ve=s(mt,"P",{});var Er=i(ve);kc=a(Er,"This is the configuration class to store the configuration of a "),lr=s(Er,"A",{href:!0});var Hh=i(lr);vc=a(Hh,"BarkCoarseModel"),Hh.forEach(o),yc=a(Er,`. It is used to instantiate the model
according to the specified arguments, defining the model architecture. Instantiating a configuration with the
defaults will yield a similar configuration to that of the Bark `),Mo=s(Er,"A",{href:!0,rel:!0});var Lh=i(Mo);wc=a(Lh,"suno/bark"),Lh.forEach(o),Mc=a(Er,`
architecture.`),Er.forEach(o),Bc=c(mt),ye=s(mt,"P",{});var zr=i(ye);$c=a(zr,"Configuration objects inherit from "),dr=s(zr,"A",{href:!0});var Qh=i(dr);Tc=a(Qh,"PretrainedConfig"),Qh.forEach(o),Cc=a(zr,` and can be used to control the model outputs. Read the
documentation from `),cr=s(zr,"A",{href:!0});var Kh=i(cr);Ec=a(Kh,"PretrainedConfig"),Kh.forEach(o),zc=a(zr," for more information."),zr.forEach(o),Jc=c(mt),k(Ke.$$.fragment,mt),mt.forEach(o),bn=c(t),we=s(t,"H2",{class:!0});var as=i(we);et=s(as,"A",{id:!0,class:!0,href:!0});var ef=i(et);Ea=s(ef,"SPAN",{});var tf=i(Ea);k(Bo.$$.fragment,tf),tf.forEach(o),ef.forEach(o),xc=c(as),za=s(as,"SPAN",{});var of=i(za);Ic=a(of,"BarkFineConfig"),of.forEach(o),as.forEach(o),kn=c(t),G=s(t,"DIV",{class:!0});var ht=i(G);k($o.$$.fragment,ht),jc=c(ht),Me=s(ht,"P",{});var Jr=i(Me);Pc=a(Jr,"This is the configuration class to store the configuration of a "),mr=s(Jr,"A",{href:!0});var rf=i(mr);Uc=a(rf,"BarkFineModel"),rf.forEach(o),Nc=a(Jr,`. It is used to instantiate the model
according to the specified arguments, defining the model architecture. Instantiating a configuration with the
defaults will yield a similar configuration to that of the Bark `),To=s(Jr,"A",{href:!0,rel:!0});var af=i(To);Sc=a(af,"suno/bark"),af.forEach(o),Wc=a(Jr,`
architecture.`),Jr.forEach(o),Zc=c(ht),Be=s(ht,"P",{});var xr=i(Be);Fc=a(xr,"Configuration objects inherit from "),hr=s(xr,"A",{href:!0});var nf=i(hr);Gc=a(nf,"PretrainedConfig"),nf.forEach(o),Vc=a(xr,` and can be used to control the model outputs. Read the
documentation from `),fr=s(xr,"A",{href:!0});var sf=i(fr);Ac=a(sf,"PretrainedConfig"),sf.forEach(o),Dc=a(xr," for more information."),xr.forEach(o),Xc=c(ht),k(tt.$$.fragment,ht),ht.forEach(o),vn=c(t),$e=s(t,"H2",{class:!0});var ns=i($e);ot=s(ns,"A",{id:!0,class:!0,href:!0});var lf=i(ot);Ja=s(lf,"SPAN",{});var df=i(Ja);k(Co.$$.fragment,df),df.forEach(o),lf.forEach(o),Yc=c(ns),xa=s(ns,"SPAN",{});var cf=i(xa);qc=a(cf,"BarkSemanticConfig"),cf.forEach(o),ns.forEach(o),yn=c(t),V=s(t,"DIV",{class:!0});var ft=i(V);k(Eo.$$.fragment,ft),Oc=c(ft),Te=s(ft,"P",{});var Ir=i(Te);Rc=a(Ir,"This is the configuration class to store the configuration of a "),pr=s(Ir,"A",{href:!0});var mf=i(pr);Hc=a(mf,"BarkSemanticModel"),mf.forEach(o),Lc=a(Ir,`. It is used to instantiate the model
according to the specified arguments, defining the model architecture. Instantiating a configuration with the
defaults will yield a similar configuration to that of the Bark `),zo=s(Ir,"A",{href:!0,rel:!0});var hf=i(zo);Qc=a(hf,"suno/bark"),hf.forEach(o),Kc=a(Ir,`
architecture.`),Ir.forEach(o),em=c(ft),Ce=s(ft,"P",{});var jr=i(Ce);tm=a(jr,"Configuration objects inherit from "),ur=s(jr,"A",{href:!0});var ff=i(ur);om=a(ff,"PretrainedConfig"),ff.forEach(o),rm=a(jr,` and can be used to control the model outputs. Read the
documentation from `),gr=s(jr,"A",{href:!0});var pf=i(gr);am=a(pf,"PretrainedConfig"),pf.forEach(o),nm=a(jr," for more information."),jr.forEach(o),sm=c(ft),k(rt.$$.fragment,ft),ft.forEach(o),this.h()},h(){l(p,"name","hf:doc:metadata"),l(p,"content",JSON.stringify(zf)),l(g,"id","bark"),l(g,"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"),l(g,"href","#bark"),l(_,"class","relative group"),l(Ee,"id","overview"),l(Ee,"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"),l(Ee,"href","#overview"),l(oe,"class","relative group"),l(gt,"href","https://github.com/suno-ai/bark"),l(gt,"rel","nofollow"),l(Po,"href","/docs/transformers/v4.31.0/en/model_doc/bark#transformers.BarkSemanticModel"),l(Uo,"href","/docs/transformers/v4.31.0/en/model_doc/bark#transformers.BarkCoarseModel"),l(No,"href","/docs/transformers/v4.31.0/en/model_doc/bark#transformers.BarkSemanticModel"),l(Wo,"href","/docs/transformers/v4.31.0/en/model_doc/bark#transformers.BarkFineModel"),l(Zo,"href","/docs/transformers/v4.31.0/en/model_doc/encodec#transformers.EncodecModel"),l(xe,"id","tips"),l(xe,"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"),l(xe,"href","#tips"),l(re,"class","relative group"),l(kt,"href","https://suno-ai.notion.site/8b8e8749ed514b0cbf3f699013548683?v=bc67cff786b04b50b3ceb756fd05f68c"),l(kt,"rel","nofollow"),l(vt,"href","https://huggingface.co/suno/bark-small/tree/main/speaker_embeddings"),l(vt,"rel","nofollow"),l(yt,"href","https://huggingface.co/suno/bark/tree/main/speaker_embeddings"),l(yt,"rel","nofollow"),l(Tt,"href","https://huggingface.co/ylacombe"),l(Tt,"rel","nofollow"),l(Ct,"href","https://github.com/sanchit-gandhi"),l(Ct,"rel","nofollow"),l(Et,"href","https://github.com/suno-ai/bark"),l(Et,"rel","nofollow"),l(Pe,"id","transformers.BarkConfig"),l(Pe,"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"),l(Pe,"href","#transformers.BarkConfig"),l(ae,"class","relative group"),l(Vo,"href","/docs/transformers/v4.31.0/en/model_doc/bark#transformers.BarkModel"),l(jt,"href","https://huggingface.co/suno/bark"),l(jt,"rel","nofollow"),l(Ao,"href","/docs/transformers/v4.31.0/en/main_classes/configuration#transformers.PretrainedConfig"),l(Do,"href","/docs/transformers/v4.31.0/en/main_classes/configuration#transformers.PretrainedConfig"),l(Xo,"href","/docs/transformers/v4.31.0/en/model_doc/bark#transformers.BarkConfig"),l(Ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Yo,"href","/docs/transformers/v4.31.0/en/main_classes/configuration#transformers.PretrainedConfig.to_dict"),l(Ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Se,"id","transformers.BarkProcessor"),l(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"),l(Se,"href","#transformers.BarkProcessor"),l(se,"class","relative group"),l(We,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(qo,"href","/docs/transformers/v4.31.0/en/model_doc/bark#transformers.BarkProcessor.from_pretrained"),l(Fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Ge,"id","transformers.BarkModel"),l(Ge,"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"),l(Ge,"href","#transformers.BarkModel"),l(ie,"class","relative group"),l(Ro,"href","/docs/transformers/v4.31.0/en/model_doc/bark#transformers.BarkSemanticModel"),l(Ho,"href","/docs/transformers/v4.31.0/en/model_doc/bark#transformers.BarkCoarseModel"),l(Qo,"href","/docs/transformers/v4.31.0/en/model_doc/bark#transformers.BarkFineModel"),l(Ko,"href","/docs/transformers/v4.31.0/en/model_doc/encodec#transformers.EncodecModel"),l(er,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel"),l(Rt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(Rt,"rel","nofollow"),l(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(De,"id","transformers.BarkSemanticModel"),l(De,"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"),l(De,"href","#transformers.BarkSemanticModel"),l(de,"class","relative group"),l(tr,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel"),l(ao,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(ao,"rel","nofollow"),l(or,"href","/docs/transformers/v4.31.0/en/model_doc/bark#transformers.BarkCausalModel"),l(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Ye,"id","transformers.BarkCoarseModel"),l(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"),l(Ye,"href","#transformers.BarkCoarseModel"),l(me,"class","relative group"),l(rr,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel"),l(mo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(mo,"rel","nofollow"),l(ar,"href","/docs/transformers/v4.31.0/en/model_doc/bark#transformers.BarkCausalModel"),l(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Oe,"id","transformers.BarkFineModel"),l(Oe,"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"),l(Oe,"href","#transformers.BarkFineModel"),l(fe,"class","relative group"),l(nr,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel"),l(go,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(go,"rel","nofollow"),l(sr,"href","/docs/transformers/v4.31.0/en/model_doc/bark#transformers.BarkFineModel"),l(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(He,"id","transformers.BarkCausalModel"),l(He,"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"),l(He,"href","#transformers.BarkCausalModel"),l(ge,"class","relative group"),l(ir,"href","/docs/transformers/v4.31.0/en/model_doc/bark#transformers.BarkCausalModel"),l(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(_e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Qe,"id","transformers.BarkCoarseConfig"),l(Qe,"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"),l(Qe,"href","#transformers.BarkCoarseConfig"),l(ke,"class","relative group"),l(lr,"href","/docs/transformers/v4.31.0/en/model_doc/bark#transformers.BarkCoarseModel"),l(Mo,"href","https://huggingface.co/suno/bark"),l(Mo,"rel","nofollow"),l(dr,"href","/docs/transformers/v4.31.0/en/main_classes/configuration#transformers.PretrainedConfig"),l(cr,"href","/docs/transformers/v4.31.0/en/main_classes/configuration#transformers.PretrainedConfig"),l(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(et,"id","transformers.BarkFineConfig"),l(et,"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"),l(et,"href","#transformers.BarkFineConfig"),l(we,"class","relative group"),l(mr,"href","/docs/transformers/v4.31.0/en/model_doc/bark#transformers.BarkFineModel"),l(To,"href","https://huggingface.co/suno/bark"),l(To,"rel","nofollow"),l(hr,"href","/docs/transformers/v4.31.0/en/main_classes/configuration#transformers.PretrainedConfig"),l(fr,"href","/docs/transformers/v4.31.0/en/main_classes/configuration#transformers.PretrainedConfig"),l(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ot,"id","transformers.BarkSemanticConfig"),l(ot,"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"),l(ot,"href","#transformers.BarkSemanticConfig"),l($e,"class","relative group"),l(pr,"href","/docs/transformers/v4.31.0/en/model_doc/bark#transformers.BarkSemanticModel"),l(zo,"href","https://huggingface.co/suno/bark"),l(zo,"rel","nofollow"),l(ur,"href","/docs/transformers/v4.31.0/en/main_classes/configuration#transformers.PretrainedConfig"),l(gr,"href","/docs/transformers/v4.31.0/en/main_classes/configuration#transformers.PretrainedConfig"),l(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,h){e(document.head,p),f(t,$,h),f(t,_,h),e(_,g),e(g,B),v(m,B,null),e(_,u),e(_,J),e(J,ds),f(t,Fa,h),f(t,oe,h),e(oe,Ee),e(Ee,Pr),v(ut,Pr,null),e(oe,cs),e(oe,Ur),e(Ur,ms),f(t,Ga,h),f(t,ze,h),e(ze,hs),e(ze,gt),e(gt,fs),e(ze,ps),f(t,Va,h),f(t,Io,h),e(Io,us),f(t,Aa,h),f(t,D,h),e(D,jo),e(jo,Po),e(Po,gs),e(jo,_s),e(D,bs),e(D,Je),e(Je,Uo),e(Uo,ks),e(Je,vs),e(Je,No),e(No,ys),e(Je,ws),e(D,Ms),e(D,So),e(So,Wo),e(Wo,Bs),e(So,$s),e(D,Ts),e(D,_t),e(_t,Cs),e(_t,Zo),e(Zo,Es),e(_t,zs),f(t,Da,h),f(t,Fo,h),e(Fo,Js),f(t,Xa,h),f(t,re,h),e(re,xe),e(xe,Nr),v(bt,Nr,null),e(re,xs),e(re,Sr),e(Sr,Is),f(t,Ya,h),f(t,X,h),e(X,js),e(X,kt),e(kt,Ps),e(X,Us),e(X,vt),e(vt,Ns),e(X,Ss),e(X,yt),e(yt,Ws),e(X,Zs),f(t,qa,h),v(wt,t,h),f(t,Oa,h),f(t,Ie,h),e(Ie,Fs),e(Ie,Wr),e(Wr,Gs),e(Ie,Vs),f(t,Ra,h),v(Mt,t,h),f(t,Ha,h),f(t,je,h),e(je,As),e(je,Zr),e(Zr,Ds),e(je,Xs),f(t,La,h),v(Bt,t,h),f(t,Qa,h),f(t,Go,h),e(Go,Ys),f(t,Ka,h),v($t,t,h),f(t,en,h),f(t,Y,h),e(Y,qs),e(Y,Tt),e(Tt,Os),e(Y,Rs),e(Y,Ct),e(Ct,Hs),e(Y,Ls),e(Y,Et),e(Et,Qs),e(Y,Ks),f(t,tn,h),f(t,ae,h),e(ae,Pe),e(Pe,Fr),v(zt,Fr,null),e(ae,ei),e(ae,Gr),e(Gr,ti),f(t,on,h),f(t,x,h),v(Jt,x,null),e(x,oi),e(x,xt),e(xt,ri),e(xt,Vo),e(Vo,ai),e(xt,ni),e(x,si),e(x,It),e(It,ii),e(It,jt),e(jt,li),e(It,di),e(x,ci),e(x,ne),e(ne,mi),e(ne,Ao),e(Ao,hi),e(ne,fi),e(ne,Do),e(Do,pi),e(ne,ui),e(x,gi),e(x,Ue),v(Pt,Ue,null),e(Ue,_i),e(Ue,Ut),e(Ut,bi),e(Ut,Xo),e(Xo,ki),e(Ut,vi),e(x,yi),e(x,Ne),v(Nt,Ne,null),e(Ne,wi),e(Ne,St),e(St,Mi),e(St,Yo),e(Yo,Bi),e(St,$i),f(t,rn,h),f(t,se,h),e(se,Se),e(Se,Vr),v(Wt,Vr,null),e(se,Ti),e(se,Ar),e(Ar,Ci),f(t,an,h),f(t,P,h),v(Zt,P,null),e(P,Ei),e(P,Dr),e(Dr,zi),e(P,Ji),e(P,We),v(Ft,We,null),e(We,xi),e(We,C),e(C,Ii),e(C,Xr),e(Xr,ji),e(C,Pi),e(C,Yr),e(Yr,Ui),e(C,Ni),e(C,qr),e(qr,Si),e(C,Wi),e(C,Or),e(Or,Zi),e(C,Fi),e(C,Rr),e(Rr,Gi),e(C,Vi),e(C,Hr),e(Hr,Ai),e(C,Di),e(C,Lr),e(Lr,Xi),e(C,Yi),e(P,qi),e(P,Ze),v(Gt,Ze,null),e(Ze,Oi),e(Ze,Qr),e(Qr,Ri),e(P,Hi),e(P,Fe),v(Vt,Fe,null),e(Fe,Li),e(Fe,At),e(At,Qi),e(At,qo),e(qo,Ki),e(At,el),f(t,nn,h),f(t,ie,h),e(ie,Ge),e(Ge,Kr),v(Dt,Kr,null),e(ie,tl),e(ie,ea),e(ea,ol),f(t,sn,h),f(t,E,h),v(Xt,E,null),e(E,rl),e(E,ta),e(ta,al),e(E,nl),e(E,R),e(R,Oo),e(Oo,Ro),e(Ro,sl),e(Oo,il),e(R,ll),e(R,Ve),e(Ve,Ho),e(Ho,dl),e(Ve,cl),e(Ve,oa),e(oa,ml),e(Ve,hl),e(R,fl),e(R,Lo),e(Lo,Qo),e(Qo,pl),e(Lo,ul),e(R,gl),e(R,Yt),e(Yt,_l),e(Yt,Ko),e(Ko,bl),e(Yt,kl),e(E,vl),e(E,ra),e(ra,yl),e(E,wl),e(E,qt),e(qt,Ml),e(qt,er),e(er,Bl),e(qt,$l),e(E,Tl),e(E,Ot),e(Ot,Cl),e(Ot,Rt),e(Rt,El),e(Ot,zl),e(E,Jl),e(E,I),v(Ht,I,null),e(I,xl),e(I,Lt),e(Lt,Il),e(Lt,aa),e(aa,jl),e(Lt,Pl),e(I,Ul),e(I,Qt),e(Qt,Nl),e(Qt,na),e(na,Sl),e(Qt,Wl),e(I,Zl),e(I,Kt),e(Kt,le),e(le,Fl),e(le,sa),e(sa,Gl),e(le,Vl),e(le,ia),e(ia,Al),e(le,Dl),e(Kt,Xl),e(Kt,N),e(N,Yl),e(N,la),e(la,ql),e(N,Ol),e(N,da),e(da,Rl),e(N,Hl),e(N,ca),e(ca,Ll),e(N,Ql),e(N,ma),e(ma,Kl),e(N,ed),e(I,td),e(I,ha),e(ha,od),e(I,rd),v(Ae,I,null),f(t,ln,h),f(t,de,h),e(de,De),e(De,fa),v(eo,fa,null),e(de,ad),e(de,pa),e(pa,nd),f(t,dn,h),f(t,S,h),v(to,S,null),e(S,sd),e(S,oo),e(oo,id),e(oo,tr),e(tr,ld),e(oo,dd),e(S,cd),e(S,ro),e(ro,md),e(ro,ao),e(ao,hd),e(ro,fd),e(S,pd),e(S,H),v(no,H,null),e(H,ud),e(H,ce),e(ce,gd),e(ce,or),e(or,_d),e(ce,bd),e(ce,ua),e(ua,kd),e(ce,vd),e(H,yd),v(Xe,H,null),f(t,cn,h),f(t,me,h),e(me,Ye),e(Ye,ga),v(so,ga,null),e(me,wd),e(me,_a),e(_a,Md),f(t,mn,h),f(t,W,h),v(io,W,null),e(W,Bd),e(W,lo),e(lo,$d),e(lo,rr),e(rr,Td),e(lo,Cd),e(W,Ed),e(W,co),e(co,zd),e(co,mo),e(mo,Jd),e(co,xd),e(W,Id),e(W,L),v(ho,L,null),e(L,jd),e(L,he),e(he,Pd),e(he,ar),e(ar,Ud),e(he,Nd),e(he,ba),e(ba,Sd),e(he,Wd),e(L,Zd),v(qe,L,null),f(t,hn,h),f(t,fe,h),e(fe,Oe),e(Oe,ka),v(fo,ka,null),e(fe,Fd),e(fe,va),e(va,Gd),f(t,fn,h),f(t,Z,h),v(po,Z,null),e(Z,Vd),e(Z,pe),e(pe,Ad),e(pe,ya),e(ya,Dd),e(pe,Xd),e(pe,nr),e(nr,Yd),e(pe,qd),e(Z,Od),e(Z,uo),e(uo,Rd),e(uo,go),e(go,Hd),e(uo,Ld),e(Z,Qd),e(Z,Q),v(_o,Q,null),e(Q,Kd),e(Q,ue),e(ue,ec),e(ue,sr),e(sr,tc),e(ue,oc),e(ue,wa),e(wa,rc),e(ue,ac),e(Q,nc),v(Re,Q,null),f(t,pn,h),f(t,ge,h),e(ge,He),e(He,Ma),v(bo,Ma,null),e(ge,sc),e(ge,Ba),e(Ba,ic),f(t,un,h),f(t,_e,h),v(ko,_e,null),e(_e,lc),e(_e,K),v(vo,K,null),e(K,dc),e(K,be),e(be,cc),e(be,ir),e(ir,mc),e(be,hc),e(be,$a),e($a,fc),e(be,pc),e(K,uc),v(Le,K,null),f(t,gn,h),f(t,ke,h),e(ke,Qe),e(Qe,Ta),v(yo,Ta,null),e(ke,gc),e(ke,Ca),e(Ca,_c),f(t,_n,h),f(t,F,h),v(wo,F,null),e(F,bc),e(F,ve),e(ve,kc),e(ve,lr),e(lr,vc),e(ve,yc),e(ve,Mo),e(Mo,wc),e(ve,Mc),e(F,Bc),e(F,ye),e(ye,$c),e(ye,dr),e(dr,Tc),e(ye,Cc),e(ye,cr),e(cr,Ec),e(ye,zc),e(F,Jc),v(Ke,F,null),f(t,bn,h),f(t,we,h),e(we,et),e(et,Ea),v(Bo,Ea,null),e(we,xc),e(we,za),e(za,Ic),f(t,kn,h),f(t,G,h),v($o,G,null),e(G,jc),e(G,Me),e(Me,Pc),e(Me,mr),e(mr,Uc),e(Me,Nc),e(Me,To),e(To,Sc),e(Me,Wc),e(G,Zc),e(G,Be),e(Be,Fc),e(Be,hr),e(hr,Gc),e(Be,Vc),e(Be,fr),e(fr,Ac),e(Be,Dc),e(G,Xc),v(tt,G,null),f(t,vn,h),f(t,$e,h),e($e,ot),e(ot,Ja),v(Co,Ja,null),e($e,Yc),e($e,xa),e(xa,qc),f(t,yn,h),f(t,V,h),v(Eo,V,null),e(V,Oc),e(V,Te),e(Te,Rc),e(Te,pr),e(pr,Hc),e(Te,Lc),e(Te,zo),e(zo,Qc),e(Te,Kc),e(V,em),e(V,Ce),e(Ce,tm),e(Ce,ur),e(ur,om),e(Ce,rm),e(Ce,gr),e(gr,am),e(Ce,nm),e(V,sm),v(rt,V,null),wn=!0},p(t,[h]){const Jo={};h&2&&(Jo.$$scope={dirty:h,ctx:t}),Ae.$set(Jo);const Ia={};h&2&&(Ia.$$scope={dirty:h,ctx:t}),Xe.$set(Ia);const ja={};h&2&&(ja.$$scope={dirty:h,ctx:t}),qe.$set(ja);const Pa={};h&2&&(Pa.$$scope={dirty:h,ctx:t}),Re.$set(Pa);const xo={};h&2&&(xo.$$scope={dirty:h,ctx:t}),Le.$set(xo);const Ua={};h&2&&(Ua.$$scope={dirty:h,ctx:t}),Ke.$set(Ua);const Na={};h&2&&(Na.$$scope={dirty:h,ctx:t}),tt.$set(Na);const Sa={};h&2&&(Sa.$$scope={dirty:h,ctx:t}),rt.$set(Sa)},i(t){wn||(y(m.$$.fragment,t),y(ut.$$.fragment,t),y(bt.$$.fragment,t),y(wt.$$.fragment,t),y(Mt.$$.fragment,t),y(Bt.$$.fragment,t),y($t.$$.fragment,t),y(zt.$$.fragment,t),y(Jt.$$.fragment,t),y(Pt.$$.fragment,t),y(Nt.$$.fragment,t),y(Wt.$$.fragment,t),y(Zt.$$.fragment,t),y(Ft.$$.fragment,t),y(Gt.$$.fragment,t),y(Vt.$$.fragment,t),y(Dt.$$.fragment,t),y(Xt.$$.fragment,t),y(Ht.$$.fragment,t),y(Ae.$$.fragment,t),y(eo.$$.fragment,t),y(to.$$.fragment,t),y(no.$$.fragment,t),y(Xe.$$.fragment,t),y(so.$$.fragment,t),y(io.$$.fragment,t),y(ho.$$.fragment,t),y(qe.$$.fragment,t),y(fo.$$.fragment,t),y(po.$$.fragment,t),y(_o.$$.fragment,t),y(Re.$$.fragment,t),y(bo.$$.fragment,t),y(ko.$$.fragment,t),y(vo.$$.fragment,t),y(Le.$$.fragment,t),y(yo.$$.fragment,t),y(wo.$$.fragment,t),y(Ke.$$.fragment,t),y(Bo.$$.fragment,t),y($o.$$.fragment,t),y(tt.$$.fragment,t),y(Co.$$.fragment,t),y(Eo.$$.fragment,t),y(rt.$$.fragment,t),wn=!0)},o(t){w(m.$$.fragment,t),w(ut.$$.fragment,t),w(bt.$$.fragment,t),w(wt.$$.fragment,t),w(Mt.$$.fragment,t),w(Bt.$$.fragment,t),w($t.$$.fragment,t),w(zt.$$.fragment,t),w(Jt.$$.fragment,t),w(Pt.$$.fragment,t),w(Nt.$$.fragment,t),w(Wt.$$.fragment,t),w(Zt.$$.fragment,t),w(Ft.$$.fragment,t),w(Gt.$$.fragment,t),w(Vt.$$.fragment,t),w(Dt.$$.fragment,t),w(Xt.$$.fragment,t),w(Ht.$$.fragment,t),w(Ae.$$.fragment,t),w(eo.$$.fragment,t),w(to.$$.fragment,t),w(no.$$.fragment,t),w(Xe.$$.fragment,t),w(so.$$.fragment,t),w(io.$$.fragment,t),w(ho.$$.fragment,t),w(qe.$$.fragment,t),w(fo.$$.fragment,t),w(po.$$.fragment,t),w(_o.$$.fragment,t),w(Re.$$.fragment,t),w(bo.$$.fragment,t),w(ko.$$.fragment,t),w(vo.$$.fragment,t),w(Le.$$.fragment,t),w(yo.$$.fragment,t),w(wo.$$.fragment,t),w(Ke.$$.fragment,t),w(Bo.$$.fragment,t),w($o.$$.fragment,t),w(tt.$$.fragment,t),w(Co.$$.fragment,t),w(Eo.$$.fragment,t),w(rt.$$.fragment,t),wn=!1},d(t){o(p),t&&o($),t&&o(_),M(m),t&&o(Fa),t&&o(oe),M(ut),t&&o(Ga),t&&o(ze),t&&o(Va),t&&o(Io),t&&o(Aa),t&&o(D),t&&o(Da),t&&o(Fo),t&&o(Xa),t&&o(re),M(bt),t&&o(Ya),t&&o(X),t&&o(qa),M(wt,t),t&&o(Oa),t&&o(Ie),t&&o(Ra),M(Mt,t),t&&o(Ha),t&&o(je),t&&o(La),M(Bt,t),t&&o(Qa),t&&o(Go),t&&o(Ka),M($t,t),t&&o(en),t&&o(Y),t&&o(tn),t&&o(ae),M(zt),t&&o(on),t&&o(x),M(Jt),M(Pt),M(Nt),t&&o(rn),t&&o(se),M(Wt),t&&o(an),t&&o(P),M(Zt),M(Ft),M(Gt),M(Vt),t&&o(nn),t&&o(ie),M(Dt),t&&o(sn),t&&o(E),M(Xt),M(Ht),M(Ae),t&&o(ln),t&&o(de),M(eo),t&&o(dn),t&&o(S),M(to),M(no),M(Xe),t&&o(cn),t&&o(me),M(so),t&&o(mn),t&&o(W),M(io),M(ho),M(qe),t&&o(hn),t&&o(fe),M(fo),t&&o(fn),t&&o(Z),M(po),M(_o),M(Re),t&&o(pn),t&&o(ge),M(bo),t&&o(un),t&&o(_e),M(ko),M(vo),M(Le),t&&o(gn),t&&o(ke),M(yo),t&&o(_n),t&&o(F),M(wo),M(Ke),t&&o(bn),t&&o(we),M(Bo),t&&o(kn),t&&o(G),M($o),M(tt),t&&o(vn),t&&o($e),M(Co),t&&o(yn),t&&o(V),M(Eo),M(rt)}}}const zf={local:"bark",sections:[{local:"overview",sections:[{local:"tips",title:"Tips:"}],title:"Overview"},{local:"transformers.BarkConfig",title:"BarkConfig"},{local:"transformers.BarkProcessor",title:"BarkProcessor"},{local:"transformers.BarkModel",title:"BarkModel"},{local:"transformers.BarkSemanticModel",title:"BarkSemanticModel"},{local:"transformers.BarkCoarseModel",title:"BarkCoarseModel"},{local:"transformers.BarkFineModel",title:"BarkFineModel"},{local:"transformers.BarkCausalModel",title:"BarkCausalModel"},{local:"transformers.BarkCoarseConfig",title:"BarkCoarseConfig"},{local:"transformers.BarkFineConfig",title:"BarkFineConfig"},{local:"transformers.BarkSemanticConfig",title:"BarkSemanticConfig"}],title:"Bark"};function Jf(z){return kf(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Sf extends uf{constructor(p){super();gf(this,p,Jf,Ef,_f,{})}}export{Sf as default,zf as metadata};
