import{s as ue,o as je,n as ut}from"../chunks/scheduler.56730f09.js";import{S as ye,i as fe,g as r,s as a,u as M,A as Je,h as c,f as t,c as n,j as k,v as d,y as h,k as w,o as T,a as e,w as u,d as j,t as y,x as f,m as ge,n as Ue}from"../chunks/index.ba464511.js";import{T as Ul}from"../chunks/Tip.70442610.js";import{Y as we}from"../chunks/Youtube.7b20230c.js";import{I as nt}from"../chunks/IconCopyLink.89bde88e.js";import{C as $}from"../chunks/CodeBlock.2302fd0d.js";import{D as Te}from"../chunks/DocNotebookDropdown.68fd8653.js";import{F as Me,M as de}from"../chunks/Markdown.6303afae.js";function be(R){let p,J,i='<a href="../model_doc/data2vec-audio">Data2VecAudio</a>, <a href="../model_doc/hubert">Hubert</a>, <a href="../model_doc/mctct">M-CTC-T</a>, <a href="../model_doc/sew">SEW</a>, <a href="../model_doc/sew-d">SEW-D</a>, <a href="../model_doc/unispeech">UniSpeech</a>, <a href="../model_doc/unispeech-sat">UniSpeechSat</a>, <a href="../model_doc/wav2vec2">Wav2Vec2</a>, <a href="../model_doc/wav2vec2-conformer">Wav2Vec2-Conformer</a>, <a href="../model_doc/wavlm">WavLM</a>';return{c(){p=ge(`이 튜토리얼에서 설명하는 작업은 다음 모델 아키텍처에 의해 지원됩니다:

`),J=r("p"),J.innerHTML=i},l(g){p=Ue(g,`이 튜토리얼에서 설명하는 작업은 다음 모델 아키텍처에 의해 지원됩니다:

`),J=c(g,"P",{"data-svelte-h":!0}),h(J)!=="svelte-1xfq5e"&&(J.innerHTML=i)},m(g,U){e(g,p,U),e(g,J,U)},p:ut,d(g){g&&(t(p),t(J))}}}function $e(R){let p,J='<code>Trainer</code>로 모델을 미세 조정하는 것이 익숙하지 않다면, <a href="../training#train-with-pytorch-trainer">여기</a>에서 기본 튜토리얼을 확인해보세요!';return{c(){p=r("p"),p.innerHTML=J},l(i){p=c(i,"P",{"data-svelte-h":!0}),h(p)!=="svelte-40ivbg"&&(p.innerHTML=J)},m(i,g){e(i,p,g)},p:ut,d(i){i&&t(p)}}}function _e(R){let p,J,i,g="이제 모델 훈련을 시작할 준비가 되었습니다! <code>AutoModelForCTC</code>로 Wav2Vec2를 가져오세요. <code>ctc_loss_reduction</code> 매개변수로 CTC 손실에 적용할 축소(reduction) 방법을 지정하세요. 기본값인 합계 대신 평균을 사용하는 것이 더 좋은 경우가 많습니다:",U,b,E,C,V="이제 세 단계만 남았습니다:",W,Q,B="<li><code>TrainingArguments</code>에서 훈련 하이퍼파라미터를 정의하세요. <code>output_dir</code>은 모델을 저장할 경로를 지정하는 유일한 필수 매개변수입니다. <code>push_to_hub=True</code>를 설정하여 모델을 Hub에 업로드 할 수 있습니다(모델을 업로드하려면 Hugging Face에 로그인해야 합니다). <code>Trainer</code>는 각 에폭마다 WER을 평가하고 훈련 체크포인트를 저장합니다.</li> <li>모델, 데이터 세트, 토크나이저, 데이터 콜레이터, <code>compute_metrics</code> 함수와 함께 <code>Trainer</code>에 훈련 인수를 전달하세요.</li> <li><code>train()</code>을 호출하여 모델을 미세 조정하세요.</li>",x,I,Z,m,v="훈련이 완료되면 모두가 모델을 사용할 수 있도록 <code>push_to_hub()</code> 메소드를 사용하여 모델을 Hub에 공유하세요:",es,G,X;return p=new Ul({props:{$$slots:{default:[$e]},$$scope:{ctx:R}}}),b=new $({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvckNUQyUyQyUyMFRyYWluaW5nQXJndW1lbnRzJTJDJTIwVHJhaW5lciUwQSUwQW1vZGVsJTIwJTNEJTIwQXV0b01vZGVsRm9yQ1RDLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJmYWNlYm9vayUyRndhdjJ2ZWMyLWJhc2UlMjIlMkMlMEElMjAlMjAlMjAlMjBjdGNfbG9zc19yZWR1Y3Rpb24lM0QlMjJtZWFuJTIyJTJDJTBBJTIwJTIwJTIwJTIwcGFkX3Rva2VuX2lkJTNEcHJvY2Vzc29yLnRva2VuaXplci5wYWRfdG9rZW5faWQlMkMlMEEp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForCTC, TrainingArguments, Trainer

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForCTC.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;facebook/wav2vec2-base&quot;</span>,
<span class="hljs-meta">... </span>    ctc_loss_reduction=<span class="hljs-string">&quot;mean&quot;</span>,
<span class="hljs-meta">... </span>    pad_token_id=processor.tokenizer.pad_token_id,
<span class="hljs-meta">... </span>)`,wrap:!1}}),I=new $({props:{code:"dHJhaW5pbmdfYXJncyUyMCUzRCUyMFRyYWluaW5nQXJndW1lbnRzKCUwQSUyMCUyMCUyMCUyMG91dHB1dF9kaXIlM0QlMjJteV9hd2Vzb21lX2Fzcl9taW5kX21vZGVsJTIyJTJDJTBBJTIwJTIwJTIwJTIwcGVyX2RldmljZV90cmFpbl9iYXRjaF9zaXplJTNEOCUyQyUwQSUyMCUyMCUyMCUyMGdyYWRpZW50X2FjY3VtdWxhdGlvbl9zdGVwcyUzRDIlMkMlMEElMjAlMjAlMjAlMjBsZWFybmluZ19yYXRlJTNEMWUtNSUyQyUwQSUyMCUyMCUyMCUyMHdhcm11cF9zdGVwcyUzRDUwMCUyQyUwQSUyMCUyMCUyMCUyMG1heF9zdGVwcyUzRDIwMDAlMkMlMEElMjAlMjAlMjAlMjBncmFkaWVudF9jaGVja3BvaW50aW5nJTNEVHJ1ZSUyQyUwQSUyMCUyMCUyMCUyMGZwMTYlM0RUcnVlJTJDJTBBJTIwJTIwJTIwJTIwZ3JvdXBfYnlfbGVuZ3RoJTNEVHJ1ZSUyQyUwQSUyMCUyMCUyMCUyMGV2YWx1YXRpb25fc3RyYXRlZ3klM0QlMjJzdGVwcyUyMiUyQyUwQSUyMCUyMCUyMCUyMHBlcl9kZXZpY2VfZXZhbF9iYXRjaF9zaXplJTNEOCUyQyUwQSUyMCUyMCUyMCUyMHNhdmVfc3RlcHMlM0QxMDAwJTJDJTBBJTIwJTIwJTIwJTIwZXZhbF9zdGVwcyUzRDEwMDAlMkMlMEElMjAlMjAlMjAlMjBsb2dnaW5nX3N0ZXBzJTNEMjUlMkMlMEElMjAlMjAlMjAlMjBsb2FkX2Jlc3RfbW9kZWxfYXRfZW5kJTNEVHJ1ZSUyQyUwQSUyMCUyMCUyMCUyMG1ldHJpY19mb3JfYmVzdF9tb2RlbCUzRCUyMndlciUyMiUyQyUwQSUyMCUyMCUyMCUyMGdyZWF0ZXJfaXNfYmV0dGVyJTNERmFsc2UlMkMlMEElMjAlMjAlMjAlMjBwdXNoX3RvX2h1YiUzRFRydWUlMkMlMEEpJTBBJTBBdHJhaW5lciUyMCUzRCUyMFRyYWluZXIoJTBBJTIwJTIwJTIwJTIwbW9kZWwlM0Rtb2RlbCUyQyUwQSUyMCUyMCUyMCUyMGFyZ3MlM0R0cmFpbmluZ19hcmdzJTJDJTBBJTIwJTIwJTIwJTIwdHJhaW5fZGF0YXNldCUzRGVuY29kZWRfbWluZHMlNUIlMjJ0cmFpbiUyMiU1RCUyQyUwQSUyMCUyMCUyMCUyMGV2YWxfZGF0YXNldCUzRGVuY29kZWRfbWluZHMlNUIlMjJ0ZXN0JTIyJTVEJTJDJTBBJTIwJTIwJTIwJTIwdG9rZW5pemVyJTNEcHJvY2Vzc29yLmZlYXR1cmVfZXh0cmFjdG9yJTJDJTBBJTIwJTIwJTIwJTIwZGF0YV9jb2xsYXRvciUzRGRhdGFfY29sbGF0b3IlMkMlMEElMjAlMjAlMjAlMjBjb21wdXRlX21ldHJpY3MlM0Rjb21wdXRlX21ldHJpY3MlMkMlMEEpJTBBJTBBdHJhaW5lci50cmFpbigp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>training_args = TrainingArguments(
<span class="hljs-meta">... </span>    output_dir=<span class="hljs-string">&quot;my_awesome_asr_mind_model&quot;</span>,
<span class="hljs-meta">... </span>    per_device_train_batch_size=<span class="hljs-number">8</span>,
<span class="hljs-meta">... </span>    gradient_accumulation_steps=<span class="hljs-number">2</span>,
<span class="hljs-meta">... </span>    learning_rate=<span class="hljs-number">1e-5</span>,
<span class="hljs-meta">... </span>    warmup_steps=<span class="hljs-number">500</span>,
<span class="hljs-meta">... </span>    max_steps=<span class="hljs-number">2000</span>,
<span class="hljs-meta">... </span>    gradient_checkpointing=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>    fp16=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>    group_by_length=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>    evaluation_strategy=<span class="hljs-string">&quot;steps&quot;</span>,
<span class="hljs-meta">... </span>    per_device_eval_batch_size=<span class="hljs-number">8</span>,
<span class="hljs-meta">... </span>    save_steps=<span class="hljs-number">1000</span>,
<span class="hljs-meta">... </span>    eval_steps=<span class="hljs-number">1000</span>,
<span class="hljs-meta">... </span>    logging_steps=<span class="hljs-number">25</span>,
<span class="hljs-meta">... </span>    load_best_model_at_end=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>    metric_for_best_model=<span class="hljs-string">&quot;wer&quot;</span>,
<span class="hljs-meta">... </span>    greater_is_better=<span class="hljs-literal">False</span>,
<span class="hljs-meta">... </span>    push_to_hub=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>trainer = Trainer(
<span class="hljs-meta">... </span>    model=model,
<span class="hljs-meta">... </span>    args=training_args,
<span class="hljs-meta">... </span>    train_dataset=encoded_minds[<span class="hljs-string">&quot;train&quot;</span>],
<span class="hljs-meta">... </span>    eval_dataset=encoded_minds[<span class="hljs-string">&quot;test&quot;</span>],
<span class="hljs-meta">... </span>    tokenizer=processor.feature_extractor,
<span class="hljs-meta">... </span>    data_collator=data_collator,
<span class="hljs-meta">... </span>    compute_metrics=compute_metrics,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>trainer.train()`,wrap:!1}}),G=new $({props:{code:"dHJhaW5lci5wdXNoX3RvX2h1Yigp",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>trainer.push_to_hub()',wrap:!1}}),{c(){M(p.$$.fragment),J=a(),i=r("p"),i.innerHTML=g,U=a(),M(b.$$.fragment),E=a(),C=r("p"),C.textContent=V,W=a(),Q=r("ol"),Q.innerHTML=B,x=a(),M(I.$$.fragment),Z=a(),m=r("p"),m.innerHTML=v,es=a(),M(G.$$.fragment)},l(o){d(p.$$.fragment,o),J=n(o),i=c(o,"P",{"data-svelte-h":!0}),h(i)!=="svelte-lskiab"&&(i.innerHTML=g),U=n(o),d(b.$$.fragment,o),E=n(o),C=c(o,"P",{"data-svelte-h":!0}),h(C)!=="svelte-1vwg7jz"&&(C.textContent=V),W=n(o),Q=c(o,"OL",{"data-svelte-h":!0}),h(Q)!=="svelte-1jcsgp0"&&(Q.innerHTML=B),x=n(o),d(I.$$.fragment,o),Z=n(o),m=c(o,"P",{"data-svelte-h":!0}),h(m)!=="svelte-u37ejb"&&(m.innerHTML=v),es=n(o),d(G.$$.fragment,o)},m(o,_){u(p,o,_),e(o,J,_),e(o,i,_),e(o,U,_),u(b,o,_),e(o,E,_),e(o,C,_),e(o,W,_),e(o,Q,_),e(o,x,_),u(I,o,_),e(o,Z,_),e(o,m,_),e(o,es,_),u(G,o,_),X=!0},p(o,_){const N={};_&2&&(N.$$scope={dirty:_,ctx:o}),p.$set(N)},i(o){X||(j(p.$$.fragment,o),j(b.$$.fragment,o),j(I.$$.fragment,o),j(G.$$.fragment,o),X=!0)},o(o){y(p.$$.fragment,o),y(b.$$.fragment,o),y(I.$$.fragment,o),y(G.$$.fragment,o),X=!1},d(o){o&&(t(J),t(i),t(U),t(E),t(C),t(W),t(Q),t(x),t(Z),t(m),t(es)),f(p,o),f(b,o),f(I,o),f(G,o)}}}function ve(R){let p,J;return p=new de({props:{$$slots:{default:[_e]},$$scope:{ctx:R}}}),{c(){M(p.$$.fragment)},l(i){d(p.$$.fragment,i)},m(i,g){u(p,i,g),J=!0},p(i,g){const U={};g&2&&(U.$$scope={dirty:g,ctx:i}),p.$set(U)},i(i){J||(j(p.$$.fragment,i),J=!0)},o(i){y(p.$$.fragment,i),J=!1},d(i){f(p,i)}}}function Ce(R){let p,J='자동 음성 인식을 위해 모델을 미세 조정하는 더 자세한 예제는 영어 자동 음성 인식을 위한 <a href="https://huggingface.co/blog/fine-tune-wav2vec2-english" rel="nofollow">블로그 포스트</a>와 다국어 자동 음성 인식을 위한 <a href="https://huggingface.co/blog/fine-tune-xlsr-wav2vec2" rel="nofollow">포스트</a>를 참조하세요.';return{c(){p=r("p"),p.innerHTML=J},l(i){p=c(i,"P",{"data-svelte-h":!0}),h(p)!=="svelte-1aqt9cb"&&(p.innerHTML=J)},m(i,g){e(i,p,g)},p:ut,d(i){i&&t(p)}}}function Ie(R){let p,J="텍스트로 변환된 결과가 꽤 괜찮지만 더 좋을 수도 있습니다! 더 나은 결과를 얻으려면 더 많은 예제로 모델을 미세 조정하세요!";return{c(){p=r("p"),p.textContent=J},l(i){p=c(i,"P",{"data-svelte-h":!0}),h(p)!=="svelte-1bgb7bv"&&(p.textContent=J)},m(i,g){e(i,p,g)},p:ut,d(i){i&&t(p)}}}function ke(R){let p,J="오디오 파일과 텍스트를 전처리하고 PyTorch 텐서로 <code>input</code>을 반환할 프로세서를 가져오세요:",i,g,U,b,E="입력을 모델에 전달하고 로짓을 반환하세요:",C,V,W,Q,B="가장 높은 확률의 <code>input_ids</code>를 예측하고, 프로세서를 사용하여 예측된 <code>input_ids</code>를 다시 텍스트로 디코딩하세요:",x,I,Z;return g=new $({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMEElMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJzdGV2aGxpdSUyRm15X2F3ZXNvbWVfYXNyX21pbmRfbW9kZWwlMjIpJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGRhdGFzZXQlNUIwJTVEJTVCJTIyYXVkaW8lMjIlNUQlNUIlMjJhcnJheSUyMiU1RCUyQyUyMHNhbXBsaW5nX3JhdGUlM0RzYW1wbGluZ19yYXRlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;stevhliu/my_awesome_asr_mind_model&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(dataset[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>], sampling_rate=sampling_rate, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)`,wrap:!1}}),V=new $({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvckNUQyUwQSUwQW1vZGVsJTIwJTNEJTIwQXV0b01vZGVsRm9yQ1RDLmZyb21fcHJldHJhaW5lZCglMjJzdGV2aGxpdSUyRm15X2F3ZXNvbWVfYXNyX21pbmRfbW9kZWwlMjIpJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForCTC

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForCTC.from_pretrained(<span class="hljs-string">&quot;stevhliu/my_awesome_asr_mind_model&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits`,wrap:!1}}),I=new $({props:{code:"aW1wb3J0JTIwdG9yY2glMEElMEFwcmVkaWN0ZWRfaWRzJTIwJTNEJTIwdG9yY2guYXJnbWF4KGxvZ2l0cyUyQyUyMGRpbSUzRC0xKSUwQXRyYW5zY3JpcHRpb24lMjAlM0QlMjBwcm9jZXNzb3IuYmF0Y2hfZGVjb2RlKHByZWRpY3RlZF9pZHMpJTBBdHJhbnNjcmlwdGlvbg==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_ids = torch.argmax(logits, dim=-<span class="hljs-number">1</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>transcription = processor.batch_decode(predicted_ids)
<span class="hljs-meta">&gt;&gt;&gt; </span>transcription
[<span class="hljs-string">&#x27;I WOUL LIKE O SET UP JOINT ACOUNT WTH Y PARTNER&#x27;</span>]`,wrap:!1}}),{c(){p=r("p"),p.innerHTML=J,i=a(),M(g.$$.fragment),U=a(),b=r("p"),b.textContent=E,C=a(),M(V.$$.fragment),W=a(),Q=r("p"),Q.innerHTML=B,x=a(),M(I.$$.fragment)},l(m){p=c(m,"P",{"data-svelte-h":!0}),h(p)!=="svelte-1l4sx2f"&&(p.innerHTML=J),i=n(m),d(g.$$.fragment,m),U=n(m),b=c(m,"P",{"data-svelte-h":!0}),h(b)!=="svelte-2w5h5p"&&(b.textContent=E),C=n(m),d(V.$$.fragment,m),W=n(m),Q=c(m,"P",{"data-svelte-h":!0}),h(Q)!=="svelte-v9dw3r"&&(Q.innerHTML=B),x=n(m),d(I.$$.fragment,m)},m(m,v){e(m,p,v),e(m,i,v),u(g,m,v),e(m,U,v),e(m,b,v),e(m,C,v),u(V,m,v),e(m,W,v),e(m,Q,v),e(m,x,v),u(I,m,v),Z=!0},p:ut,i(m){Z||(j(g.$$.fragment,m),j(V.$$.fragment,m),j(I.$$.fragment,m),Z=!0)},o(m){y(g.$$.fragment,m),y(V.$$.fragment,m),y(I.$$.fragment,m),Z=!1},d(m){m&&(t(p),t(i),t(U),t(b),t(C),t(W),t(Q),t(x)),f(g,m),f(V,m),f(I,m)}}}function Re(R){let p,J;return p=new de({props:{$$slots:{default:[ke]},$$scope:{ctx:R}}}),{c(){M(p.$$.fragment)},l(i){d(p.$$.fragment,i)},m(i,g){u(p,i,g),J=!0},p(i,g){const U={};g&2&&(U.$$scope={dirty:g,ctx:i}),p.$set(U)},i(i){J||(j(p.$$.fragment,i),J=!0)},o(i){y(p.$$.fragment,i),J=!1},d(i){f(p,i)}}}function Qe(R){let p,J,i,g,U,b,E,C,V,W,Q="자동 음성 인식",B,x,I,Z,m,v,es=`자동 음성 인식(Automatic Speech Recognition, ASR)은 음성 신호를 텍스트로 변환하여 음성 입력 시퀀스를 텍스트 출력에 매핑합니다.
Siri와 Alexa와 같은 가상 어시스턴트는 ASR 모델을 사용하여 일상적으로 사용자를 돕고 있으며, 회의 중 라이브 캡션 및 메모 작성과 같은 유용한 사용자 친화적 응용 프로그램도 많이 있습니다.`,G,X,o="이 가이드에서 소개할 내용은 아래와 같습니다:",_,N,vl='<li><a href="https://huggingface.co/datasets/PolyAI/minds14" rel="nofollow">MInDS-14</a> 데이터 세트에서 <a href="https://huggingface.co/facebook/wav2vec2-base" rel="nofollow">Wav2Vec2</a>를 미세 조정하여 오디오를 텍스트로 변환합니다.</li> <li>미세 조정한 모델을 추론에 사용합니다.</li>',jt,q,yt,as,Cl="시작하기 전에 필요한 모든 라이브러리가 설치되어 있는지 확인하세요:",ft,ns,Jt,ps,Il="Hugging Face 계정에 로그인하면 모델을 업로드하고 커뮤니티에 공유할 수 있습니다. 토큰을 입력하여 로그인하세요.",gt,rs,Ut,H,S,pt,cs,wl,st,kl="MInDS-14 데이터 세트 가져오기",wt,is,Rl=`먼저, 🤗 Datasets 라이브러리에서 <a href="https://huggingface.co/datasets/PolyAI/minds14" rel="nofollow">MInDS-14</a> 데이터 세트의 일부분을 가져오세요.
이렇게 하면 전체 데이터 세트에 대한 훈련에 시간을 들이기 전에 모든 것이 작동하는지 실험하고 검증할 수 있습니다.`,Tt,os,bt,ms,Ql="<code>~Dataset.train_test_split</code> 메소드를 사용하여 데이터 세트의 <code>train</code>을 훈련 세트와 테스트 세트로 나누세요:",$t,hs,_t,Ms,xl="그리고 데이터 세트를 확인하세요:",vt,ds,Ct,us,Zl="데이터 세트에는 <code>lang_id</code>와 <code>english_transcription</code>과 같은 유용한 정보가 많이 포함되어 있지만, 이 가이드에서는 <code>audio</code>와 <code>transcription</code>에 초점을 맞출 것입니다. 다른 열은 <code>remove_columns</code> 메소드를 사용하여 제거하세요:",It,js,kt,ys,Wl="예시를 다시 한번 확인해보세요:",Rt,fs,Qt,Js,Vl="두 개의 필드가 있습니다:",xt,gs,El="<li><code>audio</code>: 오디오 파일을 가져오고 리샘플링하기 위해 호출해야 하는 음성 신호의 1차원 <code>array(배열)</code></li> <li><code>transcription</code>: 목표 텍스트</li>",Zt,A,D,rt,Us,Tl,tt,Gl="전처리",Wt,ws,Xl="다음으로 오디오 신호를 처리하기 위한 Wav2Vec2 프로세서를 가져옵니다:",Vt,Ts,Et,bs,Bl='MInDS-14 데이터 세트의 샘플링 레이트는 8000kHz이므로(<a href="https://huggingface.co/datasets/PolyAI/minds14" rel="nofollow">데이터 세트 카드</a>에서 확인), 사전 훈련된 Wav2Vec2 모델을 사용하려면 데이터 세트를 16000kHz로 리샘플링해야 합니다:',Gt,$s,Xt,_s,Nl="위의 ‘transcription’에서 볼 수 있듯이 텍스트는 대문자와 소문자가 섞여 있습니다. Wav2Vec2 토크나이저는 대문자 문자에 대해서만 훈련되어 있으므로 텍스트가 토크나이저의 어휘와 일치하는지 확인해야 합니다:",Bt,vs,Nt,Cs,Hl="이제 다음 작업을 수행할 전처리 함수를 만들어보겠습니다:",Ht,Is,Al="<li><code>audio</code> 열을 호출하여 오디오 파일을 가져오고 리샘플링합니다.</li> <li>오디오 파일에서 <code>input_values</code>를 추출하고 프로세서로 <code>transcription</code> 열을 토큰화합니다.</li>",At,ks,Yt,Rs,Yl="전체 데이터 세트에 전처리 함수를 적용하려면 🤗 Datasets <code>map</code> 함수를 사용하세요. <code>num_proc</code> 매개변수를 사용하여 프로세스 수를 늘리면 <code>map</code>의 속도를 높일 수 있습니다. <code>remove_columns</code> 메소드를 사용하여 필요하지 않은 열을 제거하세요:",zt,Qs,Ft,xs,zl="🤗 Transformers에는 자동 음성 인식용 데이터 콜레이터가 없으므로 예제 배치를 생성하려면 <code>DataCollatorWithPadding</code>을 조정해야 합니다. 이렇게 하면 데이터 콜레이터는 텍스트와 레이블을 배치에서 가장 긴 요소의 길이에 동적으로 패딩하여 길이를 균일하게 합니다. <code>tokenizer</code> 함수에서 <code>padding=True</code>를 설정하여 텍스트를 패딩할 수 있지만, 동적 패딩이 더 효율적입니다.",qt,Zs,Fl="다른 데이터 콜레이터와 달리 이 특정 데이터 콜레이터는 <code>input_values</code>와 <code>labels</code>에 대해 다른 패딩 방법을 적용해야 합니다.",St,Ws,Dt,Vs,ql="이제 <code>DataCollatorForCTCWithPadding</code>을 인스턴스화합니다:",Lt,Es,Pt,Y,L,ct,Gs,bl,lt,Sl="평가하기",Ot,Xs,Dl=`훈련 중에 평가 지표를 포함하면 모델의 성능을 평가하는 데 도움이 되는 경우가 많습니다. 🤗 <a href="https://huggingface.co/docs/evaluate/index" rel="nofollow">Evaluate</a> 라이브러리를 사용하면 평가 방법을 빠르게 불러올 수 있습니다.
이 작업에서는 <a href="https://huggingface.co/spaces/evaluate-metric/wer" rel="nofollow">단어 오류율(Word Error Rate, WER)</a> 평가 지표를 가져옵니다.
(평가 지표를 불러오고 계산하는 방법은 🤗 Evaluate <a href="https://huggingface.co/docs/evaluate/a_quick_tour" rel="nofollow">둘러보기</a>를 참조하세요):`,Kt,Bs,sl,Ns,Ll="그런 다음 예측값과 레이블을 <code>compute</code>에 전달하여 WER을 계산하는 함수를 만듭니다:",tl,Hs,ll,As,Pl="이제 <code>compute_metrics</code> 함수를 사용할 준비가 되었으며, 훈련을 설정할 때 이 함수로 되돌아올 것입니다.",el,z,P,it,Ys,$l,et,Ol="훈련하기",al,O,nl,K,pl,F,ss,ot,zs,_l,at,Kl="추론하기",rl,Fs,se="좋아요, 이제 모델을 미세 조정했으니 추론에 사용할 수 있습니다!",cl,qs,te="추론에 사용할 오디오 파일을 가져오세요. 필요한 경우 오디오 파일의 샘플링 비율을 모델의 샘플링 레이트에 맞게 리샘플링하는 것을 잊지 마세요!",il,Ss,ol,Ds,le="추론을 위해 미세 조정된 모델을 시험해보는 가장 간단한 방법은 <code>pipeline()</code>을 사용하는 것입니다. 모델을 사용하여 자동 음성 인식을 위한 <code>pipeline</code>을 인스턴스화하고 오디오 파일을 전달하세요:",ml,Ls,hl,ts,Ml,Ps,ee="<code>pipeline</code>의 결과를 수동으로 재현할 수도 있습니다:",dl,ls,ul,mt,jl;return C=new nt({}),x=new Te({props:{classNames:"absolute z-10 right-0 top-0",options:[{label:"Mixed",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/ko/asr.ipynb"},{label:"PyTorch",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/ko/pytorch/asr.ipynb"},{label:"TensorFlow",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/ko/tensorflow/asr.ipynb"},{label:"Mixed",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/ko/asr.ipynb"},{label:"PyTorch",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/ko/pytorch/asr.ipynb"},{label:"TensorFlow",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/ko/tensorflow/asr.ipynb"}]}}),Z=new we({props:{id:"TksaY_FDgnk"}}),q=new Ul({props:{$$slots:{default:[be]},$$scope:{ctx:R}}}),ns=new $({props:{code:"cGlwJTIwaW5zdGFsbCUyMHRyYW5zZm9ybWVycyUyMGRhdGFzZXRzJTIwZXZhbHVhdGUlMjBqaXdlcg==",highlighted:"pip install transformers datasets evaluate jiwer",wrap:!1}}),rs=new $({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMG5vdGVib29rX2xvZ2luJTBBJTBBbm90ZWJvb2tfbG9naW4oKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> notebook_login

<span class="hljs-meta">&gt;&gt;&gt; </span>notebook_login()`,wrap:!1}}),cs=new nt({}),os=new $({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTJDJTIwQXVkaW8lMEElMEFtaW5kcyUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJQb2x5QUklMkZtaW5kczE0JTIyJTJDJTIwbmFtZSUzRCUyMmVuLVVTJTIyJTJDJTIwc3BsaXQlM0QlMjJ0cmFpbiU1QiUzQTEwMCU1RCUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset, Audio

<span class="hljs-meta">&gt;&gt;&gt; </span>minds = load_dataset(<span class="hljs-string">&quot;PolyAI/minds14&quot;</span>, name=<span class="hljs-string">&quot;en-US&quot;</span>, split=<span class="hljs-string">&quot;train[:100]&quot;</span>)`,wrap:!1}}),hs=new $({props:{code:"bWluZHMlMjAlM0QlMjBtaW5kcy50cmFpbl90ZXN0X3NwbGl0KHRlc3Rfc2l6ZSUzRDAuMik=",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>minds = minds.train_test_split(test_size=<span class="hljs-number">0.2</span>)',wrap:!1}}),ds=new $({props:{code:"bWluZHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>minds
DatasetDict({
    train: Dataset({
        features: [<span class="hljs-string">&#x27;path&#x27;</span>, <span class="hljs-string">&#x27;audio&#x27;</span>, <span class="hljs-string">&#x27;transcription&#x27;</span>, <span class="hljs-string">&#x27;english_transcription&#x27;</span>, <span class="hljs-string">&#x27;intent_class&#x27;</span>, <span class="hljs-string">&#x27;lang_id&#x27;</span>],
        num_rows: <span class="hljs-number">16</span>
    })
    test: Dataset({
        features: [<span class="hljs-string">&#x27;path&#x27;</span>, <span class="hljs-string">&#x27;audio&#x27;</span>, <span class="hljs-string">&#x27;transcription&#x27;</span>, <span class="hljs-string">&#x27;english_transcription&#x27;</span>, <span class="hljs-string">&#x27;intent_class&#x27;</span>, <span class="hljs-string">&#x27;lang_id&#x27;</span>],
        num_rows: <span class="hljs-number">4</span>
    })
})`,wrap:!1}}),js=new $({props:{code:"bWluZHMlMjAlM0QlMjBtaW5kcy5yZW1vdmVfY29sdW1ucyglNUIlMjJlbmdsaXNoX3RyYW5zY3JpcHRpb24lMjIlMkMlMjAlMjJpbnRlbnRfY2xhc3MlMjIlMkMlMjAlMjJsYW5nX2lkJTIyJTVEKQ==",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>minds = minds.remove_columns([<span class="hljs-string">&quot;english_transcription&quot;</span>, <span class="hljs-string">&quot;intent_class&quot;</span>, <span class="hljs-string">&quot;lang_id&quot;</span>])',wrap:!1}}),fs=new $({props:{code:"bWluZHMlNUIlMjJ0cmFpbiUyMiU1RCU1QjAlNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>minds[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-number">0</span>]
{<span class="hljs-string">&#x27;audio&#x27;</span>: {<span class="hljs-string">&#x27;array&#x27;</span>: array([-<span class="hljs-number">0.00024414</span>,  <span class="hljs-number">0.</span>        ,  <span class="hljs-number">0.</span>        , ...,  <span class="hljs-number">0.00024414</span>,
          <span class="hljs-number">0.00024414</span>,  <span class="hljs-number">0.00024414</span>], dtype=float32),
  <span class="hljs-string">&#x27;path&#x27;</span>: <span class="hljs-string">&#x27;/root/.cache/huggingface/datasets/downloads/extracted/f14948e0e84be638dd7943ac36518a4cf3324e8b7aa331c5ab11541518e9368c/en-US~APP_ERROR/602ba9e2963e11ccd901cd4f.wav&#x27;</span>,
  <span class="hljs-string">&#x27;sampling_rate&#x27;</span>: <span class="hljs-number">8000</span>},
 <span class="hljs-string">&#x27;path&#x27;</span>: <span class="hljs-string">&#x27;/root/.cache/huggingface/datasets/downloads/extracted/f14948e0e84be638dd7943ac36518a4cf3324e8b7aa331c5ab11541518e9368c/en-US~APP_ERROR/602ba9e2963e11ccd901cd4f.wav&#x27;</span>,
 <span class="hljs-string">&#x27;transcription&#x27;</span>: <span class="hljs-string">&quot;hi I&#x27;m trying to use the banking app on my phone and currently my checking and savings account balance is not refreshing&quot;</span>}`,wrap:!1}}),Us=new nt({}),Ts=new $({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMEElMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRndhdjJ2ZWMyLWJhc2UlMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;facebook/wav2vec2-base&quot;</span>)`,wrap:!1}}),$s=new $({props:{code:"bWluZHMlMjAlM0QlMjBtaW5kcy5jYXN0X2NvbHVtbiglMjJhdWRpbyUyMiUyQyUyMEF1ZGlvKHNhbXBsaW5nX3JhdGUlM0QxNl8wMDApKSUwQW1pbmRzJTVCJTIydHJhaW4lMjIlNUQlNUIwJTVE",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>minds = minds.cast_column(<span class="hljs-string">&quot;audio&quot;</span>, Audio(sampling_rate=<span class="hljs-number">16_000</span>))
<span class="hljs-meta">&gt;&gt;&gt; </span>minds[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-number">0</span>]
{<span class="hljs-string">&#x27;audio&#x27;</span>: {<span class="hljs-string">&#x27;array&#x27;</span>: array([-<span class="hljs-number">2.38064706e-04</span>, -<span class="hljs-number">1.58618059e-04</span>, -<span class="hljs-number">5.43987835e-06</span>, ...,
          <span class="hljs-number">2.78103951e-04</span>,  <span class="hljs-number">2.38446111e-04</span>,  <span class="hljs-number">1.18740834e-04</span>], dtype=float32),
  <span class="hljs-string">&#x27;path&#x27;</span>: <span class="hljs-string">&#x27;/root/.cache/huggingface/datasets/downloads/extracted/f14948e0e84be638dd7943ac36518a4cf3324e8b7aa331c5ab11541518e9368c/en-US~APP_ERROR/602ba9e2963e11ccd901cd4f.wav&#x27;</span>,
  <span class="hljs-string">&#x27;sampling_rate&#x27;</span>: <span class="hljs-number">16000</span>},
 <span class="hljs-string">&#x27;path&#x27;</span>: <span class="hljs-string">&#x27;/root/.cache/huggingface/datasets/downloads/extracted/f14948e0e84be638dd7943ac36518a4cf3324e8b7aa331c5ab11541518e9368c/en-US~APP_ERROR/602ba9e2963e11ccd901cd4f.wav&#x27;</span>,
 <span class="hljs-string">&#x27;transcription&#x27;</span>: <span class="hljs-string">&quot;hi I&#x27;m trying to use the banking app on my phone and currently my checking and savings account balance is not refreshing&quot;</span>}`,wrap:!1}}),vs=new $({props:{code:"ZGVmJTIwdXBwZXJjYXNlKGV4YW1wbGUpJTNBJTBBJTIwJTIwJTIwJTIwcmV0dXJuJTIwJTdCJTIydHJhbnNjcmlwdGlvbiUyMiUzQSUyMGV4YW1wbGUlNUIlMjJ0cmFuc2NyaXB0aW9uJTIyJTVELnVwcGVyKCklN0QlMEElMEElMEFtaW5kcyUyMCUzRCUyMG1pbmRzLm1hcCh1cHBlcmNhc2Up",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">uppercase</span>(<span class="hljs-params">example</span>):
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> {<span class="hljs-string">&quot;transcription&quot;</span>: example[<span class="hljs-string">&quot;transcription&quot;</span>].upper()}


<span class="hljs-meta">&gt;&gt;&gt; </span>minds = minds.<span class="hljs-built_in">map</span>(uppercase)`,wrap:!1}}),ks=new $({props:{code:"ZGVmJTIwcHJlcGFyZV9kYXRhc2V0KGJhdGNoKSUzQSUwQSUyMCUyMCUyMCUyMGF1ZGlvJTIwJTNEJTIwYmF0Y2glNUIlMjJhdWRpbyUyMiU1RCUwQSUyMCUyMCUyMCUyMGJhdGNoJTIwJTNEJTIwcHJvY2Vzc29yKGF1ZGlvJTVCJTIyYXJyYXklMjIlNUQlMkMlMjBzYW1wbGluZ19yYXRlJTNEYXVkaW8lNUIlMjJzYW1wbGluZ19yYXRlJTIyJTVEJTJDJTIwdGV4dCUzRGJhdGNoJTVCJTIydHJhbnNjcmlwdGlvbiUyMiU1RCklMEElMjAlMjAlMjAlMjBiYXRjaCU1QiUyMmlucHV0X2xlbmd0aCUyMiU1RCUyMCUzRCUyMGxlbihiYXRjaCU1QiUyMmlucHV0X3ZhbHVlcyUyMiU1RCU1QjAlNUQpJTBBJTIwJTIwJTIwJTIwcmV0dXJuJTIwYmF0Y2g=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">prepare_dataset</span>(<span class="hljs-params">batch</span>):
<span class="hljs-meta">... </span>    audio = batch[<span class="hljs-string">&quot;audio&quot;</span>]
<span class="hljs-meta">... </span>    batch = processor(audio[<span class="hljs-string">&quot;array&quot;</span>], sampling_rate=audio[<span class="hljs-string">&quot;sampling_rate&quot;</span>], text=batch[<span class="hljs-string">&quot;transcription&quot;</span>])
<span class="hljs-meta">... </span>    batch[<span class="hljs-string">&quot;input_length&quot;</span>] = <span class="hljs-built_in">len</span>(batch[<span class="hljs-string">&quot;input_values&quot;</span>][<span class="hljs-number">0</span>])
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> batch`,wrap:!1}}),Qs=new $({props:{code:"ZW5jb2RlZF9taW5kcyUyMCUzRCUyMG1pbmRzLm1hcChwcmVwYXJlX2RhdGFzZXQlMkMlMjByZW1vdmVfY29sdW1ucyUzRG1pbmRzLmNvbHVtbl9uYW1lcyU1QiUyMnRyYWluJTIyJTVEJTJDJTIwbnVtX3Byb2MlM0Q0KQ==",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>encoded_minds = minds.<span class="hljs-built_in">map</span>(prepare_dataset, remove_columns=minds.column_names[<span class="hljs-string">&quot;train&quot;</span>], num_proc=<span class="hljs-number">4</span>)',wrap:!1}}),Ws=new $({props:{code:"aW1wb3J0JTIwdG9yY2glMEElMEFmcm9tJTIwZGF0YWNsYXNzZXMlMjBpbXBvcnQlMjBkYXRhY2xhc3MlMkMlMjBmaWVsZCUwQWZyb20lMjB0eXBpbmclMjBpbXBvcnQlMjBBbnklMkMlMjBEaWN0JTJDJTIwTGlzdCUyQyUyME9wdGlvbmFsJTJDJTIwVW5pb24lMEElMEElMEElNDBkYXRhY2xhc3MlMEFjbGFzcyUyMERhdGFDb2xsYXRvckNUQ1dpdGhQYWRkaW5nJTNBJTBBJTIwJTIwJTIwJTIwcHJvY2Vzc29yJTNBJTIwQXV0b1Byb2Nlc3NvciUwQSUyMCUyMCUyMCUyMHBhZGRpbmclM0ElMjBVbmlvbiU1QmJvb2wlMkMlMjBzdHIlNUQlMjAlM0QlMjAlMjJsb25nZXN0JTIyJTBBJTBBJTIwJTIwJTIwJTIwZGVmJTIwX19jYWxsX18oc2VsZiUyQyUyMGZlYXR1cmVzJTNBJTIwTGlzdCU1QkRpY3QlNUJzdHIlMkMlMjBVbmlvbiU1Qkxpc3QlNUJpbnQlNUQlMkMlMjB0b3JjaC5UZW5zb3IlNUQlNUQlNUQpJTIwLSUzRSUyMERpY3QlNUJzdHIlMkMlMjB0b3JjaC5UZW5zb3IlNUQlM0ElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjMlMjAlRUMlOUUlODUlRUIlQTAlQTUlRUElQjMlQkMlMjAlRUIlQTAlODglRUMlOUQlQjQlRUIlQjglOTQlRUMlOUQlODQlMjAlRUIlQjYlODQlRUQlOTUlQTAlRUQlOTUlQTklRUIlOEIlODglRUIlOEIlQTQlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjMlMjAlRUElQjglQjglRUMlOUQlQjQlRUElQjAlODAlMjAlRUIlOEIlQTQlRUIlQTUlQjQlRUElQjMlQTAlMkMlMjAlRUElQjAlODElRUElQjAlODElMjAlRUIlOEIlQTQlRUIlQTUlQjglMjAlRUQlOEMlQTglRUIlOTQlQTklMjAlRUIlQjAlQTklRUIlQjIlOTUlRUMlOUQlODQlMjAlRUMlODIlQUMlRUMlOUElQTklRUQlOTUlQjQlRUMlOTUlQkMlMjAlRUQlOTUlOTglRUElQjglQjAlMjAlRUIlOTUlOEMlRUIlQUMlQjglRUMlOUUlODUlRUIlOEIlODglRUIlOEIlQTQlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBpbnB1dF9mZWF0dXJlcyUyMCUzRCUyMCU1QiU3QiUyMmlucHV0X3ZhbHVlcyUyMiUzQSUyMGZlYXR1cmUlNUIlMjJpbnB1dF92YWx1ZXMlMjIlNUQlNUIwJTVEJTdEJTIwZm9yJTIwZmVhdHVyZSUyMGluJTIwZmVhdHVyZXMlNUQlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBsYWJlbF9mZWF0dXJlcyUyMCUzRCUyMCU1QiU3QiUyMmlucHV0X2lkcyUyMiUzQSUyMGZlYXR1cmUlNUIlMjJsYWJlbHMlMjIlNUQlN0QlMjBmb3IlMjBmZWF0dXJlJTIwaW4lMjBmZWF0dXJlcyU1RCUwQSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGJhdGNoJTIwJTNEJTIwc2VsZi5wcm9jZXNzb3IucGFkKGlucHV0X2ZlYXR1cmVzJTJDJTIwcGFkZGluZyUzRHNlbGYucGFkZGluZyUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwbGFiZWxzX2JhdGNoJTIwJTNEJTIwc2VsZi5wcm9jZXNzb3IucGFkKGxhYmVscyUzRGxhYmVsX2ZlYXR1cmVzJTJDJTIwcGFkZGluZyUzRHNlbGYucGFkZGluZyUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIzJTIwJUVEJThDJUE4JUVCJTk0JUE5JUVDJTk3JTkwJTIwJUVCJThDJTgwJUVEJTk1JUI0JTIwJUVDJTg2JTkwJUVDJThCJUE0JUVDJTlEJTg0JTIwJUVDJUEwJTgxJUVDJTlBJUE5JUVEJTk1JTk4JUVDJUE3JTgwJTIwJUVDJTk1JThBJUVCJThGJTg0JUVCJUExJTlEJTIwLTEwMCVFQyU5QyVCQyVFQiVBMSU5QyUyMCVFQiU4QyU4MCVFQyVCMiVCNCVFRCU5NSVBOSVFQiU4QiU4OCVFQiU4QiVBNCUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGxhYmVscyUyMCUzRCUyMGxhYmVsc19iYXRjaCU1QiUyMmlucHV0X2lkcyUyMiU1RC5tYXNrZWRfZmlsbChsYWJlbHNfYmF0Y2guYXR0ZW50aW9uX21hc2submUoMSklMkMlMjAtMTAwKSUwQSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGJhdGNoJTVCJTIybGFiZWxzJTIyJTVEJTIwJTNEJTIwbGFiZWxzJTBBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwcmV0dXJuJTIwYmF0Y2g=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> dataclasses <span class="hljs-keyword">import</span> dataclass, field
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> typing <span class="hljs-keyword">import</span> <span class="hljs-type">Any</span>, <span class="hljs-type">Dict</span>, <span class="hljs-type">List</span>, <span class="hljs-type">Optional</span>, <span class="hljs-type">Union</span>


<span class="hljs-meta">&gt;&gt;&gt; </span>@dataclass
<span class="hljs-meta">... </span><span class="hljs-keyword">class</span> <span class="hljs-title class_">DataCollatorCTCWithPadding</span>:
<span class="hljs-meta">... </span>    processor: AutoProcessor
<span class="hljs-meta">... </span>    padding: <span class="hljs-type">Union</span>[<span class="hljs-built_in">bool</span>, <span class="hljs-built_in">str</span>] = <span class="hljs-string">&quot;longest&quot;</span>

<span class="hljs-meta">... </span>    <span class="hljs-keyword">def</span> <span class="hljs-title function_">__call__</span>(<span class="hljs-params">self, features: <span class="hljs-type">List</span>[<span class="hljs-type">Dict</span>[<span class="hljs-built_in">str</span>, <span class="hljs-type">Union</span>[<span class="hljs-type">List</span>[<span class="hljs-built_in">int</span>], torch.Tensor]]]</span>) -&gt; <span class="hljs-type">Dict</span>[<span class="hljs-built_in">str</span>, torch.Tensor]:
<span class="hljs-meta">... </span>        <span class="hljs-comment"># 입력과 레이블을 분할합니다</span>
<span class="hljs-meta">... </span>        <span class="hljs-comment"># 길이가 다르고, 각각 다른 패딩 방법을 사용해야 하기 때문입니다</span>
<span class="hljs-meta">... </span>        input_features = [{<span class="hljs-string">&quot;input_values&quot;</span>: feature[<span class="hljs-string">&quot;input_values&quot;</span>][<span class="hljs-number">0</span>]} <span class="hljs-keyword">for</span> feature <span class="hljs-keyword">in</span> features]
<span class="hljs-meta">... </span>        label_features = [{<span class="hljs-string">&quot;input_ids&quot;</span>: feature[<span class="hljs-string">&quot;labels&quot;</span>]} <span class="hljs-keyword">for</span> feature <span class="hljs-keyword">in</span> features]

<span class="hljs-meta">... </span>        batch = self.processor.pad(input_features, padding=self.padding, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">... </span>        labels_batch = self.processor.pad(labels=label_features, padding=self.padding, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">... </span>        <span class="hljs-comment"># 패딩에 대해 손실을 적용하지 않도록 -100으로 대체합니다</span>
<span class="hljs-meta">... </span>        labels = labels_batch[<span class="hljs-string">&quot;input_ids&quot;</span>].masked_fill(labels_batch.attention_mask.ne(<span class="hljs-number">1</span>), -<span class="hljs-number">100</span>)

<span class="hljs-meta">... </span>        batch[<span class="hljs-string">&quot;labels&quot;</span>] = labels

<span class="hljs-meta">... </span>        <span class="hljs-keyword">return</span> batch`,wrap:!1}}),Es=new $({props:{code:"ZGF0YV9jb2xsYXRvciUyMCUzRCUyMERhdGFDb2xsYXRvckNUQ1dpdGhQYWRkaW5nKHByb2Nlc3NvciUzRHByb2Nlc3NvciUyQyUyMHBhZGRpbmclM0QlMjJsb25nZXN0JTIyKQ==",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>data_collator = DataCollatorCTCWithPadding(processor=processor, padding=<span class="hljs-string">&quot;longest&quot;</span>)',wrap:!1}}),Gs=new nt({}),Bs=new $({props:{code:"aW1wb3J0JTIwZXZhbHVhdGUlMEElMEF3ZXIlMjAlM0QlMjBldmFsdWF0ZS5sb2FkKCUyMndlciUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> evaluate

<span class="hljs-meta">&gt;&gt;&gt; </span>wer = evaluate.load(<span class="hljs-string">&quot;wer&quot;</span>)`,wrap:!1}}),Hs=new $({props:{code:"aW1wb3J0JTIwbnVtcHklMjBhcyUyMG5wJTBBJTBBJTBBZGVmJTIwY29tcHV0ZV9tZXRyaWNzKHByZWQpJTNBJTBBJTIwJTIwJTIwJTIwcHJlZF9sb2dpdHMlMjAlM0QlMjBwcmVkLnByZWRpY3Rpb25zJTBBJTIwJTIwJTIwJTIwcHJlZF9pZHMlMjAlM0QlMjBucC5hcmdtYXgocHJlZF9sb2dpdHMlMkMlMjBheGlzJTNELTEpJTBBJTBBJTIwJTIwJTIwJTIwcHJlZC5sYWJlbF9pZHMlNUJwcmVkLmxhYmVsX2lkcyUyMCUzRCUzRCUyMC0xMDAlNUQlMjAlM0QlMjBwcm9jZXNzb3IudG9rZW5pemVyLnBhZF90b2tlbl9pZCUwQSUwQSUyMCUyMCUyMCUyMHByZWRfc3RyJTIwJTNEJTIwcHJvY2Vzc29yLmJhdGNoX2RlY29kZShwcmVkX2lkcyklMEElMjAlMjAlMjAlMjBsYWJlbF9zdHIlMjAlM0QlMjBwcm9jZXNzb3IuYmF0Y2hfZGVjb2RlKHByZWQubGFiZWxfaWRzJTJDJTIwZ3JvdXBfdG9rZW5zJTNERmFsc2UpJTBBJTBBJTIwJTIwJTIwJTIwd2VyJTIwJTNEJTIwd2VyLmNvbXB1dGUocHJlZGljdGlvbnMlM0RwcmVkX3N0ciUyQyUyMHJlZmVyZW5jZXMlM0RsYWJlbF9zdHIpJTBBJTBBJTIwJTIwJTIwJTIwcmV0dXJuJTIwJTdCJTIyd2VyJTIyJTNBJTIwd2VyJTdE",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np


<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">compute_metrics</span>(<span class="hljs-params">pred</span>):
<span class="hljs-meta">... </span>    pred_logits = pred.predictions
<span class="hljs-meta">... </span>    pred_ids = np.argmax(pred_logits, axis=-<span class="hljs-number">1</span>)

<span class="hljs-meta">... </span>    pred.label_ids[pred.label_ids == -<span class="hljs-number">100</span>] = processor.tokenizer.pad_token_id

<span class="hljs-meta">... </span>    pred_str = processor.batch_decode(pred_ids)
<span class="hljs-meta">... </span>    label_str = processor.batch_decode(pred.label_ids, group_tokens=<span class="hljs-literal">False</span>)

<span class="hljs-meta">... </span>    wer = wer.compute(predictions=pred_str, references=label_str)

<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> {<span class="hljs-string">&quot;wer&quot;</span>: wer}`,wrap:!1}}),Ys=new nt({}),O=new Me({props:{pytorch:!0,tensorflow:!1,jax:!1,$$slots:{pytorch:[ve]},$$scope:{ctx:R}}}),K=new Ul({props:{$$slots:{default:[Ce]},$$scope:{ctx:R}}}),zs=new nt({}),Ss=new $({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTJDJTIwQXVkaW8lMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMlBvbHlBSSUyRm1pbmRzMTQlMjIlMkMlMjAlMjJlbi1VUyUyMiUyQyUyMHNwbGl0JTNEJTIydHJhaW4lMjIpJTBBZGF0YXNldCUyMCUzRCUyMGRhdGFzZXQuY2FzdF9jb2x1bW4oJTIyYXVkaW8lMjIlMkMlMjBBdWRpbyhzYW1wbGluZ19yYXRlJTNEMTYwMDApKSUwQXNhbXBsaW5nX3JhdGUlMjAlM0QlMjBkYXRhc2V0LmZlYXR1cmVzJTVCJTIyYXVkaW8lMjIlNUQuc2FtcGxpbmdfcmF0ZSUwQWF1ZGlvX2ZpbGUlMjAlM0QlMjBkYXRhc2V0JTVCMCU1RCU1QiUyMmF1ZGlvJTIyJTVEJTVCJTIycGF0aCUyMiU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset, Audio

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;PolyAI/minds14&quot;</span>, <span class="hljs-string">&quot;en-US&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = dataset.cast_column(<span class="hljs-string">&quot;audio&quot;</span>, Audio(sampling_rate=<span class="hljs-number">16000</span>))
<span class="hljs-meta">&gt;&gt;&gt; </span>sampling_rate = dataset.features[<span class="hljs-string">&quot;audio&quot;</span>].sampling_rate
<span class="hljs-meta">&gt;&gt;&gt; </span>audio_file = dataset[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;path&quot;</span>]`,wrap:!1}}),Ls=new $({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBdHJhbnNjcmliZXIlMjAlM0QlMjBwaXBlbGluZSglMjJhdXRvbWF0aWMtc3BlZWNoLXJlY29nbml0aW9uJTIyJTJDJTIwbW9kZWwlM0QlMjJzdGV2aGxpdSUyRm15X2F3ZXNvbWVfYXNyX21pbmRzX21vZGVsJTIyKSUwQXRyYW5zY3JpYmVyKGF1ZGlvX2ZpbGUp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>transcriber = pipeline(<span class="hljs-string">&quot;automatic-speech-recognition&quot;</span>, model=<span class="hljs-string">&quot;stevhliu/my_awesome_asr_minds_model&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>transcriber(audio_file)
{<span class="hljs-string">&#x27;text&#x27;</span>: <span class="hljs-string">&#x27;I WOUD LIKE O SET UP JOINT ACOUNT WTH Y PARTNER&#x27;</span>}`,wrap:!1}}),ts=new Ul({props:{$$slots:{default:[Ie]},$$scope:{ctx:R}}}),ls=new Me({props:{pytorch:!0,tensorflow:!1,jax:!1,$$slots:{pytorch:[Re]},$$scope:{ctx:R}}}),{c(){p=r("meta"),J=a(),i=r("p"),g=a(),U=r("h1"),b=r("a"),E=r("span"),M(C.$$.fragment),V=a(),W=r("span"),W.textContent=Q,B=a(),M(x.$$.fragment),I=a(),M(Z.$$.fragment),m=a(),v=r("p"),v.textContent=es,G=a(),X=r("p"),X.textContent=o,_=a(),N=r("ol"),N.innerHTML=vl,jt=a(),M(q.$$.fragment),yt=a(),as=r("p"),as.textContent=Cl,ft=a(),M(ns.$$.fragment),Jt=a(),ps=r("p"),ps.textContent=Il,gt=a(),M(rs.$$.fragment),Ut=a(),H=r("h2"),S=r("a"),pt=r("span"),M(cs.$$.fragment),wl=a(),st=r("span"),st.textContent=kl,wt=a(),is=r("p"),is.innerHTML=Rl,Tt=a(),M(os.$$.fragment),bt=a(),ms=r("p"),ms.innerHTML=Ql,$t=a(),M(hs.$$.fragment),_t=a(),Ms=r("p"),Ms.textContent=xl,vt=a(),M(ds.$$.fragment),Ct=a(),us=r("p"),us.innerHTML=Zl,It=a(),M(js.$$.fragment),kt=a(),ys=r("p"),ys.textContent=Wl,Rt=a(),M(fs.$$.fragment),Qt=a(),Js=r("p"),Js.textContent=Vl,xt=a(),gs=r("ul"),gs.innerHTML=El,Zt=a(),A=r("h2"),D=r("a"),rt=r("span"),M(Us.$$.fragment),Tl=a(),tt=r("span"),tt.textContent=Gl,Wt=a(),ws=r("p"),ws.textContent=Xl,Vt=a(),M(Ts.$$.fragment),Et=a(),bs=r("p"),bs.innerHTML=Bl,Gt=a(),M($s.$$.fragment),Xt=a(),_s=r("p"),_s.textContent=Nl,Bt=a(),M(vs.$$.fragment),Nt=a(),Cs=r("p"),Cs.textContent=Hl,Ht=a(),Is=r("ol"),Is.innerHTML=Al,At=a(),M(ks.$$.fragment),Yt=a(),Rs=r("p"),Rs.innerHTML=Yl,zt=a(),M(Qs.$$.fragment),Ft=a(),xs=r("p"),xs.innerHTML=zl,qt=a(),Zs=r("p"),Zs.innerHTML=Fl,St=a(),M(Ws.$$.fragment),Dt=a(),Vs=r("p"),Vs.innerHTML=ql,Lt=a(),M(Es.$$.fragment),Pt=a(),Y=r("h2"),L=r("a"),ct=r("span"),M(Gs.$$.fragment),bl=a(),lt=r("span"),lt.textContent=Sl,Ot=a(),Xs=r("p"),Xs.innerHTML=Dl,Kt=a(),M(Bs.$$.fragment),sl=a(),Ns=r("p"),Ns.innerHTML=Ll,tl=a(),M(Hs.$$.fragment),ll=a(),As=r("p"),As.innerHTML=Pl,el=a(),z=r("h2"),P=r("a"),it=r("span"),M(Ys.$$.fragment),$l=a(),et=r("span"),et.textContent=Ol,al=a(),M(O.$$.fragment),nl=a(),M(K.$$.fragment),pl=a(),F=r("h2"),ss=r("a"),ot=r("span"),M(zs.$$.fragment),_l=a(),at=r("span"),at.textContent=Kl,rl=a(),Fs=r("p"),Fs.textContent=se,cl=a(),qs=r("p"),qs.textContent=te,il=a(),M(Ss.$$.fragment),ol=a(),Ds=r("p"),Ds.innerHTML=le,ml=a(),M(Ls.$$.fragment),hl=a(),M(ts.$$.fragment),Ml=a(),Ps=r("p"),Ps.innerHTML=ee,dl=a(),M(ls.$$.fragment),ul=a(),mt=r("p"),this.h()},l(s){const l=Je("svelte-1phssyn",document.head);p=c(l,"META",{name:!0,content:!0}),l.forEach(t),J=n(s),i=c(s,"P",{}),k(i).forEach(t),g=n(s),U=c(s,"H1",{class:!0});var Os=k(U);b=c(Os,"A",{id:!0,class:!0,href:!0});var ht=k(b);E=c(ht,"SPAN",{});var Mt=k(E);d(C.$$.fragment,Mt),Mt.forEach(t),ht.forEach(t),V=n(Os),W=c(Os,"SPAN",{"data-svelte-h":!0}),h(W)!=="svelte-krl0ci"&&(W.textContent=Q),Os.forEach(t),B=n(s),d(x.$$.fragment,s),I=n(s),d(Z.$$.fragment,s),m=n(s),v=c(s,"P",{"data-svelte-h":!0}),h(v)!=="svelte-1qlvl3y"&&(v.textContent=es),G=n(s),X=c(s,"P",{"data-svelte-h":!0}),h(X)!=="svelte-7oxnvp"&&(X.textContent=o),_=n(s),N=c(s,"OL",{"data-svelte-h":!0}),h(N)!=="svelte-1ok1jy5"&&(N.innerHTML=vl),jt=n(s),d(q.$$.fragment,s),yt=n(s),as=c(s,"P",{"data-svelte-h":!0}),h(as)!=="svelte-18iigii"&&(as.textContent=Cl),ft=n(s),d(ns.$$.fragment,s),Jt=n(s),ps=c(s,"P",{"data-svelte-h":!0}),h(ps)!=="svelte-2mor9q"&&(ps.textContent=Il),gt=n(s),d(rs.$$.fragment,s),Ut=n(s),H=c(s,"H2",{class:!0});var Ks=k(H);S=c(Ks,"A",{id:!0,class:!0,href:!0});var dt=k(S);pt=c(dt,"SPAN",{});var ae=k(pt);d(cs.$$.fragment,ae),ae.forEach(t),dt.forEach(t),wl=n(Ks),st=c(Ks,"SPAN",{"data-svelte-h":!0}),h(st)!=="svelte-1xn7f32"&&(st.textContent=kl),Ks.forEach(t),wt=n(s),is=c(s,"P",{"data-svelte-h":!0}),h(is)!=="svelte-7q7xwh"&&(is.innerHTML=Rl),Tt=n(s),d(os.$$.fragment,s),bt=n(s),ms=c(s,"P",{"data-svelte-h":!0}),h(ms)!=="svelte-3148pn"&&(ms.innerHTML=Ql),$t=n(s),d(hs.$$.fragment,s),_t=n(s),Ms=c(s,"P",{"data-svelte-h":!0}),h(Ms)!=="svelte-17o70r1"&&(Ms.textContent=xl),vt=n(s),d(ds.$$.fragment,s),Ct=n(s),us=c(s,"P",{"data-svelte-h":!0}),h(us)!=="svelte-1dp2qnq"&&(us.innerHTML=Zl),It=n(s),d(js.$$.fragment,s),kt=n(s),ys=c(s,"P",{"data-svelte-h":!0}),h(ys)!=="svelte-1p9pg2d"&&(ys.textContent=Wl),Rt=n(s),d(fs.$$.fragment,s),Qt=n(s),Js=c(s,"P",{"data-svelte-h":!0}),h(Js)!=="svelte-6aiy91"&&(Js.textContent=Vl),xt=n(s),gs=c(s,"UL",{"data-svelte-h":!0}),h(gs)!=="svelte-1l53gx0"&&(gs.innerHTML=El),Zt=n(s),A=c(s,"H2",{class:!0});var yl=k(A);D=c(yl,"A",{id:!0,class:!0,href:!0});var ne=k(D);rt=c(ne,"SPAN",{});var pe=k(rt);d(Us.$$.fragment,pe),pe.forEach(t),ne.forEach(t),Tl=n(yl),tt=c(yl,"SPAN",{"data-svelte-h":!0}),h(tt)!=="svelte-1cte2wb"&&(tt.textContent=Gl),yl.forEach(t),Wt=n(s),ws=c(s,"P",{"data-svelte-h":!0}),h(ws)!=="svelte-1fm7wkp"&&(ws.textContent=Xl),Vt=n(s),d(Ts.$$.fragment,s),Et=n(s),bs=c(s,"P",{"data-svelte-h":!0}),h(bs)!=="svelte-e2ss04"&&(bs.innerHTML=Bl),Gt=n(s),d($s.$$.fragment,s),Xt=n(s),_s=c(s,"P",{"data-svelte-h":!0}),h(_s)!=="svelte-14tnwq5"&&(_s.textContent=Nl),Bt=n(s),d(vs.$$.fragment,s),Nt=n(s),Cs=c(s,"P",{"data-svelte-h":!0}),h(Cs)!=="svelte-10u1mcw"&&(Cs.textContent=Hl),Ht=n(s),Is=c(s,"OL",{"data-svelte-h":!0}),h(Is)!=="svelte-bj7uax"&&(Is.innerHTML=Al),At=n(s),d(ks.$$.fragment,s),Yt=n(s),Rs=c(s,"P",{"data-svelte-h":!0}),h(Rs)!=="svelte-vxgjmg"&&(Rs.innerHTML=Yl),zt=n(s),d(Qs.$$.fragment,s),Ft=n(s),xs=c(s,"P",{"data-svelte-h":!0}),h(xs)!=="svelte-7av315"&&(xs.innerHTML=zl),qt=n(s),Zs=c(s,"P",{"data-svelte-h":!0}),h(Zs)!=="svelte-pcjp4m"&&(Zs.innerHTML=Fl),St=n(s),d(Ws.$$.fragment,s),Dt=n(s),Vs=c(s,"P",{"data-svelte-h":!0}),h(Vs)!=="svelte-o882aa"&&(Vs.innerHTML=ql),Lt=n(s),d(Es.$$.fragment,s),Pt=n(s),Y=c(s,"H2",{class:!0});var fl=k(Y);L=c(fl,"A",{id:!0,class:!0,href:!0});var re=k(L);ct=c(re,"SPAN",{});var ce=k(ct);d(Gs.$$.fragment,ce),ce.forEach(t),re.forEach(t),bl=n(fl),lt=c(fl,"SPAN",{"data-svelte-h":!0}),h(lt)!=="svelte-zfi65a"&&(lt.textContent=Sl),fl.forEach(t),Ot=n(s),Xs=c(s,"P",{"data-svelte-h":!0}),h(Xs)!=="svelte-1kx52w5"&&(Xs.innerHTML=Dl),Kt=n(s),d(Bs.$$.fragment,s),sl=n(s),Ns=c(s,"P",{"data-svelte-h":!0}),h(Ns)!=="svelte-i1fso8"&&(Ns.innerHTML=Ll),tl=n(s),d(Hs.$$.fragment,s),ll=n(s),As=c(s,"P",{"data-svelte-h":!0}),h(As)!=="svelte-15lq6yk"&&(As.innerHTML=Pl),el=n(s),z=c(s,"H2",{class:!0});var Jl=k(z);P=c(Jl,"A",{id:!0,class:!0,href:!0});var ie=k(P);it=c(ie,"SPAN",{});var oe=k(it);d(Ys.$$.fragment,oe),oe.forEach(t),ie.forEach(t),$l=n(Jl),et=c(Jl,"SPAN",{"data-svelte-h":!0}),h(et)!=="svelte-r34xwh"&&(et.textContent=Ol),Jl.forEach(t),al=n(s),d(O.$$.fragment,s),nl=n(s),d(K.$$.fragment,s),pl=n(s),F=c(s,"H2",{class:!0});var gl=k(F);ss=c(gl,"A",{id:!0,class:!0,href:!0});var me=k(ss);ot=c(me,"SPAN",{});var he=k(ot);d(zs.$$.fragment,he),he.forEach(t),me.forEach(t),_l=n(gl),at=c(gl,"SPAN",{"data-svelte-h":!0}),h(at)!=="svelte-4ugq51"&&(at.textContent=Kl),gl.forEach(t),rl=n(s),Fs=c(s,"P",{"data-svelte-h":!0}),h(Fs)!=="svelte-1annmqf"&&(Fs.textContent=se),cl=n(s),qs=c(s,"P",{"data-svelte-h":!0}),h(qs)!=="svelte-18ieb63"&&(qs.textContent=te),il=n(s),d(Ss.$$.fragment,s),ol=n(s),Ds=c(s,"P",{"data-svelte-h":!0}),h(Ds)!=="svelte-12cj03s"&&(Ds.innerHTML=le),ml=n(s),d(Ls.$$.fragment,s),hl=n(s),d(ts.$$.fragment,s),Ml=n(s),Ps=c(s,"P",{"data-svelte-h":!0}),h(Ps)!=="svelte-1olk0w9"&&(Ps.innerHTML=ee),dl=n(s),d(ls.$$.fragment,s),ul=n(s),mt=c(s,"P",{}),k(mt).forEach(t),this.h()},h(){w(p,"name","hf:doc:metadata"),w(p,"content",JSON.stringify(xe)),w(b,"id","automatic-speech-recognition"),w(b,"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"),w(b,"href","#automatic-speech-recognition"),w(U,"class","relative group"),w(S,"id","load-minds-14-dataset"),w(S,"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"),w(S,"href","#load-minds-14-dataset"),w(H,"class","relative group"),w(D,"id","preprocess"),w(D,"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"),w(D,"href","#preprocess"),w(A,"class","relative group"),w(L,"id","evaluate"),w(L,"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"),w(L,"href","#evaluate"),w(Y,"class","relative group"),w(P,"id","train"),w(P,"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"),w(P,"href","#train"),w(z,"class","relative group"),w(ss,"id","inference"),w(ss,"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"),w(ss,"href","#inference"),w(F,"class","relative group")},m(s,l){T(document.head,p),e(s,J,l),e(s,i,l),e(s,g,l),e(s,U,l),T(U,b),T(b,E),u(C,E,null),T(U,V),T(U,W),e(s,B,l),u(x,s,l),e(s,I,l),u(Z,s,l),e(s,m,l),e(s,v,l),e(s,G,l),e(s,X,l),e(s,_,l),e(s,N,l),e(s,jt,l),u(q,s,l),e(s,yt,l),e(s,as,l),e(s,ft,l),u(ns,s,l),e(s,Jt,l),e(s,ps,l),e(s,gt,l),u(rs,s,l),e(s,Ut,l),e(s,H,l),T(H,S),T(S,pt),u(cs,pt,null),T(H,wl),T(H,st),e(s,wt,l),e(s,is,l),e(s,Tt,l),u(os,s,l),e(s,bt,l),e(s,ms,l),e(s,$t,l),u(hs,s,l),e(s,_t,l),e(s,Ms,l),e(s,vt,l),u(ds,s,l),e(s,Ct,l),e(s,us,l),e(s,It,l),u(js,s,l),e(s,kt,l),e(s,ys,l),e(s,Rt,l),u(fs,s,l),e(s,Qt,l),e(s,Js,l),e(s,xt,l),e(s,gs,l),e(s,Zt,l),e(s,A,l),T(A,D),T(D,rt),u(Us,rt,null),T(A,Tl),T(A,tt),e(s,Wt,l),e(s,ws,l),e(s,Vt,l),u(Ts,s,l),e(s,Et,l),e(s,bs,l),e(s,Gt,l),u($s,s,l),e(s,Xt,l),e(s,_s,l),e(s,Bt,l),u(vs,s,l),e(s,Nt,l),e(s,Cs,l),e(s,Ht,l),e(s,Is,l),e(s,At,l),u(ks,s,l),e(s,Yt,l),e(s,Rs,l),e(s,zt,l),u(Qs,s,l),e(s,Ft,l),e(s,xs,l),e(s,qt,l),e(s,Zs,l),e(s,St,l),u(Ws,s,l),e(s,Dt,l),e(s,Vs,l),e(s,Lt,l),u(Es,s,l),e(s,Pt,l),e(s,Y,l),T(Y,L),T(L,ct),u(Gs,ct,null),T(Y,bl),T(Y,lt),e(s,Ot,l),e(s,Xs,l),e(s,Kt,l),u(Bs,s,l),e(s,sl,l),e(s,Ns,l),e(s,tl,l),u(Hs,s,l),e(s,ll,l),e(s,As,l),e(s,el,l),e(s,z,l),T(z,P),T(P,it),u(Ys,it,null),T(z,$l),T(z,et),e(s,al,l),u(O,s,l),e(s,nl,l),u(K,s,l),e(s,pl,l),e(s,F,l),T(F,ss),T(ss,ot),u(zs,ot,null),T(F,_l),T(F,at),e(s,rl,l),e(s,Fs,l),e(s,cl,l),e(s,qs,l),e(s,il,l),u(Ss,s,l),e(s,ol,l),e(s,Ds,l),e(s,ml,l),u(Ls,s,l),e(s,hl,l),u(ts,s,l),e(s,Ml,l),e(s,Ps,l),e(s,dl,l),u(ls,s,l),e(s,ul,l),e(s,mt,l),jl=!0},p(s,[l]){const Os={};l&2&&(Os.$$scope={dirty:l,ctx:s}),q.$set(Os);const ht={};l&2&&(ht.$$scope={dirty:l,ctx:s}),O.$set(ht);const Mt={};l&2&&(Mt.$$scope={dirty:l,ctx:s}),K.$set(Mt);const Ks={};l&2&&(Ks.$$scope={dirty:l,ctx:s}),ts.$set(Ks);const dt={};l&2&&(dt.$$scope={dirty:l,ctx:s}),ls.$set(dt)},i(s){jl||(j(C.$$.fragment,s),j(x.$$.fragment,s),j(Z.$$.fragment,s),j(q.$$.fragment,s),j(ns.$$.fragment,s),j(rs.$$.fragment,s),j(cs.$$.fragment,s),j(os.$$.fragment,s),j(hs.$$.fragment,s),j(ds.$$.fragment,s),j(js.$$.fragment,s),j(fs.$$.fragment,s),j(Us.$$.fragment,s),j(Ts.$$.fragment,s),j($s.$$.fragment,s),j(vs.$$.fragment,s),j(ks.$$.fragment,s),j(Qs.$$.fragment,s),j(Ws.$$.fragment,s),j(Es.$$.fragment,s),j(Gs.$$.fragment,s),j(Bs.$$.fragment,s),j(Hs.$$.fragment,s),j(Ys.$$.fragment,s),j(O.$$.fragment,s),j(K.$$.fragment,s),j(zs.$$.fragment,s),j(Ss.$$.fragment,s),j(Ls.$$.fragment,s),j(ts.$$.fragment,s),j(ls.$$.fragment,s),jl=!0)},o(s){y(C.$$.fragment,s),y(x.$$.fragment,s),y(Z.$$.fragment,s),y(q.$$.fragment,s),y(ns.$$.fragment,s),y(rs.$$.fragment,s),y(cs.$$.fragment,s),y(os.$$.fragment,s),y(hs.$$.fragment,s),y(ds.$$.fragment,s),y(js.$$.fragment,s),y(fs.$$.fragment,s),y(Us.$$.fragment,s),y(Ts.$$.fragment,s),y($s.$$.fragment,s),y(vs.$$.fragment,s),y(ks.$$.fragment,s),y(Qs.$$.fragment,s),y(Ws.$$.fragment,s),y(Es.$$.fragment,s),y(Gs.$$.fragment,s),y(Bs.$$.fragment,s),y(Hs.$$.fragment,s),y(Ys.$$.fragment,s),y(O.$$.fragment,s),y(K.$$.fragment,s),y(zs.$$.fragment,s),y(Ss.$$.fragment,s),y(Ls.$$.fragment,s),y(ts.$$.fragment,s),y(ls.$$.fragment,s),jl=!1},d(s){s&&(t(J),t(i),t(g),t(U),t(B),t(I),t(m),t(v),t(G),t(X),t(_),t(N),t(jt),t(yt),t(as),t(ft),t(Jt),t(ps),t(gt),t(Ut),t(H),t(wt),t(is),t(Tt),t(bt),t(ms),t($t),t(_t),t(Ms),t(vt),t(Ct),t(us),t(It),t(kt),t(ys),t(Rt),t(Qt),t(Js),t(xt),t(gs),t(Zt),t(A),t(Wt),t(ws),t(Vt),t(Et),t(bs),t(Gt),t(Xt),t(_s),t(Bt),t(Nt),t(Cs),t(Ht),t(Is),t(At),t(Yt),t(Rs),t(zt),t(Ft),t(xs),t(qt),t(Zs),t(St),t(Dt),t(Vs),t(Lt),t(Pt),t(Y),t(Ot),t(Xs),t(Kt),t(sl),t(Ns),t(tl),t(ll),t(As),t(el),t(z),t(al),t(nl),t(pl),t(F),t(rl),t(Fs),t(cl),t(qs),t(il),t(ol),t(Ds),t(ml),t(hl),t(Ml),t(Ps),t(dl),t(ul),t(mt)),t(p),f(C),f(x,s),f(Z,s),f(q,s),f(ns,s),f(rs,s),f(cs),f(os,s),f(hs,s),f(ds,s),f(js,s),f(fs,s),f(Us),f(Ts,s),f($s,s),f(vs,s),f(ks,s),f(Qs,s),f(Ws,s),f(Es,s),f(Gs),f(Bs,s),f(Hs,s),f(Ys),f(O,s),f(K,s),f(zs),f(Ss,s),f(Ls,s),f(ts,s),f(ls,s)}}}const xe={local:"automatic-speech-recognition",sections:[{local:"load-minds-14-dataset",title:"MInDS-14 데이터 세트 가져오기"},{local:"preprocess",title:"전처리"},{local:"evaluate",title:"평가하기"},{local:"train",title:"훈련하기"},{local:"inference",title:"추론하기"}],title:"자동 음성 인식"};function Ze(R){return je(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ae extends ye{constructor(p){super(),fe(this,p,Ze,Qe,ue,{})}}export{Ae as component};
