import{s as R,n as J,o as K}from"../chunks/scheduler.cd324960.js";import{S as N,i as Q,e as h,s as n,c as M,h as V,a as g,d as i,b as s,f as D,g as E,j as S,k as I,l as X,m as a,n as U,t as B,o as F,p as W}from"../chunks/index.d5c3adcc.js";import{C as Y,H as O,E as Z}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.8072ce1f.js";function ee(j){let l,y,w,b,o,k,r,_,m,x,u,q=`Audio classification is one of the most common applications of transformers in audio and speech processing. Like other
classification tasks in machine learning, this task involves assigning one or more labels to an audio recording based on
its content. For example, in the case of speech, we might want to detect when wake words like “Hey Siri” are spoken, or
infer a key word like “temperature” from a spoken query like “What is the weather today?“. Environmental sounds
provide another example, where we might want to automatically distinguish between sounds such as “car horn”, “siren”,
“dog barking”, etc.`,v,f,z=`In this section, we’ll look at how pre-trained audio transformers can be applied to a range of audio classification tasks.
We’ll then fine-tune a transformer model on the task of music classification, classifying songs into genres like “pop” and
“rock”. This is an important part of music streaming platforms like <a href="https://en.wikipedia.org/wiki/Spotify" rel="nofollow">Spotify</a>, which
recommend songs that are similar to the ones the user is listening to.`,C,c,A="By the end of this section, you’ll know how to:",H,p,G="<li>Find suitable pre-trained models for audio classification tasks</li> <li>Use the 🤗 Datasets library and the Hugging Face Hub to select audio classification datasets</li> <li>Fine-tune a pretrained model to classify songs by genre</li> <li>Build a Gradio demo that lets you classify your own songs</li>",L,d,P,$,T;return o=new Y({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),r=new O({props:{title:"Unit 4. Build a music genre classifier",local:"unit-4-build-a-music-genre-classifier",headingTag:"h1"}}),m=new O({props:{title:"What you’ll learn and what you’ll build",local:"what-youll-learn-and-what-youll-build",headingTag:"h2"}}),d=new Z({props:{source:"https://github.com/huggingface/audio-transformers-course/blob/main/chapters/en/chapter4/introduction.mdx"}}),{c(){l=h("meta"),y=n(),w=h("p"),b=n(),M(o.$$.fragment),k=n(),M(r.$$.fragment),_=n(),M(m.$$.fragment),x=n(),u=h("p"),u.textContent=q,v=n(),f=h("p"),f.innerHTML=z,C=n(),c=h("p"),c.textContent=A,H=n(),p=h("ul"),p.innerHTML=G,L=n(),M(d.$$.fragment),P=n(),$=h("p"),this.h()},l(e){const t=V("svelte-u9bgzb",document.head);l=g(t,"META",{name:!0,content:!0}),t.forEach(i),y=s(e),w=g(e,"P",{}),D(w).forEach(i),b=s(e),E(o.$$.fragment,e),k=s(e),E(r.$$.fragment,e),_=s(e),E(m.$$.fragment,e),x=s(e),u=g(e,"P",{"data-svelte-h":!0}),S(u)!=="svelte-1o2o5rb"&&(u.textContent=q),v=s(e),f=g(e,"P",{"data-svelte-h":!0}),S(f)!=="svelte-kj1ce0"&&(f.innerHTML=z),C=s(e),c=g(e,"P",{"data-svelte-h":!0}),S(c)!=="svelte-a5jv8f"&&(c.textContent=A),H=s(e),p=g(e,"UL",{"data-svelte-h":!0}),S(p)!=="svelte-1qg1gzt"&&(p.innerHTML=G),L=s(e),E(d.$$.fragment,e),P=s(e),$=g(e,"P",{}),D($).forEach(i),this.h()},h(){I(l,"name","hf:doc:metadata"),I(l,"content",te)},m(e,t){X(document.head,l),a(e,y,t),a(e,w,t),a(e,b,t),U(o,e,t),a(e,k,t),U(r,e,t),a(e,_,t),U(m,e,t),a(e,x,t),a(e,u,t),a(e,v,t),a(e,f,t),a(e,C,t),a(e,c,t),a(e,H,t),a(e,p,t),a(e,L,t),U(d,e,t),a(e,P,t),a(e,$,t),T=!0},p:J,i(e){T||(B(o.$$.fragment,e),B(r.$$.fragment,e),B(m.$$.fragment,e),B(d.$$.fragment,e),T=!0)},o(e){F(o.$$.fragment,e),F(r.$$.fragment,e),F(m.$$.fragment,e),F(d.$$.fragment,e),T=!1},d(e){e&&(i(y),i(w),i(b),i(k),i(_),i(x),i(u),i(v),i(f),i(C),i(c),i(H),i(p),i(L),i(P),i($)),i(l),W(o,e),W(r,e),W(m,e),W(d,e)}}}const te='{"title":"Unit 4. Build a music genre classifier","local":"unit-4-build-a-music-genre-classifier","sections":[{"title":"What you’ll learn and what you’ll build","local":"what-youll-learn-and-what-youll-build","sections":[],"depth":2}],"depth":1}';function ie(j){return K(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class le extends N{constructor(l){super(),Q(this,l,ie,ee,R,{})}}export{le as component};
