import{s as oe,f as se,n as le,o as re}from"../chunks/scheduler.f7e1785c.js";import{S as ue,i as he,g as s,s as i,r as X,A as ce,h as l,f as n,c as o,j as Z,u as ee,x as u,k as _,y as de,a,v as te,d as ne,t as ae,w as ie}from"../chunks/index.9f8f0838.js";import{H as fe,E as pe}from"../chunks/EditOnGithub.5a9bb8c5.js";function me(U){let h,T,k,$,d,P,f,W="In this section, we’ll take a look at how Transformers can be used to convert spoken speech into text, a task known <em>speech recognition</em>.",H,c,B='<img src="https://huggingface.co/datasets/huggingface-course/audio-course-images/resolve/main/asr_diagram.png" alt="Diagram of speech to text"/>',M,p,D=`Speech recognition, also known as automatic speech recognition (ASR) or speech-to-text (STT), is one of the most popular
and exciting spoken language processing tasks. It’s used in a wide range of applications, including dictation, voice assistants,
video captioning and meeting transcriptions.`,S,m,G=`You’ve probably made use of a speech recognition system many times before without realising! Consider the digital
assistant in your smartphone device (Siri, Google Assistant, Alexa). When you use these assistants, the first thing that
they do is transcribe your spoken speech to written text, ready to be used for any downstream tasks (such as finding you
the weather 🌤️).`,L,g,F=`Have a play with the speech recognition demo below. You can either record yourself using your microphone, or drag and
drop an audio sample for transcription:`,A,r,N="",O,E,v,V=`Speech recognition is a challenging task as it requires joint knowledge of audio and text. The input audio might have
lots of background noise and be spoken by speakers with different accents, making it difficult to pick out the spoken
speech. The written text might have characters which don’t have an acoustic sound, such as punctuation, which are difficult
to infer from audio alone. These are all hurdles we have to tackle when building effective speech recognition systems!`,I,w,J=`Now that we’ve defined our task, we can begin looking into speech recognition in more detail. By the end of this Unit,
you’ll have a good fundamental understanding of the different pre-trained speech recognition models available and how to
use them with the 🤗 Transformers library. You’ll also know the procedure for fine-tuning an ASR model on a domain or
language of choice, enabling you to build a performant system for whatever task you encounter. You’ll be able to showcase
your model to your friends and family by building a live demo, one that takes any spoken speech and converts it to text!`,R,y,K="Specifically, we’ll cover:",j,x,Q='<li><a href="asr_models">Pre-trained models for speech recognition</a></li> <li><a href="choosing_dataset">Choosing a dataset</a></li> <li><a href="evaluation">Evaluation and metrics for speech recognition</a></li> <li><a href="fine-tuning">How to fine-tune an ASR system with the Trainer API</a></li> <li><a href="demo">Building a demo</a></li> <li><a href="hands_on">Hands-on exercise</a></li>',q,b,z,C,Y;return d=new fe({props:{title:"What you’ll learn and what you’ll build",local:"what-youll-learn-and-what-youll-build",headingTag:"h1"}}),b=new pe({props:{source:"https://github.com/huggingface/audio-transformers-course/blob/main/chapters/en/chapter5/introduction.mdx"}}),{c(){h=s("meta"),T=i(),k=s("p"),$=i(),X(d.$$.fragment),P=i(),f=s("p"),f.innerHTML=W,H=i(),c=s("div"),c.innerHTML=B,M=i(),p=s("p"),p.textContent=D,S=i(),m=s("p"),m.textContent=G,L=i(),g=s("p"),g.textContent=F,A=i(),r=s("iframe"),r.innerHTML=N,E=i(),v=s("p"),v.textContent=V,I=i(),w=s("p"),w.textContent=J,R=i(),y=s("p"),y.textContent=K,j=i(),x=s("ul"),x.innerHTML=Q,q=i(),X(b.$$.fragment),z=i(),C=s("p"),this.h()},l(e){const t=ce("svelte-u9bgzb",document.head);h=l(t,"META",{name:!0,content:!0}),t.forEach(n),T=o(e),k=l(e,"P",{}),Z(k).forEach(n),$=o(e),ee(d.$$.fragment,e),P=o(e),f=l(e,"P",{"data-svelte-h":!0}),u(f)!=="svelte-gm4czj"&&(f.innerHTML=W),H=o(e),c=l(e,"DIV",{class:!0,"data-svelte-h":!0}),u(c)!=="svelte-gouu61"&&(c.innerHTML=B),M=o(e),p=l(e,"P",{"data-svelte-h":!0}),u(p)!=="svelte-xmgt0n"&&(p.textContent=D),S=o(e),m=l(e,"P",{"data-svelte-h":!0}),u(m)!=="svelte-e3ezub"&&(m.textContent=G),L=o(e),g=l(e,"P",{"data-svelte-h":!0}),u(g)!=="svelte-28ph8z"&&(g.textContent=F),A=o(e),r=l(e,"IFRAME",{src:!0,frameborder:!0,width:!0,height:!0,"data-svelte-h":!0}),u(r)!=="svelte-aw0ubw"&&(r.innerHTML=N),E=o(e),v=l(e,"P",{"data-svelte-h":!0}),u(v)!=="svelte-9savi7"&&(v.textContent=V),I=o(e),w=l(e,"P",{"data-svelte-h":!0}),u(w)!=="svelte-1klaps2"&&(w.textContent=J),R=o(e),y=l(e,"P",{"data-svelte-h":!0}),u(y)!=="svelte-96ho0"&&(y.textContent=K),j=o(e),x=l(e,"UL",{"data-svelte-h":!0}),u(x)!=="svelte-t4qu3r"&&(x.innerHTML=Q),q=o(e),ee(b.$$.fragment,e),z=o(e),C=l(e,"P",{}),Z(C).forEach(n),this.h()},h(){_(h,"name","hf:doc:metadata"),_(h,"content",ge),_(c,"class","flex justify-center"),se(r.src,O="https://course-demos-whisper-small.hf.space")||_(r,"src",O),_(r,"frameborder","0"),_(r,"width","850"),_(r,"height","450")},m(e,t){de(document.head,h),a(e,T,t),a(e,k,t),a(e,$,t),te(d,e,t),a(e,P,t),a(e,f,t),a(e,H,t),a(e,c,t),a(e,M,t),a(e,p,t),a(e,S,t),a(e,m,t),a(e,L,t),a(e,g,t),a(e,A,t),a(e,r,t),a(e,E,t),a(e,v,t),a(e,I,t),a(e,w,t),a(e,R,t),a(e,y,t),a(e,j,t),a(e,x,t),a(e,q,t),te(b,e,t),a(e,z,t),a(e,C,t),Y=!0},p:le,i(e){Y||(ne(d.$$.fragment,e),ne(b.$$.fragment,e),Y=!0)},o(e){ae(d.$$.fragment,e),ae(b.$$.fragment,e),Y=!1},d(e){e&&(n(T),n(k),n($),n(P),n(f),n(H),n(c),n(M),n(p),n(S),n(m),n(L),n(g),n(A),n(r),n(E),n(v),n(I),n(w),n(R),n(y),n(j),n(x),n(q),n(z),n(C)),n(h),ie(d,e),ie(b,e)}}}const ge='{"title":"What you’ll learn and what you’ll build","local":"what-youll-learn-and-what-youll-build","sections":[],"depth":1}';function ve(U){return re(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class be extends ue{constructor(h){super(),he(this,h,ve,me,oe,{})}}export{be as component};
