import{S as vs,i as ks,s as $s,e as l,k as p,w,t as s,M as ys,c as i,d as e,m as f,a as r,x as v,h as o,b as u,G as t,g as n,y as k,q as $,o as y,B as j,v as js}from"../chunks/vendor-hf-doc-builder.js";import{T as Es}from"../chunks/Tip-hf-doc-builder.js";import{I as Ka}from"../chunks/IconCopyLink-hf-doc-builder.js";import{C as ha}from"../chunks/CodeBlock-hf-doc-builder.js";function bs(Qa){let h,N,c,E,P,_,V,O;return{c(){h=l("p"),N=s("For more information about creating your own "),c=l("code"),E=s("AudioFolder"),P=s(" dataset, take a look at the "),_=l("a"),V=s("Create an audio dataset"),O=s(" guide."),this.h()},l(S){h=i(S,"P",{});var g=r(h);N=o(g,"For more information about creating your own "),c=i(g,"CODE",{});var m=r(c);E=o(m,"AudioFolder"),m.forEach(e),P=o(g," dataset, take a look at the "),_=i(g,"A",{href:!0});var ca=r(_);V=o(ca,"Create an audio dataset"),ca.forEach(e),O=o(g," guide."),g.forEach(e),this.h()},h(){u(_,"href","./audio_dataset")},m(S,g){n(S,h,g),t(h,N),t(h,c),t(c,E),t(h,P),t(h,_),t(_,V),t(h,O)},d(S){S&&e(h)}}}function zs(Qa){let h,N,c,E,P,_,V,O,S,g,m,ca,ma,qt,xt,W,ba,Ct,Pt,X,za,Ot,St,Va,D,L,Aa,Z,Dt,qa,Tt,Wa,A,Ft,xa,It,Nt,_a,Lt,Yt,Xa,T,Y,Ca,aa,Ht,Pa,Mt,Za,q,Rt,ga,Ut,Jt,wa,Bt,Gt,at,ta,tt,F,H,Oa,ea,Kt,Sa,Qt,et,M,Vt,Da,Wt,Xt,st,I,R,Ta,sa,Zt,Fa,ae,ot,U,te,Ia,ee,se,lt,oa,it,b,oe,Na,le,ie,La,re,de,Ya,ne,ue,rt,la,dt,z,Ha,pe,fe,Ma,he,ce,Ra,me,_e,nt,ia,ut,va,ge,pt,ra,ft,J,we,Ua,ve,ke,ht,x,$e,Ja,ye,je,ka,Ee,be,ct,da,mt,C,ze,Ba,Ae,qe,Ga,xe,Ce,_t,na,gt,B,wt,G,Pe,ua,Oe,Se,vt;return _=new Ka({}),Z=new Ka({}),aa=new Ka({}),ta=new ha({props:{code:`audio_dataset = Dataset.from_dict({"audio": ["path/to/audio_1", "path/to/audio_2", ..., "path/to/audio_n"]}).cast_column("audio", Audio())
audio_dataset[0]["audio"]`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>audio_dataset = Dataset.from_dict({<span class="hljs-string">&quot;audio&quot;</span>: [<span class="hljs-string">&quot;path/to/audio_1&quot;</span>, <span class="hljs-string">&quot;path/to/audio_2&quot;</span>, ..., <span class="hljs-string">&quot;path/to/audio_n&quot;</span>]}).cast_column(<span class="hljs-string">&quot;audio&quot;</span>, Audio())
<span class="hljs-meta">&gt;&gt;&gt; </span>audio_dataset[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>]
{<span class="hljs-string">&#x27;array&#x27;</span>: array([ <span class="hljs-number">0.</span>        ,  <span class="hljs-number">0.00024414</span>, -<span class="hljs-number">0.00024414</span>, ..., -<span class="hljs-number">0.00024414</span>,
         <span class="hljs-number">0.</span>        ,  <span class="hljs-number">0.</span>        ], dtype=float32),
 <span class="hljs-string">&#x27;path&#x27;</span>: <span class="hljs-string">&#x27;path/to/audio_1&#x27;</span>,
 <span class="hljs-string">&#x27;sampling_rate&#x27;</span>: <span class="hljs-number">16000</span>}`}}),ea=new Ka({}),sa=new Ka({}),oa=new ha({props:{code:`folder/train/metadata.csv
folder/train/first_audio_file.mp3
folder/train/second_audio_file.mp3
folder/train/third_audio_file.mp3`,highlighted:`folder<span class="hljs-regexp">/train/m</span>etadata.csv
folder<span class="hljs-regexp">/train/</span>first_audio_file.mp3
folder<span class="hljs-regexp">/train/</span>second_audio_file.mp3
folder<span class="hljs-regexp">/train/</span>third_audio_file.mp3`}}),la=new ha({props:{code:`file_name,transcription
first_audio_file.mp3,znowu si\u0119 duch z cia\u0142em zro\u015Bnie w m\u0142odocianej wstaniesz wiosnie i mo\u017Cesz skutkiem tych lek\xF3w umiera\u0107 wstawa\u0107 wiek wiek\xF3w dalej tam by\u0142y przestrogi jak sieka\u0107 g\u0142ow\u0119 jak nogi
second_audio_file.mp3,ju\u017C u \u017Awierzy\u0144ca podwoj\xF3w kr\xF3l zasiada przy nim ksi\u0105\u017C\u0119ta i panowie rada a gdzie wznios\u0142y kr\u0105\u017Cy\u0142 ganek rycerze obok kochanek kr\xF3l skin\u0105\u0142 palcem zacz\u0119to igrzysko
third_audio_file.mp3,pewnie k\u0119dy\u015B w ob\u0142\u0119dzie ubite min\u0119\u0142y szlaki zaczekajmy dzie\u0144 jaki po\u015Blemy szuka\u0107 wsz\u0119dzie dzi\u015B jutro pewnie b\u0119dzie pos\u0142ali wsz\u0119dzie s\u0142ugi czekali dzie\u0144 i drugi gdy nic nie doczekali z p\u0142aczem chc\u0105 jecha\u0107 dali`,highlighted:`file_name,transcription
first_audio_file.mp3,znowu si\u0119 duch z cia\u0142em zro\u015Bnie w m\u0142odocianej wstaniesz wiosnie i mo\u017Cesz skutkiem tych lek\xF3w umiera\u0107 wstawa\u0107 wiek wiek\xF3w dalej tam by\u0142y przestrogi jak sieka\u0107 g\u0142ow\u0119 jak nogi
second_audio_file.mp3,ju\u017C u \u017Awierzy\u0144ca podwoj\xF3w kr\xF3l zasiada przy nim ksi\u0105\u017C\u0119ta i panowie rada a gdzie wznios\u0142y kr\u0105\u017Cy\u0142 ganek rycerze obok kochanek kr\xF3l skin\u0105\u0142 palcem zacz\u0119to igrzysko
third_audio_file.mp3,pewnie k\u0119dy\u015B w ob\u0142\u0119dzie ubite min\u0119\u0142y szlaki zaczekajmy dzie\u0144 jaki po\u015Blemy szuka\u0107 wsz\u0119dzie dzi\u015B jutro pewnie b\u0119dzie pos\u0142ali wsz\u0119dzie s\u0142ugi czekali dzie\u0144 i drugi gdy nic nie doczekali z p\u0142aczem chc\u0105 jecha\u0107 dali`}}),ia=new ha({props:{code:`from datasets import load_dataset

dataset = load_dataset("audiofolder", data_dir="/path/to/folder")
# OR by specifying the list of files
dataset = load_dataset("audiofolder", data_files=["path/to/audio_1", "path/to/audio_2", ..., "path/to/audio_n"])`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;audiofolder&quot;</span>, data_dir=<span class="hljs-string">&quot;/path/to/folder&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># OR by specifying the list of files</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;audiofolder&quot;</span>, data_files=[<span class="hljs-string">&quot;path/to/audio_1&quot;</span>, <span class="hljs-string">&quot;path/to/audio_2&quot;</span>, ..., <span class="hljs-string">&quot;path/to/audio_n&quot;</span>])`}}),ra=new ha({props:{code:`dataset = load_dataset("audiofolder", data_files=["https://foo.bar/audio_1", "https://foo.bar/audio_2", ..., "https://foo.bar/audio_n"]
# for example, pass SpeechCommands archive:
dataset = load_dataset("audiofolder", data_files="https://s3.amazonaws.com/datasets.huggingface.co/SpeechCommands/v0.01/v0.01_test.tar.gz")`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;audiofolder&quot;</span>, data_files=[<span class="hljs-string">&quot;https://foo.bar/audio_1&quot;</span>, <span class="hljs-string">&quot;https://foo.bar/audio_2&quot;</span>, ..., <span class="hljs-string">&quot;https://foo.bar/audio_n&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># for example, pass SpeechCommands archive:</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;audiofolder&quot;</span>, data_files=<span class="hljs-string">&quot;https://s3.amazonaws.com/datasets.huggingface.co/SpeechCommands/v0.01/v0.01_test.tar.gz&quot;</span>)`}}),da=new ha({props:{code:`from datasets import load_dataset

dataset = load_dataset("audiofolder", data_dir="/path/to/folder", drop_metadata=True)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;audiofolder&quot;</span>, data_dir=<span class="hljs-string">&quot;/path/to/folder&quot;</span>, drop_metadata=<span class="hljs-literal">True</span>)`}}),na=new ha({props:{code:`from datasets import load_dataset

dataset = load_dataset("audiofolder", data_dir="/path/to/folder_without_metadata", drop_labels=True)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;audiofolder&quot;</span>, data_dir=<span class="hljs-string">&quot;/path/to/folder_without_metadata&quot;</span>, drop_labels=<span class="hljs-literal">True</span>)`}}),B=new Es({props:{$$slots:{default:[bs]},$$scope:{ctx:Qa}}}),{c(){h=l("meta"),N=p(),c=l("h1"),E=l("a"),P=l("span"),w(_.$$.fragment),V=p(),O=l("span"),S=s("Load audio data"),g=p(),m=l("p"),ca=s("You can load an audio dataset using the "),ma=l("a"),qt=s("Audio"),xt=s(` feature that automatically decodes and resamples the audio files when you access the examples.
Audio decoding is based on the `),W=l("a"),ba=l("code"),Ct=s("soundfile"),Pt=s(" python package, which uses the "),X=l("a"),za=l("code"),Ot=s("libsndfile"),St=s(" C library under the hood."),Va=p(),D=l("h2"),L=l("a"),Aa=l("span"),w(Z.$$.fragment),Dt=p(),qa=l("span"),Tt=s("Installation"),Wa=p(),A=l("p"),Ft=s("To work with audio datasets, you need to have the "),xa=l("code"),It=s("audio"),Nt=s(` dependencies installed.
Check out the `),_a=l("a"),Lt=s("installation"),Yt=s(" guide to learn how to install it."),Xa=p(),T=l("h2"),Y=l("a"),Ca=l("span"),w(aa.$$.fragment),Ht=p(),Pa=l("span"),Mt=s("Local files"),Za=p(),q=l("p"),Rt=s("You can load your own dataset using the paths to your audio files. Use the "),ga=l("a"),Ut=s("cast_column()"),Jt=s(" function to take a column of audio file paths, and cast it to the "),wa=l("a"),Bt=s("Audio"),Gt=s(" feature:"),at=p(),w(ta.$$.fragment),tt=p(),F=l("h2"),H=l("a"),Oa=l("span"),w(ea.$$.fragment),Kt=p(),Sa=l("span"),Qt=s("AudioFolder"),et=p(),M=l("p"),Vt=s("You can also load a dataset with an "),Da=l("code"),Wt=s("AudioFolder"),Xt=s(" dataset builder. It does not require writing a custom dataloader, making it useful for quickly creating and loading audio datasets with several thousand audio files."),st=p(),I=l("h2"),R=l("a"),Ta=l("span"),w(sa.$$.fragment),Zt=p(),Fa=l("span"),ae=s("AudioFolder with metadata"),ot=p(),U=l("p"),te=s("To link your audio files with metadata information, make sure your dataset has a "),Ia=l("code"),ee=s("metadata.csv"),se=s(" file. Your dataset structure might look like:"),lt=p(),w(oa.$$.fragment),it=p(),b=l("p"),oe=s("Your "),Na=l("code"),le=s("metadata.csv"),ie=s(" file must have a "),La=l("code"),re=s("file_name"),de=s(" column which links audio files with their metadata. An example "),Ya=l("code"),ne=s("metadata.csv"),ue=s(" file might look like:"),rt=p(),w(la.$$.fragment),dt=p(),z=l("p"),Ha=l("code"),pe=s("AudioFolder"),fe=s(" will load audio data and create a "),Ma=l("code"),he=s("transcription"),ce=s(" column containing texts from "),Ra=l("code"),me=s("metadata.csv"),_e=s(":"),nt=p(),w(ia.$$.fragment),ut=p(),va=l("p"),ge=s("You can load remote datasets from their URLs with the data_files parameter:"),pt=p(),w(ra.$$.fragment),ft=p(),J=l("p"),we=s("Metadata can also be specified as JSON Lines, in which case use "),Ua=l("code"),ve=s("metadata.jsonl"),ke=s(" as the name of the metadata file. This format is helpful in scenarios when one of the columns is complex, e.g. a list of floats, to avoid parsing errors or reading the complex values as strings."),ht=p(),x=l("p"),$e=s("To ignore the information in the metadata file, set "),Ja=l("code"),ye=s("drop_metadata=True"),je=s(" in "),ka=l("a"),Ee=s("load_dataset()"),be=s(":"),ct=p(),w(da.$$.fragment),mt=p(),C=l("p"),ze=s("If you don\u2019t have a metadata file, "),Ba=l("code"),Ae=s("AudioFolder"),qe=s(` automatically infers the label name from the directory name.
If you want to drop automatically created labels, set `),Ga=l("code"),xe=s("drop_labels=True"),Ce=s(`.
In this case, your dataset will only contain an audio column:`),_t=p(),w(na.$$.fragment),gt=p(),w(B.$$.fragment),wt=p(),G=l("p"),Pe=s("For a guide on how to load any type of dataset, take a look at the "),ua=l("a"),Oe=s("general loading guide"),Se=s("."),this.h()},l(a){const d=ys('[data-svelte="svelte-1phssyn"]',document.head);h=i(d,"META",{name:!0,content:!0}),d.forEach(e),N=f(a),c=i(a,"H1",{class:!0});var pa=r(c);E=i(pa,"A",{id:!0,class:!0,href:!0});var De=r(E);P=i(De,"SPAN",{});var Te=r(P);v(_.$$.fragment,Te),Te.forEach(e),De.forEach(e),V=f(pa),O=i(pa,"SPAN",{});var Fe=r(O);S=o(Fe,"Load audio data"),Fe.forEach(e),pa.forEach(e),g=f(a),m=i(a,"P",{});var K=r(m);ca=o(K,"You can load an audio dataset using the "),ma=i(K,"A",{href:!0});var Ie=r(ma);qt=o(Ie,"Audio"),Ie.forEach(e),xt=o(K,` feature that automatically decodes and resamples the audio files when you access the examples.
Audio decoding is based on the `),W=i(K,"A",{href:!0,rel:!0});var Ne=r(W);ba=i(Ne,"CODE",{});var Le=r(ba);Ct=o(Le,"soundfile"),Le.forEach(e),Ne.forEach(e),Pt=o(K," python package, which uses the "),X=i(K,"A",{href:!0,rel:!0});var Ye=r(X);za=i(Ye,"CODE",{});var He=r(za);Ot=o(He,"libsndfile"),He.forEach(e),Ye.forEach(e),St=o(K," C library under the hood."),K.forEach(e),Va=f(a),D=i(a,"H2",{class:!0});var kt=r(D);L=i(kt,"A",{id:!0,class:!0,href:!0});var Me=r(L);Aa=i(Me,"SPAN",{});var Re=r(Aa);v(Z.$$.fragment,Re),Re.forEach(e),Me.forEach(e),Dt=f(kt),qa=i(kt,"SPAN",{});var Ue=r(qa);Tt=o(Ue,"Installation"),Ue.forEach(e),kt.forEach(e),Wa=f(a),A=i(a,"P",{});var $a=r(A);Ft=o($a,"To work with audio datasets, you need to have the "),xa=i($a,"CODE",{});var Je=r(xa);It=o(Je,"audio"),Je.forEach(e),Nt=o($a,` dependencies installed.
Check out the `),_a=i($a,"A",{href:!0});var Be=r(_a);Lt=o(Be,"installation"),Be.forEach(e),Yt=o($a," guide to learn how to install it."),$a.forEach(e),Xa=f(a),T=i(a,"H2",{class:!0});var $t=r(T);Y=i($t,"A",{id:!0,class:!0,href:!0});var Ge=r(Y);Ca=i(Ge,"SPAN",{});var Ke=r(Ca);v(aa.$$.fragment,Ke),Ke.forEach(e),Ge.forEach(e),Ht=f($t),Pa=i($t,"SPAN",{});var Qe=r(Pa);Mt=o(Qe,"Local files"),Qe.forEach(e),$t.forEach(e),Za=f(a),q=i(a,"P",{});var ya=r(q);Rt=o(ya,"You can load your own dataset using the paths to your audio files. Use the "),ga=i(ya,"A",{href:!0});var Ve=r(ga);Ut=o(Ve,"cast_column()"),Ve.forEach(e),Jt=o(ya," function to take a column of audio file paths, and cast it to the "),wa=i(ya,"A",{href:!0});var We=r(wa);Bt=o(We,"Audio"),We.forEach(e),Gt=o(ya," feature:"),ya.forEach(e),at=f(a),v(ta.$$.fragment,a),tt=f(a),F=i(a,"H2",{class:!0});var yt=r(F);H=i(yt,"A",{id:!0,class:!0,href:!0});var Xe=r(H);Oa=i(Xe,"SPAN",{});var Ze=r(Oa);v(ea.$$.fragment,Ze),Ze.forEach(e),Xe.forEach(e),Kt=f(yt),Sa=i(yt,"SPAN",{});var as=r(Sa);Qt=o(as,"AudioFolder"),as.forEach(e),yt.forEach(e),et=f(a),M=i(a,"P",{});var jt=r(M);Vt=o(jt,"You can also load a dataset with an "),Da=i(jt,"CODE",{});var ts=r(Da);Wt=o(ts,"AudioFolder"),ts.forEach(e),Xt=o(jt," dataset builder. It does not require writing a custom dataloader, making it useful for quickly creating and loading audio datasets with several thousand audio files."),jt.forEach(e),st=f(a),I=i(a,"H2",{class:!0});var Et=r(I);R=i(Et,"A",{id:!0,class:!0,href:!0});var es=r(R);Ta=i(es,"SPAN",{});var ss=r(Ta);v(sa.$$.fragment,ss),ss.forEach(e),es.forEach(e),Zt=f(Et),Fa=i(Et,"SPAN",{});var os=r(Fa);ae=o(os,"AudioFolder with metadata"),os.forEach(e),Et.forEach(e),ot=f(a),U=i(a,"P",{});var bt=r(U);te=o(bt,"To link your audio files with metadata information, make sure your dataset has a "),Ia=i(bt,"CODE",{});var ls=r(Ia);ee=o(ls,"metadata.csv"),ls.forEach(e),se=o(bt," file. Your dataset structure might look like:"),bt.forEach(e),lt=f(a),v(oa.$$.fragment,a),it=f(a),b=i(a,"P",{});var Q=r(b);oe=o(Q,"Your "),Na=i(Q,"CODE",{});var is=r(Na);le=o(is,"metadata.csv"),is.forEach(e),ie=o(Q," file must have a "),La=i(Q,"CODE",{});var rs=r(La);re=o(rs,"file_name"),rs.forEach(e),de=o(Q," column which links audio files with their metadata. An example "),Ya=i(Q,"CODE",{});var ds=r(Ya);ne=o(ds,"metadata.csv"),ds.forEach(e),ue=o(Q," file might look like:"),Q.forEach(e),rt=f(a),v(la.$$.fragment,a),dt=f(a),z=i(a,"P",{});var fa=r(z);Ha=i(fa,"CODE",{});var ns=r(Ha);pe=o(ns,"AudioFolder"),ns.forEach(e),fe=o(fa," will load audio data and create a "),Ma=i(fa,"CODE",{});var us=r(Ma);he=o(us,"transcription"),us.forEach(e),ce=o(fa," column containing texts from "),Ra=i(fa,"CODE",{});var ps=r(Ra);me=o(ps,"metadata.csv"),ps.forEach(e),_e=o(fa,":"),fa.forEach(e),nt=f(a),v(ia.$$.fragment,a),ut=f(a),va=i(a,"P",{});var fs=r(va);ge=o(fs,"You can load remote datasets from their URLs with the data_files parameter:"),fs.forEach(e),pt=f(a),v(ra.$$.fragment,a),ft=f(a),J=i(a,"P",{});var zt=r(J);we=o(zt,"Metadata can also be specified as JSON Lines, in which case use "),Ua=i(zt,"CODE",{});var hs=r(Ua);ve=o(hs,"metadata.jsonl"),hs.forEach(e),ke=o(zt," as the name of the metadata file. This format is helpful in scenarios when one of the columns is complex, e.g. a list of floats, to avoid parsing errors or reading the complex values as strings."),zt.forEach(e),ht=f(a),x=i(a,"P",{});var ja=r(x);$e=o(ja,"To ignore the information in the metadata file, set "),Ja=i(ja,"CODE",{});var cs=r(Ja);ye=o(cs,"drop_metadata=True"),cs.forEach(e),je=o(ja," in "),ka=i(ja,"A",{href:!0});var ms=r(ka);Ee=o(ms,"load_dataset()"),ms.forEach(e),be=o(ja,":"),ja.forEach(e),ct=f(a),v(da.$$.fragment,a),mt=f(a),C=i(a,"P",{});var Ea=r(C);ze=o(Ea,"If you don\u2019t have a metadata file, "),Ba=i(Ea,"CODE",{});var _s=r(Ba);Ae=o(_s,"AudioFolder"),_s.forEach(e),qe=o(Ea,` automatically infers the label name from the directory name.
If you want to drop automatically created labels, set `),Ga=i(Ea,"CODE",{});var gs=r(Ga);xe=o(gs,"drop_labels=True"),gs.forEach(e),Ce=o(Ea,`.
In this case, your dataset will only contain an audio column:`),Ea.forEach(e),_t=f(a),v(na.$$.fragment,a),gt=f(a),v(B.$$.fragment,a),wt=f(a),G=i(a,"P",{});var At=r(G);Pe=o(At,"For a guide on how to load any type of dataset, take a look at the "),ua=i(At,"A",{class:!0,href:!0});var ws=r(ua);Oe=o(ws,"general loading guide"),ws.forEach(e),Se=o(At,"."),At.forEach(e),this.h()},h(){u(h,"name","hf:doc:metadata"),u(h,"content",JSON.stringify(As)),u(E,"id","load-audio-data"),u(E,"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"),u(E,"href","#load-audio-data"),u(c,"class","relative group"),u(ma,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Audio"),u(W,"href","https://github.com/bastibe/python-soundfile"),u(W,"rel","nofollow"),u(X,"href","https://github.com/libsndfile/libsndfile"),u(X,"rel","nofollow"),u(L,"id","installation"),u(L,"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"),u(L,"href","#installation"),u(D,"class","relative group"),u(_a,"href","./installation#audio"),u(Y,"id","local-files"),u(Y,"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"),u(Y,"href","#local-files"),u(T,"class","relative group"),u(ga,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Dataset.cast_column"),u(wa,"href","/docs/datasets/v2.11.0/en/package_reference/main_classes#datasets.Audio"),u(H,"id","audiofolder"),u(H,"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"),u(H,"href","#audiofolder"),u(F,"class","relative group"),u(R,"id","audiofolder-with-metadata"),u(R,"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"),u(R,"href","#audiofolder-with-metadata"),u(I,"class","relative group"),u(ka,"href","/docs/datasets/v2.11.0/en/package_reference/loading_methods#datasets.load_dataset"),u(ua,"class","underline decoration-sky-400 decoration-2 font-semibold"),u(ua,"href","./loading")},m(a,d){t(document.head,h),n(a,N,d),n(a,c,d),t(c,E),t(E,P),k(_,P,null),t(c,V),t(c,O),t(O,S),n(a,g,d),n(a,m,d),t(m,ca),t(m,ma),t(ma,qt),t(m,xt),t(m,W),t(W,ba),t(ba,Ct),t(m,Pt),t(m,X),t(X,za),t(za,Ot),t(m,St),n(a,Va,d),n(a,D,d),t(D,L),t(L,Aa),k(Z,Aa,null),t(D,Dt),t(D,qa),t(qa,Tt),n(a,Wa,d),n(a,A,d),t(A,Ft),t(A,xa),t(xa,It),t(A,Nt),t(A,_a),t(_a,Lt),t(A,Yt),n(a,Xa,d),n(a,T,d),t(T,Y),t(Y,Ca),k(aa,Ca,null),t(T,Ht),t(T,Pa),t(Pa,Mt),n(a,Za,d),n(a,q,d),t(q,Rt),t(q,ga),t(ga,Ut),t(q,Jt),t(q,wa),t(wa,Bt),t(q,Gt),n(a,at,d),k(ta,a,d),n(a,tt,d),n(a,F,d),t(F,H),t(H,Oa),k(ea,Oa,null),t(F,Kt),t(F,Sa),t(Sa,Qt),n(a,et,d),n(a,M,d),t(M,Vt),t(M,Da),t(Da,Wt),t(M,Xt),n(a,st,d),n(a,I,d),t(I,R),t(R,Ta),k(sa,Ta,null),t(I,Zt),t(I,Fa),t(Fa,ae),n(a,ot,d),n(a,U,d),t(U,te),t(U,Ia),t(Ia,ee),t(U,se),n(a,lt,d),k(oa,a,d),n(a,it,d),n(a,b,d),t(b,oe),t(b,Na),t(Na,le),t(b,ie),t(b,La),t(La,re),t(b,de),t(b,Ya),t(Ya,ne),t(b,ue),n(a,rt,d),k(la,a,d),n(a,dt,d),n(a,z,d),t(z,Ha),t(Ha,pe),t(z,fe),t(z,Ma),t(Ma,he),t(z,ce),t(z,Ra),t(Ra,me),t(z,_e),n(a,nt,d),k(ia,a,d),n(a,ut,d),n(a,va,d),t(va,ge),n(a,pt,d),k(ra,a,d),n(a,ft,d),n(a,J,d),t(J,we),t(J,Ua),t(Ua,ve),t(J,ke),n(a,ht,d),n(a,x,d),t(x,$e),t(x,Ja),t(Ja,ye),t(x,je),t(x,ka),t(ka,Ee),t(x,be),n(a,ct,d),k(da,a,d),n(a,mt,d),n(a,C,d),t(C,ze),t(C,Ba),t(Ba,Ae),t(C,qe),t(C,Ga),t(Ga,xe),t(C,Ce),n(a,_t,d),k(na,a,d),n(a,gt,d),k(B,a,d),n(a,wt,d),n(a,G,d),t(G,Pe),t(G,ua),t(ua,Oe),t(G,Se),vt=!0},p(a,[d]){const pa={};d&2&&(pa.$$scope={dirty:d,ctx:a}),B.$set(pa)},i(a){vt||($(_.$$.fragment,a),$(Z.$$.fragment,a),$(aa.$$.fragment,a),$(ta.$$.fragment,a),$(ea.$$.fragment,a),$(sa.$$.fragment,a),$(oa.$$.fragment,a),$(la.$$.fragment,a),$(ia.$$.fragment,a),$(ra.$$.fragment,a),$(da.$$.fragment,a),$(na.$$.fragment,a),$(B.$$.fragment,a),vt=!0)},o(a){y(_.$$.fragment,a),y(Z.$$.fragment,a),y(aa.$$.fragment,a),y(ta.$$.fragment,a),y(ea.$$.fragment,a),y(sa.$$.fragment,a),y(oa.$$.fragment,a),y(la.$$.fragment,a),y(ia.$$.fragment,a),y(ra.$$.fragment,a),y(da.$$.fragment,a),y(na.$$.fragment,a),y(B.$$.fragment,a),vt=!1},d(a){e(h),a&&e(N),a&&e(c),j(_),a&&e(g),a&&e(m),a&&e(Va),a&&e(D),j(Z),a&&e(Wa),a&&e(A),a&&e(Xa),a&&e(T),j(aa),a&&e(Za),a&&e(q),a&&e(at),j(ta,a),a&&e(tt),a&&e(F),j(ea),a&&e(et),a&&e(M),a&&e(st),a&&e(I),j(sa),a&&e(ot),a&&e(U),a&&e(lt),j(oa,a),a&&e(it),a&&e(b),a&&e(rt),j(la,a),a&&e(dt),a&&e(z),a&&e(nt),j(ia,a),a&&e(ut),a&&e(va),a&&e(pt),j(ra,a),a&&e(ft),a&&e(J),a&&e(ht),a&&e(x),a&&e(ct),j(da,a),a&&e(mt),a&&e(C),a&&e(_t),j(na,a),a&&e(gt),j(B,a),a&&e(wt),a&&e(G)}}}const As={local:"load-audio-data",sections:[{local:"installation",title:"Installation"},{local:"local-files",title:"Local files"},{local:"audiofolder",title:"AudioFolder"},{local:"audiofolder-with-metadata",title:"AudioFolder with metadata"}],title:"Load audio data"};function qs(Qa){return js(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ss extends vs{constructor(h){super();ks(this,h,qs,zs,$s,{})}}export{Ss as default,As as metadata};
