import{s as A,n as F,o as J}from"../chunks/scheduler.cd324960.js";import{S as U,i as X,e as h,s as o,c as L,h as Z,a as $,d as a,b as i,f as N,g as E,j as H,k as R,l as B,m as l,n as j,t as k,o as G,p as S}from"../chunks/index.d5c3adcc.js";import{C as K,H as Q,E as V}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.fc13b46c.js";function W(z){let n,_,d,x,s,b,r,v,m,O="本节的练习不计入课程成绩，旨在帮助你熟悉本课程中将要使用的工具和库。如果你已经熟悉使用 Google Colab、🤗 Datasets、librosa 和 🤗 Transformers，你可以选择跳过本节练习。",C,p,q='<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>',w,f,D='如果你在这个练习中遇到了问题，可以参考<a href="https://colab.research.google.com/drive/1NGyo5wFpRj8TMfZOIuPaJHqyyXCITftc?usp=sharing" rel="nofollow">示例解决方案</a>。你发现了什么有趣的东西？找到了一个很酷的模型？得到了一个漂亮的频谱图？欢迎在 Twitter 上分享你的工作和发现！',T,c,I="在接下来的章节中，你会学习到更多关于各种音频Transformer架构的知识，并训练你自己的模型！",y,u,P,g,M;return s=new K({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),r=new Q({props:{title:"实战练习",local:"实战练习",headingTag:"h1"}}),u=new V({props:{source:"https://github.com/huggingface/audio-transformers-course/blob/main/chapters/zh-CN/chapter2/hands_on.mdx"}}),{c(){n=h("meta"),_=o(),d=h("p"),x=o(),L(s.$$.fragment),b=o(),L(r.$$.fragment),v=o(),m=h("p"),m.textContent=O,C=o(),p=h("ol"),p.innerHTML=q,w=o(),f=h("p"),f.innerHTML=D,T=o(),c=h("p"),c.textContent=I,y=o(),L(u.$$.fragment),P=o(),g=h("p"),this.h()},l(t){const e=Z("svelte-u9bgzb",document.head);n=$(e,"META",{name:!0,content:!0}),e.forEach(a),_=i(t),d=$(t,"P",{}),N(d).forEach(a),x=i(t),E(s.$$.fragment,t),b=i(t),E(r.$$.fragment,t),v=i(t),m=$(t,"P",{"data-svelte-h":!0}),H(m)!=="svelte-jm105e"&&(m.textContent=O),C=i(t),p=$(t,"OL",{"data-svelte-h":!0}),H(p)!=="svelte-d3k8fi"&&(p.innerHTML=q),w=i(t),f=$(t,"P",{"data-svelte-h":!0}),H(f)!=="svelte-h9rjt2"&&(f.innerHTML=D),T=i(t),c=$(t,"P",{"data-svelte-h":!0}),H(c)!=="svelte-16lfs5m"&&(c.textContent=I),y=i(t),E(u.$$.fragment,t),P=i(t),g=$(t,"P",{}),N(g).forEach(a),this.h()},h(){R(n,"name","hf:doc:metadata"),R(n,"content",Y)},m(t,e){B(document.head,n),l(t,_,e),l(t,d,e),l(t,x,e),j(s,t,e),l(t,b,e),j(r,t,e),l(t,v,e),l(t,m,e),l(t,C,e),l(t,p,e),l(t,w,e),l(t,f,e),l(t,T,e),l(t,c,e),l(t,y,e),j(u,t,e),l(t,P,e),l(t,g,e),M=!0},p:F,i(t){M||(k(s.$$.fragment,t),k(r.$$.fragment,t),k(u.$$.fragment,t),M=!0)},o(t){G(s.$$.fragment,t),G(r.$$.fragment,t),G(u.$$.fragment,t),M=!1},d(t){t&&(a(_),a(d),a(x),a(b),a(v),a(m),a(C),a(p),a(w),a(f),a(T),a(c),a(y),a(P),a(g)),a(n),S(s,t),S(r,t),S(u,t)}}}const Y='{"title":"实战练习","local":"实战练习","sections":[],"depth":1}';function tt(z){return J(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class nt extends U{constructor(n){super(),X(this,n,tt,W,A,{})}}export{nt as component};
