import{S as Se,i as Fe,s as Oe,e as a,k as u,w as qe,t as r,M as Me,c as s,d as o,m as f,a as i,x as Ne,h as l,b as h,G as e,g as p,y as Ue,L as Je,q as Re,o as je,B as Be,v as Xe}from"../../chunks/vendor-hf-doc-builder.js";import{I as Ze}from"../../chunks/IconCopyLink-hf-doc-builder.js";function ze(be){let m,F,v,g,$,_,z,T,K,O,P,Q,q,n,w,V,b,W,Y,ee,k,te,y,A,oe,ae,re,se,E,le,D,ie,ne,he,H,ce,de,I,ue,G,fe,pe,me,S,ve,M,x,ge,C,ye,xe,N,L,_e,U;return _=new Ze({}),{c(){m=a("meta"),F=u(),v=a("h1"),g=a("a"),$=a("span"),qe(_.$$.fragment),z=u(),T=a("span"),K=r("Hands-on exercise"),O=u(),P=a("p"),Q=r("This exercise is not graded and is intended to help you become familiar with the tools and libraries that you will be using throughout the rest of the course. If you are already experienced in using Google Colab, \u{1F917} Datasets, librosa and \u{1F917} Transformers, you may choose to skip this exercise."),q=u(),n=a("ol"),w=a("li"),V=r("Create a "),b=a("a"),W=r("Google Colab"),Y=r(" notebook."),ee=u(),k=a("li"),te=r("Use \u{1F917} Datasets to load the train split of the "),y=a("a"),A=a("code"),oe=r("facebook/voxpopuli"),ae=r(" dataset"),re=r(" in language of your choice in streaming mode."),se=u(),E=a("li"),le=r("Get the third example from the "),D=a("code"),ie=r("train"),ne=r(" part of the dataset and explore it. Given the features that this example has, what kinds of audio tasks can you use this dataset for?"),he=u(),H=a("li"),ce=r("Plot this example\u2019s waveform and spectrogram."),de=u(),I=a("li"),ue=r("Go to "),G=a("a"),fe=r("\u{1F917} Hub"),pe=r(", explore pretrained models and find one that can be used for automatic speech recognition for the language that you have picked earlier. Instantiate a corresponding pipeline with the model you found, and transcribe the example."),me=u(),S=a("li"),ve=r("Compare the transcription that you get from the pipeline to the transcription provided in the example."),M=u(),x=a("p"),ge=r("If you struggle with this exercise, feel free to take a peek at an "),C=a("a"),ye=r("example solution"),xe=r(`.
Discovered something interesting? Found a cool model? Got a beautiful spectrogram? Feel free to share your work and discoveries on Twitter!`),N=u(),L=a("p"),_e=r("In the next chapters you\u2019ll learn more about various audio transformer architectures and will train your own model!"),this.h()},l(t){const c=Me('[data-svelte="svelte-1phssyn"]',document.head);m=s(c,"META",{name:!0,content:!0}),c.forEach(o),F=f(t),v=s(t,"H1",{class:!0});var J=i(v);g=s(J,"A",{id:!0,class:!0,href:!0});var ke=i(g);$=s(ke,"SPAN",{});var Ee=i($);Ne(_.$$.fragment,Ee),Ee.forEach(o),ke.forEach(o),z=f(J),T=s(J,"SPAN",{});var Ie=i(T);K=l(Ie,"Hands-on exercise"),Ie.forEach(o),J.forEach(o),O=f(t),P=s(t,"P",{});var Ge=i(P);Q=l(Ge,"This exercise is not graded and is intended to help you become familiar with the tools and libraries that you will be using throughout the rest of the course. If you are already experienced in using Google Colab, \u{1F917} Datasets, librosa and \u{1F917} Transformers, you may choose to skip this exercise."),Ge.forEach(o),q=f(t),n=s(t,"OL",{});var d=i(n);w=s(d,"LI",{});var R=i(w);V=l(R,"Create a "),b=s(R,"A",{href:!0,rel:!0});var Ce=i(b);W=l(Ce,"Google Colab"),Ce.forEach(o),Y=l(R," notebook."),R.forEach(o),ee=f(d),k=s(d,"LI",{});var j=i(k);te=l(j,"Use \u{1F917} Datasets to load the train split of the "),y=s(j,"A",{href:!0,rel:!0});var we=i(y);A=s(we,"CODE",{});var Pe=i(A);oe=l(Pe,"facebook/voxpopuli"),Pe.forEach(o),ae=l(we," dataset"),we.forEach(o),re=l(j," in language of your choice in streaming mode."),j.forEach(o),se=f(d),E=s(d,"LI",{});var B=i(E);le=l(B,"Get the third example from the "),D=s(B,"CODE",{});var Le=i(D);ie=l(Le,"train"),Le.forEach(o),ne=l(B," part of the dataset and explore it. Given the features that this example has, what kinds of audio tasks can you use this dataset for?"),B.forEach(o),he=f(d),H=s(d,"LI",{});var $e=i(H);ce=l($e,"Plot this example\u2019s waveform and spectrogram."),$e.forEach(o),de=f(d),I=s(d,"LI",{});var X=i(I);ue=l(X,"Go to "),G=s(X,"A",{href:!0,rel:!0});var Te=i(G);fe=l(Te,"\u{1F917} Hub"),Te.forEach(o),pe=l(X,", explore pretrained models and find one that can be used for automatic speech recognition for the language that you have picked earlier. Instantiate a corresponding pipeline with the model you found, and transcribe the example."),X.forEach(o),me=f(d),S=s(d,"LI",{});var Ae=i(S);ve=l(Ae,"Compare the transcription that you get from the pipeline to the transcription provided in the example."),Ae.forEach(o),d.forEach(o),M=f(t),x=s(t,"P",{});var Z=i(x);ge=l(Z,"If you struggle with this exercise, feel free to take a peek at an "),C=s(Z,"A",{href:!0,rel:!0});var De=i(C);ye=l(De,"example solution"),De.forEach(o),xe=l(Z,`.
Discovered something interesting? Found a cool model? Got a beautiful spectrogram? Feel free to share your work and discoveries on Twitter!`),Z.forEach(o),N=f(t),L=s(t,"P",{});var He=i(L);_e=l(He,"In the next chapters you\u2019ll learn more about various audio transformer architectures and will train your own model!"),He.forEach(o),this.h()},h(){h(m,"name","hf:doc:metadata"),h(m,"content",JSON.stringify(Ke)),h(g,"id","handson-exercise"),h(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"),h(g,"href","#handson-exercise"),h(v,"class","relative group"),h(b,"href","https://colab.research.google.com"),h(b,"rel","nofollow"),h(y,"href","https://huggingface.co/datasets/facebook/voxpopuli"),h(y,"rel","nofollow"),h(G,"href","https://huggingface.co/models"),h(G,"rel","nofollow"),h(C,"href","https://colab.research.google.com/drive/1NGyo5wFpRj8TMfZOIuPaJHqyyXCITftc?usp=sharing"),h(C,"rel","nofollow")},m(t,c){e(document.head,m),p(t,F,c),p(t,v,c),e(v,g),e(g,$),Ue(_,$,null),e(v,z),e(v,T),e(T,K),p(t,O,c),p(t,P,c),e(P,Q),p(t,q,c),p(t,n,c),e(n,w),e(w,V),e(w,b),e(b,W),e(w,Y),e(n,ee),e(n,k),e(k,te),e(k,y),e(y,A),e(A,oe),e(y,ae),e(k,re),e(n,se),e(n,E),e(E,le),e(E,D),e(D,ie),e(E,ne),e(n,he),e(n,H),e(H,ce),e(n,de),e(n,I),e(I,ue),e(I,G),e(G,fe),e(I,pe),e(n,me),e(n,S),e(S,ve),p(t,M,c),p(t,x,c),e(x,ge),e(x,C),e(C,ye),e(x,xe),p(t,N,c),p(t,L,c),e(L,_e),U=!0},p:Je,i(t){U||(Re(_.$$.fragment,t),U=!0)},o(t){je(_.$$.fragment,t),U=!1},d(t){o(m),t&&o(F),t&&o(v),Be(_),t&&o(O),t&&o(P),t&&o(q),t&&o(n),t&&o(M),t&&o(x),t&&o(N),t&&o(L)}}}const Ke={local:"handson-exercise",title:"Hands-on exercise"};function Qe(be){return Xe(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ye extends Se{constructor(m){super();Fe(this,m,Qe,ze,Oe,{})}}export{Ye as default,Ke as metadata};
