import{S as mi,i as fi,s as gi,e as n,k as p,w,t as s,M as _i,c as a,d as o,m as h,a as r,x as y,h as i,b as c,G as e,g as _,y as S,q as T,o as $,B as k,v as vi,L as jo}from"../../chunks/vendor-hf-doc-builder.js";import{T as kn}from"../../chunks/Tip-hf-doc-builder.js";import{D as I}from"../../chunks/Docstring-hf-doc-builder.js";import{C as qo}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as re}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Fo}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function bi(U){let d,b,g,f,v;return f=new qo({props:{code:`from transformers import UniSpeechConfig, UniSpeechModel

# Initializing a UniSpeech facebook/unispeech-base-960h style configuration
configuration = UniSpeechConfig()

# Initializing a model (with random weights) from the facebook/unispeech-base-960h style configuration
model = UniSpeechModel(configuration)

# Accessing the model configuration
configuration = model.config`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> UniSpeechConfig, UniSpeechModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a UniSpeech facebook/unispeech-base-960h style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = UniSpeechConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the facebook/unispeech-base-960h style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = UniSpeechModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){d=n("p"),b=s("Example:"),g=p(),w(f.$$.fragment)},l(l){d=a(l,"P",{});var u=r(d);b=i(u,"Example:"),u.forEach(o),g=h(l),y(f.$$.fragment,l)},m(l,u){_(l,d,u),e(d,b),_(l,g,u),S(f,l,u),v=!0},p:jo,i(l){v||(T(f.$$.fragment,l),v=!0)},o(l){$(f.$$.fragment,l),v=!1},d(l){l&&o(d),l&&o(g),k(f,l)}}}function wi(U){let d,b,g,f,v;return{c(){d=n("p"),b=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),f=s("Module"),v=s(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=a(l,"P",{});var u=r(d);b=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a(u,"CODE",{});var C=r(g);f=i(C,"Module"),C.forEach(o),v=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(o)},m(l,u){_(l,d,u),e(d,b),e(d,g),e(g,f),e(d,v)},d(l){l&&o(d)}}}function yi(U){let d,b,g,f,v;return f=new qo({props:{code:`from transformers import AutoProcessor, UniSpeechModel
import torch
from datasets import load_dataset

dataset = load_dataset("hf-internal-testing/librispeech_asr_demo", "clean", split="validation")
dataset = dataset.sort("id")
sampling_rate = dataset.features["audio"].sampling_rate

processor = AutoProcessor.from_pretrained("patrickvonplaten/unispeech-large-1500h-cv-timit")
model = UniSpeechModel.from_pretrained("patrickvonplaten/unispeech-large-1500h-cv-timit")

# audio file is decoded on the fly
inputs = processor(dataset[0]["audio"]["array"], sampling_rate=sampling_rate, return_tensors="pt")
with torch.no_grad():
    outputs = model(**inputs)

last_hidden_states = outputs.last_hidden_state
list(last_hidden_states.shape)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, UniSpeechModel
<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> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;hf-internal-testing/librispeech_asr_demo&quot;</span>, <span class="hljs-string">&quot;clean&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = dataset.sort(<span class="hljs-string">&quot;id&quot;</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>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;patrickvonplaten/unispeech-large-1500h-cv-timit&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = UniSpeechModel.from_pretrained(<span class="hljs-string">&quot;patrickvonplaten/unispeech-large-1500h-cv-timit&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># audio file is decoded on the fly</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>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(last_hidden_states.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">292</span>, <span class="hljs-number">1024</span>]`}}),{c(){d=n("p"),b=s("Example:"),g=p(),w(f.$$.fragment)},l(l){d=a(l,"P",{});var u=r(d);b=i(u,"Example:"),u.forEach(o),g=h(l),y(f.$$.fragment,l)},m(l,u){_(l,d,u),e(d,b),_(l,g,u),S(f,l,u),v=!0},p:jo,i(l){v||(T(f.$$.fragment,l),v=!0)},o(l){$(f.$$.fragment,l),v=!1},d(l){l&&o(d),l&&o(g),k(f,l)}}}function Si(U){let d,b,g,f,v;return{c(){d=n("p"),b=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),f=s("Module"),v=s(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=a(l,"P",{});var u=r(d);b=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a(u,"CODE",{});var C=r(g);f=i(C,"Module"),C.forEach(o),v=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(o)},m(l,u){_(l,d,u),e(d,b),e(d,g),e(g,f),e(d,v)},d(l){l&&o(d)}}}function Ti(U){let d,b,g,f,v;return f=new qo({props:{code:`from transformers import AutoProcessor, UniSpeechForCTC
from datasets import load_dataset
import torch

dataset = load_dataset("hf-internal-testing/librispeech_asr_demo", "clean", split="validation")
dataset = dataset.sort("id")
sampling_rate = dataset.features["audio"].sampling_rate

processor = AutoProcessor.from_pretrained("patrickvonplaten/unispeech-large-1500h-cv-timit")
model = UniSpeechForCTC.from_pretrained("patrickvonplaten/unispeech-large-1500h-cv-timit")

# audio file is decoded on the fly
inputs = processor(dataset[0]["audio"]["array"], sampling_rate=sampling_rate, return_tensors="pt")
with torch.no_grad():
    logits = model(**inputs).logits
predicted_ids = torch.argmax(logits, dim=-1)

# transcribe speech
transcription = processor.batch_decode(predicted_ids)
transcription[0]

inputs["labels"] = processor(text=dataset[0]["text"], return_tensors="pt").input_ids

# compute loss
loss = model(**inputs).loss
round(loss.item(), 2)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, UniSpeechForCTC
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;hf-internal-testing/librispeech_asr_demo&quot;</span>, <span class="hljs-string">&quot;clean&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = dataset.sort(<span class="hljs-string">&quot;id&quot;</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>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;patrickvonplaten/unispeech-large-1500h-cv-timit&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = UniSpeechForCTC.from_pretrained(<span class="hljs-string">&quot;patrickvonplaten/unispeech-large-1500h-cv-timit&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># audio file is decoded on the fly</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>)
<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
<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><span class="hljs-comment"># transcribe speech</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-number">0</span>]
<span class="hljs-string">&#x27;mister quilter is the apposl of the midle classes and weare glad to welcom his gosepl&#x27;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs[<span class="hljs-string">&quot;labels&quot;</span>] = processor(text=dataset[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;text&quot;</span>], return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).input_ids

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># compute loss</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs).loss
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">17.17</span>`}}),{c(){d=n("p"),b=s("Example:"),g=p(),w(f.$$.fragment)},l(l){d=a(l,"P",{});var u=r(d);b=i(u,"Example:"),u.forEach(o),g=h(l),y(f.$$.fragment,l)},m(l,u){_(l,d,u),e(d,b),_(l,g,u),S(f,l,u),v=!0},p:jo,i(l){v||(T(f.$$.fragment,l),v=!0)},o(l){$(f.$$.fragment,l),v=!1},d(l){l&&o(d),l&&o(g),k(f,l)}}}function $i(U){let d,b,g,f,v;return{c(){d=n("p"),b=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),f=s("Module"),v=s(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=a(l,"P",{});var u=r(d);b=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a(u,"CODE",{});var C=r(g);f=i(C,"Module"),C.forEach(o),v=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(o)},m(l,u){_(l,d,u),e(d,b),e(d,g),e(g,f),e(d,v)},d(l){l&&o(d)}}}function ki(U){let d,b,g,f,v;return f=new qo({props:{code:`from transformers import AutoFeatureExtractor, UniSpeechForSequenceClassification
from datasets import load_dataset
import torch

dataset = load_dataset("hf-internal-testing/librispeech_asr_demo", "clean", split="validation")
dataset = dataset.sort("id")
sampling_rate = dataset.features["audio"].sampling_rate

feature_extractor = AutoFeatureExtractor.from_pretrained("patrickvonplaten/unispeech-large-1500h-cv-timit")
model = UniSpeechForSequenceClassification.from_pretrained("patrickvonplaten/unispeech-large-1500h-cv-timit")

# audio file is decoded on the fly
inputs = feature_extractor(dataset[0]["audio"]["array"], sampling_rate=sampling_rate, return_tensors="pt")

with torch.no_grad():
    logits = model(**inputs).logits

predicted_class_ids = torch.argmax(logits, dim=-1).item()
predicted_label = model.config.id2label[predicted_class_ids]

# compute loss - target_label is e.g. "down"
target_label = model.config.id2label[0]
inputs["labels"] = torch.tensor([model.config.label2id[target_label]])
loss = model(**inputs).loss`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor, UniSpeechForSequenceClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;hf-internal-testing/librispeech_asr_demo&quot;</span>, <span class="hljs-string">&quot;clean&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = dataset.sort(<span class="hljs-string">&quot;id&quot;</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>feature_extractor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;patrickvonplaten/unispeech-large-1500h-cv-timit&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = UniSpeechForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;patrickvonplaten/unispeech-large-1500h-cv-timit&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># audio file is decoded on the fly</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>)

<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

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_ids = torch.argmax(logits, dim=-<span class="hljs-number">1</span>).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><span class="hljs-comment"># compute loss - target_label is e.g. &quot;down&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_label = model.config.id2label[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs[<span class="hljs-string">&quot;labels&quot;</span>] = torch.tensor([model.config.label2id[target_label]])
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs).loss`}}),{c(){d=n("p"),b=s("Example:"),g=p(),w(f.$$.fragment)},l(l){d=a(l,"P",{});var u=r(d);b=i(u,"Example:"),u.forEach(o),g=h(l),y(f.$$.fragment,l)},m(l,u){_(l,d,u),e(d,b),_(l,g,u),S(f,l,u),v=!0},p:jo,i(l){v||(T(f.$$.fragment,l),v=!0)},o(l){$(f.$$.fragment,l),v=!1},d(l){l&&o(d),l&&o(g),k(f,l)}}}function Ui(U){let d,b,g,f,v;return{c(){d=n("p"),b=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),f=s("Module"),v=s(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=a(l,"P",{});var u=r(d);b=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a(u,"CODE",{});var C=r(g);f=i(C,"Module"),C.forEach(o),v=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(o)},m(l,u){_(l,d,u),e(d,b),e(d,g),e(g,f),e(d,v)},d(l){l&&o(d)}}}function Ci(U){let d,b,g,f,v;return f=new qo({props:{code:`import torch
from transformers import AutoFeatureExtractor, UniSpeechForPreTraining

feature_extractor = AutoFeatureExtractor.from_pretrained("microsoft/unispeech-large-1500h-cv")
model = UniSpeechForPreTraining.from_pretrained("microsoft/unispeech-large-1500h-cv")
# TODO: Add full pretraining example`,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> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor, UniSpeechForPreTraining

<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;microsoft/unispeech-large-1500h-cv&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = UniSpeechForPreTraining.from_pretrained(<span class="hljs-string">&quot;microsoft/unispeech-large-1500h-cv&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># <span class="hljs-doctag">TODO:</span> Add full pretraining example</span>`}}),{c(){d=n("p"),b=s("Example:"),g=p(),w(f.$$.fragment)},l(l){d=a(l,"P",{});var u=r(d);b=i(u,"Example:"),u.forEach(o),g=h(l),y(f.$$.fragment,l)},m(l,u){_(l,d,u),e(d,b),_(l,g,u),S(f,l,u),v=!0},p:jo,i(l){v||(T(f.$$.fragment,l),v=!0)},o(l){$(f.$$.fragment,l),v=!1},d(l){l&&o(d),l&&o(g),k(f,l)}}}function xi(U){let d,b,g,f,v,l,u,C,Un,Po,V,se,Xt,qe,Cn,Zt,xn,Eo,ie,Fn,Pe,jn,qn,Mo,$t,Pn,Ao,kt,Gt,En,zo,Ut,Mn,Oo,le,Ee,An,Ct,zn,On,Dn,Me,Ln,xt,Wn,Nn,Do,D,In,Ae,Vn,Hn,ze,Kn,Yn,Lo,H,ce,Jt,Oe,Rn,eo,Bn,Wo,de,to,Ft,Qn,Xn,oo,jt,Zn,No,K,pe,no,De,Gn,ao,Jn,Io,P,Le,ea,Y,ta,qt,oa,na,We,aa,ra,sa,R,ia,Pt,la,ca,Et,da,pa,ha,he,Vo,B,ue,ro,Ne,ua,so,ma,Ho,Q,Ie,fa,Ve,ga,io,_a,va,Ko,X,me,lo,He,ba,co,wa,Yo,F,Ke,ya,Ye,Sa,Re,Ta,$a,ka,Be,Ua,Mt,Ca,xa,Fa,Qe,ja,Xe,qa,Pa,Ea,E,Ze,Ma,Z,Aa,At,za,Oa,po,Da,La,Wa,fe,Na,ge,Ro,G,_e,ho,Ge,Ia,uo,Va,Bo,j,Je,Ha,J,Ka,mo,Ya,Ra,et,Ba,Qa,Xa,tt,Za,zt,Ga,Ja,er,ot,tr,nt,or,nr,ar,M,at,rr,ee,sr,Ot,ir,lr,fo,cr,dr,pr,ve,hr,be,Qo,te,we,go,rt,ur,_o,mr,Xo,x,st,fr,vo,gr,_r,it,vr,lt,br,wr,yr,ct,Sr,Dt,Tr,$r,kr,dt,Ur,pt,Cr,xr,Fr,A,ht,jr,oe,qr,Lt,Pr,Er,bo,Mr,Ar,zr,ye,Or,Se,Zo,ne,Te,wo,ut,Dr,yo,Lr,Go,q,mt,Wr,ft,Nr,gt,Ir,Vr,Hr,_t,Kr,Wt,Yr,Rr,Br,vt,Qr,bt,Xr,Zr,Gr,z,wt,Jr,ae,es,Nt,ts,os,So,ns,as,rs,$e,ss,ke,Jo;return l=new re({}),qe=new re({}),Oe=new re({}),De=new re({}),Le=new I({props:{name:"class transformers.UniSpeechConfig",anchor:"transformers.UniSpeechConfig",parameters:[{name:"vocab_size",val:" = 32"},{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"intermediate_size",val:" = 3072"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout",val:" = 0.1"},{name:"activation_dropout",val:" = 0.1"},{name:"attention_dropout",val:" = 0.1"},{name:"feat_proj_dropout",val:" = 0.0"},{name:"feat_quantizer_dropout",val:" = 0.0"},{name:"final_dropout",val:" = 0.1"},{name:"layerdrop",val:" = 0.1"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-05"},{name:"feat_extract_norm",val:" = 'group'"},{name:"feat_extract_activation",val:" = 'gelu'"},{name:"conv_dim",val:" = (512, 512, 512, 512, 512, 512, 512)"},{name:"conv_stride",val:" = (5, 2, 2, 2, 2, 2, 2)"},{name:"conv_kernel",val:" = (10, 3, 3, 3, 3, 2, 2)"},{name:"conv_bias",val:" = False"},{name:"num_conv_pos_embeddings",val:" = 128"},{name:"num_conv_pos_embedding_groups",val:" = 16"},{name:"do_stable_layer_norm",val:" = False"},{name:"apply_spec_augment",val:" = True"},{name:"mask_time_prob",val:" = 0.05"},{name:"mask_time_length",val:" = 10"},{name:"mask_time_min_masks",val:" = 2"},{name:"mask_feature_prob",val:" = 0.0"},{name:"mask_feature_length",val:" = 10"},{name:"mask_feature_min_masks",val:" = 0"},{name:"num_codevectors_per_group",val:" = 320"},{name:"num_codevector_groups",val:" = 2"},{name:"contrastive_logits_temperature",val:" = 0.1"},{name:"num_negatives",val:" = 100"},{name:"codevector_dim",val:" = 256"},{name:"proj_codevector_dim",val:" = 256"},{name:"diversity_loss_weight",val:" = 0.1"},{name:"ctc_loss_reduction",val:" = 'mean'"},{name:"ctc_zero_infinity",val:" = False"},{name:"use_weighted_layer_sum",val:" = False"},{name:"classifier_proj_size",val:" = 256"},{name:"num_ctc_classes",val:" = 80"},{name:"pad_token_id",val:" = 0"},{name:"bos_token_id",val:" = 1"},{name:"eos_token_id",val:" = 2"},{name:"replace_prob",val:" = 0.5"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.UniSpeechConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
Vocabulary size of the UniSpeech model. Defines the number of different tokens that can be represented by
the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.29.0/en/model_doc/unispeech#transformers.UniSpeechModel">UniSpeechModel</a>. Vocabulary size of the model. Defines the
different tokens that can be represented by the <em>inputs_ids</em> passed to the forward method of
<a href="/docs/transformers/v4.29.0/en/model_doc/unispeech#transformers.UniSpeechModel">UniSpeechModel</a>.`,name:"vocab_size"},{anchor:"transformers.UniSpeechConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.UniSpeechConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.UniSpeechConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.UniSpeechConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.UniSpeechConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.UniSpeechConfig.hidden_dropout",description:`<strong>hidden_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout"},{anchor:"transformers.UniSpeechConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.UniSpeechConfig.final_dropout",description:`<strong>final_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for the final projection layer of <a href="/docs/transformers/v4.29.0/en/model_doc/unispeech#transformers.UniSpeechForCTC">UniSpeechForCTC</a>.`,name:"final_dropout"},{anchor:"transformers.UniSpeechConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.UniSpeechConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.UniSpeechConfig.feat_extract_norm",description:`<strong>feat_extract_norm</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;group&quot;</code>) &#x2014;
The norm to be applied to 1D convolutional layers in feature encoder. One of <code>&quot;group&quot;</code> for group
normalization of only the first 1D convolutional layer or <code>&quot;layer&quot;</code> for layer normalization of all 1D
convolutional layers.`,name:"feat_extract_norm"},{anchor:"transformers.UniSpeechConfig.feat_proj_dropout",description:`<strong>feat_proj_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probability for output of the feature encoder.`,name:"feat_proj_dropout"},{anchor:"transformers.UniSpeechConfig.feat_extract_activation",description:"<strong>feat_extract_activation</strong> (<code>str, </code>optional<code>, defaults to </code>&#x201C;gelu&#x201D;<code>) -- The non-linear activation function (function or string) in the 1D convolutional layers of the feature extractor. If string, </code>&#x201C;gelu&#x201D;<code>, </code>&#x201C;relu&#x201D;<code>, </code>&#x201C;selu&#x201D;<code>and</code>&#x201C;gelu_new&#x201D;` are supported.",name:"feat_extract_activation"},{anchor:"transformers.UniSpeechConfig.feat_quantizer_dropout",description:`<strong>feat_quantizer_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probabilitiy for quantized feature encoder states.`,name:"feat_quantizer_dropout"},{anchor:"transformers.UniSpeechConfig.conv_dim",description:`<strong>conv_dim</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>(512, 512, 512, 512, 512, 512, 512)</code>) &#x2014;
A tuple of integers defining the number of input and output channels of each 1D convolutional layer in the
feature encoder. The length of <em>conv_dim</em> defines the number of 1D convolutional layers.`,name:"conv_dim"},{anchor:"transformers.UniSpeechConfig.conv_stride",description:`<strong>conv_stride</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>(5, 2, 2, 2, 2, 2, 2)</code>) &#x2014;
A tuple of integers defining the stride of each 1D convolutional layer in the feature encoder. The length
of <em>conv_stride</em> defines the number of convolutional layers and has to match the length of <em>conv_dim</em>.`,name:"conv_stride"},{anchor:"transformers.UniSpeechConfig.conv_kernel",description:`<strong>conv_kernel</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>(10, 3, 3, 3, 3, 3, 3)</code>) &#x2014;
A tuple of integers defining the kernel size of each 1D convolutional layer in the feature encoder. The
length of <em>conv_kernel</em> defines the number of convolutional layers and has to match the length of
<em>conv_dim</em>.`,name:"conv_kernel"},{anchor:"transformers.UniSpeechConfig.conv_bias",description:`<strong>conv_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the 1D convolutional layers have a bias.`,name:"conv_bias"},{anchor:"transformers.UniSpeechConfig.num_conv_pos_embeddings",description:`<strong>num_conv_pos_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 128) &#x2014;
Number of convolutional positional embeddings. Defines the kernel size of 1D convolutional positional
embeddings layer.`,name:"num_conv_pos_embeddings"},{anchor:"transformers.UniSpeechConfig.num_conv_pos_embedding_groups",description:`<strong>num_conv_pos_embedding_groups</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Number of groups of 1D convolutional positional embeddings layer.`,name:"num_conv_pos_embedding_groups"},{anchor:"transformers.UniSpeechConfig.do_stable_layer_norm",description:`<strong>do_stable_layer_norm</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to apply <em>stable</em> layer norm architecture of the Transformer encoder. <code>do_stable_layer_norm is True</code> corresponds to applying layer norm before the attention layer, whereas <code>do_stable_layer_norm is False</code> corresponds to applying layer norm after the attention layer.`,name:"do_stable_layer_norm"},{anchor:"transformers.UniSpeechConfig.apply_spec_augment",description:`<strong>apply_spec_augment</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to apply <em>SpecAugment</em> data augmentation to the outputs of the feature encoder. For reference see
<a href="https://arxiv.org/abs/1904.08779" rel="nofollow">SpecAugment: A Simple Data Augmentation Method for Automatic Speech
Recognition</a>.`,name:"apply_spec_augment"},{anchor:"transformers.UniSpeechConfig.mask_time_prob",description:`<strong>mask_time_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.05) &#x2014;
Percentage (between 0 and 1) of all feature vectors along the time axis which will be masked. The masking
procecure generates &#x201D;mask_time_prob<em>len(time_axis)/mask_time_length&#x201D; independent masks over the axis. If
reasoning from the propability of each feature vector to be chosen as the start of the vector span to be
masked, </em>mask_time_prob<em> should be \`prob_vector_start</em>mask_time_length<code>. Note that overlap may decrease the actual percentage of masked vectors. This is only relevant if </code>apply_spec_augment is True\`.`,name:"mask_time_prob"},{anchor:"transformers.UniSpeechConfig.mask_time_length",description:`<strong>mask_time_length</strong> (<code>int</code>, <em>optional</em>, defaults to 10) &#x2014;
Length of vector span along the time axis.`,name:"mask_time_length"},{anchor:"transformers.UniSpeechConfig.mask_time_min_masks",description:`<strong>mask_time_min_masks</strong> (<code>int</code>, <em>optional</em>, defaults to 2), &#x2014;
The minimum number of masks of length <code>mask_feature_length</code> generated along the time axis, each time step,
irrespectively of <code>mask_feature_prob</code>. Only relevant if &#x201D;mask_time_prob*len(time_axis)/mask_time_length &lt;
mask_time_min_masks&#x201D;`,name:"mask_time_min_masks"},{anchor:"transformers.UniSpeechConfig.mask_feature_prob",description:`<strong>mask_feature_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Percentage (between 0 and 1) of all feature vectors along the feature axis which will be masked. The
masking procecure generates &#x201D;mask_feature_prob<em>len(feature_axis)/mask_time_length&#x201D; independent masks over
the axis. If reasoning from the propability of each feature vector to be chosen as the start of the vector
span to be masked, </em>mask_feature_prob<em> should be \`prob_vector_start</em>mask_feature_length<code>. Note that overlap may decrease the actual percentage of masked vectors. This is only relevant if </code>apply_spec_augment is
True\`.`,name:"mask_feature_prob"},{anchor:"transformers.UniSpeechConfig.mask_feature_length",description:`<strong>mask_feature_length</strong> (<code>int</code>, <em>optional</em>, defaults to 10) &#x2014;
Length of vector span along the feature axis.`,name:"mask_feature_length"},{anchor:"transformers.UniSpeechConfig.mask_feature_min_masks",description:`<strong>mask_feature_min_masks</strong> (<code>int</code>, <em>optional</em>, defaults to 0), &#x2014;
The minimum number of masks of length <code>mask_feature_length</code> generated along the feature axis, each time
step, irrespectively of <code>mask_feature_prob</code>. Only relevant if
&#x201D;mask_feature_prob*len(feature_axis)/mask_feature_length &lt; mask_feature_min_masks&#x201D;`,name:"mask_feature_min_masks"},{anchor:"transformers.UniSpeechConfig.num_codevectors_per_group",description:`<strong>num_codevectors_per_group</strong> (<code>int</code>, <em>optional</em>, defaults to 320) &#x2014;
Number of entries in each quantization codebook (group).`,name:"num_codevectors_per_group"},{anchor:"transformers.UniSpeechConfig.num_codevector_groups",description:`<strong>num_codevector_groups</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
Number of codevector groups for product codevector quantization.`,name:"num_codevector_groups"},{anchor:"transformers.UniSpeechConfig.contrastive_logits_temperature",description:`<strong>contrastive_logits_temperature</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The temperature <em>kappa</em> in the contrastive loss.`,name:"contrastive_logits_temperature"},{anchor:"transformers.UniSpeechConfig.feat_quantizer_dropout",description:`<strong>feat_quantizer_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probabilitiy for the output of the feature encoder that&#x2019;s used by the quantizer.`,name:"feat_quantizer_dropout"},{anchor:"transformers.UniSpeechConfig.num_negatives",description:`<strong>num_negatives</strong> (<code>int</code>, <em>optional</em>, defaults to 100) &#x2014;
Number of negative samples for the contrastive loss.`,name:"num_negatives"},{anchor:"transformers.UniSpeechConfig.codevector_dim",description:`<strong>codevector_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Dimensionality of the quantized feature vectors.`,name:"codevector_dim"},{anchor:"transformers.UniSpeechConfig.proj_codevector_dim",description:`<strong>proj_codevector_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Dimensionality of the final projection of both the quantized and the transformer features.`,name:"proj_codevector_dim"},{anchor:"transformers.UniSpeechConfig.diversity_loss_weight",description:`<strong>diversity_loss_weight</strong> (<code>int</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The weight of the codebook diversity loss component.`,name:"diversity_loss_weight"},{anchor:"transformers.UniSpeechConfig.ctc_loss_reduction",description:`<strong>ctc_loss_reduction</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;mean&quot;</code>) &#x2014;
Specifies the reduction to apply to the output of <code>torch.nn.CTCLoss</code>. Only relevant when training an
instance of <a href="/docs/transformers/v4.29.0/en/model_doc/unispeech#transformers.UniSpeechForCTC">UniSpeechForCTC</a>.`,name:"ctc_loss_reduction"},{anchor:"transformers.UniSpeechConfig.ctc_zero_infinity",description:`<strong>ctc_zero_infinity</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to zero infinite losses and the associated gradients of <code>torch.nn.CTCLoss</code>. Infinite losses mainly
occur when the inputs are too short to be aligned to the targets. Only relevant when training an instance
of <a href="/docs/transformers/v4.29.0/en/model_doc/unispeech#transformers.UniSpeechForCTC">UniSpeechForCTC</a>.`,name:"ctc_zero_infinity"},{anchor:"transformers.UniSpeechConfig.use_weighted_layer_sum",description:`<strong>use_weighted_layer_sum</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use a weighted average of layer outputs with learned weights. Only relevant when using an
instance of <a href="/docs/transformers/v4.29.0/en/model_doc/unispeech#transformers.UniSpeechForSequenceClassification">UniSpeechForSequenceClassification</a>.`,name:"use_weighted_layer_sum"},{anchor:"transformers.UniSpeechConfig.classifier_proj_size",description:`<strong>classifier_proj_size</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Dimensionality of the projection before token mean-pooling for classification.`,name:"classifier_proj_size"},{anchor:"transformers.UniSpeechConfig.replace_prob",description:`<strong>replace_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.5) &#x2014;
Propability that transformer feature is replaced by quantized feature for pretraining.`,name:"replace_prob"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/unispeech/configuration_unispeech.py#L34"}}),he=new Fo({props:{anchor:"transformers.UniSpeechConfig.example",$$slots:{default:[bi]},$$scope:{ctx:U}}}),Ne=new re({}),Ie=new I({props:{name:"class transformers.models.unispeech.modeling_unispeech.UniSpeechForPreTrainingOutput",anchor:"transformers.models.unispeech.modeling_unispeech.UniSpeechForPreTrainingOutput",parameters:[{name:"loss",val:": typing.Optional[torch.FloatTensor] = None"},{name:"projected_states",val:": FloatTensor = None"},{name:"projected_quantized_states",val:": FloatTensor = None"},{name:"codevector_perplexity",val:": FloatTensor = None"},{name:"hidden_states",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"attentions",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"}],parametersDescription:[{anchor:"transformers.models.unispeech.modeling_unispeech.UniSpeechForPreTrainingOutput.loss",description:`<strong>loss</strong> (<em>optional</em>, returned when model is in train mode, <code>torch.FloatTensor</code> of shape <code>(1,)</code>) &#x2014;
Total loss as the sum of the contrastive loss (L_m) and the diversity loss (L_d) as stated in the <a href="https://arxiv.org/pdf/2006.11477.pdf" rel="nofollow">official
paper</a> . (classification) loss.`,name:"loss"},{anchor:"transformers.models.unispeech.modeling_unispeech.UniSpeechForPreTrainingOutput.projected_states",description:`<strong>projected_states</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.proj_codevector_dim)</code>) &#x2014;
Hidden-states of the model projected to <em>config.proj_codevector_dim</em> that can be used to predict the masked
projected quantized states.`,name:"projected_states"},{anchor:"transformers.models.unispeech.modeling_unispeech.UniSpeechForPreTrainingOutput.projected_quantized_states",description:`<strong>projected_quantized_states</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.proj_codevector_dim)</code>) &#x2014;
Quantized extracted feature vectors projected to <em>config.proj_codevector_dim</em> representing the positive
target vectors for contrastive loss.`,name:"projected_quantized_states"},{anchor:"transformers.models.unispeech.modeling_unispeech.UniSpeechForPreTrainingOutput.hidden_states",description:`<strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) &#x2014;
Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.`,name:"hidden_states"},{anchor:"transformers.models.unispeech.modeling_unispeech.UniSpeechForPreTrainingOutput.attentions",description:`<strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) &#x2014;
Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.`,name:"attentions"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/unispeech/modeling_unispeech.py#L67"}}),He=new re({}),Ke=new I({props:{name:"class transformers.UniSpeechModel",anchor:"transformers.UniSpeechModel",parameters:[{name:"config",val:": UniSpeechConfig"}],parametersDescription:[{anchor:"transformers.UniSpeechModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/unispeech#transformers.UniSpeechConfig">UniSpeechConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/unispeech/modeling_unispeech.py#L1070"}}),Ze=new I({props:{name:"forward",anchor:"transformers.UniSpeechModel.forward",parameters:[{name:"input_values",val:": typing.Optional[torch.Tensor]"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"mask_time_indices",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.UniSpeechModel.forward.input_values",description:`<strong>input_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Float values of input raw speech waveform. Values can be obtained by loading a <code>.flac</code> or <code>.wav</code> audio file
into an array of type <code>List[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em> via the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_values</code>, the <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a> should be used for padding and
conversion into a tensor of type <code>torch.FloatTensor</code>. See <a href="/docs/transformers/v4.29.0/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor.__call__">Wav2Vec2Processor.<strong>call</strong>()</a> for details.`,name:"input_values"},{anchor:"transformers.UniSpeechModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing convolution and attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p><code>attention_mask</code> should only be passed if the corresponding processor has <code>config.return_attention_mask == True</code>. For all models whose processor has <code>config.return_attention_mask == False</code>, <code>attention_mask</code> should
<strong>not</strong> be passed to avoid degraded performance when doing batched inference. For such models
<code>input_values</code> should simply be padded with 0 and passed without <code>attention_mask</code>. Be aware that these
models also yield slightly different results depending on whether <code>input_values</code> is padded or not.</p>

					</div>`,name:"attention_mask"},{anchor:"transformers.UniSpeechModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.UniSpeechModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.UniSpeechModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/unispeech/modeling_unispeech.py#L1135",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.Wav2Vec2BaseModelOutput"
>transformers.modeling_outputs.Wav2Vec2BaseModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/unispeech#transformers.UniSpeechConfig"
>UniSpeechConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>extract_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, conv_dim[-1])</code>) \u2014 Sequence of extracted feature vectors of the last convolutional layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.Wav2Vec2BaseModelOutput"
>transformers.modeling_outputs.Wav2Vec2BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),fe=new kn({props:{$$slots:{default:[wi]},$$scope:{ctx:U}}}),ge=new Fo({props:{anchor:"transformers.UniSpeechModel.forward.example",$$slots:{default:[yi]},$$scope:{ctx:U}}}),Ge=new re({}),Je=new I({props:{name:"class transformers.UniSpeechForCTC",anchor:"transformers.UniSpeechForCTC",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.UniSpeechForCTC.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/unispeech#transformers.UniSpeechConfig">UniSpeechConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/unispeech/modeling_unispeech.py#L1342"}}),at=new I({props:{name:"forward",anchor:"transformers.UniSpeechForCTC.forward",parameters:[{name:"input_values",val:": typing.Optional[torch.Tensor]"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"}],parametersDescription:[{anchor:"transformers.UniSpeechForCTC.forward.input_values",description:`<strong>input_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Float values of input raw speech waveform. Values can be obtained by loading a <code>.flac</code> or <code>.wav</code> audio file
into an array of type <code>List[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em> via the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_values</code>, the <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a> should be used for padding and
conversion into a tensor of type <code>torch.FloatTensor</code>. See <a href="/docs/transformers/v4.29.0/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor.__call__">Wav2Vec2Processor.<strong>call</strong>()</a> for details.`,name:"input_values"},{anchor:"transformers.UniSpeechForCTC.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing convolution and attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p><code>attention_mask</code> should only be passed if the corresponding processor has <code>config.return_attention_mask == True</code>. For all models whose processor has <code>config.return_attention_mask == False</code>, <code>attention_mask</code> should
<strong>not</strong> be passed to avoid degraded performance when doing batched inference. For such models
<code>input_values</code> should simply be padded with 0 and passed without <code>attention_mask</code>. Be aware that these
models also yield slightly different results depending on whether <code>input_values</code> is padded or not.</p>

					</div>`,name:"attention_mask"},{anchor:"transformers.UniSpeechForCTC.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.UniSpeechForCTC.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.UniSpeechForCTC.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.UniSpeechForCTC.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_length)</code>, <em>optional</em>) &#x2014;
Labels for connectionist temporal classification. Note that <code>target_length</code> has to be smaller or equal to
the sequence length of the output logits. Indices are selected in <code>[-100, 0, ..., config.vocab_size - 1]</code>.
All labels set to <code>-100</code> are ignored (masked), the loss is only computed for labels in <code>[0, ..., config.vocab_size - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/unispeech/modeling_unispeech.py#L1383",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutput"
>transformers.modeling_outputs.CausalLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/unispeech#transformers.UniSpeechConfig"
>UniSpeechConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutput"
>transformers.modeling_outputs.CausalLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ve=new kn({props:{$$slots:{default:[Si]},$$scope:{ctx:U}}}),be=new Fo({props:{anchor:"transformers.UniSpeechForCTC.forward.example",$$slots:{default:[Ti]},$$scope:{ctx:U}}}),rt=new re({}),st=new I({props:{name:"class transformers.UniSpeechForSequenceClassification",anchor:"transformers.UniSpeechForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.UniSpeechForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/unispeech#transformers.UniSpeechConfig">UniSpeechConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/unispeech/modeling_unispeech.py#L1470"}}),ht=new I({props:{name:"forward",anchor:"transformers.UniSpeechForSequenceClassification.forward",parameters:[{name:"input_values",val:": typing.Optional[torch.Tensor]"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"}],parametersDescription:[{anchor:"transformers.UniSpeechForSequenceClassification.forward.input_values",description:`<strong>input_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Float values of input raw speech waveform. Values can be obtained by loading a <code>.flac</code> or <code>.wav</code> audio file
into an array of type <code>List[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em> via the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_values</code>, the <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a> should be used for padding and
conversion into a tensor of type <code>torch.FloatTensor</code>. See <a href="/docs/transformers/v4.29.0/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor.__call__">Wav2Vec2Processor.<strong>call</strong>()</a> for details.`,name:"input_values"},{anchor:"transformers.UniSpeechForSequenceClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing convolution and attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p><code>attention_mask</code> should only be passed if the corresponding processor has <code>config.return_attention_mask == True</code>. For all models whose processor has <code>config.return_attention_mask == False</code>, <code>attention_mask</code> should
<strong>not</strong> be passed to avoid degraded performance when doing batched inference. For such models
<code>input_values</code> should simply be padded with 0 and passed without <code>attention_mask</code>. Be aware that these
models also yield slightly different results depending on whether <code>input_values</code> is padded or not.</p>

					</div>`,name:"attention_mask"},{anchor:"transformers.UniSpeechForSequenceClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.UniSpeechForSequenceClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.UniSpeechForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.UniSpeechForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/unispeech/modeling_unispeech.py#L1518",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/unispeech#transformers.UniSpeechConfig"
>UniSpeechConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ye=new kn({props:{$$slots:{default:[$i]},$$scope:{ctx:U}}}),Se=new Fo({props:{anchor:"transformers.UniSpeechForSequenceClassification.forward.example",$$slots:{default:[ki]},$$scope:{ctx:U}}}),ut=new re({}),mt=new I({props:{name:"class transformers.UniSpeechForPreTraining",anchor:"transformers.UniSpeechForPreTraining",parameters:[{name:"config",val:": UniSpeechConfig"}],parametersDescription:[{anchor:"transformers.UniSpeechForPreTraining.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/unispeech#transformers.UniSpeechConfig">UniSpeechConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/unispeech/modeling_unispeech.py#L1194"}}),wt=new I({props:{name:"forward",anchor:"transformers.UniSpeechForPreTraining.forward",parameters:[{name:"input_values",val:": typing.Optional[torch.Tensor]"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.UniSpeechForPreTraining.forward.input_values",description:`<strong>input_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Float values of input raw speech waveform. Values can be obtained by loading a <code>.flac</code> or <code>.wav</code> audio file
into an array of type <code>List[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em> via the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_values</code>, the <a href="/docs/transformers/v4.29.0/en/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a> should be used for padding and
conversion into a tensor of type <code>torch.FloatTensor</code>. See <a href="/docs/transformers/v4.29.0/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor.__call__">Wav2Vec2Processor.<strong>call</strong>()</a> for details.`,name:"input_values"},{anchor:"transformers.UniSpeechForPreTraining.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing convolution and attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p><code>attention_mask</code> should only be passed if the corresponding processor has <code>config.return_attention_mask == True</code>. For all models whose processor has <code>config.return_attention_mask == False</code>, <code>attention_mask</code> should
<strong>not</strong> be passed to avoid degraded performance when doing batched inference. For such models
<code>input_values</code> should simply be padded with 0 and passed without <code>attention_mask</code>. Be aware that these
models also yield slightly different results depending on whether <code>input_values</code> is padded or not.</p>

					</div>`,name:"attention_mask"},{anchor:"transformers.UniSpeechForPreTraining.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.UniSpeechForPreTraining.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.UniSpeechForPreTraining.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.UniSpeechForPreTraining.forward.mask_time_indices",description:`<strong>mask_time_indices</strong> (<code>torch.BoolTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices to mask extracted features for contrastive loss. When in training mode, model learns to predict
masked extracted features in <em>config.proj_codevector_dim</em> space.`,name:"mask_time_indices"},{anchor:"transformers.UniSpeechForPreTraining.forward.sampled_negative_indices",description:`<strong>sampled_negative_indices</strong> (<code>torch.BoolTensor</code> of shape <code>(batch_size, sequence_length, num_negatives)</code>, <em>optional</em>) &#x2014;
Indices indicating which quantized target vectors are used as negative sampled vectors in contrastive loss.
Required input for pre-training.`,name:"sampled_negative_indices"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/unispeech/modeling_unispeech.py#L1255",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/model_doc/unispeech#transformers.models.unispeech.modeling_unispeech.UniSpeechForPreTrainingOutput"
>transformers.models.unispeech.modeling_unispeech.UniSpeechForPreTrainingOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/unispeech#transformers.UniSpeechConfig"
>UniSpeechConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<em>optional</em>, returned when model is in train mode, <code>torch.FloatTensor</code> of shape <code>(1,)</code>) \u2014 Total loss as the sum of the contrastive loss (L_m) and the diversity loss (L_d) as stated in the <a
  href="https://arxiv.org/pdf/2006.11477.pdf"
  rel="nofollow"
>official
paper</a> . (classification) loss.</p>
</li>
<li>
<p><strong>projected_states</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.proj_codevector_dim)</code>) \u2014 Hidden-states of the model projected to <em>config.proj_codevector_dim</em> that can be used to predict the masked
projected quantized states.</p>
</li>
<li>
<p><strong>projected_quantized_states</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.proj_codevector_dim)</code>) \u2014 Quantized extracted feature vectors projected to <em>config.proj_codevector_dim</em> representing the positive
target vectors for contrastive loss.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.29.0/en/model_doc/unispeech#transformers.models.unispeech.modeling_unispeech.UniSpeechForPreTrainingOutput"
>transformers.models.unispeech.modeling_unispeech.UniSpeechForPreTrainingOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),$e=new kn({props:{$$slots:{default:[Ui]},$$scope:{ctx:U}}}),ke=new Fo({props:{anchor:"transformers.UniSpeechForPreTraining.forward.example",$$slots:{default:[Ci]},$$scope:{ctx:U}}}),{c(){d=n("meta"),b=p(),g=n("h1"),f=n("a"),v=n("span"),w(l.$$.fragment),u=p(),C=n("span"),Un=s("UniSpeech"),Po=p(),V=n("h2"),se=n("a"),Xt=n("span"),w(qe.$$.fragment),Cn=p(),Zt=n("span"),xn=s("Overview"),Eo=p(),ie=n("p"),Fn=s("The UniSpeech model was proposed in "),Pe=n("a"),jn=s("UniSpeech: Unified Speech Representation Learning with Labeled and Unlabeled Data"),qn=s(` by Chengyi Wang, Yu Wu, Yao Qian, Kenichi Kumatani, Shujie Liu, Furu Wei, Michael
Zeng, Xuedong Huang .`),Mo=p(),$t=n("p"),Pn=s("The abstract from the paper is the following:"),Ao=p(),kt=n("p"),Gt=n("em"),En=s(`In this paper, we propose a unified pre-training approach called UniSpeech to learn speech representations with both
unlabeled and labeled data, in which supervised phonetic CTC learning and phonetically-aware contrastive
self-supervised learning are conducted in a multi-task learning manner. The resultant representations can capture
information more correlated with phonetic structures and improve the generalization across languages and domains. We
evaluate the effectiveness of UniSpeech for cross-lingual representation learning on public CommonVoice corpus. The
results show that UniSpeech outperforms self-supervised pretraining and supervised transfer learning for speech
recognition by a maximum of 13.4% and 17.8% relative phone error rate reductions respectively (averaged over all
testing languages). The transferability of UniSpeech is also demonstrated on a domain-shift speech recognition task,
i.e., a relative word error rate reduction of 6% against the previous approach.`),zo=p(),Ut=n("p"),Mn=s("Tips:"),Oo=p(),le=n("ul"),Ee=n("li"),An=s(`UniSpeech is a speech model that accepts a float array corresponding to the raw waveform of the speech signal. Please
use `),Ct=n("a"),zn=s("Wav2Vec2Processor"),On=s(" for the feature extraction."),Dn=p(),Me=n("li"),Ln=s(`UniSpeech model can be fine-tuned using connectionist temporal classification (CTC) so the model output has to be
decoded using `),xt=n("a"),Wn=s("Wav2Vec2CTCTokenizer"),Nn=s("."),Do=p(),D=n("p"),In=s("This model was contributed by "),Ae=n("a"),Vn=s("patrickvonplaten"),Hn=s(`. The Authors\u2019 code can be
found `),ze=n("a"),Kn=s("here"),Yn=s("."),Lo=p(),H=n("h2"),ce=n("a"),Jt=n("span"),w(Oe.$$.fragment),Rn=p(),eo=n("span"),Bn=s("Documentation resources"),Wo=p(),de=n("ul"),to=n("li"),Ft=n("a"),Qn=s("Audio classification task guide"),Xn=p(),oo=n("li"),jt=n("a"),Zn=s("Automatic speech recognition task guide"),No=p(),K=n("h2"),pe=n("a"),no=n("span"),w(De.$$.fragment),Gn=p(),ao=n("span"),Jn=s("UniSpeechConfig"),Io=p(),P=n("div"),w(Le.$$.fragment),ea=p(),Y=n("p"),ta=s("This is the configuration class to store the configuration of a "),qt=n("a"),oa=s("UniSpeechModel"),na=s(`. It is used to instantiate an
UniSpeech model according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the UniSpeech
`),We=n("a"),aa=s("microsoft/unispeech-large-1500h-cv"),ra=s(" architecture."),sa=p(),R=n("p"),ia=s("Configuration objects inherit from "),Pt=n("a"),la=s("PretrainedConfig"),ca=s(` and can be used to control the model outputs. Read the
documentation from `),Et=n("a"),da=s("PretrainedConfig"),pa=s(" for more information."),ha=p(),w(he.$$.fragment),Vo=p(),B=n("h2"),ue=n("a"),ro=n("span"),w(Ne.$$.fragment),ua=p(),so=n("span"),ma=s("UniSpeech specific outputs"),Ho=p(),Q=n("div"),w(Ie.$$.fragment),fa=p(),Ve=n("p"),ga=s("Output type of "),io=n("code"),_a=s("UniSpeechForPreTrainingOutput"),va=s(", with potential hidden states and attentions."),Ko=p(),X=n("h2"),me=n("a"),lo=n("span"),w(He.$$.fragment),ba=p(),co=n("span"),wa=s("UniSpeechModel"),Yo=p(),F=n("div"),w(Ke.$$.fragment),ya=p(),Ye=n("p"),Sa=s(`The bare UniSpeech Model transformer outputting raw hidden-states without any specific head on top.
UniSpeech was proposed in `),Re=n("a"),Ta=s(`UniSpeech: Unified Speech Representation Learning with Labeled and Unlabeled
Data`),$a=s(` by Chengyi Wang, Yu Wu, Yao Qian, Kenichi Kumatani, Shujie Liu, Furu Wei,
Michael Zeng, Xuedong Huang.`),ka=p(),Be=n("p"),Ua=s("This model inherits from "),Mt=n("a"),Ca=s("PreTrainedModel"),xa=s(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Fa=p(),Qe=n("p"),ja=s("This model is a PyTorch "),Xe=n("a"),qa=s("torch.nn.Module"),Pa=s(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ea=p(),E=n("div"),w(Ze.$$.fragment),Ma=p(),Z=n("p"),Aa=s("The "),At=n("a"),za=s("UniSpeechModel"),Oa=s(" forward method, overrides the "),po=n("code"),Da=s("__call__"),La=s(" special method."),Wa=p(),w(fe.$$.fragment),Na=p(),w(ge.$$.fragment),Ro=p(),G=n("h2"),_e=n("a"),ho=n("span"),w(Ge.$$.fragment),Ia=p(),uo=n("span"),Va=s("UniSpeechForCTC"),Bo=p(),j=n("div"),w(Je.$$.fragment),Ha=p(),J=n("p"),Ka=s("UniSpeech Model with a "),mo=n("code"),Ya=s("language modeling"),Ra=s(` head on top for Connectionist Temporal Classification (CTC).
UniSpeech was proposed in `),et=n("a"),Ba=s(`UniSpeech: Unified Speech Representation Learning with Labeled and Unlabeled
Data`),Qa=s(` by Chengyi Wang, Yu Wu, Yao Qian, Kenichi Kumatani, Shujie Liu, Furu Wei,
Michael Zeng, Xuedong Huang.`),Xa=p(),tt=n("p"),Za=s("This model inherits from "),zt=n("a"),Ga=s("PreTrainedModel"),Ja=s(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),er=p(),ot=n("p"),tr=s("This model is a PyTorch "),nt=n("a"),or=s("torch.nn.Module"),nr=s(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ar=p(),M=n("div"),w(at.$$.fragment),rr=p(),ee=n("p"),sr=s("The "),Ot=n("a"),ir=s("UniSpeechForCTC"),lr=s(" forward method, overrides the "),fo=n("code"),cr=s("__call__"),dr=s(" special method."),pr=p(),w(ve.$$.fragment),hr=p(),w(be.$$.fragment),Qo=p(),te=n("h2"),we=n("a"),go=n("span"),w(rt.$$.fragment),ur=p(),_o=n("span"),mr=s("UniSpeechForSequenceClassification"),Xo=p(),x=n("div"),w(st.$$.fragment),fr=p(),vo=n("p"),gr=s(`UniSpeech Model with a sequence classification head on top (a linear layer over the pooled output) for tasks like
SUPERB Keyword Spotting.`),_r=p(),it=n("p"),vr=s("UniSpeech was proposed in "),lt=n("a"),br=s(`UniSpeech: Unified Speech Representation Learning with Labeled and Unlabeled
Data`),wr=s(` by Chengyi Wang, Yu Wu, Yao Qian, Kenichi Kumatani, Shujie Liu, Furu Wei,
Michael Zeng, Xuedong Huang.`),yr=p(),ct=n("p"),Sr=s("This model inherits from "),Dt=n("a"),Tr=s("PreTrainedModel"),$r=s(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),kr=p(),dt=n("p"),Ur=s("This model is a PyTorch "),pt=n("a"),Cr=s("torch.nn.Module"),xr=s(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Fr=p(),A=n("div"),w(ht.$$.fragment),jr=p(),oe=n("p"),qr=s("The "),Lt=n("a"),Pr=s("UniSpeechForSequenceClassification"),Er=s(" forward method, overrides the "),bo=n("code"),Mr=s("__call__"),Ar=s(" special method."),zr=p(),w(ye.$$.fragment),Or=p(),w(Se.$$.fragment),Zo=p(),ne=n("h2"),Te=n("a"),wo=n("span"),w(ut.$$.fragment),Dr=p(),yo=n("span"),Lr=s("UniSpeechForPreTraining"),Go=p(),q=n("div"),w(mt.$$.fragment),Wr=p(),ft=n("p"),Nr=s(`UniSpeech Model with a vector-quantization module and ctc loss for pre-training.
UniSpeech was proposed in `),gt=n("a"),Ir=s(`UniSpeech: Unified Speech Representation Learning with Labeled and Unlabeled
Data`),Vr=s(` by Chengyi Wang, Yu Wu, Yao Qian, Kenichi Kumatani, Shujie Liu, Furu Wei,
Michael Zeng, Xuedong Huang.`),Hr=p(),_t=n("p"),Kr=s("This model inherits from "),Wt=n("a"),Yr=s("PreTrainedModel"),Rr=s(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Br=p(),vt=n("p"),Qr=s("This model is a PyTorch "),bt=n("a"),Xr=s("torch.nn.Module"),Zr=s(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Gr=p(),z=n("div"),w(wt.$$.fragment),Jr=p(),ae=n("p"),es=s("The "),Nt=n("a"),ts=s("UniSpeechForPreTraining"),os=s(" forward method, overrides the "),So=n("code"),ns=s("__call__"),as=s(" special method."),rs=p(),w($e.$$.fragment),ss=p(),w(ke.$$.fragment),this.h()},l(t){const m=_i('[data-svelte="svelte-1phssyn"]',document.head);d=a(m,"META",{name:!0,content:!0}),m.forEach(o),b=h(t),g=a(t,"H1",{class:!0});var yt=r(g);f=a(yt,"A",{id:!0,class:!0,href:!0});var To=r(f);v=a(To,"SPAN",{});var $o=r(v);y(l.$$.fragment,$o),$o.forEach(o),To.forEach(o),u=h(yt),C=a(yt,"SPAN",{});var ko=r(C);Un=i(ko,"UniSpeech"),ko.forEach(o),yt.forEach(o),Po=h(t),V=a(t,"H2",{class:!0});var St=r(V);se=a(St,"A",{id:!0,class:!0,href:!0});var Uo=r(se);Xt=a(Uo,"SPAN",{});var Co=r(Xt);y(qe.$$.fragment,Co),Co.forEach(o),Uo.forEach(o),Cn=h(St),Zt=a(St,"SPAN",{});var xo=r(Zt);xn=i(xo,"Overview"),xo.forEach(o),St.forEach(o),Eo=h(t),ie=a(t,"P",{});var Tt=r(ie);Fn=i(Tt,"The UniSpeech model was proposed in "),Pe=a(Tt,"A",{href:!0,rel:!0});var is=r(Pe);jn=i(is,"UniSpeech: Unified Speech Representation Learning with Labeled and Unlabeled Data"),is.forEach(o),qn=i(Tt,` by Chengyi Wang, Yu Wu, Yao Qian, Kenichi Kumatani, Shujie Liu, Furu Wei, Michael
Zeng, Xuedong Huang .`),Tt.forEach(o),Mo=h(t),$t=a(t,"P",{});var ls=r($t);Pn=i(ls,"The abstract from the paper is the following:"),ls.forEach(o),Ao=h(t),kt=a(t,"P",{});var cs=r(kt);Gt=a(cs,"EM",{});var ds=r(Gt);En=i(ds,`In this paper, we propose a unified pre-training approach called UniSpeech to learn speech representations with both
unlabeled and labeled data, in which supervised phonetic CTC learning and phonetically-aware contrastive
self-supervised learning are conducted in a multi-task learning manner. The resultant representations can capture
information more correlated with phonetic structures and improve the generalization across languages and domains. We
evaluate the effectiveness of UniSpeech for cross-lingual representation learning on public CommonVoice corpus. The
results show that UniSpeech outperforms self-supervised pretraining and supervised transfer learning for speech
recognition by a maximum of 13.4% and 17.8% relative phone error rate reductions respectively (averaged over all
testing languages). The transferability of UniSpeech is also demonstrated on a domain-shift speech recognition task,
i.e., a relative word error rate reduction of 6% against the previous approach.`),ds.forEach(o),cs.forEach(o),zo=h(t),Ut=a(t,"P",{});var ps=r(Ut);Mn=i(ps,"Tips:"),ps.forEach(o),Oo=h(t),le=a(t,"UL",{});var en=r(le);Ee=a(en,"LI",{});var tn=r(Ee);An=i(tn,`UniSpeech is a speech model that accepts a float array corresponding to the raw waveform of the speech signal. Please
use `),Ct=a(tn,"A",{href:!0});var hs=r(Ct);zn=i(hs,"Wav2Vec2Processor"),hs.forEach(o),On=i(tn," for the feature extraction."),tn.forEach(o),Dn=h(en),Me=a(en,"LI",{});var on=r(Me);Ln=i(on,`UniSpeech model can be fine-tuned using connectionist temporal classification (CTC) so the model output has to be
decoded using `),xt=a(on,"A",{href:!0});var us=r(xt);Wn=i(us,"Wav2Vec2CTCTokenizer"),us.forEach(o),Nn=i(on,"."),on.forEach(o),en.forEach(o),Do=h(t),D=a(t,"P",{});var It=r(D);In=i(It,"This model was contributed by "),Ae=a(It,"A",{href:!0,rel:!0});var ms=r(Ae);Vn=i(ms,"patrickvonplaten"),ms.forEach(o),Hn=i(It,`. The Authors\u2019 code can be
found `),ze=a(It,"A",{href:!0,rel:!0});var fs=r(ze);Kn=i(fs,"here"),fs.forEach(o),Yn=i(It,"."),It.forEach(o),Lo=h(t),H=a(t,"H2",{class:!0});var nn=r(H);ce=a(nn,"A",{id:!0,class:!0,href:!0});var gs=r(ce);Jt=a(gs,"SPAN",{});var _s=r(Jt);y(Oe.$$.fragment,_s),_s.forEach(o),gs.forEach(o),Rn=h(nn),eo=a(nn,"SPAN",{});var vs=r(eo);Bn=i(vs,"Documentation resources"),vs.forEach(o),nn.forEach(o),Wo=h(t),de=a(t,"UL",{});var an=r(de);to=a(an,"LI",{});var bs=r(to);Ft=a(bs,"A",{href:!0});var ws=r(Ft);Qn=i(ws,"Audio classification task guide"),ws.forEach(o),bs.forEach(o),Xn=h(an),oo=a(an,"LI",{});var ys=r(oo);jt=a(ys,"A",{href:!0});var Ss=r(jt);Zn=i(Ss,"Automatic speech recognition task guide"),Ss.forEach(o),ys.forEach(o),an.forEach(o),No=h(t),K=a(t,"H2",{class:!0});var rn=r(K);pe=a(rn,"A",{id:!0,class:!0,href:!0});var Ts=r(pe);no=a(Ts,"SPAN",{});var $s=r(no);y(De.$$.fragment,$s),$s.forEach(o),Ts.forEach(o),Gn=h(rn),ao=a(rn,"SPAN",{});var ks=r(ao);Jn=i(ks,"UniSpeechConfig"),ks.forEach(o),rn.forEach(o),Io=h(t),P=a(t,"DIV",{class:!0});var Ue=r(P);y(Le.$$.fragment,Ue),ea=h(Ue),Y=a(Ue,"P",{});var Vt=r(Y);ta=i(Vt,"This is the configuration class to store the configuration of a "),qt=a(Vt,"A",{href:!0});var Us=r(qt);oa=i(Us,"UniSpeechModel"),Us.forEach(o),na=i(Vt,`. It is used to instantiate an
UniSpeech model according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the UniSpeech
`),We=a(Vt,"A",{href:!0,rel:!0});var Cs=r(We);aa=i(Cs,"microsoft/unispeech-large-1500h-cv"),Cs.forEach(o),ra=i(Vt," architecture."),Vt.forEach(o),sa=h(Ue),R=a(Ue,"P",{});var Ht=r(R);ia=i(Ht,"Configuration objects inherit from "),Pt=a(Ht,"A",{href:!0});var xs=r(Pt);la=i(xs,"PretrainedConfig"),xs.forEach(o),ca=i(Ht,` and can be used to control the model outputs. Read the
documentation from `),Et=a(Ht,"A",{href:!0});var Fs=r(Et);da=i(Fs,"PretrainedConfig"),Fs.forEach(o),pa=i(Ht," for more information."),Ht.forEach(o),ha=h(Ue),y(he.$$.fragment,Ue),Ue.forEach(o),Vo=h(t),B=a(t,"H2",{class:!0});var sn=r(B);ue=a(sn,"A",{id:!0,class:!0,href:!0});var js=r(ue);ro=a(js,"SPAN",{});var qs=r(ro);y(Ne.$$.fragment,qs),qs.forEach(o),js.forEach(o),ua=h(sn),so=a(sn,"SPAN",{});var Ps=r(so);ma=i(Ps,"UniSpeech specific outputs"),Ps.forEach(o),sn.forEach(o),Ho=h(t),Q=a(t,"DIV",{class:!0});var ln=r(Q);y(Ie.$$.fragment,ln),fa=h(ln),Ve=a(ln,"P",{});var cn=r(Ve);ga=i(cn,"Output type of "),io=a(cn,"CODE",{});var Es=r(io);_a=i(Es,"UniSpeechForPreTrainingOutput"),Es.forEach(o),va=i(cn,", with potential hidden states and attentions."),cn.forEach(o),ln.forEach(o),Ko=h(t),X=a(t,"H2",{class:!0});var dn=r(X);me=a(dn,"A",{id:!0,class:!0,href:!0});var Ms=r(me);lo=a(Ms,"SPAN",{});var As=r(lo);y(He.$$.fragment,As),As.forEach(o),Ms.forEach(o),ba=h(dn),co=a(dn,"SPAN",{});var zs=r(co);wa=i(zs,"UniSpeechModel"),zs.forEach(o),dn.forEach(o),Yo=h(t),F=a(t,"DIV",{class:!0});var L=r(F);y(Ke.$$.fragment,L),ya=h(L),Ye=a(L,"P",{});var pn=r(Ye);Sa=i(pn,`The bare UniSpeech Model transformer outputting raw hidden-states without any specific head on top.
UniSpeech was proposed in `),Re=a(pn,"A",{href:!0,rel:!0});var Os=r(Re);Ta=i(Os,`UniSpeech: Unified Speech Representation Learning with Labeled and Unlabeled
Data`),Os.forEach(o),$a=i(pn,` by Chengyi Wang, Yu Wu, Yao Qian, Kenichi Kumatani, Shujie Liu, Furu Wei,
Michael Zeng, Xuedong Huang.`),pn.forEach(o),ka=h(L),Be=a(L,"P",{});var hn=r(Be);Ua=i(hn,"This model inherits from "),Mt=a(hn,"A",{href:!0});var Ds=r(Mt);Ca=i(Ds,"PreTrainedModel"),Ds.forEach(o),xa=i(hn,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),hn.forEach(o),Fa=h(L),Qe=a(L,"P",{});var un=r(Qe);ja=i(un,"This model is a PyTorch "),Xe=a(un,"A",{href:!0,rel:!0});var Ls=r(Xe);qa=i(Ls,"torch.nn.Module"),Ls.forEach(o),Pa=i(un,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),un.forEach(o),Ea=h(L),E=a(L,"DIV",{class:!0});var Ce=r(E);y(Ze.$$.fragment,Ce),Ma=h(Ce),Z=a(Ce,"P",{});var Kt=r(Z);Aa=i(Kt,"The "),At=a(Kt,"A",{href:!0});var Ws=r(At);za=i(Ws,"UniSpeechModel"),Ws.forEach(o),Oa=i(Kt," forward method, overrides the "),po=a(Kt,"CODE",{});var Ns=r(po);Da=i(Ns,"__call__"),Ns.forEach(o),La=i(Kt," special method."),Kt.forEach(o),Wa=h(Ce),y(fe.$$.fragment,Ce),Na=h(Ce),y(ge.$$.fragment,Ce),Ce.forEach(o),L.forEach(o),Ro=h(t),G=a(t,"H2",{class:!0});var mn=r(G);_e=a(mn,"A",{id:!0,class:!0,href:!0});var Is=r(_e);ho=a(Is,"SPAN",{});var Vs=r(ho);y(Ge.$$.fragment,Vs),Vs.forEach(o),Is.forEach(o),Ia=h(mn),uo=a(mn,"SPAN",{});var Hs=r(uo);Va=i(Hs,"UniSpeechForCTC"),Hs.forEach(o),mn.forEach(o),Bo=h(t),j=a(t,"DIV",{class:!0});var W=r(j);y(Je.$$.fragment,W),Ha=h(W),J=a(W,"P",{});var Yt=r(J);Ka=i(Yt,"UniSpeech Model with a "),mo=a(Yt,"CODE",{});var Ks=r(mo);Ya=i(Ks,"language modeling"),Ks.forEach(o),Ra=i(Yt,` head on top for Connectionist Temporal Classification (CTC).
UniSpeech was proposed in `),et=a(Yt,"A",{href:!0,rel:!0});var Ys=r(et);Ba=i(Ys,`UniSpeech: Unified Speech Representation Learning with Labeled and Unlabeled
Data`),Ys.forEach(o),Qa=i(Yt,` by Chengyi Wang, Yu Wu, Yao Qian, Kenichi Kumatani, Shujie Liu, Furu Wei,
Michael Zeng, Xuedong Huang.`),Yt.forEach(o),Xa=h(W),tt=a(W,"P",{});var fn=r(tt);Za=i(fn,"This model inherits from "),zt=a(fn,"A",{href:!0});var Rs=r(zt);Ga=i(Rs,"PreTrainedModel"),Rs.forEach(o),Ja=i(fn,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),fn.forEach(o),er=h(W),ot=a(W,"P",{});var gn=r(ot);tr=i(gn,"This model is a PyTorch "),nt=a(gn,"A",{href:!0,rel:!0});var Bs=r(nt);or=i(Bs,"torch.nn.Module"),Bs.forEach(o),nr=i(gn,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),gn.forEach(o),ar=h(W),M=a(W,"DIV",{class:!0});var xe=r(M);y(at.$$.fragment,xe),rr=h(xe),ee=a(xe,"P",{});var Rt=r(ee);sr=i(Rt,"The "),Ot=a(Rt,"A",{href:!0});var Qs=r(Ot);ir=i(Qs,"UniSpeechForCTC"),Qs.forEach(o),lr=i(Rt," forward method, overrides the "),fo=a(Rt,"CODE",{});var Xs=r(fo);cr=i(Xs,"__call__"),Xs.forEach(o),dr=i(Rt," special method."),Rt.forEach(o),pr=h(xe),y(ve.$$.fragment,xe),hr=h(xe),y(be.$$.fragment,xe),xe.forEach(o),W.forEach(o),Qo=h(t),te=a(t,"H2",{class:!0});var _n=r(te);we=a(_n,"A",{id:!0,class:!0,href:!0});var Zs=r(we);go=a(Zs,"SPAN",{});var Gs=r(go);y(rt.$$.fragment,Gs),Gs.forEach(o),Zs.forEach(o),ur=h(_n),_o=a(_n,"SPAN",{});var Js=r(_o);mr=i(Js,"UniSpeechForSequenceClassification"),Js.forEach(o),_n.forEach(o),Xo=h(t),x=a(t,"DIV",{class:!0});var O=r(x);y(st.$$.fragment,O),fr=h(O),vo=a(O,"P",{});var ei=r(vo);gr=i(ei,`UniSpeech Model with a sequence classification head on top (a linear layer over the pooled output) for tasks like
SUPERB Keyword Spotting.`),ei.forEach(o),_r=h(O),it=a(O,"P",{});var vn=r(it);vr=i(vn,"UniSpeech was proposed in "),lt=a(vn,"A",{href:!0,rel:!0});var ti=r(lt);br=i(ti,`UniSpeech: Unified Speech Representation Learning with Labeled and Unlabeled
Data`),ti.forEach(o),wr=i(vn,` by Chengyi Wang, Yu Wu, Yao Qian, Kenichi Kumatani, Shujie Liu, Furu Wei,
Michael Zeng, Xuedong Huang.`),vn.forEach(o),yr=h(O),ct=a(O,"P",{});var bn=r(ct);Sr=i(bn,"This model inherits from "),Dt=a(bn,"A",{href:!0});var oi=r(Dt);Tr=i(oi,"PreTrainedModel"),oi.forEach(o),$r=i(bn,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),bn.forEach(o),kr=h(O),dt=a(O,"P",{});var wn=r(dt);Ur=i(wn,"This model is a PyTorch "),pt=a(wn,"A",{href:!0,rel:!0});var ni=r(pt);Cr=i(ni,"torch.nn.Module"),ni.forEach(o),xr=i(wn,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),wn.forEach(o),Fr=h(O),A=a(O,"DIV",{class:!0});var Fe=r(A);y(ht.$$.fragment,Fe),jr=h(Fe),oe=a(Fe,"P",{});var Bt=r(oe);qr=i(Bt,"The "),Lt=a(Bt,"A",{href:!0});var ai=r(Lt);Pr=i(ai,"UniSpeechForSequenceClassification"),ai.forEach(o),Er=i(Bt," forward method, overrides the "),bo=a(Bt,"CODE",{});var ri=r(bo);Mr=i(ri,"__call__"),ri.forEach(o),Ar=i(Bt," special method."),Bt.forEach(o),zr=h(Fe),y(ye.$$.fragment,Fe),Or=h(Fe),y(Se.$$.fragment,Fe),Fe.forEach(o),O.forEach(o),Zo=h(t),ne=a(t,"H2",{class:!0});var yn=r(ne);Te=a(yn,"A",{id:!0,class:!0,href:!0});var si=r(Te);wo=a(si,"SPAN",{});var ii=r(wo);y(ut.$$.fragment,ii),ii.forEach(o),si.forEach(o),Dr=h(yn),yo=a(yn,"SPAN",{});var li=r(yo);Lr=i(li,"UniSpeechForPreTraining"),li.forEach(o),yn.forEach(o),Go=h(t),q=a(t,"DIV",{class:!0});var N=r(q);y(mt.$$.fragment,N),Wr=h(N),ft=a(N,"P",{});var Sn=r(ft);Nr=i(Sn,`UniSpeech Model with a vector-quantization module and ctc loss for pre-training.
UniSpeech was proposed in `),gt=a(Sn,"A",{href:!0,rel:!0});var ci=r(gt);Ir=i(ci,`UniSpeech: Unified Speech Representation Learning with Labeled and Unlabeled
Data`),ci.forEach(o),Vr=i(Sn,` by Chengyi Wang, Yu Wu, Yao Qian, Kenichi Kumatani, Shujie Liu, Furu Wei,
Michael Zeng, Xuedong Huang.`),Sn.forEach(o),Hr=h(N),_t=a(N,"P",{});var Tn=r(_t);Kr=i(Tn,"This model inherits from "),Wt=a(Tn,"A",{href:!0});var di=r(Wt);Yr=i(di,"PreTrainedModel"),di.forEach(o),Rr=i(Tn,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Tn.forEach(o),Br=h(N),vt=a(N,"P",{});var $n=r(vt);Qr=i($n,"This model is a PyTorch "),bt=a($n,"A",{href:!0,rel:!0});var pi=r(bt);Xr=i(pi,"torch.nn.Module"),pi.forEach(o),Zr=i($n,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),$n.forEach(o),Gr=h(N),z=a(N,"DIV",{class:!0});var je=r(z);y(wt.$$.fragment,je),Jr=h(je),ae=a(je,"P",{});var Qt=r(ae);es=i(Qt,"The "),Nt=a(Qt,"A",{href:!0});var hi=r(Nt);ts=i(hi,"UniSpeechForPreTraining"),hi.forEach(o),os=i(Qt," forward method, overrides the "),So=a(Qt,"CODE",{});var ui=r(So);ns=i(ui,"__call__"),ui.forEach(o),as=i(Qt," special method."),Qt.forEach(o),rs=h(je),y($e.$$.fragment,je),ss=h(je),y(ke.$$.fragment,je),je.forEach(o),N.forEach(o),this.h()},h(){c(d,"name","hf:doc:metadata"),c(d,"content",JSON.stringify(Fi)),c(f,"id","unispeech"),c(f,"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"),c(f,"href","#unispeech"),c(g,"class","relative group"),c(se,"id","overview"),c(se,"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"),c(se,"href","#overview"),c(V,"class","relative group"),c(Pe,"href","https://arxiv.org/abs/2101.07597"),c(Pe,"rel","nofollow"),c(Ct,"href","/docs/transformers/v4.29.0/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor"),c(xt,"href","/docs/transformers/v4.29.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer"),c(Ae,"href","https://huggingface.co/patrickvonplaten"),c(Ae,"rel","nofollow"),c(ze,"href","https://github.com/microsoft/UniSpeech/tree/main/UniSpeech"),c(ze,"rel","nofollow"),c(ce,"id","documentation-resources"),c(ce,"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"),c(ce,"href","#documentation-resources"),c(H,"class","relative group"),c(Ft,"href","../tasks/audio_classification"),c(jt,"href","../tasks/asr"),c(pe,"id","transformers.UniSpeechConfig"),c(pe,"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"),c(pe,"href","#transformers.UniSpeechConfig"),c(K,"class","relative group"),c(qt,"href","/docs/transformers/v4.29.0/en/model_doc/unispeech#transformers.UniSpeechModel"),c(We,"href","https://huggingface.co/microsoft/unispeech-large-1500h-cv"),c(We,"rel","nofollow"),c(Pt,"href","/docs/transformers/v4.29.0/en/main_classes/configuration#transformers.PretrainedConfig"),c(Et,"href","/docs/transformers/v4.29.0/en/main_classes/configuration#transformers.PretrainedConfig"),c(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ue,"id","transformers.models.unispeech.modeling_unispeech.UniSpeechForPreTrainingOutput"),c(ue,"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"),c(ue,"href","#transformers.models.unispeech.modeling_unispeech.UniSpeechForPreTrainingOutput"),c(B,"class","relative group"),c(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(me,"id","transformers.UniSpeechModel"),c(me,"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"),c(me,"href","#transformers.UniSpeechModel"),c(X,"class","relative group"),c(Re,"href","https://arxiv.org/abs/2101.07597"),c(Re,"rel","nofollow"),c(Mt,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel"),c(Xe,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Xe,"rel","nofollow"),c(At,"href","/docs/transformers/v4.29.0/en/model_doc/unispeech#transformers.UniSpeechModel"),c(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(_e,"id","transformers.UniSpeechForCTC"),c(_e,"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"),c(_e,"href","#transformers.UniSpeechForCTC"),c(G,"class","relative group"),c(et,"href","https://arxiv.org/abs/2101.07597"),c(et,"rel","nofollow"),c(zt,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel"),c(nt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(nt,"rel","nofollow"),c(Ot,"href","/docs/transformers/v4.29.0/en/model_doc/unispeech#transformers.UniSpeechForCTC"),c(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(we,"id","transformers.UniSpeechForSequenceClassification"),c(we,"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"),c(we,"href","#transformers.UniSpeechForSequenceClassification"),c(te,"class","relative group"),c(lt,"href","https://arxiv.org/abs/2101.07597"),c(lt,"rel","nofollow"),c(Dt,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel"),c(pt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(pt,"rel","nofollow"),c(Lt,"href","/docs/transformers/v4.29.0/en/model_doc/unispeech#transformers.UniSpeechForSequenceClassification"),c(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Te,"id","transformers.UniSpeechForPreTraining"),c(Te,"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"),c(Te,"href","#transformers.UniSpeechForPreTraining"),c(ne,"class","relative group"),c(gt,"href","https://arxiv.org/abs/2101.07597"),c(gt,"rel","nofollow"),c(Wt,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel"),c(bt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(bt,"rel","nofollow"),c(Nt,"href","/docs/transformers/v4.29.0/en/model_doc/unispeech#transformers.UniSpeechForPreTraining"),c(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,m){e(document.head,d),_(t,b,m),_(t,g,m),e(g,f),e(f,v),S(l,v,null),e(g,u),e(g,C),e(C,Un),_(t,Po,m),_(t,V,m),e(V,se),e(se,Xt),S(qe,Xt,null),e(V,Cn),e(V,Zt),e(Zt,xn),_(t,Eo,m),_(t,ie,m),e(ie,Fn),e(ie,Pe),e(Pe,jn),e(ie,qn),_(t,Mo,m),_(t,$t,m),e($t,Pn),_(t,Ao,m),_(t,kt,m),e(kt,Gt),e(Gt,En),_(t,zo,m),_(t,Ut,m),e(Ut,Mn),_(t,Oo,m),_(t,le,m),e(le,Ee),e(Ee,An),e(Ee,Ct),e(Ct,zn),e(Ee,On),e(le,Dn),e(le,Me),e(Me,Ln),e(Me,xt),e(xt,Wn),e(Me,Nn),_(t,Do,m),_(t,D,m),e(D,In),e(D,Ae),e(Ae,Vn),e(D,Hn),e(D,ze),e(ze,Kn),e(D,Yn),_(t,Lo,m),_(t,H,m),e(H,ce),e(ce,Jt),S(Oe,Jt,null),e(H,Rn),e(H,eo),e(eo,Bn),_(t,Wo,m),_(t,de,m),e(de,to),e(to,Ft),e(Ft,Qn),e(de,Xn),e(de,oo),e(oo,jt),e(jt,Zn),_(t,No,m),_(t,K,m),e(K,pe),e(pe,no),S(De,no,null),e(K,Gn),e(K,ao),e(ao,Jn),_(t,Io,m),_(t,P,m),S(Le,P,null),e(P,ea),e(P,Y),e(Y,ta),e(Y,qt),e(qt,oa),e(Y,na),e(Y,We),e(We,aa),e(Y,ra),e(P,sa),e(P,R),e(R,ia),e(R,Pt),e(Pt,la),e(R,ca),e(R,Et),e(Et,da),e(R,pa),e(P,ha),S(he,P,null),_(t,Vo,m),_(t,B,m),e(B,ue),e(ue,ro),S(Ne,ro,null),e(B,ua),e(B,so),e(so,ma),_(t,Ho,m),_(t,Q,m),S(Ie,Q,null),e(Q,fa),e(Q,Ve),e(Ve,ga),e(Ve,io),e(io,_a),e(Ve,va),_(t,Ko,m),_(t,X,m),e(X,me),e(me,lo),S(He,lo,null),e(X,ba),e(X,co),e(co,wa),_(t,Yo,m),_(t,F,m),S(Ke,F,null),e(F,ya),e(F,Ye),e(Ye,Sa),e(Ye,Re),e(Re,Ta),e(Ye,$a),e(F,ka),e(F,Be),e(Be,Ua),e(Be,Mt),e(Mt,Ca),e(Be,xa),e(F,Fa),e(F,Qe),e(Qe,ja),e(Qe,Xe),e(Xe,qa),e(Qe,Pa),e(F,Ea),e(F,E),S(Ze,E,null),e(E,Ma),e(E,Z),e(Z,Aa),e(Z,At),e(At,za),e(Z,Oa),e(Z,po),e(po,Da),e(Z,La),e(E,Wa),S(fe,E,null),e(E,Na),S(ge,E,null),_(t,Ro,m),_(t,G,m),e(G,_e),e(_e,ho),S(Ge,ho,null),e(G,Ia),e(G,uo),e(uo,Va),_(t,Bo,m),_(t,j,m),S(Je,j,null),e(j,Ha),e(j,J),e(J,Ka),e(J,mo),e(mo,Ya),e(J,Ra),e(J,et),e(et,Ba),e(J,Qa),e(j,Xa),e(j,tt),e(tt,Za),e(tt,zt),e(zt,Ga),e(tt,Ja),e(j,er),e(j,ot),e(ot,tr),e(ot,nt),e(nt,or),e(ot,nr),e(j,ar),e(j,M),S(at,M,null),e(M,rr),e(M,ee),e(ee,sr),e(ee,Ot),e(Ot,ir),e(ee,lr),e(ee,fo),e(fo,cr),e(ee,dr),e(M,pr),S(ve,M,null),e(M,hr),S(be,M,null),_(t,Qo,m),_(t,te,m),e(te,we),e(we,go),S(rt,go,null),e(te,ur),e(te,_o),e(_o,mr),_(t,Xo,m),_(t,x,m),S(st,x,null),e(x,fr),e(x,vo),e(vo,gr),e(x,_r),e(x,it),e(it,vr),e(it,lt),e(lt,br),e(it,wr),e(x,yr),e(x,ct),e(ct,Sr),e(ct,Dt),e(Dt,Tr),e(ct,$r),e(x,kr),e(x,dt),e(dt,Ur),e(dt,pt),e(pt,Cr),e(dt,xr),e(x,Fr),e(x,A),S(ht,A,null),e(A,jr),e(A,oe),e(oe,qr),e(oe,Lt),e(Lt,Pr),e(oe,Er),e(oe,bo),e(bo,Mr),e(oe,Ar),e(A,zr),S(ye,A,null),e(A,Or),S(Se,A,null),_(t,Zo,m),_(t,ne,m),e(ne,Te),e(Te,wo),S(ut,wo,null),e(ne,Dr),e(ne,yo),e(yo,Lr),_(t,Go,m),_(t,q,m),S(mt,q,null),e(q,Wr),e(q,ft),e(ft,Nr),e(ft,gt),e(gt,Ir),e(ft,Vr),e(q,Hr),e(q,_t),e(_t,Kr),e(_t,Wt),e(Wt,Yr),e(_t,Rr),e(q,Br),e(q,vt),e(vt,Qr),e(vt,bt),e(bt,Xr),e(vt,Zr),e(q,Gr),e(q,z),S(wt,z,null),e(z,Jr),e(z,ae),e(ae,es),e(ae,Nt),e(Nt,ts),e(ae,os),e(ae,So),e(So,ns),e(ae,as),e(z,rs),S($e,z,null),e(z,ss),S(ke,z,null),Jo=!0},p(t,[m]){const yt={};m&2&&(yt.$$scope={dirty:m,ctx:t}),he.$set(yt);const To={};m&2&&(To.$$scope={dirty:m,ctx:t}),fe.$set(To);const $o={};m&2&&($o.$$scope={dirty:m,ctx:t}),ge.$set($o);const ko={};m&2&&(ko.$$scope={dirty:m,ctx:t}),ve.$set(ko);const St={};m&2&&(St.$$scope={dirty:m,ctx:t}),be.$set(St);const Uo={};m&2&&(Uo.$$scope={dirty:m,ctx:t}),ye.$set(Uo);const Co={};m&2&&(Co.$$scope={dirty:m,ctx:t}),Se.$set(Co);const xo={};m&2&&(xo.$$scope={dirty:m,ctx:t}),$e.$set(xo);const Tt={};m&2&&(Tt.$$scope={dirty:m,ctx:t}),ke.$set(Tt)},i(t){Jo||(T(l.$$.fragment,t),T(qe.$$.fragment,t),T(Oe.$$.fragment,t),T(De.$$.fragment,t),T(Le.$$.fragment,t),T(he.$$.fragment,t),T(Ne.$$.fragment,t),T(Ie.$$.fragment,t),T(He.$$.fragment,t),T(Ke.$$.fragment,t),T(Ze.$$.fragment,t),T(fe.$$.fragment,t),T(ge.$$.fragment,t),T(Ge.$$.fragment,t),T(Je.$$.fragment,t),T(at.$$.fragment,t),T(ve.$$.fragment,t),T(be.$$.fragment,t),T(rt.$$.fragment,t),T(st.$$.fragment,t),T(ht.$$.fragment,t),T(ye.$$.fragment,t),T(Se.$$.fragment,t),T(ut.$$.fragment,t),T(mt.$$.fragment,t),T(wt.$$.fragment,t),T($e.$$.fragment,t),T(ke.$$.fragment,t),Jo=!0)},o(t){$(l.$$.fragment,t),$(qe.$$.fragment,t),$(Oe.$$.fragment,t),$(De.$$.fragment,t),$(Le.$$.fragment,t),$(he.$$.fragment,t),$(Ne.$$.fragment,t),$(Ie.$$.fragment,t),$(He.$$.fragment,t),$(Ke.$$.fragment,t),$(Ze.$$.fragment,t),$(fe.$$.fragment,t),$(ge.$$.fragment,t),$(Ge.$$.fragment,t),$(Je.$$.fragment,t),$(at.$$.fragment,t),$(ve.$$.fragment,t),$(be.$$.fragment,t),$(rt.$$.fragment,t),$(st.$$.fragment,t),$(ht.$$.fragment,t),$(ye.$$.fragment,t),$(Se.$$.fragment,t),$(ut.$$.fragment,t),$(mt.$$.fragment,t),$(wt.$$.fragment,t),$($e.$$.fragment,t),$(ke.$$.fragment,t),Jo=!1},d(t){o(d),t&&o(b),t&&o(g),k(l),t&&o(Po),t&&o(V),k(qe),t&&o(Eo),t&&o(ie),t&&o(Mo),t&&o($t),t&&o(Ao),t&&o(kt),t&&o(zo),t&&o(Ut),t&&o(Oo),t&&o(le),t&&o(Do),t&&o(D),t&&o(Lo),t&&o(H),k(Oe),t&&o(Wo),t&&o(de),t&&o(No),t&&o(K),k(De),t&&o(Io),t&&o(P),k(Le),k(he),t&&o(Vo),t&&o(B),k(Ne),t&&o(Ho),t&&o(Q),k(Ie),t&&o(Ko),t&&o(X),k(He),t&&o(Yo),t&&o(F),k(Ke),k(Ze),k(fe),k(ge),t&&o(Ro),t&&o(G),k(Ge),t&&o(Bo),t&&o(j),k(Je),k(at),k(ve),k(be),t&&o(Qo),t&&o(te),k(rt),t&&o(Xo),t&&o(x),k(st),k(ht),k(ye),k(Se),t&&o(Zo),t&&o(ne),k(ut),t&&o(Go),t&&o(q),k(mt),k(wt),k($e),k(ke)}}}const Fi={local:"unispeech",sections:[{local:"overview",title:"Overview"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.UniSpeechConfig",title:"UniSpeechConfig"},{local:"transformers.models.unispeech.modeling_unispeech.UniSpeechForPreTrainingOutput",title:"UniSpeech specific outputs"},{local:"transformers.UniSpeechModel",title:"UniSpeechModel"},{local:"transformers.UniSpeechForCTC",title:"UniSpeechForCTC"},{local:"transformers.UniSpeechForSequenceClassification",title:"UniSpeechForSequenceClassification"},{local:"transformers.UniSpeechForPreTraining",title:"UniSpeechForPreTraining"}],title:"UniSpeech"};function ji(U){return vi(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Oi extends mi{constructor(d){super();fi(this,d,ji,xi,gi,{})}}export{Oi as default,Fi as metadata};
