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