import{s as U,n as A,o as J}from"../chunks/scheduler.cd324960.js";import{S as N,i as X,e as c,s as i,c as M,h as Z,a as d,d as a,b as s,f as z,g as G,j as H,k as R,l as B,m as o,n as L,t as E,o as I,p as S}from"../chunks/index.d5c3adcc.js";import{C as K,H as Q,E as V}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.92ea4747.js";function W(q){let n,$,g,b,l,y,r,v,p,D="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, 🤗 Datasets, librosa and 🤗 Transformers, you may choose to skip this exercise.",w,m,F='<li>Create a <a href="https://colab.research.google.com" rel="nofollow">Google Colab</a> notebook.</li> <li>Use 🤗 Datasets to load the train split of the <a href="https://huggingface.co/datasets/facebook/voxpopuli" rel="nofollow"><code>facebook/voxpopuli</code> dataset</a> in language of your choice in streaming mode.</li> <li>Get the third example from the <code>train</code> 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?</li> <li>Plot this example’s waveform and spectrogram.</li> <li>Go to <a href="https://huggingface.co/models" rel="nofollow">🤗 Hub</a>, 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.</li> <li>Compare the transcription that you get from the pipeline to the transcription provided in the example.</li>',_,h,O=`If you struggle with this exercise, feel free to take a peek at an <a href="https://colab.research.google.com/drive/1NGyo5wFpRj8TMfZOIuPaJHqyyXCITftc?usp=sharing" rel="nofollow">example solution</a>.
Discovered something interesting? Found a cool model? Got a beautiful spectrogram? Feel free to share your work and discoveries on Twitter!`,C,f,j="In the next chapters you’ll learn more about various audio transformer architectures and will train your own model!",k,u,T,x,P;return l=new K({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),r=new Q({props:{title:"Hands-on exercise",local:"hands-on-exercise",headingTag:"h1"}}),u=new V({props:{source:"https://github.com/huggingface/audio-transformers-course/blob/main/chapters/en/chapter2/hands_on.mdx"}}),{c(){n=c("meta"),$=i(),g=c("p"),b=i(),M(l.$$.fragment),y=i(),M(r.$$.fragment),v=i(),p=c("p"),p.textContent=D,w=i(),m=c("ol"),m.innerHTML=F,_=i(),h=c("p"),h.innerHTML=O,C=i(),f=c("p"),f.textContent=j,k=i(),M(u.$$.fragment),T=i(),x=c("p"),this.h()},l(e){const t=Z("svelte-u9bgzb",document.head);n=d(t,"META",{name:!0,content:!0}),t.forEach(a),$=s(e),g=d(e,"P",{}),z(g).forEach(a),b=s(e),G(l.$$.fragment,e),y=s(e),G(r.$$.fragment,e),v=s(e),p=d(e,"P",{"data-svelte-h":!0}),H(p)!=="svelte-le73t9"&&(p.textContent=D),w=s(e),m=d(e,"OL",{"data-svelte-h":!0}),H(m)!=="svelte-7tk64q"&&(m.innerHTML=F),_=s(e),h=d(e,"P",{"data-svelte-h":!0}),H(h)!=="svelte-ka8x12"&&(h.innerHTML=O),C=s(e),f=d(e,"P",{"data-svelte-h":!0}),H(f)!=="svelte-1gcx1bf"&&(f.textContent=j),k=s(e),G(u.$$.fragment,e),T=s(e),x=d(e,"P",{}),z(x).forEach(a),this.h()},h(){R(n,"name","hf:doc:metadata"),R(n,"content",Y)},m(e,t){B(document.head,n),o(e,$,t),o(e,g,t),o(e,b,t),L(l,e,t),o(e,y,t),L(r,e,t),o(e,v,t),o(e,p,t),o(e,w,t),o(e,m,t),o(e,_,t),o(e,h,t),o(e,C,t),o(e,f,t),o(e,k,t),L(u,e,t),o(e,T,t),o(e,x,t),P=!0},p:A,i(e){P||(E(l.$$.fragment,e),E(r.$$.fragment,e),E(u.$$.fragment,e),P=!0)},o(e){I(l.$$.fragment,e),I(r.$$.fragment,e),I(u.$$.fragment,e),P=!1},d(e){e&&(a($),a(g),a(b),a(y),a(v),a(p),a(w),a(m),a(_),a(h),a(C),a(f),a(k),a(T),a(x)),a(n),S(l,e),S(r,e),S(u,e)}}}const Y='{"title":"Hands-on exercise","local":"hands-on-exercise","sections":[],"depth":1}';function ee(q){return J(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ne extends N{constructor(n){super(),X(this,n,ee,W,U,{})}}export{ne as component};
