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