import{S as Ba,i as Na,s as _a,e as M,k as U,w as x,t as n,M as Va,c as o,d as a,m as r,a as i,x as R,h as y,b as J,G as e,g as l,y as z,L as Za,q as F,o as W,B as Y,v as xa}from"../../chunks/vendor-hf-doc-builder.js";import{I as Ra}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{C as ls}from"../../chunks/CodeBlock-hf-doc-builder.js";function za(ra){let T,Ms,u,C,G,A,vs,X,Ds,ns,v,ks,os,w,Qs,O,Bs,Ns,m,_s,Vs,$,Zs,xs,ys,h,Rs,g,zs,Fs,is,D,Ws,Us,p,L,Ys,Gs,P,Xs,Os,H,$s,rs,k,Ls,ws,Q,Ps,ps,d,Hs,K,Ks,sa,Js,f,Ts,B,aa,us,j,ea,ss,ta,la,Cs,E,hs,N,as,Ma,ds,q,js,c,na,es,oa,ya,cs,S,Is,_,ts,ia,As,b,ms,V,Ua,gs;return A=new Ra({}),f=new ls({props:{code:"Z2lnYXNwZWVjaCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJzcGVlY2hjb2xhYiUyRmdpZ2FzcGVlY2glMjIlMkMlMjAlMjJ4cyUyMiUyQyUyMHN0cmVhbWluZyUzRFRydWUp",highlighted:'gigaspeech = load_dataset(<span class="hljs-string">&quot;speechcolab/gigaspeech&quot;</span>, <span class="hljs-string">&quot;xs&quot;</span>, streaming=<span class="hljs-literal">True</span>)'}}),E=new ls({props:{code:"bmV4dChpdGVyKGdpZ2FzcGVlY2glNUIlMjJ0cmFpbiUyMiU1RCkp",highlighted:'<span class="hljs-built_in">next</span>(<span class="hljs-built_in">iter</span>(gigaspeech[<span class="hljs-string">&quot;train&quot;</span>]))'}}),q=new ls({props:{code:"JTdCJTBBJTIwJTIwJTIwJTIwJTIyc2VnbWVudF9pZCUyMiUzQSUyMCUyMllPVTAwMDAwMDAzMTVfUzAwMDA2NjAlMjIlMkMlMEElMjAlMjAlMjAlMjAlMjJzcGVha2VyJTIyJTNBJTIwJTIyTiUyRkElMjIlMkMlMEElMjAlMjAlMjAlMjAlMjJ0ZXh0JTIyJTNBJTIwJTIyQVMlMjBUSEVZJ1JFJTIwTEVBVklORyUyMCUzQ0NPTU1BJTNFJTIwQ0FOJTIwS0FTSCUyMFBVTEwlMjBaQUhSQSUyMEFTSURFJTIwUkVBTExZJTIwUVVJQ0tMWSUyMCUzQ1FVRVNUSU9OTUFSSyUzRSUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMmF1ZGlvJTIyJTNBJTIwJTdCJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIycGF0aCUyMiUzQSUyMCUyMnhzX2NodW5rc18wMDAwJTJGWU9VMDAwMDAwMDMxNV9TMDAwMDY2MC53YXYlMjIlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJhcnJheSUyMiUzQSUyMGFycmF5KCUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCU1QjAuMDAwNTE4OCUyQyUyMDAuMDAwODU0NDklMkMlMjAwLjAwMDEyMjA3JTJDJTIwLi4uJTJDJTIwMC4wMDEyNTEyMiUyQyUyMDAuMDAwNzYyOTQlMkMlMjAwLjAwMDM2NjIxJTVEJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwKSUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMnNhbXBsaW5nX3JhdGUlMjIlM0ElMjAxNjAwMCUyQyUwQSUyMCUyMCUyMCUyMCU3RCUyQyUwQSUyMCUyMCUyMCUyMCUyMmJlZ2luX3RpbWUlMjIlM0ElMjAyOTQxLjg5JTJDJTBBJTIwJTIwJTIwJTIwJTIyZW5kX3RpbWUlMjIlM0ElMjAyOTQ1LjA3JTJDJTBBJTIwJTIwJTIwJTIwJTIyYXVkaW9faWQlMjIlM0ElMjAlMjJZT1UwMDAwMDAwMzE1JTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIydGl0bGUlMjIlM0ElMjAlMjJSZXR1cm4lMjB0byUyMFZhc3NlbGhlaW0lMjAlN0MlMjBDcml0aWNhbCUyMFJvbGUlM0ElMjBWT1glMjBNQUNISU5BJTIwJTdDJTIwRXBpc29kZSUyMDQzJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIydXJsJTIyJTNBJTIwJTIyaHR0cHMlM0ElMkYlMkZ3d3cueW91dHViZS5jb20lMkZ3YXRjaCUzRnYlM0R6cjJuMWZMVmFzVSUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMnNvdXJjZSUyMiUzQSUyMDIlMkMlMEElMjAlMjAlMjAlMjAlMjJjYXRlZ29yeSUyMiUzQSUyMDI0JTJDJTBBJTIwJTIwJTIwJTIwJTIyb3JpZ2luYWxfZnVsbF9wYXRoJTIyJTNBJTIwJTIyYXVkaW8lMkZ5b3V0dWJlJTJGUDAwMDQlMkZZT1UwMDAwMDAwMzE1Lm9wdXMlMjIlMkMlMEElN0Q=",highlighted:`{
    <span class="hljs-string">&quot;segment_id&quot;</span>: <span class="hljs-string">&quot;YOU0000000315_S0000660&quot;</span>,
    <span class="hljs-string">&quot;speaker&quot;</span>: <span class="hljs-string">&quot;N/A&quot;</span>,
    <span class="hljs-string">&quot;text&quot;</span>: <span class="hljs-string">&quot;AS THEY&#x27;RE LEAVING &lt;COMMA&gt; CAN KASH PULL ZAHRA ASIDE REALLY QUICKLY &lt;QUESTIONMARK&gt;&quot;</span>,
    <span class="hljs-string">&quot;audio&quot;</span>: {
        <span class="hljs-string">&quot;path&quot;</span>: <span class="hljs-string">&quot;xs_chunks_0000/YOU0000000315_S0000660.wav&quot;</span>,
        <span class="hljs-string">&quot;array&quot;</span>: <span class="hljs-built_in">array</span>(
            <span class="hljs-selector-attr">[0.0005188, 0.00085449, 0.00012207, ..., 0.00125122, 0.00076294, 0.00036621]</span>
        ),
        <span class="hljs-string">&quot;sampling_rate&quot;</span>: <span class="hljs-number">16000</span>,
    },
    <span class="hljs-string">&quot;begin_time&quot;</span>: <span class="hljs-number">2941.89</span>,
    <span class="hljs-string">&quot;end_time&quot;</span>: <span class="hljs-number">2945.07</span>,
    <span class="hljs-string">&quot;audio_id&quot;</span>: <span class="hljs-string">&quot;YOU0000000315&quot;</span>,
    <span class="hljs-string">&quot;title&quot;</span>: <span class="hljs-string">&quot;Return to Vasselheim | Critical Role: VOX MACHINA | Episode 43&quot;</span>,
    <span class="hljs-string">&quot;url&quot;</span>: <span class="hljs-string">&quot;https://www.youtube.com/watch?v=zr2n1fLVasU&quot;</span>,
    <span class="hljs-string">&quot;source&quot;</span>: <span class="hljs-number">2</span>,
    <span class="hljs-string">&quot;category&quot;</span>: <span class="hljs-number">24</span>,
    <span class="hljs-string">&quot;original_full_path&quot;</span>: <span class="hljs-string">&quot;audio/youtube/P0004/YOU0000000315.opus&quot;</span>,
}`}}),S=new ls({props:{code:"Z2lnYXNwZWVjaF9oZWFkJTIwJTNEJTIwZ2lnYXNwZWVjaCU1QiUyMnRyYWluJTIyJTVELnRha2UoMiklMEFsaXN0KGdpZ2FzcGVlY2hfaGVhZCk=",highlighted:`gigaspeech_head = gigaspeech[<span class="hljs-string">&quot;train&quot;</span>].take(<span class="hljs-number">2</span>)
<span class="hljs-built_in">list</span>(gigaspeech_head)`}}),b=new ls({props:{code:" ",highlighted:`[
    {
        <span class="hljs-string">&quot;segment_id&quot;</span>: <span class="hljs-string">&quot;YOU0000000315_S0000660&quot;</span>,
        <span class="hljs-string">&quot;speaker&quot;</span>: <span class="hljs-string">&quot;N/A&quot;</span>,
        <span class="hljs-string">&quot;text&quot;</span>: <span class="hljs-string">&quot;AS THEY&#x27;RE LEAVING &lt;COMMA&gt; CAN KASH PULL ZAHRA ASIDE REALLY QUICKLY &lt;QUESTIONMARK&gt;&quot;</span>,
        <span class="hljs-string">&quot;audio&quot;</span>: {
            <span class="hljs-string">&quot;path&quot;</span>: <span class="hljs-string">&quot;xs_chunks_0000/YOU0000000315_S0000660.wav&quot;</span>,
            <span class="hljs-string">&quot;array&quot;</span>: array(
                [
                    <span class="hljs-number">0.0005188</span>,
                    <span class="hljs-number">0.00085449</span>,
                    <span class="hljs-number">0.00012207</span>,
                    ...,
                    <span class="hljs-number">0.00125122</span>,
                    <span class="hljs-number">0.00076294</span>,
                    <span class="hljs-number">0.00036621</span>,
                ]
            ),
            <span class="hljs-string">&quot;sampling_rate&quot;</span>: <span class="hljs-number">16000</span>,
        },
        <span class="hljs-string">&quot;begin_time&quot;</span>: <span class="hljs-number">2941.89</span>,
        <span class="hljs-string">&quot;end_time&quot;</span>: <span class="hljs-number">2945.07</span>,
        <span class="hljs-string">&quot;audio_id&quot;</span>: <span class="hljs-string">&quot;YOU0000000315&quot;</span>,
        <span class="hljs-string">&quot;title&quot;</span>: <span class="hljs-string">&quot;Return to Vasselheim | Critical Role: VOX MACHINA | Episode 43&quot;</span>,
        <span class="hljs-string">&quot;url&quot;</span>: <span class="hljs-string">&quot;https://www.youtube.com/watch?v=zr2n1fLVasU&quot;</span>,
        <span class="hljs-string">&quot;source&quot;</span>: <span class="hljs-number">2</span>,
        <span class="hljs-string">&quot;category&quot;</span>: <span class="hljs-number">24</span>,
        <span class="hljs-string">&quot;original_full_path&quot;</span>: <span class="hljs-string">&quot;audio/youtube/P0004/YOU0000000315.opus&quot;</span>,
    },
    {
        <span class="hljs-string">&quot;segment_id&quot;</span>: <span class="hljs-string">&quot;AUD0000001043_S0000775&quot;</span>,
        <span class="hljs-string">&quot;speaker&quot;</span>: <span class="hljs-string">&quot;N/A&quot;</span>,
        <span class="hljs-string">&quot;text&quot;</span>: <span class="hljs-string">&quot;SIX TOMATOES &lt;PERIOD&gt;&quot;</span>,
        <span class="hljs-string">&quot;audio&quot;</span>: {
            <span class="hljs-string">&quot;path&quot;</span>: <span class="hljs-string">&quot;xs_chunks_0000/AUD0000001043_S0000775.wav&quot;</span>,
            <span class="hljs-string">&quot;array&quot;</span>: array(
                [
                    <span class="hljs-number">1.43432617</span>e-03,
                    <span class="hljs-number">1.37329102</span>e-03,
                    <span class="hljs-number">1.31225586</span>e-03,
                    ...,
                    <span class="hljs-number">-6.10351562</span>e-05,
                    <span class="hljs-number">-1.22070312</span>e-04,
                    <span class="hljs-number">-1.83105469</span>e-04,
                ]
            ),
            <span class="hljs-string">&quot;sampling_rate&quot;</span>: <span class="hljs-number">16000</span>,
        },
        <span class="hljs-string">&quot;begin_time&quot;</span>: <span class="hljs-number">3673.96</span>,
        <span class="hljs-string">&quot;end_time&quot;</span>: <span class="hljs-number">3675.26</span>,
        <span class="hljs-string">&quot;audio_id&quot;</span>: <span class="hljs-string">&quot;AUD0000001043&quot;</span>,
        <span class="hljs-string">&quot;title&quot;</span>: <span class="hljs-string">&quot;Asteroid of Fear&quot;</span>,
        <span class="hljs-string">&quot;url&quot;</span>: <span class="hljs-string">&quot;http//www.archive.org/download/asteroid_of_fear_1012_librivox/asteroid_of_fear_1012_librivox_64kb_mp3.zip&quot;</span>,
        <span class="hljs-string">&quot;source&quot;</span>: <span class="hljs-number">0</span>,
        <span class="hljs-string">&quot;category&quot;</span>: <span class="hljs-number">28</span>,
        <span class="hljs-string">&quot;original_full_path&quot;</span>: <span class="hljs-string">&quot;audio/audiobook/P0011/AUD0000001043.opus&quot;</span>,
    },
]`}}),{c(){T=M("meta"),Ms=U(),u=M("h1"),C=M("a"),G=M("span"),x(A.$$.fragment),vs=U(),X=M("span"),Ds=n("Streaming audio data"),ns=U(),v=M("p"),ks=n(`One of the biggest challenges faced with audio datasets is their sheer size. A single minute of uncompressed CD-quality audio (44.1kHz, 16-bit)
takes up  a bit more than 5 MB of storage. Typically, an audio dataset would contains hours of recordings.`),os=U(),w=M("p"),Qs=n(`In the previous sections we used a very small subset of MINDS-14 audio dataset, however, typical audio datasets are much larger.
For example, the `),O=M("code"),Bs=n("xs"),Ns=n(" (smallest) configuration of "),m=M("a"),_s=n("GigaSpeech from SpeechColab"),Vs=n(`
contains only 10 hours of training data, but takes over 13GB of storage space for download and preparation. So what
happens when we want to train on a larger split? The full `),$=M("code"),Zs=n("xl"),xs=n(` configuration of the same dataset contains 10,000 hours of
training data, requiring over 1TB of storage space. For most of us, this well exceeds the specifications of a typical
hard drive disk. Do we need to fork out and buy additional storage? Or is there a way we can train on these datasets with no disk space constraints?`),ys=U(),h=M("p"),Rs=n("\u{1F917} Datasets comes to the rescue by offering the "),g=M("a"),zs=n("streaming mode"),Fs=n(`. Streaming allows us to load the data progressively as
we iterate over the dataset. Rather than downloading the whole dataset at once, we load the dataset one example at a time.
We iterate over the dataset, loading and preparing examples on the fly when they are needed. This way, we only ever
load the examples that we\u2019re using, and not the ones that we\u2019re not!
Once we\u2019re done with an example sample, we continue iterating over the dataset and load the next one.`),is=U(),D=M("p"),Ws=n("Streaming mode has three primary advantages over downloading the entire dataset at once:"),Us=U(),p=M("ul"),L=M("li"),Ys=n(`Disk space: examples are loaded to memory one-by-one as we iterate over the dataset. Since the data is not downloaded
locally, there are no disk space requirements, so you can use datasets of arbitrary size.`),Gs=U(),P=M("li"),Xs=n(`Download and processing time: audio datasets are large and need a significant amount of time to download and process.
With streaming, loading and processing is done on the fly, meaning you can start using the dataset as soon as the first
example is ready.`),Os=U(),H=M("li"),$s=n(`Easy experimentation: you can experiment on a handful of examples to check that your script works without having to
download the entire dataset.`),rs=U(),k=M("p"),Ls=n(`There is one caveat to streaming mode. When downloading a full dataset without streaming, both the raw data and processed
data are saved locally to disk. If we want to re-use this dataset, we can directly load the processed data from disk,
skipping the download and processing steps.  Consequently, we only have to perform the downloading and processing
operations once, after which we can re-use the prepared data.`),ws=U(),Q=M("p"),Ps=n(`With streaming mode, the data is not downloaded to disk. Thus, neither the downloaded nor pre-processed data are cached.
If we want to re-use the dataset, the streaming steps must be repeated, with the audio files loaded and processed on
the fly again. For this reason, it is advised to download datasets that you are likely to use multiple times.`),ps=U(),d=M("p"),Hs=n("How can you enable streaming mode? Easy! Just set "),K=M("code"),Ks=n("streaming=True"),sa=n(` when you load your dataset. The rest will be taken
care for you:`),Js=U(),x(f.$$.fragment),Ts=U(),B=M("p"),aa=n(`Just like we applied preprocessing steps to a downloaded subset of MINDS-14, you can do the same preprocessing with a
streaming dataset in the exactly the same manner.`),us=U(),j=M("p"),ea=n("The only difference is that you can no longer access individual samples using Python indexing (i.e. "),ss=M("code"),ta=n('gigaspeech["train"][sample_idx]'),la=n(`).
Instead, you have to iterate over the dataset. Here\u2019s how you can access an example when streaming a dataset:`),Cs=U(),x(E.$$.fragment),hs=U(),N=M("p"),as=M("strong"),Ma=n("Output:"),ds=U(),x(q.$$.fragment),js=U(),c=M("p"),na=n("If you\u2019d like to preview several examples from a large dataset, use the "),es=M("code"),oa=n("take()"),ya=n(` to get the first n elements. Let\u2019s grab
the first two examples in the gigaspeech dataset:`),cs=U(),x(S.$$.fragment),Is=U(),_=M("p"),ts=M("strong"),ia=n("Output:"),As=U(),x(b.$$.fragment),ms=U(),V=M("p"),Ua=n(`Streaming mode can take your research to the next level: not only are the biggest datasets accessible to you, but you
can easily evaluate systems over multiple datasets in one go without worrying about your disk space. Compared to
evaluating on a single dataset, multi-dataset evaluation gives a better metric for the generalisation abilities of a
speech recognition system (c.f. End-to-end Speech Benchmark (ESB)).`),this.h()},l(s){const t=Va('[data-svelte="svelte-1phssyn"]',document.head);T=o(t,"META",{name:!0,content:!0}),t.forEach(a),Ms=r(s),u=o(s,"H1",{class:!0});var fs=i(u);C=o(fs,"A",{id:!0,class:!0,href:!0});var wa=i(C);G=o(wa,"SPAN",{});var pa=i(G);R(A.$$.fragment,pa),pa.forEach(a),wa.forEach(a),vs=r(fs),X=o(fs,"SPAN",{});var Ja=i(X);Ds=y(Ja,"Streaming audio data"),Ja.forEach(a),fs.forEach(a),ns=r(s),v=o(s,"P",{});var Ta=i(v);ks=y(Ta,`One of the biggest challenges faced with audio datasets is their sheer size. A single minute of uncompressed CD-quality audio (44.1kHz, 16-bit)
takes up  a bit more than 5 MB of storage. Typically, an audio dataset would contains hours of recordings.`),Ta.forEach(a),os=r(s),w=o(s,"P",{});var I=i(w);Qs=y(I,`In the previous sections we used a very small subset of MINDS-14 audio dataset, however, typical audio datasets are much larger.
For example, the `),O=o(I,"CODE",{});var ua=i(O);Bs=y(ua,"xs"),ua.forEach(a),Ns=y(I," (smallest) configuration of "),m=o(I,"A",{href:!0,rel:!0});var Ca=i(m);_s=y(Ca,"GigaSpeech from SpeechColab"),Ca.forEach(a),Vs=y(I,`
contains only 10 hours of training data, but takes over 13GB of storage space for download and preparation. So what
happens when we want to train on a larger split? The full `),$=o(I,"CODE",{});var ha=i($);Zs=y(ha,"xl"),ha.forEach(a),xs=y(I,` configuration of the same dataset contains 10,000 hours of
training data, requiring over 1TB of storage space. For most of us, this well exceeds the specifications of a typical
hard drive disk. Do we need to fork out and buy additional storage? Or is there a way we can train on these datasets with no disk space constraints?`),I.forEach(a),ys=r(s),h=o(s,"P",{});var Es=i(h);Rs=y(Es,"\u{1F917} Datasets comes to the rescue by offering the "),g=o(Es,"A",{href:!0,rel:!0});var da=i(g);zs=y(da,"streaming mode"),da.forEach(a),Fs=y(Es,`. Streaming allows us to load the data progressively as
we iterate over the dataset. Rather than downloading the whole dataset at once, we load the dataset one example at a time.
We iterate over the dataset, loading and preparing examples on the fly when they are needed. This way, we only ever
load the examples that we\u2019re using, and not the ones that we\u2019re not!
Once we\u2019re done with an example sample, we continue iterating over the dataset and load the next one.`),Es.forEach(a),is=r(s),D=o(s,"P",{});var ja=i(D);Ws=y(ja,"Streaming mode has three primary advantages over downloading the entire dataset at once:"),ja.forEach(a),Us=r(s),p=o(s,"UL",{});var Z=i(p);L=o(Z,"LI",{});var ca=i(L);Ys=y(ca,`Disk space: examples are loaded to memory one-by-one as we iterate over the dataset. Since the data is not downloaded
locally, there are no disk space requirements, so you can use datasets of arbitrary size.`),ca.forEach(a),Gs=r(Z),P=o(Z,"LI",{});var Ia=i(P);Xs=y(Ia,`Download and processing time: audio datasets are large and need a significant amount of time to download and process.
With streaming, loading and processing is done on the fly, meaning you can start using the dataset as soon as the first
example is ready.`),Ia.forEach(a),Os=r(Z),H=o(Z,"LI",{});var Aa=i(H);$s=y(Aa,`Easy experimentation: you can experiment on a handful of examples to check that your script works without having to
download the entire dataset.`),Aa.forEach(a),Z.forEach(a),rs=r(s),k=o(s,"P",{});var ma=i(k);Ls=y(ma,`There is one caveat to streaming mode. When downloading a full dataset without streaming, both the raw data and processed
data are saved locally to disk. If we want to re-use this dataset, we can directly load the processed data from disk,
skipping the download and processing steps.  Consequently, we only have to perform the downloading and processing
operations once, after which we can re-use the prepared data.`),ma.forEach(a),ws=r(s),Q=o(s,"P",{});var ga=i(Q);Ps=y(ga,`With streaming mode, the data is not downloaded to disk. Thus, neither the downloaded nor pre-processed data are cached.
If we want to re-use the dataset, the streaming steps must be repeated, with the audio files loaded and processed on
the fly again. For this reason, it is advised to download datasets that you are likely to use multiple times.`),ga.forEach(a),ps=r(s),d=o(s,"P",{});var qs=i(d);Hs=y(qs,"How can you enable streaming mode? Easy! Just set "),K=o(qs,"CODE",{});var fa=i(K);Ks=y(fa,"streaming=True"),fa.forEach(a),sa=y(qs,` when you load your dataset. The rest will be taken
care for you:`),qs.forEach(a),Js=r(s),R(f.$$.fragment,s),Ts=r(s),B=o(s,"P",{});var Ea=i(B);aa=y(Ea,`Just like we applied preprocessing steps to a downloaded subset of MINDS-14, you can do the same preprocessing with a
streaming dataset in the exactly the same manner.`),Ea.forEach(a),us=r(s),j=o(s,"P",{});var Ss=i(j);ea=y(Ss,"The only difference is that you can no longer access individual samples using Python indexing (i.e. "),ss=o(Ss,"CODE",{});var qa=i(ss);ta=y(qa,'gigaspeech["train"][sample_idx]'),qa.forEach(a),la=y(Ss,`).
Instead, you have to iterate over the dataset. Here\u2019s how you can access an example when streaming a dataset:`),Ss.forEach(a),Cs=r(s),R(E.$$.fragment,s),hs=r(s),N=o(s,"P",{});var Sa=i(N);as=o(Sa,"STRONG",{});var ba=i(as);Ma=y(ba,"Output:"),ba.forEach(a),Sa.forEach(a),ds=r(s),R(q.$$.fragment,s),js=r(s),c=o(s,"P",{});var bs=i(c);na=y(bs,"If you\u2019d like to preview several examples from a large dataset, use the "),es=o(bs,"CODE",{});var va=i(es);oa=y(va,"take()"),va.forEach(a),ya=y(bs,` to get the first n elements. Let\u2019s grab
the first two examples in the gigaspeech dataset:`),bs.forEach(a),cs=r(s),R(S.$$.fragment,s),Is=r(s),_=o(s,"P",{});var Da=i(_);ts=o(Da,"STRONG",{});var ka=i(ts);ia=y(ka,"Output:"),ka.forEach(a),Da.forEach(a),As=r(s),R(b.$$.fragment,s),ms=r(s),V=o(s,"P",{});var Qa=i(V);Ua=y(Qa,`Streaming mode can take your research to the next level: not only are the biggest datasets accessible to you, but you
can easily evaluate systems over multiple datasets in one go without worrying about your disk space. Compared to
evaluating on a single dataset, multi-dataset evaluation gives a better metric for the generalisation abilities of a
speech recognition system (c.f. End-to-end Speech Benchmark (ESB)).`),Qa.forEach(a),this.h()},h(){J(T,"name","hf:doc:metadata"),J(T,"content",JSON.stringify(Fa)),J(C,"id","streaming-audio-data"),J(C,"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"),J(C,"href","#streaming-audio-data"),J(u,"class","relative group"),J(m,"href","https://huggingface.co/datasets/speechcolab/gigaspeech"),J(m,"rel","nofollow"),J(g,"href","https://huggingface.co/docs/datasets/stream"),J(g,"rel","nofollow")},m(s,t){e(document.head,T),l(s,Ms,t),l(s,u,t),e(u,C),e(C,G),z(A,G,null),e(u,vs),e(u,X),e(X,Ds),l(s,ns,t),l(s,v,t),e(v,ks),l(s,os,t),l(s,w,t),e(w,Qs),e(w,O),e(O,Bs),e(w,Ns),e(w,m),e(m,_s),e(w,Vs),e(w,$),e($,Zs),e(w,xs),l(s,ys,t),l(s,h,t),e(h,Rs),e(h,g),e(g,zs),e(h,Fs),l(s,is,t),l(s,D,t),e(D,Ws),l(s,Us,t),l(s,p,t),e(p,L),e(L,Ys),e(p,Gs),e(p,P),e(P,Xs),e(p,Os),e(p,H),e(H,$s),l(s,rs,t),l(s,k,t),e(k,Ls),l(s,ws,t),l(s,Q,t),e(Q,Ps),l(s,ps,t),l(s,d,t),e(d,Hs),e(d,K),e(K,Ks),e(d,sa),l(s,Js,t),z(f,s,t),l(s,Ts,t),l(s,B,t),e(B,aa),l(s,us,t),l(s,j,t),e(j,ea),e(j,ss),e(ss,ta),e(j,la),l(s,Cs,t),z(E,s,t),l(s,hs,t),l(s,N,t),e(N,as),e(as,Ma),l(s,ds,t),z(q,s,t),l(s,js,t),l(s,c,t),e(c,na),e(c,es),e(es,oa),e(c,ya),l(s,cs,t),z(S,s,t),l(s,Is,t),l(s,_,t),e(_,ts),e(ts,ia),l(s,As,t),z(b,s,t),l(s,ms,t),l(s,V,t),e(V,Ua),gs=!0},p:Za,i(s){gs||(F(A.$$.fragment,s),F(f.$$.fragment,s),F(E.$$.fragment,s),F(q.$$.fragment,s),F(S.$$.fragment,s),F(b.$$.fragment,s),gs=!0)},o(s){W(A.$$.fragment,s),W(f.$$.fragment,s),W(E.$$.fragment,s),W(q.$$.fragment,s),W(S.$$.fragment,s),W(b.$$.fragment,s),gs=!1},d(s){a(T),s&&a(Ms),s&&a(u),Y(A),s&&a(ns),s&&a(v),s&&a(os),s&&a(w),s&&a(ys),s&&a(h),s&&a(is),s&&a(D),s&&a(Us),s&&a(p),s&&a(rs),s&&a(k),s&&a(ws),s&&a(Q),s&&a(ps),s&&a(d),s&&a(Js),Y(f,s),s&&a(Ts),s&&a(B),s&&a(us),s&&a(j),s&&a(Cs),Y(E,s),s&&a(hs),s&&a(N),s&&a(ds),Y(q,s),s&&a(js),s&&a(c),s&&a(cs),Y(S,s),s&&a(Is),s&&a(_),s&&a(As),Y(b,s),s&&a(ms),s&&a(V)}}}const Fa={local:"streaming-audio-data",title:"Streaming audio data"};function Wa(ra){return xa(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Oa extends Ba{constructor(T){super();Na(this,T,Wa,za,_a,{})}}export{Oa as default,Fa as metadata};
