import{s as ue,o as je,n as ut}from"../chunks/scheduler.889ebb13.js";import{S as ye,i as Je,g as c,s as a,u as M,A as ge,h as r,f as t,c as n,j as k,v as d,y as h,k as T,o as w,a as e,w as u,d as j,t as y,x as J,m as fe,n as Ue}from"../chunks/index.8980e686.js";import{T as Ul}from"../chunks/Tip.7191df11.js";import{Y as Te}from"../chunks/Youtube.532e53e0.js";import{I as nt}from"../chunks/IconCopyLink.357761cd.js";import{C as $}from"../chunks/CodeBlock.25fc3430.js";import{D as we}from"../chunks/DocNotebookDropdown.f8a50280.js";import{F as Me,M as de}from"../chunks/Markdown.31057263.js";function be(R){let p,g,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=fe(`이 튜토리얼에서 설명하는 작업은 다음 모델 아키텍처에 의해 지원됩니다:

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

`),g=r(f,"P",{"data-svelte-h":!0}),h(g)!=="svelte-1xfq5e"&&(g.innerHTML=i)},m(f,U){e(f,p,U),e(f,g,U)},p:ut,d(f){f&&(t(p),t(g))}}}function $e(R){let p,g='<code>Trainer</code>로 모델을 미세 조정하는 것이 익숙하지 않다면, <a href="../training#train-with-pytorch-trainer">여기</a>에서 기본 튜토리얼을 확인해보세요!';return{c(){p=c("p"),p.innerHTML=g},l(i){p=r(i,"P",{"data-svelte-h":!0}),h(p)!=="svelte-40ivbg"&&(p.innerHTML=g)},m(i,f){e(i,p,f)},p:ut,d(i){i&&t(p)}}}function _e(R){let p,g,i,f="이제 모델 훈련을 시작할 준비가 되었습니다! <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>)`}}),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()`}}),G=new $({props:{code:"dHJhaW5lci5wdXNoX3RvX2h1Yigp",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>trainer.push_to_hub()'}}),{c(){M(p.$$.fragment),g=a(),i=c("p"),i.innerHTML=f,U=a(),M(b.$$.fragment),E=a(),C=c("p"),C.textContent=V,W=a(),Q=c("ol"),Q.innerHTML=B,x=a(),M(I.$$.fragment),Z=a(),m=c("p"),m.innerHTML=v,es=a(),M(G.$$.fragment)},l(o){d(p.$$.fragment,o),g=n(o),i=r(o,"P",{"data-svelte-h":!0}),h(i)!=="svelte-lskiab"&&(i.innerHTML=f),U=n(o),d(b.$$.fragment,o),E=n(o),C=r(o,"P",{"data-svelte-h":!0}),h(C)!=="svelte-1vwg7jz"&&(C.textContent=V),W=n(o),Q=r(o,"OL",{"data-svelte-h":!0}),h(Q)!=="svelte-1jcsgp0"&&(Q.innerHTML=B),x=n(o),d(I.$$.fragment,o),Z=n(o),m=r(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,g,_),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(g),t(i),t(U),t(E),t(C),t(W),t(Q),t(x),t(Z),t(m),t(es)),J(p,o),J(b,o),J(I,o),J(G,o)}}}function ve(R){let p,g;return p=new de({props:{$$slots:{default:[_e]},$$scope:{ctx:R}}}),{c(){M(p.$$.fragment)},l(i){d(p.$$.fragment,i)},m(i,f){u(p,i,f),g=!0},p(i,f){const U={};f&2&&(U.$$scope={dirty:f,ctx:i}),p.$set(U)},i(i){g||(j(p.$$.fragment,i),g=!0)},o(i){y(p.$$.fragment,i),g=!1},d(i){J(p,i)}}}function Ce(R){let p,g='자동 음성 인식을 위해 모델을 미세 조정하는 더 자세한 예제는 영어 자동 음성 인식을 위한 <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=c("p"),p.innerHTML=g},l(i){p=r(i,"P",{"data-svelte-h":!0}),h(p)!=="svelte-1aqt9cb"&&(p.innerHTML=g)},m(i,f){e(i,p,f)},p:ut,d(i){i&&t(p)}}}function Ie(R){let p,g="텍스트로 변환된 결과가 꽤 괜찮지만 더 좋을 수도 있습니다! 더 나은 결과를 얻으려면 더 많은 예제로 모델을 미세 조정하세요!";return{c(){p=c("p"),p.textContent=g},l(i){p=r(i,"P",{"data-svelte-h":!0}),h(p)!=="svelte-1bgb7bv"&&(p.textContent=g)},m(i,f){e(i,p,f)},p:ut,d(i){i&&t(p)}}}function ke(R){let p,g="오디오 파일과 텍스트를 전처리하고 PyTorch 텐서로 <code>input</code>을 반환할 프로세서를 가져오세요:",i,f,U,b,E="입력을 모델에 전달하고 로짓을 반환하세요:",C,V,W,Q,B="가장 높은 확률의 <code>input_ids</code>를 예측하고, 프로세서를 사용하여 예측된 <code>input_ids</code>를 다시 텍스트로 디코딩하세요:",x,I,Z;return f=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>)`}}),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`}}),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>]`}}),{c(){p=c("p"),p.innerHTML=g,i=a(),M(f.$$.fragment),U=a(),b=c("p"),b.textContent=E,C=a(),M(V.$$.fragment),W=a(),Q=c("p"),Q.innerHTML=B,x=a(),M(I.$$.fragment)},l(m){p=r(m,"P",{"data-svelte-h":!0}),h(p)!=="svelte-1l4sx2f"&&(p.innerHTML=g),i=n(m),d(f.$$.fragment,m),U=n(m),b=r(m,"P",{"data-svelte-h":!0}),h(b)!=="svelte-2w5h5p"&&(b.textContent=E),C=n(m),d(V.$$.fragment,m),W=n(m),Q=r(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(f,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(f.$$.fragment,m),j(V.$$.fragment,m),j(I.$$.fragment,m),Z=!0)},o(m){y(f.$$.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)),J(f,m),J(V,m),J(I,m)}}}function Re(R){let p,g;return p=new de({props:{$$slots:{default:[ke]},$$scope:{ctx:R}}}),{c(){M(p.$$.fragment)},l(i){d(p.$$.fragment,i)},m(i,f){u(p,i,f),g=!0},p(i,f){const U={};f&2&&(U.$$scope={dirty:f,ctx:i}),p.$set(U)},i(i){g||(j(p.$$.fragment,i),g=!0)},o(i){y(p.$$.fragment,i),g=!1},d(i){J(p,i)}}}function Qe(R){let p,g,i,f,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="시작하기 전에 필요한 모든 라이브러리가 설치되어 있는지 확인하세요:",Jt,ns,gt,ps,Il="Hugging Face 계정에 로그인하면 모델을 업로드하고 커뮤니티에 공유할 수 있습니다. 토큰을 입력하여 로그인하세요.",ft,cs,Ut,H,S,pt,rs,Tl,st,kl="MInDS-14 데이터 세트 가져오기",Tt,is,Rl=`먼저, 🤗 Datasets 라이브러리에서 <a href="https://huggingface.co/datasets/PolyAI/minds14" rel="nofollow">MInDS-14</a> 데이터 세트의 일부분을 가져오세요.
이렇게 하면 전체 데이터 세트에 대한 훈련에 시간을 들이기 전에 모든 것이 작동하는지 실험하고 검증할 수 있습니다.`,wt,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,Js,Qt,gs,Vl="두 개의 필드가 있습니다:",xt,fs,El="<li><code>audio</code>: 오디오 파일을 가져오고 리샘플링하기 위해 호출해야 하는 음성 신호의 1차원 <code>array(배열)</code></li> <li><code>transcription</code>: 목표 텍스트</li>",Zt,A,D,ct,Us,wl,tt,Gl="전처리",Wt,Ts,Xl="다음으로 오디오 신호를 처리하기 위한 Wav2Vec2 프로세서를 가져옵니다:",Vt,ws,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,rt,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="추론하기",cl,Fs,se="좋아요, 이제 모델을 미세 조정했으니 추론에 사용할 수 있습니다!",rl,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 we({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 Te({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"}}),cs=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()`}}),rs=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>)`}}),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>)'}}),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>
    })
})`}}),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>])'}}),Js=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>}`}}),Us=new nt({}),ws=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>)`}}),$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>}`}}),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)`}}),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`}}),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>)'}}),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`}}),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>)'}}),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>)`}}),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}`}}),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>]`}}),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>}`}}),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=c("meta"),g=a(),i=c("p"),f=a(),U=c("h1"),b=c("a"),E=c("span"),M(C.$$.fragment),V=a(),W=c("span"),W.textContent=Q,B=a(),M(x.$$.fragment),I=a(),M(Z.$$.fragment),m=a(),v=c("p"),v.textContent=es,G=a(),X=c("p"),X.textContent=o,_=a(),N=c("ol"),N.innerHTML=vl,jt=a(),M(q.$$.fragment),yt=a(),as=c("p"),as.textContent=Cl,Jt=a(),M(ns.$$.fragment),gt=a(),ps=c("p"),ps.textContent=Il,ft=a(),M(cs.$$.fragment),Ut=a(),H=c("h2"),S=c("a"),pt=c("span"),M(rs.$$.fragment),Tl=a(),st=c("span"),st.textContent=kl,Tt=a(),is=c("p"),is.innerHTML=Rl,wt=a(),M(os.$$.fragment),bt=a(),ms=c("p"),ms.innerHTML=Ql,$t=a(),M(hs.$$.fragment),_t=a(),Ms=c("p"),Ms.textContent=xl,vt=a(),M(ds.$$.fragment),Ct=a(),us=c("p"),us.innerHTML=Zl,It=a(),M(js.$$.fragment),kt=a(),ys=c("p"),ys.textContent=Wl,Rt=a(),M(Js.$$.fragment),Qt=a(),gs=c("p"),gs.textContent=Vl,xt=a(),fs=c("ul"),fs.innerHTML=El,Zt=a(),A=c("h2"),D=c("a"),ct=c("span"),M(Us.$$.fragment),wl=a(),tt=c("span"),tt.textContent=Gl,Wt=a(),Ts=c("p"),Ts.textContent=Xl,Vt=a(),M(ws.$$.fragment),Et=a(),bs=c("p"),bs.innerHTML=Bl,Gt=a(),M($s.$$.fragment),Xt=a(),_s=c("p"),_s.textContent=Nl,Bt=a(),M(vs.$$.fragment),Nt=a(),Cs=c("p"),Cs.textContent=Hl,Ht=a(),Is=c("ol"),Is.innerHTML=Al,At=a(),M(ks.$$.fragment),Yt=a(),Rs=c("p"),Rs.innerHTML=Yl,zt=a(),M(Qs.$$.fragment),Ft=a(),xs=c("p"),xs.innerHTML=zl,qt=a(),Zs=c("p"),Zs.innerHTML=Fl,St=a(),M(Ws.$$.fragment),Dt=a(),Vs=c("p"),Vs.innerHTML=ql,Lt=a(),M(Es.$$.fragment),Pt=a(),Y=c("h2"),L=c("a"),rt=c("span"),M(Gs.$$.fragment),bl=a(),lt=c("span"),lt.textContent=Sl,Ot=a(),Xs=c("p"),Xs.innerHTML=Dl,Kt=a(),M(Bs.$$.fragment),sl=a(),Ns=c("p"),Ns.innerHTML=Ll,tl=a(),M(Hs.$$.fragment),ll=a(),As=c("p"),As.innerHTML=Pl,el=a(),z=c("h2"),P=c("a"),it=c("span"),M(Ys.$$.fragment),$l=a(),et=c("span"),et.textContent=Ol,al=a(),M(O.$$.fragment),nl=a(),M(K.$$.fragment),pl=a(),F=c("h2"),ss=c("a"),ot=c("span"),M(zs.$$.fragment),_l=a(),at=c("span"),at.textContent=Kl,cl=a(),Fs=c("p"),Fs.textContent=se,rl=a(),qs=c("p"),qs.textContent=te,il=a(),M(Ss.$$.fragment),ol=a(),Ds=c("p"),Ds.innerHTML=le,ml=a(),M(Ls.$$.fragment),hl=a(),M(ts.$$.fragment),Ml=a(),Ps=c("p"),Ps.innerHTML=ee,dl=a(),M(ls.$$.fragment),ul=a(),mt=c("p"),this.h()},l(s){const l=ge("svelte-1phssyn",document.head);p=r(l,"META",{name:!0,content:!0}),l.forEach(t),g=n(s),i=r(s,"P",{}),k(i).forEach(t),f=n(s),U=r(s,"H1",{class:!0});var Os=k(U);b=r(Os,"A",{id:!0,class:!0,href:!0});var ht=k(b);E=r(ht,"SPAN",{});var Mt=k(E);d(C.$$.fragment,Mt),Mt.forEach(t),ht.forEach(t),V=n(Os),W=r(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=r(s,"P",{"data-svelte-h":!0}),h(v)!=="svelte-1qlvl3y"&&(v.textContent=es),G=n(s),X=r(s,"P",{"data-svelte-h":!0}),h(X)!=="svelte-7oxnvp"&&(X.textContent=o),_=n(s),N=r(s,"OL",{"data-svelte-h":!0}),h(N)!=="svelte-1ok1jy5"&&(N.innerHTML=vl),jt=n(s),d(q.$$.fragment,s),yt=n(s),as=r(s,"P",{"data-svelte-h":!0}),h(as)!=="svelte-18iigii"&&(as.textContent=Cl),Jt=n(s),d(ns.$$.fragment,s),gt=n(s),ps=r(s,"P",{"data-svelte-h":!0}),h(ps)!=="svelte-2mor9q"&&(ps.textContent=Il),ft=n(s),d(cs.$$.fragment,s),Ut=n(s),H=r(s,"H2",{class:!0});var Ks=k(H);S=r(Ks,"A",{id:!0,class:!0,href:!0});var dt=k(S);pt=r(dt,"SPAN",{});var ae=k(pt);d(rs.$$.fragment,ae),ae.forEach(t),dt.forEach(t),Tl=n(Ks),st=r(Ks,"SPAN",{"data-svelte-h":!0}),h(st)!=="svelte-1xn7f32"&&(st.textContent=kl),Ks.forEach(t),Tt=n(s),is=r(s,"P",{"data-svelte-h":!0}),h(is)!=="svelte-7q7xwh"&&(is.innerHTML=Rl),wt=n(s),d(os.$$.fragment,s),bt=n(s),ms=r(s,"P",{"data-svelte-h":!0}),h(ms)!=="svelte-3148pn"&&(ms.innerHTML=Ql),$t=n(s),d(hs.$$.fragment,s),_t=n(s),Ms=r(s,"P",{"data-svelte-h":!0}),h(Ms)!=="svelte-17o70r1"&&(Ms.textContent=xl),vt=n(s),d(ds.$$.fragment,s),Ct=n(s),us=r(s,"P",{"data-svelte-h":!0}),h(us)!=="svelte-1dp2qnq"&&(us.innerHTML=Zl),It=n(s),d(js.$$.fragment,s),kt=n(s),ys=r(s,"P",{"data-svelte-h":!0}),h(ys)!=="svelte-1p9pg2d"&&(ys.textContent=Wl),Rt=n(s),d(Js.$$.fragment,s),Qt=n(s),gs=r(s,"P",{"data-svelte-h":!0}),h(gs)!=="svelte-6aiy91"&&(gs.textContent=Vl),xt=n(s),fs=r(s,"UL",{"data-svelte-h":!0}),h(fs)!=="svelte-1l53gx0"&&(fs.innerHTML=El),Zt=n(s),A=r(s,"H2",{class:!0});var yl=k(A);D=r(yl,"A",{id:!0,class:!0,href:!0});var ne=k(D);ct=r(ne,"SPAN",{});var pe=k(ct);d(Us.$$.fragment,pe),pe.forEach(t),ne.forEach(t),wl=n(yl),tt=r(yl,"SPAN",{"data-svelte-h":!0}),h(tt)!=="svelte-1cte2wb"&&(tt.textContent=Gl),yl.forEach(t),Wt=n(s),Ts=r(s,"P",{"data-svelte-h":!0}),h(Ts)!=="svelte-1fm7wkp"&&(Ts.textContent=Xl),Vt=n(s),d(ws.$$.fragment,s),Et=n(s),bs=r(s,"P",{"data-svelte-h":!0}),h(bs)!=="svelte-e2ss04"&&(bs.innerHTML=Bl),Gt=n(s),d($s.$$.fragment,s),Xt=n(s),_s=r(s,"P",{"data-svelte-h":!0}),h(_s)!=="svelte-14tnwq5"&&(_s.textContent=Nl),Bt=n(s),d(vs.$$.fragment,s),Nt=n(s),Cs=r(s,"P",{"data-svelte-h":!0}),h(Cs)!=="svelte-10u1mcw"&&(Cs.textContent=Hl),Ht=n(s),Is=r(s,"OL",{"data-svelte-h":!0}),h(Is)!=="svelte-bj7uax"&&(Is.innerHTML=Al),At=n(s),d(ks.$$.fragment,s),Yt=n(s),Rs=r(s,"P",{"data-svelte-h":!0}),h(Rs)!=="svelte-vxgjmg"&&(Rs.innerHTML=Yl),zt=n(s),d(Qs.$$.fragment,s),Ft=n(s),xs=r(s,"P",{"data-svelte-h":!0}),h(xs)!=="svelte-7av315"&&(xs.innerHTML=zl),qt=n(s),Zs=r(s,"P",{"data-svelte-h":!0}),h(Zs)!=="svelte-pcjp4m"&&(Zs.innerHTML=Fl),St=n(s),d(Ws.$$.fragment,s),Dt=n(s),Vs=r(s,"P",{"data-svelte-h":!0}),h(Vs)!=="svelte-o882aa"&&(Vs.innerHTML=ql),Lt=n(s),d(Es.$$.fragment,s),Pt=n(s),Y=r(s,"H2",{class:!0});var Jl=k(Y);L=r(Jl,"A",{id:!0,class:!0,href:!0});var ce=k(L);rt=r(ce,"SPAN",{});var re=k(rt);d(Gs.$$.fragment,re),re.forEach(t),ce.forEach(t),bl=n(Jl),lt=r(Jl,"SPAN",{"data-svelte-h":!0}),h(lt)!=="svelte-zfi65a"&&(lt.textContent=Sl),Jl.forEach(t),Ot=n(s),Xs=r(s,"P",{"data-svelte-h":!0}),h(Xs)!=="svelte-1kx52w5"&&(Xs.innerHTML=Dl),Kt=n(s),d(Bs.$$.fragment,s),sl=n(s),Ns=r(s,"P",{"data-svelte-h":!0}),h(Ns)!=="svelte-i1fso8"&&(Ns.innerHTML=Ll),tl=n(s),d(Hs.$$.fragment,s),ll=n(s),As=r(s,"P",{"data-svelte-h":!0}),h(As)!=="svelte-15lq6yk"&&(As.innerHTML=Pl),el=n(s),z=r(s,"H2",{class:!0});var gl=k(z);P=r(gl,"A",{id:!0,class:!0,href:!0});var ie=k(P);it=r(ie,"SPAN",{});var oe=k(it);d(Ys.$$.fragment,oe),oe.forEach(t),ie.forEach(t),$l=n(gl),et=r(gl,"SPAN",{"data-svelte-h":!0}),h(et)!=="svelte-r34xwh"&&(et.textContent=Ol),gl.forEach(t),al=n(s),d(O.$$.fragment,s),nl=n(s),d(K.$$.fragment,s),pl=n(s),F=r(s,"H2",{class:!0});var fl=k(F);ss=r(fl,"A",{id:!0,class:!0,href:!0});var me=k(ss);ot=r(me,"SPAN",{});var he=k(ot);d(zs.$$.fragment,he),he.forEach(t),me.forEach(t),_l=n(fl),at=r(fl,"SPAN",{"data-svelte-h":!0}),h(at)!=="svelte-4ugq51"&&(at.textContent=Kl),fl.forEach(t),cl=n(s),Fs=r(s,"P",{"data-svelte-h":!0}),h(Fs)!=="svelte-1annmqf"&&(Fs.textContent=se),rl=n(s),qs=r(s,"P",{"data-svelte-h":!0}),h(qs)!=="svelte-18ieb63"&&(qs.textContent=te),il=n(s),d(Ss.$$.fragment,s),ol=n(s),Ds=r(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=r(s,"P",{"data-svelte-h":!0}),h(Ps)!=="svelte-1olk0w9"&&(Ps.innerHTML=ee),dl=n(s),d(ls.$$.fragment,s),ul=n(s),mt=r(s,"P",{}),k(mt).forEach(t),this.h()},h(){T(p,"name","hf:doc:metadata"),T(p,"content",JSON.stringify(xe)),T(b,"id","automatic-speech-recognition"),T(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"),T(b,"href","#automatic-speech-recognition"),T(U,"class","relative group"),T(S,"id","load-minds-14-dataset"),T(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"),T(S,"href","#load-minds-14-dataset"),T(H,"class","relative group"),T(D,"id","preprocess"),T(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"),T(D,"href","#preprocess"),T(A,"class","relative group"),T(L,"id","evaluate"),T(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"),T(L,"href","#evaluate"),T(Y,"class","relative group"),T(P,"id","train"),T(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"),T(P,"href","#train"),T(z,"class","relative group"),T(ss,"id","inference"),T(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"),T(ss,"href","#inference"),T(F,"class","relative group")},m(s,l){w(document.head,p),e(s,g,l),e(s,i,l),e(s,f,l),e(s,U,l),w(U,b),w(b,E),u(C,E,null),w(U,V),w(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,Jt,l),u(ns,s,l),e(s,gt,l),e(s,ps,l),e(s,ft,l),u(cs,s,l),e(s,Ut,l),e(s,H,l),w(H,S),w(S,pt),u(rs,pt,null),w(H,Tl),w(H,st),e(s,Tt,l),e(s,is,l),e(s,wt,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(Js,s,l),e(s,Qt,l),e(s,gs,l),e(s,xt,l),e(s,fs,l),e(s,Zt,l),e(s,A,l),w(A,D),w(D,ct),u(Us,ct,null),w(A,wl),w(A,tt),e(s,Wt,l),e(s,Ts,l),e(s,Vt,l),u(ws,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),w(Y,L),w(L,rt),u(Gs,rt,null),w(Y,bl),w(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),w(z,P),w(P,it),u(Ys,it,null),w(z,$l),w(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),w(F,ss),w(ss,ot),u(zs,ot,null),w(F,_l),w(F,at),e(s,cl,l),e(s,Fs,l),e(s,rl,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(cs.$$.fragment,s),j(rs.$$.fragment,s),j(os.$$.fragment,s),j(hs.$$.fragment,s),j(ds.$$.fragment,s),j(js.$$.fragment,s),j(Js.$$.fragment,s),j(Us.$$.fragment,s),j(ws.$$.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(cs.$$.fragment,s),y(rs.$$.fragment,s),y(os.$$.fragment,s),y(hs.$$.fragment,s),y(ds.$$.fragment,s),y(js.$$.fragment,s),y(Js.$$.fragment,s),y(Us.$$.fragment,s),y(ws.$$.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(g),t(i),t(f),t(U),t(B),t(I),t(m),t(v),t(G),t(X),t(_),t(N),t(jt),t(yt),t(as),t(Jt),t(gt),t(ps),t(ft),t(Ut),t(H),t(Tt),t(is),t(wt),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(gs),t(xt),t(fs),t(Zt),t(A),t(Wt),t(Ts),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(cl),t(Fs),t(rl),t(qs),t(il),t(ol),t(Ds),t(ml),t(hl),t(Ml),t(Ps),t(dl),t(ul),t(mt)),t(p),J(C),J(x,s),J(Z,s),J(q,s),J(ns,s),J(cs,s),J(rs),J(os,s),J(hs,s),J(ds,s),J(js,s),J(Js,s),J(Us),J(ws,s),J($s,s),J(vs,s),J(ks,s),J(Qs,s),J(Ws,s),J(Es,s),J(Gs),J(Bs,s),J(Hs,s),J(Ys),J(O,s),J(K,s),J(zs),J(Ss,s),J(Ls,s),J(ts,s),J(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(),Je(this,p,Ze,Qe,ue,{})}}export{Ae as component};
