import{s as na,o as pa,n as me}from"../chunks/scheduler.56730f09.js";import{S as ia,i as ra,g as i,s as l,u,A as oa,h as r,f as t,c as n,j as W,v as f,y as h,k as w,o as J,a,w as d,d as g,t as M,x as j,m as ca,n as ma}from"../chunks/index.ba464511.js";import{T as Me}from"../chunks/Tip.70442610.js";import{Y as ha}from"../chunks/Youtube.7b20230c.js";import{I as tt}from"../chunks/IconCopyLink.89bde88e.js";import{C as T}from"../chunks/CodeBlock.2302fd0d.js";import{D as ua}from"../chunks/DocNotebookDropdown.68fd8653.js";import{F as aa,M as la}from"../chunks/Markdown.6303afae.js";function fa(X){let p,y,o='<a href="../model_doc/audio-spectrogram-transformer">Audio Spectrogram Transformer</a>, <a href="../model_doc/data2vec-audio">Data2VecAudio</a>, <a href="../model_doc/hubert">Hubert</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>, <a href="../model_doc/whisper">Whisper</a>';return{c(){p=ca(`이 튜토리얼에서 설명하는 작업은 아래의 모델 아키텍처에서 지원됩니다:

`),y=i("p"),y.innerHTML=o},l(b){p=ma(b,`이 튜토리얼에서 설명하는 작업은 아래의 모델 아키텍처에서 지원됩니다:

`),y=r(b,"P",{"data-svelte-h":!0}),h(y)!=="svelte-1x7pfyj"&&(y.innerHTML=o)},m(b,$){a(b,p,$),a(b,y,$)},p:me,d(b){b&&(t(p),t(y))}}}function da(X){let p,y='<code>Trainer</code>로 모델을 미세 조정하는 데 익숙하지 않다면 기본 튜토리얼 <a href="../training#train-with-pytorch-trainer">여기</a>을 살펴보세요!';return{c(){p=i("p"),p.innerHTML=y},l(o){p=r(o,"P",{"data-svelte-h":!0}),h(p)!=="svelte-1ukxqs2"&&(p.innerHTML=y)},m(o,b){a(o,p,b)},p:me,d(o){o&&t(p)}}}function ga(X){let p,y,o,b="이제 모델 훈련을 시작할 준비가 되었습니다! <code>AutoModelForAudioClassification</code>을 이용해서 Wav2Vec2를 불러옵니다. 예상되는 레이블 수와 레이블 매핑을 지정합니다:",$,_,V,U,G="이제 세 단계만 남았습니다:",R,Z,Y="<li>훈련 하이퍼파라미터를 <code>TrainingArguments</code>에 정의합니다. 유일한 필수 매개변수는 모델을 저장할 위치를 지정하는 <code>output_dir</code>입니다. <code>push_to_hub = True</code>를 설정하여 이 모델을 허브로 푸시합니다(모델을 업로드하려면 허깅 페이스에 로그인해야 합니다). 각 에폭이 끝날 때마다 <code>Trainer</code>가 정확도를 평가하고 훈련 체크포인트를 저장합니다.</li> <li>모델, 데이터 세트, 토크나이저, 데이터 콜레이터, <code>compute_metrics</code> 함수와 함께 훈련 인자를 <code>Trainer</code>에 전달합니다.</li> <li><code>train()</code>을 호출하여 모델을 미세 조정합니다.</li>",C,k,I,m,x="훈련이 완료되면 모든 사람이 모델을 사용할 수 있도록 <code>push_to_hub()</code> 메소드를 사용하여 모델을 허브에 공유하세요:",es,N,E;return p=new Me({props:{$$slots:{default:[da]},$$scope:{ctx:X}}}),_=new T({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvckF1ZGlvQ2xhc3NpZmljYXRpb24lMkMlMjBUcmFpbmluZ0FyZ3VtZW50cyUyQyUyMFRyYWluZXIlMEElMEFudW1fbGFiZWxzJTIwJTNEJTIwbGVuKGlkMmxhYmVsKSUwQW1vZGVsJTIwJTNEJTIwQXV0b01vZGVsRm9yQXVkaW9DbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyZmFjZWJvb2slMkZ3YXYydmVjMi1iYXNlJTIyJTJDJTIwbnVtX2xhYmVscyUzRG51bV9sYWJlbHMlMkMlMjBsYWJlbDJpZCUzRGxhYmVsMmlkJTJDJTIwaWQybGFiZWwlM0RpZDJsYWJlbCUwQSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForAudioClassification, TrainingArguments, Trainer

<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(id2label)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForAudioClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;facebook/wav2vec2-base&quot;</span>, num_labels=num_labels, label2id=label2id, id2label=id2label
<span class="hljs-meta">... </span>)`,wrap:!1}}),k=new T({props:{code:"dHJhaW5pbmdfYXJncyUyMCUzRCUyMFRyYWluaW5nQXJndW1lbnRzKCUwQSUyMCUyMCUyMCUyMG91dHB1dF9kaXIlM0QlMjJteV9hd2Vzb21lX21pbmRfbW9kZWwlMjIlMkMlMEElMjAlMjAlMjAlMjBldmFsdWF0aW9uX3N0cmF0ZWd5JTNEJTIyZXBvY2glMjIlMkMlMEElMjAlMjAlMjAlMjBzYXZlX3N0cmF0ZWd5JTNEJTIyZXBvY2glMjIlMkMlMEElMjAlMjAlMjAlMjBsZWFybmluZ19yYXRlJTNEM2UtNSUyQyUwQSUyMCUyMCUyMCUyMHBlcl9kZXZpY2VfdHJhaW5fYmF0Y2hfc2l6ZSUzRDMyJTJDJTBBJTIwJTIwJTIwJTIwZ3JhZGllbnRfYWNjdW11bGF0aW9uX3N0ZXBzJTNENCUyQyUwQSUyMCUyMCUyMCUyMHBlcl9kZXZpY2VfZXZhbF9iYXRjaF9zaXplJTNEMzIlMkMlMEElMjAlMjAlMjAlMjBudW1fdHJhaW5fZXBvY2hzJTNEMTAlMkMlMEElMjAlMjAlMjAlMjB3YXJtdXBfcmF0aW8lM0QwLjElMkMlMEElMjAlMjAlMjAlMjBsb2dnaW5nX3N0ZXBzJTNEMTAlMkMlMEElMjAlMjAlMjAlMjBsb2FkX2Jlc3RfbW9kZWxfYXRfZW5kJTNEVHJ1ZSUyQyUwQSUyMCUyMCUyMCUyMG1ldHJpY19mb3JfYmVzdF9tb2RlbCUzRCUyMmFjY3VyYWN5JTIyJTJDJTBBJTIwJTIwJTIwJTIwcHVzaF90b19odWIlM0RUcnVlJTJDJTBBKSUwQSUwQXRyYWluZXIlMjAlM0QlMjBUcmFpbmVyKCUwQSUyMCUyMCUyMCUyMG1vZGVsJTNEbW9kZWwlMkMlMEElMjAlMjAlMjAlMjBhcmdzJTNEdHJhaW5pbmdfYXJncyUyQyUwQSUyMCUyMCUyMCUyMHRyYWluX2RhdGFzZXQlM0RlbmNvZGVkX21pbmRzJTVCJTIydHJhaW4lMjIlNUQlMkMlMEElMjAlMjAlMjAlMjBldmFsX2RhdGFzZXQlM0RlbmNvZGVkX21pbmRzJTVCJTIydGVzdCUyMiU1RCUyQyUwQSUyMCUyMCUyMCUyMHRva2VuaXplciUzRGZlYXR1cmVfZXh0cmFjdG9yJTJDJTBBJTIwJTIwJTIwJTIwY29tcHV0ZV9tZXRyaWNzJTNEY29tcHV0ZV9tZXRyaWNzJTJDJTBBKSUwQSUwQXRyYWluZXIudHJhaW4oKQ==",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_mind_model&quot;</span>,
<span class="hljs-meta">... </span>    evaluation_strategy=<span class="hljs-string">&quot;epoch&quot;</span>,
<span class="hljs-meta">... </span>    save_strategy=<span class="hljs-string">&quot;epoch&quot;</span>,
<span class="hljs-meta">... </span>    learning_rate=<span class="hljs-number">3e-5</span>,
<span class="hljs-meta">... </span>    per_device_train_batch_size=<span class="hljs-number">32</span>,
<span class="hljs-meta">... </span>    gradient_accumulation_steps=<span class="hljs-number">4</span>,
<span class="hljs-meta">... </span>    per_device_eval_batch_size=<span class="hljs-number">32</span>,
<span class="hljs-meta">... </span>    num_train_epochs=<span class="hljs-number">10</span>,
<span class="hljs-meta">... </span>    warmup_ratio=<span class="hljs-number">0.1</span>,
<span class="hljs-meta">... </span>    logging_steps=<span class="hljs-number">10</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;accuracy&quot;</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=feature_extractor,
<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}}),N=new T({props:{code:"dHJhaW5lci5wdXNoX3RvX2h1Yigp",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>trainer.push_to_hub()',wrap:!1}}),{c(){u(p.$$.fragment),y=l(),o=i("p"),o.innerHTML=b,$=l(),u(_.$$.fragment),V=l(),U=i("p"),U.textContent=G,R=l(),Z=i("ol"),Z.innerHTML=Y,C=l(),u(k.$$.fragment),I=l(),m=i("p"),m.innerHTML=x,es=l(),u(N.$$.fragment)},l(c){f(p.$$.fragment,c),y=n(c),o=r(c,"P",{"data-svelte-h":!0}),h(o)!=="svelte-mqhd57"&&(o.innerHTML=b),$=n(c),f(_.$$.fragment,c),V=n(c),U=r(c,"P",{"data-svelte-h":!0}),h(U)!=="svelte-1vwg7jz"&&(U.textContent=G),R=n(c),Z=r(c,"OL",{"data-svelte-h":!0}),h(Z)!=="svelte-192msm8"&&(Z.innerHTML=Y),C=n(c),f(k.$$.fragment,c),I=n(c),m=r(c,"P",{"data-svelte-h":!0}),h(m)!=="svelte-yt6kqu"&&(m.innerHTML=x),es=n(c),f(N.$$.fragment,c)},m(c,v){d(p,c,v),a(c,y,v),a(c,o,v),a(c,$,v),d(_,c,v),a(c,V,v),a(c,U,v),a(c,R,v),a(c,Z,v),a(c,C,v),d(k,c,v),a(c,I,v),a(c,m,v),a(c,es,v),d(N,c,v),E=!0},p(c,v){const F={};v&2&&(F.$$scope={dirty:v,ctx:c}),p.$set(F)},i(c){E||(g(p.$$.fragment,c),g(_.$$.fragment,c),g(k.$$.fragment,c),g(N.$$.fragment,c),E=!0)},o(c){M(p.$$.fragment,c),M(_.$$.fragment,c),M(k.$$.fragment,c),M(N.$$.fragment,c),E=!1},d(c){c&&(t(y),t(o),t($),t(V),t(U),t(R),t(Z),t(C),t(I),t(m),t(es)),j(p,c),j(_,c),j(k,c),j(N,c)}}}function Ma(X){let p,y;return p=new la({props:{$$slots:{default:[ga]},$$scope:{ctx:X}}}),{c(){u(p.$$.fragment)},l(o){f(p.$$.fragment,o)},m(o,b){d(p,o,b),y=!0},p(o,b){const $={};b&2&&($.$$scope={dirty:b,ctx:o}),p.$set($)},i(o){y||(g(p.$$.fragment,o),y=!0)},o(o){M(p.$$.fragment,o),y=!1},d(o){j(p,o)}}}function ja(X){let p,y='For a more in-depth example of how to finetune a model for audio classification, take a look at the corresponding <a href="https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/audio_classification.ipynb" rel="nofollow">PyTorch notebook</a>.';return{c(){p=i("p"),p.innerHTML=y},l(o){p=r(o,"P",{"data-svelte-h":!0}),h(p)!=="svelte-1zzytb"&&(p.innerHTML=y)},m(o,b){a(o,p,b)},p:me,d(o){o&&t(p)}}}function ba(X){let p,y="특징 추출기를 가져와서 오디오 파일을 전처리하고 <code>입력</code>을 PyTorch 텐서로 반환합니다:",o,b,$,_,V="모델에 입력을 전달하고 로짓을 반환합니다:",U,G,R,Z,Y="확률이 가장 높은 클래스를 가져온 다음 모델의 <code>id2label</code> 매핑을 사용하여 이를 레이블로 변환합니다:",C,k,I;return b=new T({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9GZWF0dXJlRXh0cmFjdG9yJTBBJTBBZmVhdHVyZV9leHRyYWN0b3IlMjAlM0QlMjBBdXRvRmVhdHVyZUV4dHJhY3Rvci5mcm9tX3ByZXRyYWluZWQoJTIyc3RldmhsaXUlMkZteV9hd2Vzb21lX21pbmRzX21vZGVsJTIyKSUwQWlucHV0cyUyMCUzRCUyMGZlYXR1cmVfZXh0cmFjdG9yKGRhdGFzZXQlNUIwJTVEJTVCJTIyYXVkaW8lMjIlNUQlNUIlMjJhcnJheSUyMiU1RCUyQyUyMHNhbXBsaW5nX3JhdGUlM0RzYW1wbGluZ19yYXRlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor

<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;stevhliu/my_awesome_minds_model&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = feature_extractor(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}}),G=new T({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvckF1ZGlvQ2xhc3NpZmljYXRpb24lMEElMEFtb2RlbCUyMCUzRCUyMEF1dG9Nb2RlbEZvckF1ZGlvQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMnN0ZXZobGl1JTJGbXlfYXdlc29tZV9taW5kc19tb2RlbCUyMiklMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForAudioClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForAudioClassification.from_pretrained(<span class="hljs-string">&quot;stevhliu/my_awesome_minds_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}}),k=new T({props:{code:"aW1wb3J0JTIwdG9yY2glMEElMEFwcmVkaWN0ZWRfY2xhc3NfaWRzJTIwJTNEJTIwdG9yY2guYXJnbWF4KGxvZ2l0cykuaXRlbSgpJTBBcHJlZGljdGVkX2xhYmVsJTIwJTNEJTIwbW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCcHJlZGljdGVkX2NsYXNzX2lkcyU1RCUwQXByZWRpY3RlZF9sYWJlbA==",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_class_ids = torch.argmax(logits).item()
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_label = model.config.id2label[predicted_class_ids]
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_label
<span class="hljs-string">&#x27;cash_deposit&#x27;</span>`,wrap:!1}}),{c(){p=i("p"),p.innerHTML=y,o=l(),u(b.$$.fragment),$=l(),_=i("p"),_.textContent=V,U=l(),u(G.$$.fragment),R=l(),Z=i("p"),Z.innerHTML=Y,C=l(),u(k.$$.fragment)},l(m){p=r(m,"P",{"data-svelte-h":!0}),h(p)!=="svelte-17y820t"&&(p.innerHTML=y),o=n(m),f(b.$$.fragment,m),$=n(m),_=r(m,"P",{"data-svelte-h":!0}),h(_)!=="svelte-xk5bow"&&(_.textContent=V),U=n(m),f(G.$$.fragment,m),R=n(m),Z=r(m,"P",{"data-svelte-h":!0}),h(Z)!=="svelte-qlgilp"&&(Z.innerHTML=Y),C=n(m),f(k.$$.fragment,m)},m(m,x){a(m,p,x),a(m,o,x),d(b,m,x),a(m,$,x),a(m,_,x),a(m,U,x),d(G,m,x),a(m,R,x),a(m,Z,x),a(m,C,x),d(k,m,x),I=!0},p:me,i(m){I||(g(b.$$.fragment,m),g(G.$$.fragment,m),g(k.$$.fragment,m),I=!0)},o(m){M(b.$$.fragment,m),M(G.$$.fragment,m),M(k.$$.fragment,m),I=!1},d(m){m&&(t(p),t(o),t($),t(_),t(U),t(R),t(Z),t(C)),j(b,m),j(G,m),j(k,m)}}}function ya(X){let p,y;return p=new la({props:{$$slots:{default:[ba]},$$scope:{ctx:X}}}),{c(){u(p.$$.fragment)},l(o){f(p.$$.fragment,o)},m(o,b){d(p,o,b),y=!0},p(o,b){const $={};b&2&&($.$$scope={dirty:b,ctx:o}),p.$set($)},i(o){y||(g(p.$$.fragment,o),y=!0)},o(o){M(p.$$.fragment,o),y=!1},d(o){j(p,o)}}}function $a(X){let p,y,o,b,$,_,V,U,G,R,Z="오디오 분류",Y,C,k,I,m,x,es="오디오 분류는 텍스트와 마찬가지로 입력 데이터에 클래스 레이블 출력을 할당합니다. 유일한 차이점은 텍스트 입력 대신 원시 오디오 파형이 있다는 것입니다. 오디오 분류의 실제 적용 분야에는 화자의 의도 파악, 언어 분류, 소리로 동물 종을 식별하는 것 등이 있습니다.",N,E,c="이 문서에서 방법을 알아보겠습니다:",v,F,je='<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>',ct,q,mt,as,be="시작하기 전에 필요한 라이브러리가 모두 설치되어 있는지 확인하세요:",ht,ls,ut,ns,ye="모델을 업로드하고 커뮤니티와 공유할 수 있도록 허깅페이스 계정에 로그인하는 것이 좋습니다. 메시지가 표시되면 토큰을 입력하여 로그인합니다:",ft,ps,dt,H,S,et,is,he,Ls,$e="MInDS-14 데이터셋 불러오기",gt,rs,we="먼저 🤗 Datasets 라이브러리에서 MinDS-14 데이터 세트를 가져옵니다:",Mt,os,jt,cs,Je="데이터 세트의 <code>train</code> 분할을 <code>train_test_split</code> 메소드를 사용하여 더 작은 훈련 및 테스트 집합으로 분할합니다. 이렇게 하면 전체 데이터 세트에 더 많은 시간을 소비하기 전에 모든 것이 작동하는지 실험하고 확인할 수 있습니다.",bt,ms,yt,hs,_e="이제 데이터 집합을 살펴볼게요:",$t,us,wt,fs,ve="데이터 세트에는 <code>lang_id</code> 및 <code>english_transcription</code>과 같은 유용한 정보가 많이 포함되어 있지만 이 가이드에서는 <code>audio</code> 및 <code>intent_class</code>에 중점을 둘 것입니다. 다른 열은 <code>remove_columns</code> 메소드를 사용하여 제거합니다:",Jt,ds,_t,gs,Te="예시를 살펴보겠습니다:",vt,Ms,Tt,js,xe="두 개의 필드가 있습니다:",xt,bs,Ue="<li><code>audio</code>: 오디오 파일을 가져오고 리샘플링하기 위해 호출해야 하는 음성 신호의 1차원 <code>배열</code>입니다.</li> <li><code>intent_class</code>: 화자의 의도에 대한 클래스 ID를 나타냅니다.</li>",Ut,ys,ke="모델이 레이블 ID에서 레이블 이름을 쉽게 가져올 수 있도록 레이블 이름을 정수로 매핑하는 사전을 만들거나 그 반대로 매핑하는 사전을 만듭니다:",kt,$s,Wt,ws,We="이제 레이블 ID를 레이블 이름으로 변환할 수 있습니다:",Zt,Js,Ct,B,P,at,_s,ue,Ds,Ze="전처리",It,vs,Ce="다음 단계는 오디오 신호를 처리하기 위해 Wav2Vec2 특징 추출기를 가져오는 것입니다:",Xt,Ts,Rt,xs,Ie='MinDS-14 데이터 세트의 샘플링 속도는 8000khz이므로(이 정보는 <a href="https://huggingface.co/datasets/PolyAI/minds14" rel="nofollow">데이터세트 카드</a>에서 확인할 수 있습니다), 사전 훈련된 Wav2Vec2 모델을 사용하려면 데이터 세트를 16000kHz로 리샘플링해야 합니다:',Gt,Us,Vt,ks,Xe="이제 전처리 함수를 만듭니다:",Nt,Ws,Re='<li>가져올 <code>오디오</code> 열을 호출하고 필요한 경우 오디오 파일을 리샘플링합니다.</li> <li>오디오 파일의 샘플링 속도가 모델에 사전 훈련된 오디오 데이터의 샘플링 속도와 일치하는지 확인합니다. 이 정보는 Wav2Vec2 <a href="https://huggingface.co/facebook/wav2vec2-base" rel="nofollow">모델 카드</a>에서 확인할 수 있습니다.</li> <li>긴 입력이 잘리지 않고 일괄 처리되도록 최대 입력 길이를 설정합니다.</li>',Et,Zs,Yt,Cs,Ge="전체 데이터 세트에 전처리 기능을 적용하려면 🤗 Datasets <code>map</code> 함수를 사용합니다. <code>batched=True</code>를 설정하여 데이터 집합의 여러 요소를 한 번에 처리하면 <code>map</code>의 속도를 높일 수 있습니다. 필요하지 않은 열을 제거하고 <code>intent_class</code>의 이름을 모델이 예상하는 이름인 <code>label</code>로 변경합니다:",Ft,Is,Ht,A,L,lt,Xs,fe,Ks,Ve="평가하기",Bt,Rs,Ne='훈련 중에 메트릭을 포함하면 모델의 성능을 평가하는 데 도움이 되는 경우가 많습니다. 🤗 <a href="https://huggingface.co/docs/evaluate/index" rel="nofollow">Evaluate</a> 라이브러리를 사용하여 평가 방법을 빠르게 가져올 수 있습니다. 이 작업에서는 <a href="https://huggingface.co/spaces/evaluate-metric/accuracy" rel="nofollow">accuracy(정확도)</a> 메트릭을 가져옵니다(메트릭을 가져오고 계산하는 방법에 대한 자세한 내용은 🤗 Evalutate <a href="https://huggingface.co/docs/evaluate/a_quick_tour" rel="nofollow">빠른 둘러보기</a> 참조하세요):',At,Gs,Qt,Vs,Ee="그런 다음 예측과 레이블을 <code>compute</code>에 전달하여 정확도를 계산하는 함수를 만듭니다:",zt,Ns,qt,Es,Ye="이제 <code>compute_metrics</code> 함수를 사용할 준비가 되었으며, 트레이닝을 설정할 때 이 함수를 사용합니다.",St,Q,D,nt,Ys,de,Os,Fe="훈련",Pt,K,Lt,O,Dt,z,ss,pt,Fs,ge,st,He="추론",Kt,Hs,Be="이제 모델을 미세 조정했으니 추론에 사용할 수 있습니다!",Ot,Bs,Ae="추론을 실행할 오디오 파일을 가져옵니다. 필요한 경우 오디오 파일의 샘플링 속도를 모델의 샘플링 속도와 일치하도록 리샘플링하는 것을 잊지 마세요!",se,As,te,Qs,Qe="추론을 위해 미세 조정한 모델을 시험해 보는 가장 간단한 방법은 <code>pipeline()</code>에서 사용하는 것입니다. 모델을 사용하여 오디오 분류를 위한 <code>pipeline</code>을 인스턴스화하고 오디오 파일을 전달합니다:",ee,zs,ae,qs,ze="원하는 경우 <code>pipeline</code>의 결과를 수동으로 복제할 수도 있습니다:",le,ts,ne,it,pe;return U=new tt({}),C=new ua({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/audio_classification.ipynb"},{label:"PyTorch",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/ko/pytorch/audio_classification.ipynb"},{label:"TensorFlow",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/ko/tensorflow/audio_classification.ipynb"},{label:"Mixed",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/ko/audio_classification.ipynb"},{label:"PyTorch",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/ko/pytorch/audio_classification.ipynb"},{label:"TensorFlow",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/ko/tensorflow/audio_classification.ipynb"}]}}),I=new ha({props:{id:"KWwzcmG98Ds"}}),q=new Me({props:{$$slots:{default:[fa]},$$scope:{ctx:X}}}),ls=new T({props:{code:"cGlwJTIwaW5zdGFsbCUyMHRyYW5zZm9ybWVycyUyMGRhdGFzZXRzJTIwZXZhbHVhdGU=",highlighted:"pip install transformers datasets evaluate",wrap:!1}}),ps=new T({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}}),is=new tt({}),os=new T({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTJDJTIwQXVkaW8lMEElMEFtaW5kcyUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJQb2x5QUklMkZtaW5kczE0JTIyJTJDJTIwbmFtZSUzRCUyMmVuLVVTJTIyJTJDJTIwc3BsaXQlM0QlMjJ0cmFpbiUyMik=",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&quot;</span>)`,wrap:!1}}),ms=new T({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}}),us=new T({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">450</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">113</span>
    })
})`,wrap:!1}}),ds=new T({props:{code:"bWluZHMlMjAlM0QlMjBtaW5kcy5yZW1vdmVfY29sdW1ucyglNUIlMjJwYXRoJTIyJTJDJTIwJTIydHJhbnNjcmlwdGlvbiUyMiUyQyUyMCUyMmVuZ2xpc2hfdHJhbnNjcmlwdGlvbiUyMiUyQyUyMCUyMmxhbmdfaWQlMjIlNUQp",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>minds = minds.remove_columns([<span class="hljs-string">&quot;path&quot;</span>, <span class="hljs-string">&quot;transcription&quot;</span>, <span class="hljs-string">&quot;english_transcription&quot;</span>, <span class="hljs-string">&quot;lang_id&quot;</span>])',wrap:!1}}),Ms=new T({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.</span>        ,  <span class="hljs-number">0.</span>        ,  <span class="hljs-number">0.</span>        , ..., -<span class="hljs-number">0.00048828</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/602b9a5fbb1e6d0fbce91f52.wav&#x27;</span>,
  <span class="hljs-string">&#x27;sampling_rate&#x27;</span>: <span class="hljs-number">8000</span>},
 <span class="hljs-string">&#x27;intent_class&#x27;</span>: <span class="hljs-number">2</span>}`,wrap:!1}}),$s=new T({props:{code:"bGFiZWxzJTIwJTNEJTIwbWluZHMlNUIlMjJ0cmFpbiUyMiU1RC5mZWF0dXJlcyU1QiUyMmludGVudF9jbGFzcyUyMiU1RC5uYW1lcyUwQWxhYmVsMmlkJTJDJTIwaWQybGFiZWwlMjAlM0QlMjBkaWN0KCklMkMlMjBkaWN0KCklMEFmb3IlMjBpJTJDJTIwbGFiZWwlMjBpbiUyMGVudW1lcmF0ZShsYWJlbHMpJTNBJTBBJTIwJTIwJTIwJTIwbGFiZWwyaWQlNUJsYWJlbCU1RCUyMCUzRCUyMHN0cihpKSUwQSUyMCUyMCUyMCUyMGlkMmxhYmVsJTVCc3RyKGkpJTVEJTIwJTNEJTIwbGFiZWw=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>labels = minds[<span class="hljs-string">&quot;train&quot;</span>].features[<span class="hljs-string">&quot;intent_class&quot;</span>].names
<span class="hljs-meta">&gt;&gt;&gt; </span>label2id, id2label = <span class="hljs-built_in">dict</span>(), <span class="hljs-built_in">dict</span>()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">for</span> i, label <span class="hljs-keyword">in</span> <span class="hljs-built_in">enumerate</span>(labels):
<span class="hljs-meta">... </span>    label2id[label] = <span class="hljs-built_in">str</span>(i)
<span class="hljs-meta">... </span>    id2label[<span class="hljs-built_in">str</span>(i)] = label`,wrap:!1}}),Js=new T({props:{code:"aWQybGFiZWwlNUJzdHIoMiklNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>id2label[<span class="hljs-built_in">str</span>(<span class="hljs-number">2</span>)]
<span class="hljs-string">&#x27;app_error&#x27;</span>`,wrap:!1}}),_s=new tt({}),Ts=new T({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9GZWF0dXJlRXh0cmFjdG9yJTBBJTBBZmVhdHVyZV9leHRyYWN0b3IlMjAlM0QlMjBBdXRvRmVhdHVyZUV4dHJhY3Rvci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZ3YXYydmVjMi1iYXNlJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor

<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;facebook/wav2vec2-base&quot;</span>)`,wrap:!1}}),Us=new T({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.2098757e-05</span>,  <span class="hljs-number">4.6582241e-05</span>, -<span class="hljs-number">2.2803260e-05</span>, ...,
         -<span class="hljs-number">2.8419291e-04</span>, -<span class="hljs-number">2.3305941e-04</span>, -<span class="hljs-number">1.1425107e-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/602b9a5fbb1e6d0fbce91f52.wav&#x27;</span>,
  <span class="hljs-string">&#x27;sampling_rate&#x27;</span>: <span class="hljs-number">16000</span>},
 <span class="hljs-string">&#x27;intent_class&#x27;</span>: <span class="hljs-number">2</span>}`,wrap:!1}}),Zs=new T({props:{code:"ZGVmJTIwcHJlcHJvY2Vzc19mdW5jdGlvbihleGFtcGxlcyklM0ElMEElMjAlMjAlMjAlMjBhdWRpb19hcnJheXMlMjAlM0QlMjAlNUJ4JTVCJTIyYXJyYXklMjIlNUQlMjBmb3IlMjB4JTIwaW4lMjBleGFtcGxlcyU1QiUyMmF1ZGlvJTIyJTVEJTVEJTBBJTIwJTIwJTIwJTIwaW5wdXRzJTIwJTNEJTIwZmVhdHVyZV9leHRyYWN0b3IoJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwYXVkaW9fYXJyYXlzJTJDJTIwc2FtcGxpbmdfcmF0ZSUzRGZlYXR1cmVfZXh0cmFjdG9yLnNhbXBsaW5nX3JhdGUlMkMlMjBtYXhfbGVuZ3RoJTNEMTYwMDAlMkMlMjB0cnVuY2F0aW9uJTNEVHJ1ZSUwQSUyMCUyMCUyMCUyMCklMEElMjAlMjAlMjAlMjByZXR1cm4lMjBpbnB1dHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">preprocess_function</span>(<span class="hljs-params">examples</span>):
<span class="hljs-meta">... </span>    audio_arrays = [x[<span class="hljs-string">&quot;array&quot;</span>] <span class="hljs-keyword">for</span> x <span class="hljs-keyword">in</span> examples[<span class="hljs-string">&quot;audio&quot;</span>]]
<span class="hljs-meta">... </span>    inputs = feature_extractor(
<span class="hljs-meta">... </span>        audio_arrays, sampling_rate=feature_extractor.sampling_rate, max_length=<span class="hljs-number">16000</span>, truncation=<span class="hljs-literal">True</span>
<span class="hljs-meta">... </span>    )
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> inputs`,wrap:!1}}),Is=new T({props:{code:"ZW5jb2RlZF9taW5kcyUyMCUzRCUyMG1pbmRzLm1hcChwcmVwcm9jZXNzX2Z1bmN0aW9uJTJDJTIwcmVtb3ZlX2NvbHVtbnMlM0QlMjJhdWRpbyUyMiUyQyUyMGJhdGNoZWQlM0RUcnVlKSUwQWVuY29kZWRfbWluZHMlMjAlM0QlMjBlbmNvZGVkX21pbmRzLnJlbmFtZV9jb2x1bW4oJTIyaW50ZW50X2NsYXNzJTIyJTJDJTIwJTIybGFiZWwlMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>encoded_minds = minds.<span class="hljs-built_in">map</span>(preprocess_function, remove_columns=<span class="hljs-string">&quot;audio&quot;</span>, batched=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>encoded_minds = encoded_minds.rename_column(<span class="hljs-string">&quot;intent_class&quot;</span>, <span class="hljs-string">&quot;label&quot;</span>)`,wrap:!1}}),Xs=new tt({}),Gs=new T({props:{code:"aW1wb3J0JTIwZXZhbHVhdGUlMEElMEFhY2N1cmFjeSUyMCUzRCUyMGV2YWx1YXRlLmxvYWQoJTIyYWNjdXJhY3klMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> evaluate

<span class="hljs-meta">&gt;&gt;&gt; </span>accuracy = evaluate.load(<span class="hljs-string">&quot;accuracy&quot;</span>)`,wrap:!1}}),Ns=new T({props:{code:"aW1wb3J0JTIwbnVtcHklMjBhcyUyMG5wJTBBJTBBJTBBZGVmJTIwY29tcHV0ZV9tZXRyaWNzKGV2YWxfcHJlZCklM0ElMEElMjAlMjAlMjAlMjBwcmVkaWN0aW9ucyUyMCUzRCUyMG5wLmFyZ21heChldmFsX3ByZWQucHJlZGljdGlvbnMlMkMlMjBheGlzJTNEMSklMEElMjAlMjAlMjAlMjByZXR1cm4lMjBhY2N1cmFjeS5jb21wdXRlKHByZWRpY3Rpb25zJTNEcHJlZGljdGlvbnMlMkMlMjByZWZlcmVuY2VzJTNEZXZhbF9wcmVkLmxhYmVsX2lkcyk=",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">eval_pred</span>):
<span class="hljs-meta">... </span>    predictions = np.argmax(eval_pred.predictions, axis=<span class="hljs-number">1</span>)
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> accuracy.compute(predictions=predictions, references=eval_pred.label_ids)`,wrap:!1}}),Ys=new tt({}),K=new aa({props:{pytorch:!0,tensorflow:!1,jax:!1,$$slots:{pytorch:[Ma]},$$scope:{ctx:X}}}),O=new Me({props:{$$slots:{default:[ja]},$$scope:{ctx:X}}}),Fs=new tt({}),As=new T({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTJDJTIwQXVkaW8lMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMlBvbHlBSSUyRm1pbmRzMTQlMjIlMkMlMjBuYW1lJTNEJTIyZW4tVVMlMjIlMkMlMjBzcGxpdCUzRCUyMnRyYWluJTIyKSUwQWRhdGFzZXQlMjAlM0QlMjBkYXRhc2V0LmNhc3RfY29sdW1uKCUyMmF1ZGlvJTIyJTJDJTIwQXVkaW8oc2FtcGxpbmdfcmF0ZSUzRDE2MDAwKSklMEFzYW1wbGluZ19yYXRlJTIwJTNEJTIwZGF0YXNldC5mZWF0dXJlcyU1QiUyMmF1ZGlvJTIyJTVELnNhbXBsaW5nX3JhdGUlMEFhdWRpb19maWxlJTIwJTNEJTIwZGF0YXNldCU1QjAlNUQlNUIlMjJhdWRpbyUyMiU1RCU1QiUyMnBhdGglMjIlNUQ=",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>, name=<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}}),zs=new T({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBY2xhc3NpZmllciUyMCUzRCUyMHBpcGVsaW5lKCUyMmF1ZGlvLWNsYXNzaWZpY2F0aW9uJTIyJTJDJTIwbW9kZWwlM0QlMjJzdGV2aGxpdSUyRm15X2F3ZXNvbWVfbWluZHNfbW9kZWwlMjIpJTBBY2xhc3NpZmllcihhdWRpb19maWxlKQ==",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>classifier = pipeline(<span class="hljs-string">&quot;audio-classification&quot;</span>, model=<span class="hljs-string">&quot;stevhliu/my_awesome_minds_model&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>classifier(audio_file)
[
    {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.09766869246959686</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;cash_deposit&#x27;</span>},
    {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.07998877018690109</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;app_error&#x27;</span>},
    {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.0781070664525032</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;joint_account&#x27;</span>},
    {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.07667109370231628</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;pay_bill&#x27;</span>},
    {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.0755252093076706</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;balance&#x27;</span>}
]`,wrap:!1}}),ts=new aa({props:{pytorch:!0,tensorflow:!1,jax:!1,$$slots:{pytorch:[ya]},$$scope:{ctx:X}}}),{c(){p=i("meta"),y=l(),o=i("p"),b=l(),$=i("h1"),_=i("a"),V=i("span"),u(U.$$.fragment),G=l(),R=i("span"),R.textContent=Z,Y=l(),u(C.$$.fragment),k=l(),u(I.$$.fragment),m=l(),x=i("p"),x.textContent=es,N=l(),E=i("p"),E.textContent=c,v=l(),F=i("ol"),F.innerHTML=je,ct=l(),u(q.$$.fragment),mt=l(),as=i("p"),as.textContent=be,ht=l(),u(ls.$$.fragment),ut=l(),ns=i("p"),ns.textContent=ye,ft=l(),u(ps.$$.fragment),dt=l(),H=i("h2"),S=i("a"),et=i("span"),u(is.$$.fragment),he=l(),Ls=i("span"),Ls.textContent=$e,gt=l(),rs=i("p"),rs.textContent=we,Mt=l(),u(os.$$.fragment),jt=l(),cs=i("p"),cs.innerHTML=Je,bt=l(),u(ms.$$.fragment),yt=l(),hs=i("p"),hs.textContent=_e,$t=l(),u(us.$$.fragment),wt=l(),fs=i("p"),fs.innerHTML=ve,Jt=l(),u(ds.$$.fragment),_t=l(),gs=i("p"),gs.textContent=Te,vt=l(),u(Ms.$$.fragment),Tt=l(),js=i("p"),js.textContent=xe,xt=l(),bs=i("ul"),bs.innerHTML=Ue,Ut=l(),ys=i("p"),ys.textContent=ke,kt=l(),u($s.$$.fragment),Wt=l(),ws=i("p"),ws.textContent=We,Zt=l(),u(Js.$$.fragment),Ct=l(),B=i("h2"),P=i("a"),at=i("span"),u(_s.$$.fragment),ue=l(),Ds=i("span"),Ds.textContent=Ze,It=l(),vs=i("p"),vs.textContent=Ce,Xt=l(),u(Ts.$$.fragment),Rt=l(),xs=i("p"),xs.innerHTML=Ie,Gt=l(),u(Us.$$.fragment),Vt=l(),ks=i("p"),ks.textContent=Xe,Nt=l(),Ws=i("ol"),Ws.innerHTML=Re,Et=l(),u(Zs.$$.fragment),Yt=l(),Cs=i("p"),Cs.innerHTML=Ge,Ft=l(),u(Is.$$.fragment),Ht=l(),A=i("h2"),L=i("a"),lt=i("span"),u(Xs.$$.fragment),fe=l(),Ks=i("span"),Ks.textContent=Ve,Bt=l(),Rs=i("p"),Rs.innerHTML=Ne,At=l(),u(Gs.$$.fragment),Qt=l(),Vs=i("p"),Vs.innerHTML=Ee,zt=l(),u(Ns.$$.fragment),qt=l(),Es=i("p"),Es.innerHTML=Ye,St=l(),Q=i("h2"),D=i("a"),nt=i("span"),u(Ys.$$.fragment),de=l(),Os=i("span"),Os.textContent=Fe,Pt=l(),u(K.$$.fragment),Lt=l(),u(O.$$.fragment),Dt=l(),z=i("h2"),ss=i("a"),pt=i("span"),u(Fs.$$.fragment),ge=l(),st=i("span"),st.textContent=He,Kt=l(),Hs=i("p"),Hs.textContent=Be,Ot=l(),Bs=i("p"),Bs.textContent=Ae,se=l(),u(As.$$.fragment),te=l(),Qs=i("p"),Qs.innerHTML=Qe,ee=l(),u(zs.$$.fragment),ae=l(),qs=i("p"),qs.innerHTML=ze,le=l(),u(ts.$$.fragment),ne=l(),it=i("p"),this.h()},l(s){const e=oa("svelte-1phssyn",document.head);p=r(e,"META",{name:!0,content:!0}),e.forEach(t),y=n(s),o=r(s,"P",{}),W(o).forEach(t),b=n(s),$=r(s,"H1",{class:!0});var Ss=W($);_=r(Ss,"A",{id:!0,class:!0,href:!0});var rt=W(_);V=r(rt,"SPAN",{});var ot=W(V);f(U.$$.fragment,ot),ot.forEach(t),rt.forEach(t),G=n(Ss),R=r(Ss,"SPAN",{"data-svelte-h":!0}),h(R)!=="svelte-vjgcqp"&&(R.textContent=Z),Ss.forEach(t),Y=n(s),f(C.$$.fragment,s),k=n(s),f(I.$$.fragment,s),m=n(s),x=r(s,"P",{"data-svelte-h":!0}),h(x)!=="svelte-1rid8x9"&&(x.textContent=es),N=n(s),E=r(s,"P",{"data-svelte-h":!0}),h(E)!=="svelte-18ym8yt"&&(E.textContent=c),v=n(s),F=r(s,"OL",{"data-svelte-h":!0}),h(F)!=="svelte-ff8wat"&&(F.innerHTML=je),ct=n(s),f(q.$$.fragment,s),mt=n(s),as=r(s,"P",{"data-svelte-h":!0}),h(as)!=="svelte-1k0z9pm"&&(as.textContent=be),ht=n(s),f(ls.$$.fragment,s),ut=n(s),ns=r(s,"P",{"data-svelte-h":!0}),h(ns)!=="svelte-c0su0x"&&(ns.textContent=ye),ft=n(s),f(ps.$$.fragment,s),dt=n(s),H=r(s,"H2",{class:!0});var Ps=W(H);S=r(Ps,"A",{id:!0,class:!0,href:!0});var qe=W(S);et=r(qe,"SPAN",{});var Se=W(et);f(is.$$.fragment,Se),Se.forEach(t),qe.forEach(t),he=n(Ps),Ls=r(Ps,"SPAN",{"data-svelte-h":!0}),h(Ls)!=="svelte-owsnur"&&(Ls.textContent=$e),Ps.forEach(t),gt=n(s),rs=r(s,"P",{"data-svelte-h":!0}),h(rs)!=="svelte-hvgbt0"&&(rs.textContent=we),Mt=n(s),f(os.$$.fragment,s),jt=n(s),cs=r(s,"P",{"data-svelte-h":!0}),h(cs)!=="svelte-107kb56"&&(cs.innerHTML=Je),bt=n(s),f(ms.$$.fragment,s),yt=n(s),hs=r(s,"P",{"data-svelte-h":!0}),h(hs)!=="svelte-11m4j1g"&&(hs.textContent=_e),$t=n(s),f(us.$$.fragment,s),wt=n(s),fs=r(s,"P",{"data-svelte-h":!0}),h(fs)!=="svelte-1qmbw2b"&&(fs.innerHTML=ve),Jt=n(s),f(ds.$$.fragment,s),_t=n(s),gs=r(s,"P",{"data-svelte-h":!0}),h(gs)!=="svelte-194ktnh"&&(gs.textContent=Te),vt=n(s),f(Ms.$$.fragment,s),Tt=n(s),js=r(s,"P",{"data-svelte-h":!0}),h(js)!=="svelte-6aiy91"&&(js.textContent=xe),xt=n(s),bs=r(s,"UL",{"data-svelte-h":!0}),h(bs)!=="svelte-a8ku1e"&&(bs.innerHTML=Ue),Ut=n(s),ys=r(s,"P",{"data-svelte-h":!0}),h(ys)!=="svelte-1vm3gzf"&&(ys.textContent=ke),kt=n(s),f($s.$$.fragment,s),Wt=n(s),ws=r(s,"P",{"data-svelte-h":!0}),h(ws)!=="svelte-135k07i"&&(ws.textContent=We),Zt=n(s),f(Js.$$.fragment,s),Ct=n(s),B=r(s,"H2",{class:!0});var ie=W(B);P=r(ie,"A",{id:!0,class:!0,href:!0});var Pe=W(P);at=r(Pe,"SPAN",{});var Le=W(at);f(_s.$$.fragment,Le),Le.forEach(t),Pe.forEach(t),ue=n(ie),Ds=r(ie,"SPAN",{"data-svelte-h":!0}),h(Ds)!=="svelte-1cte2wb"&&(Ds.textContent=Ze),ie.forEach(t),It=n(s),vs=r(s,"P",{"data-svelte-h":!0}),h(vs)!=="svelte-1g5n3eo"&&(vs.textContent=Ce),Xt=n(s),f(Ts.$$.fragment,s),Rt=n(s),xs=r(s,"P",{"data-svelte-h":!0}),h(xs)!=="svelte-1w7dtwt"&&(xs.innerHTML=Ie),Gt=n(s),f(Us.$$.fragment,s),Vt=n(s),ks=r(s,"P",{"data-svelte-h":!0}),h(ks)!=="svelte-1n50b1d"&&(ks.textContent=Xe),Nt=n(s),Ws=r(s,"OL",{"data-svelte-h":!0}),h(Ws)!=="svelte-ajo58h"&&(Ws.innerHTML=Re),Et=n(s),f(Zs.$$.fragment,s),Yt=n(s),Cs=r(s,"P",{"data-svelte-h":!0}),h(Cs)!=="svelte-1rf4gyf"&&(Cs.innerHTML=Ge),Ft=n(s),f(Is.$$.fragment,s),Ht=n(s),A=r(s,"H2",{class:!0});var re=W(A);L=r(re,"A",{id:!0,class:!0,href:!0});var De=W(L);lt=r(De,"SPAN",{});var Ke=W(lt);f(Xs.$$.fragment,Ke),Ke.forEach(t),De.forEach(t),fe=n(re),Ks=r(re,"SPAN",{"data-svelte-h":!0}),h(Ks)!=="svelte-zfi65a"&&(Ks.textContent=Ve),re.forEach(t),Bt=n(s),Rs=r(s,"P",{"data-svelte-h":!0}),h(Rs)!=="svelte-n8ji9s"&&(Rs.innerHTML=Ne),At=n(s),f(Gs.$$.fragment,s),Qt=n(s),Vs=r(s,"P",{"data-svelte-h":!0}),h(Vs)!=="svelte-tpx6n8"&&(Vs.innerHTML=Ee),zt=n(s),f(Ns.$$.fragment,s),qt=n(s),Es=r(s,"P",{"data-svelte-h":!0}),h(Es)!=="svelte-1v7hg37"&&(Es.innerHTML=Ye),St=n(s),Q=r(s,"H2",{class:!0});var oe=W(Q);D=r(oe,"A",{id:!0,class:!0,href:!0});var Oe=W(D);nt=r(Oe,"SPAN",{});var sa=W(nt);f(Ys.$$.fragment,sa),sa.forEach(t),Oe.forEach(t),de=n(oe),Os=r(oe,"SPAN",{"data-svelte-h":!0}),h(Os)!=="svelte-tdy10p"&&(Os.textContent=Fe),oe.forEach(t),Pt=n(s),f(K.$$.fragment,s),Lt=n(s),f(O.$$.fragment,s),Dt=n(s),z=r(s,"H2",{class:!0});var ce=W(z);ss=r(ce,"A",{id:!0,class:!0,href:!0});var ta=W(ss);pt=r(ta,"SPAN",{});var ea=W(pt);f(Fs.$$.fragment,ea),ea.forEach(t),ta.forEach(t),ge=n(ce),st=r(ce,"SPAN",{"data-svelte-h":!0}),h(st)!=="svelte-8litrx"&&(st.textContent=He),ce.forEach(t),Kt=n(s),Hs=r(s,"P",{"data-svelte-h":!0}),h(Hs)!=="svelte-174wmmm"&&(Hs.textContent=Be),Ot=n(s),Bs=r(s,"P",{"data-svelte-h":!0}),h(Bs)!=="svelte-1uaek2x"&&(Bs.textContent=Ae),se=n(s),f(As.$$.fragment,s),te=n(s),Qs=r(s,"P",{"data-svelte-h":!0}),h(Qs)!=="svelte-5aredu"&&(Qs.innerHTML=Qe),ee=n(s),f(zs.$$.fragment,s),ae=n(s),qs=r(s,"P",{"data-svelte-h":!0}),h(qs)!=="svelte-186svr5"&&(qs.innerHTML=ze),le=n(s),f(ts.$$.fragment,s),ne=n(s),it=r(s,"P",{}),W(it).forEach(t),this.h()},h(){w(p,"name","hf:doc:metadata"),w(p,"content",JSON.stringify(wa)),w(_,"id","audio_classification"),w(_,"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(_,"href","#audio_classification"),w($,"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(P,"id","preprocess"),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","#preprocess"),w(B,"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(A,"class","relative group"),w(D,"id","train"),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","#train"),w(Q,"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(z,"class","relative group")},m(s,e){J(document.head,p),a(s,y,e),a(s,o,e),a(s,b,e),a(s,$,e),J($,_),J(_,V),d(U,V,null),J($,G),J($,R),a(s,Y,e),d(C,s,e),a(s,k,e),d(I,s,e),a(s,m,e),a(s,x,e),a(s,N,e),a(s,E,e),a(s,v,e),a(s,F,e),a(s,ct,e),d(q,s,e),a(s,mt,e),a(s,as,e),a(s,ht,e),d(ls,s,e),a(s,ut,e),a(s,ns,e),a(s,ft,e),d(ps,s,e),a(s,dt,e),a(s,H,e),J(H,S),J(S,et),d(is,et,null),J(H,he),J(H,Ls),a(s,gt,e),a(s,rs,e),a(s,Mt,e),d(os,s,e),a(s,jt,e),a(s,cs,e),a(s,bt,e),d(ms,s,e),a(s,yt,e),a(s,hs,e),a(s,$t,e),d(us,s,e),a(s,wt,e),a(s,fs,e),a(s,Jt,e),d(ds,s,e),a(s,_t,e),a(s,gs,e),a(s,vt,e),d(Ms,s,e),a(s,Tt,e),a(s,js,e),a(s,xt,e),a(s,bs,e),a(s,Ut,e),a(s,ys,e),a(s,kt,e),d($s,s,e),a(s,Wt,e),a(s,ws,e),a(s,Zt,e),d(Js,s,e),a(s,Ct,e),a(s,B,e),J(B,P),J(P,at),d(_s,at,null),J(B,ue),J(B,Ds),a(s,It,e),a(s,vs,e),a(s,Xt,e),d(Ts,s,e),a(s,Rt,e),a(s,xs,e),a(s,Gt,e),d(Us,s,e),a(s,Vt,e),a(s,ks,e),a(s,Nt,e),a(s,Ws,e),a(s,Et,e),d(Zs,s,e),a(s,Yt,e),a(s,Cs,e),a(s,Ft,e),d(Is,s,e),a(s,Ht,e),a(s,A,e),J(A,L),J(L,lt),d(Xs,lt,null),J(A,fe),J(A,Ks),a(s,Bt,e),a(s,Rs,e),a(s,At,e),d(Gs,s,e),a(s,Qt,e),a(s,Vs,e),a(s,zt,e),d(Ns,s,e),a(s,qt,e),a(s,Es,e),a(s,St,e),a(s,Q,e),J(Q,D),J(D,nt),d(Ys,nt,null),J(Q,de),J(Q,Os),a(s,Pt,e),d(K,s,e),a(s,Lt,e),d(O,s,e),a(s,Dt,e),a(s,z,e),J(z,ss),J(ss,pt),d(Fs,pt,null),J(z,ge),J(z,st),a(s,Kt,e),a(s,Hs,e),a(s,Ot,e),a(s,Bs,e),a(s,se,e),d(As,s,e),a(s,te,e),a(s,Qs,e),a(s,ee,e),d(zs,s,e),a(s,ae,e),a(s,qs,e),a(s,le,e),d(ts,s,e),a(s,ne,e),a(s,it,e),pe=!0},p(s,[e]){const Ss={};e&2&&(Ss.$$scope={dirty:e,ctx:s}),q.$set(Ss);const rt={};e&2&&(rt.$$scope={dirty:e,ctx:s}),K.$set(rt);const ot={};e&2&&(ot.$$scope={dirty:e,ctx:s}),O.$set(ot);const Ps={};e&2&&(Ps.$$scope={dirty:e,ctx:s}),ts.$set(Ps)},i(s){pe||(g(U.$$.fragment,s),g(C.$$.fragment,s),g(I.$$.fragment,s),g(q.$$.fragment,s),g(ls.$$.fragment,s),g(ps.$$.fragment,s),g(is.$$.fragment,s),g(os.$$.fragment,s),g(ms.$$.fragment,s),g(us.$$.fragment,s),g(ds.$$.fragment,s),g(Ms.$$.fragment,s),g($s.$$.fragment,s),g(Js.$$.fragment,s),g(_s.$$.fragment,s),g(Ts.$$.fragment,s),g(Us.$$.fragment,s),g(Zs.$$.fragment,s),g(Is.$$.fragment,s),g(Xs.$$.fragment,s),g(Gs.$$.fragment,s),g(Ns.$$.fragment,s),g(Ys.$$.fragment,s),g(K.$$.fragment,s),g(O.$$.fragment,s),g(Fs.$$.fragment,s),g(As.$$.fragment,s),g(zs.$$.fragment,s),g(ts.$$.fragment,s),pe=!0)},o(s){M(U.$$.fragment,s),M(C.$$.fragment,s),M(I.$$.fragment,s),M(q.$$.fragment,s),M(ls.$$.fragment,s),M(ps.$$.fragment,s),M(is.$$.fragment,s),M(os.$$.fragment,s),M(ms.$$.fragment,s),M(us.$$.fragment,s),M(ds.$$.fragment,s),M(Ms.$$.fragment,s),M($s.$$.fragment,s),M(Js.$$.fragment,s),M(_s.$$.fragment,s),M(Ts.$$.fragment,s),M(Us.$$.fragment,s),M(Zs.$$.fragment,s),M(Is.$$.fragment,s),M(Xs.$$.fragment,s),M(Gs.$$.fragment,s),M(Ns.$$.fragment,s),M(Ys.$$.fragment,s),M(K.$$.fragment,s),M(O.$$.fragment,s),M(Fs.$$.fragment,s),M(As.$$.fragment,s),M(zs.$$.fragment,s),M(ts.$$.fragment,s),pe=!1},d(s){s&&(t(y),t(o),t(b),t($),t(Y),t(k),t(m),t(x),t(N),t(E),t(v),t(F),t(ct),t(mt),t(as),t(ht),t(ut),t(ns),t(ft),t(dt),t(H),t(gt),t(rs),t(Mt),t(jt),t(cs),t(bt),t(yt),t(hs),t($t),t(wt),t(fs),t(Jt),t(_t),t(gs),t(vt),t(Tt),t(js),t(xt),t(bs),t(Ut),t(ys),t(kt),t(Wt),t(ws),t(Zt),t(Ct),t(B),t(It),t(vs),t(Xt),t(Rt),t(xs),t(Gt),t(Vt),t(ks),t(Nt),t(Ws),t(Et),t(Yt),t(Cs),t(Ft),t(Ht),t(A),t(Bt),t(Rs),t(At),t(Qt),t(Vs),t(zt),t(qt),t(Es),t(St),t(Q),t(Pt),t(Lt),t(Dt),t(z),t(Kt),t(Hs),t(Ot),t(Bs),t(se),t(te),t(Qs),t(ee),t(ae),t(qs),t(le),t(ne),t(it)),t(p),j(U),j(C,s),j(I,s),j(q,s),j(ls,s),j(ps,s),j(is),j(os,s),j(ms,s),j(us,s),j(ds,s),j(Ms,s),j($s,s),j(Js,s),j(_s),j(Ts,s),j(Us,s),j(Zs,s),j(Is,s),j(Xs),j(Gs,s),j(Ns,s),j(Ys),j(K,s),j(O,s),j(Fs),j(As,s),j(zs,s),j(ts,s)}}}const wa={local:"audio_classification",sections:[{local:"load_minds_14_dataset",title:"MInDS-14 데이터셋 불러오기"},{local:"preprocess",title:"전처리"},{local:"evaluate",title:"평가하기"},{local:"train",title:"훈련"},{local:"inference",title:"추론"}],title:"오디오 분류"};function Ja(X){return pa(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ca extends ia{constructor(p){super(),ra(this,p,Ja,$a,na,{})}}export{Ca as component};
