import{S as et,i as tt,s as at,e as o,k as h,w as ot,t as f,M as nt,c as n,d as t,m as c,a as i,x as it,h as d,b as l,N as Xe,G as a,g as r,y as st,L as rt,q as lt,o as ht,B as ct,v as ut}from"../../chunks/vendor-hf-doc-builder.js";import{I as ft}from"../../chunks/IconCopyLink-hf-doc-builder.js";function dt(Se){let v,D,w,y,q,k,ne,C,ie,F,g,se,M,re,le,J,_,b,Ie,O,E,he,V,x,ce,z,A,ue,K,m,Te,Q,S,fe,X,I,de,Z,T,pe,ee,u,N,P,me,ve,B,L,we,ye,W,$,ge,ke,G,R,_e,be,U,Y,Ee,xe,j,H,Ae,te;return k=new ft({}),{c(){v=o("meta"),D=h(),w=o("h1"),y=o("a"),q=o("span"),ot(k.$$.fragment),ne=h(),C=o("span"),ie=f("What you'll learn and what you'll build"),F=h(),g=o("p"),se=f("In this section, we\u2019ll take a look at how Transformers can be used to convert spoken speech into text, a task known "),M=o("em"),re=f("speech recognition"),le=f("."),J=h(),_=o("div"),b=o("img"),O=h(),E=o("p"),he=f(`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\u2019s used in a wide range of applications, including dictation, voice assistants,
video captioning and meeting transcriptions.`),V=h(),x=o("p"),ce=f(`You\u2019ve 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 \u{1F324}\uFE0F).`),z=h(),A=o("p"),ue=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:`),K=h(),m=o("iframe"),Q=h(),S=o("p"),fe=f(`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\u2019t 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!`),X=h(),I=o("p"),de=f(`Now that we\u2019ve defined our task, we can begin looking into speech recognition in more detail. By the end of this Unit,
you\u2019ll have a good fundamental understanding of the different pre-trained speech recognition models available and how to
use them with the \u{1F917} Transformers library. You\u2019ll 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\u2019ll 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!`),Z=h(),T=o("p"),pe=f("Specifically, we\u2019ll cover:"),ee=h(),u=o("ul"),N=o("li"),P=o("a"),me=f("Pre-trained models for speech recognition"),ve=h(),B=o("li"),L=o("a"),we=f("Choosing a dataset"),ye=h(),W=o("li"),$=o("a"),ge=f("Evaluation and metrics for speech recognition"),ke=h(),G=o("li"),R=o("a"),_e=f("How to fine-tune an ASR system with the Trainer API"),be=h(),U=o("li"),Y=o("a"),Ee=f("Building a demo"),xe=h(),j=o("li"),H=o("a"),Ae=f("Hands-on exercise"),this.h()},l(e){const s=nt('[data-svelte="svelte-1phssyn"]',document.head);v=n(s,"META",{name:!0,content:!0}),s.forEach(t),D=c(e),w=n(e,"H1",{class:!0});var ae=i(w);y=n(ae,"A",{id:!0,class:!0,href:!0});var Pe=i(y);q=n(Pe,"SPAN",{});var Le=i(q);it(k.$$.fragment,Le),Le.forEach(t),Pe.forEach(t),ne=c(ae),C=n(ae,"SPAN",{});var $e=i(C);ie=d($e,"What you'll learn and what you'll build"),$e.forEach(t),ae.forEach(t),F=c(e),g=n(e,"P",{});var oe=i(g);se=d(oe,"In this section, we\u2019ll take a look at how Transformers can be used to convert spoken speech into text, a task known "),M=n(oe,"EM",{});var Re=i(M);re=d(Re,"speech recognition"),Re.forEach(t),le=d(oe,"."),oe.forEach(t),J=c(e),_=n(e,"DIV",{class:!0});var Ye=i(_);b=n(Ye,"IMG",{src:!0,alt:!0}),Ye.forEach(t),O=c(e),E=n(e,"P",{});var He=i(E);he=d(He,`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\u2019s used in a wide range of applications, including dictation, voice assistants,
video captioning and meeting transcriptions.`),He.forEach(t),V=c(e),x=n(e,"P",{});var qe=i(x);ce=d(qe,`You\u2019ve 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 \u{1F324}\uFE0F).`),qe.forEach(t),z=c(e),A=n(e,"P",{});var Ce=i(A);ue=d(Ce,`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:`),Ce.forEach(t),K=c(e),m=n(e,"IFRAME",{src:!0,frameborder:!0,width:!0,height:!0});var Ze=i(m);Ze.forEach(t),Q=c(e),S=n(e,"P",{});var Me=i(S);fe=d(Me,`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\u2019t 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!`),Me.forEach(t),X=c(e),I=n(e,"P",{});var Ne=i(I);de=d(Ne,`Now that we\u2019ve defined our task, we can begin looking into speech recognition in more detail. By the end of this Unit,
you\u2019ll have a good fundamental understanding of the different pre-trained speech recognition models available and how to
use them with the \u{1F917} Transformers library. You\u2019ll 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\u2019ll 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!`),Ne.forEach(t),Z=c(e),T=n(e,"P",{});var Be=i(T);pe=d(Be,"Specifically, we\u2019ll cover:"),Be.forEach(t),ee=c(e),u=n(e,"UL",{});var p=i(u);N=n(p,"LI",{});var We=i(N);P=n(We,"A",{href:!0});var Ge=i(P);me=d(Ge,"Pre-trained models for speech recognition"),Ge.forEach(t),We.forEach(t),ve=c(p),B=n(p,"LI",{});var Ue=i(B);L=n(Ue,"A",{href:!0});var je=i(L);we=d(je,"Choosing a dataset"),je.forEach(t),Ue.forEach(t),ye=c(p),W=n(p,"LI",{});var De=i(W);$=n(De,"A",{href:!0});var Fe=i($);ge=d(Fe,"Evaluation and metrics for speech recognition"),Fe.forEach(t),De.forEach(t),ke=c(p),G=n(p,"LI",{});var Je=i(G);R=n(Je,"A",{href:!0});var Oe=i(R);_e=d(Oe,"How to fine-tune an ASR system with the Trainer API"),Oe.forEach(t),Je.forEach(t),be=c(p),U=n(p,"LI",{});var Ve=i(U);Y=n(Ve,"A",{href:!0});var ze=i(Y);Ee=d(ze,"Building a demo"),ze.forEach(t),Ve.forEach(t),xe=c(p),j=n(p,"LI",{});var Ke=i(j);H=n(Ke,"A",{href:!0});var Qe=i(H);Ae=d(Qe,"Hands-on exercise"),Qe.forEach(t),Ke.forEach(t),p.forEach(t),this.h()},h(){l(v,"name","hf:doc:metadata"),l(v,"content",JSON.stringify(pt)),l(y,"id","what-youll-learn-and-what-youll-build"),l(y,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(y,"href","#what-youll-learn-and-what-youll-build"),l(w,"class","relative group"),Xe(b.src,Ie="https://huggingface.co/datasets/huggingface-course/audio-course-images/resolve/main/asr_diagram.png")||l(b,"src",Ie),l(b,"alt","Diagram of speech to text"),l(_,"class","flex justify-center"),Xe(m.src,Te="https://course-demos-whisper-small.hf.space")||l(m,"src",Te),l(m,"frameborder","0"),l(m,"width","850"),l(m,"height","450"),l(P,"href","asr_models"),l(L,"href","choosing_dataset"),l($,"href","evaluation"),l(R,"href","fine-tuning"),l(Y,"href","demo"),l(H,"href","hands_on")},m(e,s){a(document.head,v),r(e,D,s),r(e,w,s),a(w,y),a(y,q),st(k,q,null),a(w,ne),a(w,C),a(C,ie),r(e,F,s),r(e,g,s),a(g,se),a(g,M),a(M,re),a(g,le),r(e,J,s),r(e,_,s),a(_,b),r(e,O,s),r(e,E,s),a(E,he),r(e,V,s),r(e,x,s),a(x,ce),r(e,z,s),r(e,A,s),a(A,ue),r(e,K,s),r(e,m,s),r(e,Q,s),r(e,S,s),a(S,fe),r(e,X,s),r(e,I,s),a(I,de),r(e,Z,s),r(e,T,s),a(T,pe),r(e,ee,s),r(e,u,s),a(u,N),a(N,P),a(P,me),a(u,ve),a(u,B),a(B,L),a(L,we),a(u,ye),a(u,W),a(W,$),a($,ge),a(u,ke),a(u,G),a(G,R),a(R,_e),a(u,be),a(u,U),a(U,Y),a(Y,Ee),a(u,xe),a(u,j),a(j,H),a(H,Ae),te=!0},p:rt,i(e){te||(lt(k.$$.fragment,e),te=!0)},o(e){ht(k.$$.fragment,e),te=!1},d(e){t(v),e&&t(D),e&&t(w),ct(k),e&&t(F),e&&t(g),e&&t(J),e&&t(_),e&&t(O),e&&t(E),e&&t(V),e&&t(x),e&&t(z),e&&t(A),e&&t(K),e&&t(m),e&&t(Q),e&&t(S),e&&t(X),e&&t(I),e&&t(Z),e&&t(T),e&&t(ee),e&&t(u)}}}const pt={local:"what-youll-learn-and-what-youll-build",title:"What you'll learn and what you'll build"};function mt(Se){return ut(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class yt extends et{constructor(v){super();tt(this,v,mt,dt,at,{})}}export{yt as default,pt as metadata};
