import{s as I,n as O,o as R}from"../chunks/scheduler.f7e1785c.js";import{S as J,i as K,g as h,s,r as E,A as N,h as p,f as a,c as o,j as z,u as L,x as T,k as G,y as Q,a as i,v as M,d as S,t as U,w as B}from"../chunks/index.9f8f0838.js";import{H as D,E as V}from"../chunks/EditOnGithub.5a9bb8c5.js";function X(F){let n,y,g,$,l,b,r,k,u,W=`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.`,_,m,j=`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.`,v,c,q="By the end of this section, you’ll know how to:",x,f,A="<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>",C,d,H,w,P;return l=new D({props:{title:"Unit 4. Build a music genre classifier",local:"unit-4-build-a-music-genre-classifier",headingTag:"h1"}}),r=new D({props:{title:"What you’ll learn and what you’ll build",local:"what-youll-learn-and-what-youll-build",headingTag:"h2"}}),d=new V({props:{source:"https://github.com/huggingface/audio-transformers-course/blob/main/chapters/en/chapter4/introduction.mdx"}}),{c(){n=h("meta"),y=s(),g=h("p"),$=s(),E(l.$$.fragment),b=s(),E(r.$$.fragment),k=s(),u=h("p"),u.textContent=W,_=s(),m=h("p"),m.innerHTML=j,v=s(),c=h("p"),c.textContent=q,x=s(),f=h("ul"),f.innerHTML=A,C=s(),E(d.$$.fragment),H=s(),w=h("p"),this.h()},l(e){const t=N("svelte-u9bgzb",document.head);n=p(t,"META",{name:!0,content:!0}),t.forEach(a),y=o(e),g=p(e,"P",{}),z(g).forEach(a),$=o(e),L(l.$$.fragment,e),b=o(e),L(r.$$.fragment,e),k=o(e),u=p(e,"P",{"data-svelte-h":!0}),T(u)!=="svelte-1o2o5rb"&&(u.textContent=W),_=o(e),m=p(e,"P",{"data-svelte-h":!0}),T(m)!=="svelte-kj1ce0"&&(m.innerHTML=j),v=o(e),c=p(e,"P",{"data-svelte-h":!0}),T(c)!=="svelte-a5jv8f"&&(c.textContent=q),x=o(e),f=p(e,"UL",{"data-svelte-h":!0}),T(f)!=="svelte-1qg1gzt"&&(f.innerHTML=A),C=o(e),L(d.$$.fragment,e),H=o(e),w=p(e,"P",{}),z(w).forEach(a),this.h()},h(){G(n,"name","hf:doc:metadata"),G(n,"content",Y)},m(e,t){Q(document.head,n),i(e,y,t),i(e,g,t),i(e,$,t),M(l,e,t),i(e,b,t),M(r,e,t),i(e,k,t),i(e,u,t),i(e,_,t),i(e,m,t),i(e,v,t),i(e,c,t),i(e,x,t),i(e,f,t),i(e,C,t),M(d,e,t),i(e,H,t),i(e,w,t),P=!0},p:O,i(e){P||(S(l.$$.fragment,e),S(r.$$.fragment,e),S(d.$$.fragment,e),P=!0)},o(e){U(l.$$.fragment,e),U(r.$$.fragment,e),U(d.$$.fragment,e),P=!1},d(e){e&&(a(y),a(g),a($),a(b),a(k),a(u),a(_),a(m),a(v),a(c),a(x),a(f),a(C),a(H),a(w)),a(n),B(l,e),B(r,e),B(d,e)}}}const Y='{"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 Z(F){return R(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ie extends J{constructor(n){super(),K(this,n,Z,X,I,{})}}export{ie as component};
