import{s as rt,a as mt,n as ft,o as ut}from"../chunks/scheduler.cd324960.js";import{S as pt,i as ot,e as s,s as a,c as F,h as ct,a as r,d as l,b as i,f as st,g as N,j as f,k as w,l as _t,m as n,n as O,t as V,o as B,p as J}from"../chunks/index.d5c3adcc.js";import{C as ht,H as xt,E as vt}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.87c38818.js";function dt(K){let u,L,M,b,o,y,c,H,_,Q="在本节中，我们将探讨如何使用 Transformers 将语音转换为文本，这一任务被称为 <em>语音识别</em>。",S,p,W='<img src="https://huggingface.co/datasets/huggingface-course/audio-course-images/resolve/main/asr_diagram.png" alt="语音到文本的示意图"/>',E,h,X=`语音识别，也称为自动语音识别（ASR）或语音转文本（STT），是最受欢迎和令人兴奋的语音处理任务之一。
它广泛应用于包括口述、语音助手、视频字幕和会议记录在内的多种应用中。`,A,x,Y=`您可能在不知不觉中多次使用过语音识别系统，比如说您智能手机中的数字助手（Siri、Google Assistant、Alexa）！
当您使用这些助手时，它们首先要做的就是将您的语音转写为书面文本，准备用于各种下游任务（比如为您查询天气预报 🌤️）。`,z,v,Z="试试下面的语音识别 demo。您可以使用麦克风录制自己的声音，或拖放音频样本文件进行转写：",q,m,tt="",et,R,d,lt=`语音识别是一项具有挑战性的任务，它需要对音频和文本都有所了解。输入的音频可能有很多背景噪音，并且可能由具有各种口音的说话人发出，这使得从中识别出语音变得困难。
书面文本可能包含无声音的字符，如标点符号，这些信息仅从音频中推断很困难。这些都是我们在构建有效的语音识别系统时必须克服的障碍！`,j,C,nt=`现在我们已经定义了我们的任务，我们可以开始更详细地研究语音识别。通过本单元的学习，您将对各种可用的预训练语音识别模型有一个良好的基本理解，并了解如何通过 🤗 Transformers 库使用它们。
您还将了解对一个领域或某种特定语言微调 ASR 模型的过程，使您能够为遇到的任何任务构建一个高效的系统。您将能够向您的亲朋好友现场演示您的模型，一个能够将任何语音转换为文本的模型！`,k,$,at="具体而言，我们将介绍：",G,T,it='<li><a href="asr_models">语音识别的预训练模型</a></li> <li><a href="choosing_dataset">选择数据集</a></li> <li><a href="evaluation">语音识别的评价指标</a></li> <li><a href="fine-tuning">微调语音识别模型</a></li> <li><a href="demo">创建 demo</a></li> <li><a href="hands_on">实战练习</a></li>',I,g,U,P,D;return o=new ht({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),c=new xt({props:{title:"单元简介",local:"单元简介",headingTag:"h1"}}),g=new vt({props:{source:"https://github.com/huggingface/audio-transformers-course/blob/main/chapters/zh-CN/chapter5/introduction.mdx"}}),{c(){u=s("meta"),L=a(),M=s("p"),b=a(),F(o.$$.fragment),y=a(),F(c.$$.fragment),H=a(),_=s("p"),_.innerHTML=Q,S=a(),p=s("div"),p.innerHTML=W,E=a(),h=s("p"),h.textContent=X,A=a(),x=s("p"),x.textContent=Y,z=a(),v=s("p"),v.textContent=Z,q=a(),m=s("iframe"),m.innerHTML=tt,R=a(),d=s("p"),d.textContent=lt,j=a(),C=s("p"),C.textContent=nt,k=a(),$=s("p"),$.textContent=at,G=a(),T=s("ul"),T.innerHTML=it,I=a(),F(g.$$.fragment),U=a(),P=s("p"),this.h()},l(t){const e=ct("svelte-u9bgzb",document.head);u=r(e,"META",{name:!0,content:!0}),e.forEach(l),L=i(t),M=r(t,"P",{}),st(M).forEach(l),b=i(t),N(o.$$.fragment,t),y=i(t),N(c.$$.fragment,t),H=i(t),_=r(t,"P",{"data-svelte-h":!0}),f(_)!=="svelte-1wneij3"&&(_.innerHTML=Q),S=i(t),p=r(t,"DIV",{class:!0,"data-svelte-h":!0}),f(p)!=="svelte-16h6g2l"&&(p.innerHTML=W),E=i(t),h=r(t,"P",{"data-svelte-h":!0}),f(h)!=="svelte-1a0kyrr"&&(h.textContent=X),A=i(t),x=r(t,"P",{"data-svelte-h":!0}),f(x)!=="svelte-1f96cy0"&&(x.textContent=Y),z=i(t),v=r(t,"P",{"data-svelte-h":!0}),f(v)!=="svelte-wqafy4"&&(v.textContent=Z),q=i(t),m=r(t,"IFRAME",{src:!0,frameborder:!0,width:!0,height:!0,"data-svelte-h":!0}),f(m)!=="svelte-aw0ubw"&&(m.innerHTML=tt),R=i(t),d=r(t,"P",{"data-svelte-h":!0}),f(d)!=="svelte-1cn4pkz"&&(d.textContent=lt),j=i(t),C=r(t,"P",{"data-svelte-h":!0}),f(C)!=="svelte-94zp8i"&&(C.textContent=nt),k=i(t),$=r(t,"P",{"data-svelte-h":!0}),f($)!=="svelte-51rpan"&&($.textContent=at),G=i(t),T=r(t,"UL",{"data-svelte-h":!0}),f(T)!=="svelte-1q8lgtd"&&(T.innerHTML=it),I=i(t),N(g.$$.fragment,t),U=i(t),P=r(t,"P",{}),st(P).forEach(l),this.h()},h(){w(u,"name","hf:doc:metadata"),w(u,"content",Ct),w(p,"class","flex justify-center"),mt(m.src,et="https://course-demos-whisper-small.hf.space")||w(m,"src",et),w(m,"frameborder","0"),w(m,"width","850"),w(m,"height","450")},m(t,e){_t(document.head,u),n(t,L,e),n(t,M,e),n(t,b,e),O(o,t,e),n(t,y,e),O(c,t,e),n(t,H,e),n(t,_,e),n(t,S,e),n(t,p,e),n(t,E,e),n(t,h,e),n(t,A,e),n(t,x,e),n(t,z,e),n(t,v,e),n(t,q,e),n(t,m,e),n(t,R,e),n(t,d,e),n(t,j,e),n(t,C,e),n(t,k,e),n(t,$,e),n(t,G,e),n(t,T,e),n(t,I,e),O(g,t,e),n(t,U,e),n(t,P,e),D=!0},p:ft,i(t){D||(V(o.$$.fragment,t),V(c.$$.fragment,t),V(g.$$.fragment,t),D=!0)},o(t){B(o.$$.fragment,t),B(c.$$.fragment,t),B(g.$$.fragment,t),D=!1},d(t){t&&(l(L),l(M),l(b),l(y),l(H),l(_),l(S),l(p),l(E),l(h),l(A),l(x),l(z),l(v),l(q),l(m),l(R),l(d),l(j),l(C),l(k),l($),l(G),l(T),l(I),l(U),l(P)),l(u),J(o,t),J(c,t),J(g,t)}}}const Ct='{"title":"单元简介","local":"单元简介","sections":[],"depth":1}';function $t(K){return ut(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Mt extends pt{constructor(u){super(),ot(this,u,$t,dt,rt,{})}}export{Mt as component};
