import{s as le,a as re,n as ue,o as he}from"../chunks/scheduler.cd324960.js";import{S as ce,i as pe,e as s,s as i,c as B,h as fe,a as l,d as n,b as o,f as se,g as D,j as u,k,l as me,m as a,n as G,t as F,o as N,p as O}from"../chunks/index.d5c3adcc.js";import{C as de,H as ge,E as ve}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.9176019f.js";function we(V){let h,T,C,P,p,H,f,M,m,J="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>.",L,c,K='<img src="https://huggingface.co/datasets/huggingface-course/audio-course-images/resolve/main/asr_diagram.png" alt="Diagram of speech to text"/>',S,d,Q=`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.`,A,g,X=`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 🌤️).`,E,v,Z=`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:`,z,r,ee="",te,I,w,ne=`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!`,R,y,ae=`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!`,j,x,ie="Specifically, we’ll cover:",q,b,oe='<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>',Y,_,U,$,W;return p=new de({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),f=new ge({props:{title:"What you’ll learn and what you’ll build",local:"what-youll-learn-and-what-youll-build",headingTag:"h1"}}),_=new ve({props:{source:"https://github.com/huggingface/audio-transformers-course/blob/main/chapters/en/chapter5/introduction.mdx"}}),{c(){h=s("meta"),T=i(),C=s("p"),P=i(),B(p.$$.fragment),H=i(),B(f.$$.fragment),M=i(),m=s("p"),m.innerHTML=J,L=i(),c=s("div"),c.innerHTML=K,S=i(),d=s("p"),d.textContent=Q,A=i(),g=s("p"),g.textContent=X,E=i(),v=s("p"),v.textContent=Z,z=i(),r=s("iframe"),r.innerHTML=ee,I=i(),w=s("p"),w.textContent=ne,R=i(),y=s("p"),y.textContent=ae,j=i(),x=s("p"),x.textContent=ie,q=i(),b=s("ul"),b.innerHTML=oe,Y=i(),B(_.$$.fragment),U=i(),$=s("p"),this.h()},l(e){const t=fe("svelte-u9bgzb",document.head);h=l(t,"META",{name:!0,content:!0}),t.forEach(n),T=o(e),C=l(e,"P",{}),se(C).forEach(n),P=o(e),D(p.$$.fragment,e),H=o(e),D(f.$$.fragment,e),M=o(e),m=l(e,"P",{"data-svelte-h":!0}),u(m)!=="svelte-gm4czj"&&(m.innerHTML=J),L=o(e),c=l(e,"DIV",{class:!0,"data-svelte-h":!0}),u(c)!=="svelte-gouu61"&&(c.innerHTML=K),S=o(e),d=l(e,"P",{"data-svelte-h":!0}),u(d)!=="svelte-xmgt0n"&&(d.textContent=Q),A=o(e),g=l(e,"P",{"data-svelte-h":!0}),u(g)!=="svelte-e3ezub"&&(g.textContent=X),E=o(e),v=l(e,"P",{"data-svelte-h":!0}),u(v)!=="svelte-28ph8z"&&(v.textContent=Z),z=o(e),r=l(e,"IFRAME",{src:!0,frameborder:!0,width:!0,height:!0,"data-svelte-h":!0}),u(r)!=="svelte-aw0ubw"&&(r.innerHTML=ee),I=o(e),w=l(e,"P",{"data-svelte-h":!0}),u(w)!=="svelte-9savi7"&&(w.textContent=ne),R=o(e),y=l(e,"P",{"data-svelte-h":!0}),u(y)!=="svelte-1klaps2"&&(y.textContent=ae),j=o(e),x=l(e,"P",{"data-svelte-h":!0}),u(x)!=="svelte-96ho0"&&(x.textContent=ie),q=o(e),b=l(e,"UL",{"data-svelte-h":!0}),u(b)!=="svelte-t4qu3r"&&(b.innerHTML=oe),Y=o(e),D(_.$$.fragment,e),U=o(e),$=l(e,"P",{}),se($).forEach(n),this.h()},h(){k(h,"name","hf:doc:metadata"),k(h,"content",ye),k(c,"class","flex justify-center"),re(r.src,te="https://course-demos-whisper-small.hf.space")||k(r,"src",te),k(r,"frameborder","0"),k(r,"width","850"),k(r,"height","450")},m(e,t){me(document.head,h),a(e,T,t),a(e,C,t),a(e,P,t),G(p,e,t),a(e,H,t),G(f,e,t),a(e,M,t),a(e,m,t),a(e,L,t),a(e,c,t),a(e,S,t),a(e,d,t),a(e,A,t),a(e,g,t),a(e,E,t),a(e,v,t),a(e,z,t),a(e,r,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),a(e,b,t),a(e,Y,t),G(_,e,t),a(e,U,t),a(e,$,t),W=!0},p:ue,i(e){W||(F(p.$$.fragment,e),F(f.$$.fragment,e),F(_.$$.fragment,e),W=!0)},o(e){N(p.$$.fragment,e),N(f.$$.fragment,e),N(_.$$.fragment,e),W=!1},d(e){e&&(n(T),n(C),n(P),n(H),n(M),n(m),n(L),n(c),n(S),n(d),n(A),n(g),n(E),n(v),n(z),n(r),n(I),n(w),n(R),n(y),n(j),n(x),n(q),n(b),n(Y),n(U),n($)),n(h),O(p,e),O(f,e),O(_,e)}}}const ye='{"title":"What you’ll learn and what you’ll build","local":"what-youll-learn-and-what-youll-build","sections":[],"depth":1}';function xe(V){return he(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ce extends ce{constructor(h){super(),pe(this,h,xe,we,le,{})}}export{Ce as component};
