import{s as I,n as N,o as R}from"../chunks/scheduler.f7e1785c.js";import{S as F,i as J,g as u,s as n,r as k,A as U,h,f as a,c as s,j as G,u as O,x as H,k as S,y as X,a as l,v as q,d as z,t as A,w as D}from"../chunks/index.9f8f0838.js";import{H as Z,E as B}from"../chunks/getInferenceSnippets.ba5f4cd0.js";function K(y){let o,g,d,$,i,b,r,M="本节的练习不计入课程成绩，旨在帮助你熟悉本课程中将要使用的工具和库。如果你已经熟悉使用 Google Colab、🤗 Datasets、librosa 和 🤗 Transformers，你可以选择跳过本节练习。",v,m,E='<li>创建一个 <a href="https://colab.research.google.com" rel="nofollow">Google Colab</a> 笔记本。</li> <li>使用 🤗 Datasets 加载 <a href="https://huggingface.co/datasets/facebook/voxpopuli" rel="nofollow"><code>facebook/voxpopuli</code> 数据集</a> 的训练集，语言任选，使用流式加载模式。</li> <li>获取数据集<code>train</code>部分的第三个样本并探索它。根据这个样本所拥有的特征，你可以用这个数据集做哪些音频任务？</li> <li>绘制这个样本的波形图和频谱图。</li> <li>前往 <a href="https://huggingface.co/models" rel="nofollow">🤗 Hub</a>，探索预训练模型并找到一个可以用于你之前选择的语言的自动语音识别的模型。使用你找到的模型实例化一个对应的 pipeline，并转录这个样本。</li> <li>将你从 pipeline 得到的转录与样本的真实转录文字进行比较。</li>',x,p,L='如果你在这个练习中遇到了问题，可以参考<a href="https://colab.research.google.com/drive/1NGyo5wFpRj8TMfZOIuPaJHqyyXCITftc?usp=sharing" rel="nofollow">示例解决方案</a>。你发现了什么有趣的东西？找到了一个很酷的模型？得到了一个漂亮的频谱图？欢迎在 Twitter 上分享你的工作和发现！',w,f,j="在接下来的章节中，你会学习到更多关于各种音频Transformer架构的知识，并训练你自己的模型！",C,c,T,_,P;return i=new Z({props:{title:"实战练习",local:"实战练习",headingTag:"h1"}}),c=new B({props:{source:"https://github.com/huggingface/audio-transformers-course/blob/main/chapters/zh-CN/chapter2/hands_on.mdx"}}),{c(){o=u("meta"),g=n(),d=u("p"),$=n(),k(i.$$.fragment),b=n(),r=u("p"),r.textContent=M,v=n(),m=u("ol"),m.innerHTML=E,x=n(),p=u("p"),p.innerHTML=L,w=n(),f=u("p"),f.textContent=j,C=n(),k(c.$$.fragment),T=n(),_=u("p"),this.h()},l(t){const e=U("svelte-u9bgzb",document.head);o=h(e,"META",{name:!0,content:!0}),e.forEach(a),g=s(t),d=h(t,"P",{}),G(d).forEach(a),$=s(t),O(i.$$.fragment,t),b=s(t),r=h(t,"P",{"data-svelte-h":!0}),H(r)!=="svelte-jm105e"&&(r.textContent=M),v=s(t),m=h(t,"OL",{"data-svelte-h":!0}),H(m)!=="svelte-d3k8fi"&&(m.innerHTML=E),x=s(t),p=h(t,"P",{"data-svelte-h":!0}),H(p)!=="svelte-h9rjt2"&&(p.innerHTML=L),w=s(t),f=h(t,"P",{"data-svelte-h":!0}),H(f)!=="svelte-16lfs5m"&&(f.textContent=j),C=s(t),O(c.$$.fragment,t),T=s(t),_=h(t,"P",{}),G(_).forEach(a),this.h()},h(){S(o,"name","hf:doc:metadata"),S(o,"content",Q)},m(t,e){X(document.head,o),l(t,g,e),l(t,d,e),l(t,$,e),q(i,t,e),l(t,b,e),l(t,r,e),l(t,v,e),l(t,m,e),l(t,x,e),l(t,p,e),l(t,w,e),l(t,f,e),l(t,C,e),q(c,t,e),l(t,T,e),l(t,_,e),P=!0},p:N,i(t){P||(z(i.$$.fragment,t),z(c.$$.fragment,t),P=!0)},o(t){A(i.$$.fragment,t),A(c.$$.fragment,t),P=!1},d(t){t&&(a(g),a(d),a($),a(b),a(r),a(v),a(m),a(x),a(p),a(w),a(f),a(C),a(T),a(_)),a(o),D(i,t),D(c,t)}}}const Q='{"title":"实战练习","local":"实战练习","sections":[],"depth":1}';function V(y){return R(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class et extends F{constructor(o){super(),J(this,o,V,K,I,{})}}export{et as component};
