import{S as xc,i as qc,s as Ec,e as n,k as p,w,t as r,M as Ac,c as s,d as t,m as f,a as i,x as C,h as a,b as d,G as e,g as _,y,q as k,o as T,B as $,v as Pc,L as lt}from"../../chunks/vendor-hf-doc-builder.js";import{T as Dt}from"../../chunks/Tip-hf-doc-builder.js";import{D as P}from"../../chunks/Docstring-hf-doc-builder.js";import{C as ct}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as G}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as it}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Mc(V){let c,b,u,h,v;return h=new ct({props:{code:`from transformers import Wav2Vec2ConformerConfig, Wav2Vec2ConformerModel

# Initializing a Wav2Vec2Conformer facebook/wav2vec2-conformer-rel-pos-large style configuration
configuration = Wav2Vec2ConformerConfig()

# Initializing a model (with random weights) from the facebook/wav2vec2-conformer-rel-pos-large style configuration
model = Wav2Vec2ConformerModel(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> Wav2Vec2ConformerConfig, Wav2Vec2ConformerModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a Wav2Vec2Conformer facebook/wav2vec2-conformer-rel-pos-large style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = Wav2Vec2ConformerConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the facebook/wav2vec2-conformer-rel-pos-large style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Wav2Vec2ConformerModel(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(){c=n("p"),b=r("Example:"),u=p(),w(h.$$.fragment)},l(l){c=s(l,"P",{});var m=i(c);b=a(m,"Example:"),m.forEach(t),u=f(l),C(h.$$.fragment,l)},m(l,m){_(l,c,m),e(c,b),_(l,u,m),y(h,l,m),v=!0},p:lt,i(l){v||(k(h.$$.fragment,l),v=!0)},o(l){T(h.$$.fragment,l),v=!1},d(l){l&&t(c),l&&t(u),$(h,l)}}}function zc(V){let c,b,u,h,v;return{c(){c=n("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n("code"),h=r("Module"),v=r(`
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){c=s(l,"P",{});var m=i(c);b=a(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(m,"CODE",{});var W=i(u);h=a(W,"Module"),W.forEach(t),v=a(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){_(l,c,m),e(c,b),e(c,u),e(u,h),e(c,v)},d(l){l&&t(c)}}}function Sc(V){let c,b,u,h,v;return h=new ct({props:{code:`from transformers import AutoProcessor, Wav2Vec2ConformerModel
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("facebook/wav2vec2-conformer-rope-large-960h-ft")
model = Wav2Vec2ConformerModel.from_pretrained("facebook/wav2vec2-conformer-rope-large-960h-ft")

# 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, Wav2Vec2ConformerModel
<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;facebook/wav2vec2-conformer-rope-large-960h-ft&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Wav2Vec2ConformerModel.from_pretrained(<span class="hljs-string">&quot;facebook/wav2vec2-conformer-rope-large-960h-ft&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(){c=n("p"),b=r("Example:"),u=p(),w(h.$$.fragment)},l(l){c=s(l,"P",{});var m=i(c);b=a(m,"Example:"),m.forEach(t),u=f(l),C(h.$$.fragment,l)},m(l,m){_(l,c,m),e(c,b),_(l,u,m),y(h,l,m),v=!0},p:lt,i(l){v||(k(h.$$.fragment,l),v=!0)},o(l){T(h.$$.fragment,l),v=!1},d(l){l&&t(c),l&&t(u),$(h,l)}}}function Oc(V){let c,b,u,h,v;return{c(){c=n("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n("code"),h=r("Module"),v=r(`
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){c=s(l,"P",{});var m=i(c);b=a(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(m,"CODE",{});var W=i(u);h=a(W,"Module"),W.forEach(t),v=a(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){_(l,c,m),e(c,b),e(c,u),e(u,h),e(c,v)},d(l){l&&t(c)}}}function Dc(V){let c,b,u,h,v;return h=new ct({props:{code:`from transformers import AutoProcessor, Wav2Vec2ConformerForCTC
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("facebook/wav2vec2-conformer-rope-large-960h-ft")
model = Wav2Vec2ConformerForCTC.from_pretrained("facebook/wav2vec2-conformer-rope-large-960h-ft")

# 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, Wav2Vec2ConformerForCTC
<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;facebook/wav2vec2-conformer-rope-large-960h-ft&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Wav2Vec2ConformerForCTC.from_pretrained(<span class="hljs-string">&quot;facebook/wav2vec2-conformer-rope-large-960h-ft&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 APOSTLE OF THE MIDDLE CLASSES AND WE ARE GLAD TO WELCOME HIS GOSPEL&#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">64.21</span>`}}),{c(){c=n("p"),b=r("Example:"),u=p(),w(h.$$.fragment)},l(l){c=s(l,"P",{});var m=i(c);b=a(m,"Example:"),m.forEach(t),u=f(l),C(h.$$.fragment,l)},m(l,m){_(l,c,m),e(c,b),_(l,u,m),y(h,l,m),v=!0},p:lt,i(l){v||(k(h.$$.fragment,l),v=!0)},o(l){T(h.$$.fragment,l),v=!1},d(l){l&&t(c),l&&t(u),$(h,l)}}}function Lc(V){let c,b,u,h,v;return{c(){c=n("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n("code"),h=r("Module"),v=r(`
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){c=s(l,"P",{});var m=i(c);b=a(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(m,"CODE",{});var W=i(u);h=a(W,"Module"),W.forEach(t),v=a(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){_(l,c,m),e(c,b),e(c,u),e(u,h),e(c,v)},d(l){l&&t(c)}}}function Nc(V){let c,b,u,h,v;return h=new ct({props:{code:`from transformers import AutoFeatureExtractor, Wav2Vec2ConformerForSequenceClassification
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("facebook/wav2vec2-conformer-rope-large-960h-ft")
model = Wav2Vec2ConformerForSequenceClassification.from_pretrained("facebook/wav2vec2-conformer-rope-large-960h-ft")

# 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, Wav2Vec2ConformerForSequenceClassification
<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;facebook/wav2vec2-conformer-rope-large-960h-ft&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Wav2Vec2ConformerForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;facebook/wav2vec2-conformer-rope-large-960h-ft&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(){c=n("p"),b=r("Example:"),u=p(),w(h.$$.fragment)},l(l){c=s(l,"P",{});var m=i(c);b=a(m,"Example:"),m.forEach(t),u=f(l),C(h.$$.fragment,l)},m(l,m){_(l,c,m),e(c,b),_(l,u,m),y(h,l,m),v=!0},p:lt,i(l){v||(k(h.$$.fragment,l),v=!0)},o(l){T(h.$$.fragment,l),v=!1},d(l){l&&t(c),l&&t(u),$(h,l)}}}function Ic(V){let c,b,u,h,v;return{c(){c=n("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n("code"),h=r("Module"),v=r(`
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){c=s(l,"P",{});var m=i(c);b=a(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(m,"CODE",{});var W=i(u);h=a(W,"Module"),W.forEach(t),v=a(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){_(l,c,m),e(c,b),e(c,u),e(u,h),e(c,v)},d(l){l&&t(c)}}}function Xc(V){let c,b,u,h,v;return h=new ct({props:{code:`from transformers import AutoFeatureExtractor, Wav2Vec2ConformerForAudioFrameClassification
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("facebook/wav2vec2-conformer-rope-large-960h-ft")
model = Wav2Vec2ConformerForAudioFrameClassification.from_pretrained("facebook/wav2vec2-conformer-rope-large-960h-ft")

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

probabilities = torch.sigmoid(logits[0])
# labels is a one-hot array of shape (num_frames, num_speakers)
labels = (probabilities > 0.5).long()`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor, Wav2Vec2ConformerForAudioFrameClassification
<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;facebook/wav2vec2-conformer-rope-large-960h-ft&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Wav2Vec2ConformerForAudioFrameClassification.from_pretrained(<span class="hljs-string">&quot;facebook/wav2vec2-conformer-rope-large-960h-ft&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>], return_tensors=<span class="hljs-string">&quot;pt&quot;</span>, sampling_rate=sampling_rate)
<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>probabilities = torch.sigmoid(logits[<span class="hljs-number">0</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># labels is a one-hot array of shape (num_frames, num_speakers)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = (probabilities &gt; <span class="hljs-number">0.5</span>).long()`}}),{c(){c=n("p"),b=r("Example:"),u=p(),w(h.$$.fragment)},l(l){c=s(l,"P",{});var m=i(c);b=a(m,"Example:"),m.forEach(t),u=f(l),C(h.$$.fragment,l)},m(l,m){_(l,c,m),e(c,b),_(l,u,m),y(h,l,m),v=!0},p:lt,i(l){v||(k(h.$$.fragment,l),v=!0)},o(l){T(h.$$.fragment,l),v=!1},d(l){l&&t(c),l&&t(u),$(h,l)}}}function Hc(V){let c,b,u,h,v;return{c(){c=n("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n("code"),h=r("Module"),v=r(`
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){c=s(l,"P",{});var m=i(c);b=a(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(m,"CODE",{});var W=i(u);h=a(W,"Module"),W.forEach(t),v=a(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){_(l,c,m),e(c,b),e(c,u),e(u,h),e(c,v)},d(l){l&&t(c)}}}function Bc(V){let c,b,u,h,v;return h=new ct({props:{code:`from transformers import AutoFeatureExtractor, Wav2Vec2ConformerForXVector
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("facebook/wav2vec2-conformer-rope-large-960h-ft")
model = Wav2Vec2ConformerForXVector.from_pretrained("facebook/wav2vec2-conformer-rope-large-960h-ft")

# audio file is decoded on the fly
inputs = feature_extractor(
    [d["array"] for d in dataset[:2]["audio"]], sampling_rate=sampling_rate, return_tensors="pt", padding=True
)
with torch.no_grad():
    embeddings = model(**inputs).embeddings

embeddings = torch.nn.functional.normalize(embeddings, dim=-1).cpu()

# the resulting embeddings can be used for cosine similarity-based retrieval
cosine_sim = torch.nn.CosineSimilarity(dim=-1)
similarity = cosine_sim(embeddings[0], embeddings[1])
threshold = 0.7  # the optimal threshold is dataset-dependent
if similarity < threshold:
    print("Speakers are not the same!")`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor, Wav2Vec2ConformerForXVector
<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;facebook/wav2vec2-conformer-rope-large-960h-ft&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Wav2Vec2ConformerForXVector.from_pretrained(<span class="hljs-string">&quot;facebook/wav2vec2-conformer-rope-large-960h-ft&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(
<span class="hljs-meta">... </span>    [d[<span class="hljs-string">&quot;array&quot;</span>] <span class="hljs-keyword">for</span> d <span class="hljs-keyword">in</span> dataset[:<span class="hljs-number">2</span>][<span class="hljs-string">&quot;audio&quot;</span>]], sampling_rate=sampling_rate, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>, padding=<span class="hljs-literal">True</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    embeddings = model(**inputs).embeddings

<span class="hljs-meta">&gt;&gt;&gt; </span>embeddings = torch.nn.functional.normalize(embeddings, dim=-<span class="hljs-number">1</span>).cpu()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># the resulting embeddings can be used for cosine similarity-based retrieval</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>cosine_sim = torch.nn.CosineSimilarity(dim=-<span class="hljs-number">1</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>similarity = cosine_sim(embeddings[<span class="hljs-number">0</span>], embeddings[<span class="hljs-number">1</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>threshold = <span class="hljs-number">0.7</span>  <span class="hljs-comment"># the optimal threshold is dataset-dependent</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">if</span> similarity &lt; threshold:
<span class="hljs-meta">... </span>    <span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Speakers are not the same!&quot;</span>)`}}),{c(){c=n("p"),b=r("Example:"),u=p(),w(h.$$.fragment)},l(l){c=s(l,"P",{});var m=i(c);b=a(m,"Example:"),m.forEach(t),u=f(l),C(h.$$.fragment,l)},m(l,m){_(l,c,m),e(c,b),_(l,u,m),y(h,l,m),v=!0},p:lt,i(l){v||(k(h.$$.fragment,l),v=!0)},o(l){T(h.$$.fragment,l),v=!1},d(l){l&&t(c),l&&t(u),$(h,l)}}}function Rc(V){let c,b,u,h,v;return{c(){c=n("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n("code"),h=r("Module"),v=r(`
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){c=s(l,"P",{});var m=i(c);b=a(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(m,"CODE",{});var W=i(u);h=a(W,"Module"),W.forEach(t),v=a(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){_(l,c,m),e(c,b),e(c,u),e(u,h),e(c,v)},d(l){l&&t(c)}}}function Uc(V){let c,b,u,h,v;return h=new ct({props:{code:`import torch
from transformers import AutoFeatureExtractor, Wav2Vec2ConformerForPreTraining
from transformers.models.wav2vec2_conformer.modeling_wav2vec2_conformer import (
    _compute_mask_indices,
    _sample_negative_indices,
)
from datasets import load_dataset

feature_extractor = AutoFeatureExtractor.from_pretrained("facebook/wav2vec2-conformer-rel-pos-large")
model = Wav2Vec2ConformerForPreTraining.from_pretrained("facebook/wav2vec2-conformer-rel-pos-large")

ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
input_values = feature_extractor(ds[0]["audio"]["array"], return_tensors="pt").input_values  # Batch size 1

# compute masked indices
batch_size, raw_sequence_length = input_values.shape
sequence_length = model._get_feat_extract_output_lengths(raw_sequence_length).item()
mask_time_indices = _compute_mask_indices(
    shape=(batch_size, sequence_length), mask_prob=0.2, mask_length=2
)
sampled_negative_indices = _sample_negative_indices(
    features_shape=(batch_size, sequence_length),
    num_negatives=model.config.num_negatives,
    mask_time_indices=mask_time_indices,
)
mask_time_indices = torch.tensor(data=mask_time_indices, device=input_values.device, dtype=torch.long)
sampled_negative_indices = torch.tensor(
    data=sampled_negative_indices, device=input_values.device, dtype=torch.long
)

with torch.no_grad():
    outputs = model(input_values, mask_time_indices=mask_time_indices)

# compute cosine similarity between predicted (=projected_states) and target (=projected_quantized_states)
cosine_sim = torch.cosine_similarity(outputs.projected_states, outputs.projected_quantized_states, dim=-1)

# show that cosine similarity is much higher than random
cosine_sim[mask_time_indices.to(torch.bool)].mean() > 0.5

# for contrastive loss training model should be put into train mode
model = model.train()
loss = model(
    input_values, mask_time_indices=mask_time_indices, sampled_negative_indices=sampled_negative_indices
).loss`,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, Wav2Vec2ConformerForPreTraining
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers.models.wav2vec2_conformer.modeling_wav2vec2_conformer <span class="hljs-keyword">import</span> (
<span class="hljs-meta">... </span>    _compute_mask_indices,
<span class="hljs-meta">... </span>    _sample_negative_indices,
<span class="hljs-meta">... </span>)
<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>feature_extractor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;facebook/wav2vec2-conformer-rel-pos-large&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Wav2Vec2ConformerForPreTraining.from_pretrained(<span class="hljs-string">&quot;facebook/wav2vec2-conformer-rel-pos-large&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;hf-internal-testing/librispeech_asr_dummy&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>input_values = feature_extractor(ds[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>], return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).input_values  <span class="hljs-comment"># Batch size 1</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># compute masked indices</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>batch_size, raw_sequence_length = input_values.shape
<span class="hljs-meta">&gt;&gt;&gt; </span>sequence_length = model._get_feat_extract_output_lengths(raw_sequence_length).item()
<span class="hljs-meta">&gt;&gt;&gt; </span>mask_time_indices = _compute_mask_indices(
<span class="hljs-meta">... </span>    shape=(batch_size, sequence_length), mask_prob=<span class="hljs-number">0.2</span>, mask_length=<span class="hljs-number">2</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>sampled_negative_indices = _sample_negative_indices(
<span class="hljs-meta">... </span>    features_shape=(batch_size, sequence_length),
<span class="hljs-meta">... </span>    num_negatives=model.config.num_negatives,
<span class="hljs-meta">... </span>    mask_time_indices=mask_time_indices,
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>mask_time_indices = torch.tensor(data=mask_time_indices, device=input_values.device, dtype=torch.long)
<span class="hljs-meta">&gt;&gt;&gt; </span>sampled_negative_indices = torch.tensor(
<span class="hljs-meta">... </span>    data=sampled_negative_indices, device=input_values.device, dtype=torch.long
<span class="hljs-meta">... </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(input_values, mask_time_indices=mask_time_indices)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># compute cosine similarity between predicted (=projected_states) and target (=projected_quantized_states)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>cosine_sim = torch.cosine_similarity(outputs.projected_states, outputs.projected_quantized_states, dim=-<span class="hljs-number">1</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># show that cosine similarity is much higher than random</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>cosine_sim[mask_time_indices.to(torch.<span class="hljs-built_in">bool</span>)].mean() &gt; <span class="hljs-number">0.5</span>
tensor(<span class="hljs-literal">True</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># for contrastive loss training model should be put into train mode</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = model.train()
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(
<span class="hljs-meta">... </span>    input_values, mask_time_indices=mask_time_indices, sampled_negative_indices=sampled_negative_indices
<span class="hljs-meta">... </span>).loss`}}),{c(){c=n("p"),b=r("Example:"),u=p(),w(h.$$.fragment)},l(l){c=s(l,"P",{});var m=i(c);b=a(m,"Example:"),m.forEach(t),u=f(l),C(h.$$.fragment,l)},m(l,m){_(l,c,m),e(c,b),_(l,u,m),y(h,l,m),v=!0},p:lt,i(l){v||(k(h.$$.fragment,l),v=!0)},o(l){T(h.$$.fragment,l),v=!1},d(l){l&&t(c),l&&t(u),$(h,l)}}}function Zc(V){let c,b,u,h,v,l,m,W,Va,Fr,J,ve,Lt,Ge,Wa,Nt,ja,xr,be,Fa,Je,xa,qa,qr,dt,Ea,Er,we,Aa,Ye,Pa,Ma,Ar,mt,za,Pr,z,R,Sa,It,Oa,Da,Xt,La,Na,eo,Ia,Xa,Ha,Ht,Ba,Ra,Bt,Ua,Za,oo,Qa,Rt,Ka,Ga,Mr,U,Ja,to,Ya,en,ro,on,tn,zr,Y,Ce,Ut,ao,rn,Zt,an,Sr,M,no,nn,ee,sn,pt,ln,cn,so,dn,mn,pn,oe,fn,ft,hn,un,ht,gn,_n,vn,ye,Or,te,ke,Qt,io,bn,Kt,wn,Dr,re,lo,Cn,co,yn,ut,kn,Tn,Lr,ae,Te,Gt,mo,$n,Jt,Vn,Nr,q,po,Wn,fo,jn,ho,Fn,xn,qn,uo,En,gt,An,Pn,Mn,go,zn,_o,Sn,On,Dn,S,vo,Ln,ne,Nn,_t,In,Xn,Yt,Hn,Bn,Rn,$e,Un,Ve,Ir,se,We,er,bo,Zn,or,Qn,Xr,E,wo,Kn,ie,Gn,tr,Jn,Yn,Co,es,os,ts,yo,rs,vt,as,ns,ss,ko,is,To,ls,cs,ds,O,$o,ms,le,ps,bt,fs,hs,rr,us,gs,_s,je,vs,Fe,Hr,ce,xe,ar,Vo,bs,nr,ws,Br,j,Wo,Cs,sr,ys,ks,jo,Ts,Fo,$s,Vs,Ws,xo,js,wt,Fs,xs,qs,qo,Es,Eo,As,Ps,Ms,D,Ao,zs,de,Ss,Ct,Os,Ds,ir,Ls,Ns,Is,qe,Xs,Ee,Rr,me,Ae,lr,Po,Hs,cr,Bs,Ur,F,Mo,Rs,dr,Us,Zs,zo,Qs,So,Ks,Gs,Js,Oo,Ys,yt,ei,oi,ti,Do,ri,Lo,ai,ni,si,L,No,ii,pe,li,kt,ci,di,mr,mi,pi,fi,Pe,hi,Me,Zr,fe,ze,pr,Io,ui,fr,gi,Qr,x,Xo,_i,hr,vi,bi,Ho,wi,Bo,Ci,yi,ki,Ro,Ti,Tt,$i,Vi,Wi,Uo,ji,Zo,Fi,xi,qi,N,Qo,Ei,he,Ai,$t,Pi,Mi,ur,zi,Si,Oi,Se,Di,Oe,Kr,ue,De,gr,Ko,Li,_r,Ni,Gr,A,Go,Ii,ge,Xi,vr,Hi,Bi,Jo,Ri,Ui,Zi,Yo,Qi,Vt,Ki,Gi,Ji,et,Yi,ot,el,ol,tl,I,tt,rl,_e,al,Wt,nl,sl,br,il,ll,cl,Le,dl,Ne,Jr;return l=new G({}),Ge=new G({}),ao=new G({}),no=new P({props:{name:"class transformers.Wav2Vec2ConformerConfig",anchor:"transformers.Wav2Vec2ConformerConfig",parameters:[{name:"vocab_size",val:" = None"},{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:"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:" = 'sum'"},{name:"ctc_zero_infinity",val:" = False"},{name:"use_weighted_layer_sum",val:" = False"},{name:"classifier_proj_size",val:" = 256"},{name:"tdnn_dim",val:" = (512, 512, 512, 512, 1500)"},{name:"tdnn_kernel",val:" = (5, 3, 3, 1, 1)"},{name:"tdnn_dilation",val:" = (1, 2, 3, 1, 1)"},{name:"xvector_output_dim",val:" = 512"},{name:"pad_token_id",val:" = 0"},{name:"bos_token_id",val:" = 1"},{name:"eos_token_id",val:" = 2"},{name:"add_adapter",val:" = False"},{name:"adapter_kernel_size",val:" = 3"},{name:"adapter_stride",val:" = 2"},{name:"num_adapter_layers",val:" = 3"},{name:"output_hidden_size",val:" = None"},{name:"position_embeddings_type",val:" = 'relative'"},{name:"rotary_embedding_base",val:" = 10000"},{name:"max_source_positions",val:" = 5000"},{name:"conv_depthwise_kernel_size",val:" = 31"},{name:"conformer_conv_dropout",val:" = 0.1"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Wav2Vec2ConformerConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Vocabulary size of the Wav2Vec2Conformer model. Defines the number of different tokens that can be
represented by the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerModel">Wav2Vec2ConformerModel</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/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerModel">Wav2Vec2ConformerModel</a>.`,name:"vocab_size"},{anchor:"transformers.Wav2Vec2ConformerConfig.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.Wav2Vec2ConformerConfig.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.Wav2Vec2ConformerConfig.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.Wav2Vec2ConformerConfig.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.Wav2Vec2ConformerConfig.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.Wav2Vec2ConformerConfig.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.Wav2Vec2ConformerConfig.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.Wav2Vec2ConformerConfig.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/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerForCTC">Wav2Vec2ConformerForCTC</a>.`,name:"final_dropout"},{anchor:"transformers.Wav2Vec2ConformerConfig.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.Wav2Vec2ConformerConfig.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.Wav2Vec2ConformerConfig.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.Wav2Vec2ConformerConfig.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.Wav2Vec2ConformerConfig.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.Wav2Vec2ConformerConfig.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.Wav2Vec2ConformerConfig.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.Wav2Vec2ConformerConfig.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.Wav2Vec2ConformerConfig.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.Wav2Vec2ConformerConfig.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.Wav2Vec2ConformerConfig.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.Wav2Vec2ConformerConfig.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.Wav2Vec2ConformerConfig.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.Wav2Vec2ConformerConfig.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.Wav2Vec2ConformerConfig.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.Wav2Vec2ConformerConfig.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.Wav2Vec2ConformerConfig.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.Wav2Vec2ConformerConfig.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.Wav2Vec2ConformerConfig.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.Wav2Vec2ConformerConfig.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.Wav2Vec2ConformerConfig.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.Wav2Vec2ConformerConfig.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.Wav2Vec2ConformerConfig.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.Wav2Vec2ConformerConfig.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.Wav2Vec2ConformerConfig.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.Wav2Vec2ConformerConfig.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.Wav2Vec2ConformerConfig.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.Wav2Vec2ConformerConfig.ctc_loss_reduction",description:`<strong>ctc_loss_reduction</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;sum&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/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerForCTC">Wav2Vec2ConformerForCTC</a>.`,name:"ctc_loss_reduction"},{anchor:"transformers.Wav2Vec2ConformerConfig.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/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerForCTC">Wav2Vec2ConformerForCTC</a>.`,name:"ctc_zero_infinity"},{anchor:"transformers.Wav2Vec2ConformerConfig.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/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerForSequenceClassification">Wav2Vec2ConformerForSequenceClassification</a>.`,name:"use_weighted_layer_sum"},{anchor:"transformers.Wav2Vec2ConformerConfig.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.Wav2Vec2ConformerConfig.tdnn_dim",description:`<strong>tdnn_dim</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>(512, 512, 512, 512, 1500)</code>) &#x2014;
A tuple of integers defining the number of output channels of each 1D convolutional layer in the <em>TDNN</em>
module of the <em>XVector</em> model. The length of <em>tdnn_dim</em> defines the number of <em>TDNN</em> layers.`,name:"tdnn_dim"},{anchor:"transformers.Wav2Vec2ConformerConfig.tdnn_kernel",description:`<strong>tdnn_kernel</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>(5, 3, 3, 1, 1)</code>) &#x2014;
A tuple of integers defining the kernel size of each 1D convolutional layer in the <em>TDNN</em> module of the
<em>XVector</em> model. The length of <em>tdnn_kernel</em> has to match the length of <em>tdnn_dim</em>.`,name:"tdnn_kernel"},{anchor:"transformers.Wav2Vec2ConformerConfig.tdnn_dilation",description:`<strong>tdnn_dilation</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>(1, 2, 3, 1, 1)</code>) &#x2014;
A tuple of integers defining the dilation factor of each 1D convolutional layer in <em>TDNN</em> module of the
<em>XVector</em> model. The length of <em>tdnn_dilation</em> has to match the length of <em>tdnn_dim</em>.`,name:"tdnn_dilation"},{anchor:"transformers.Wav2Vec2ConformerConfig.xvector_output_dim",description:`<strong>xvector_output_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Dimensionality of the <em>XVector</em> embedding vectors.`,name:"xvector_output_dim"},{anchor:"transformers.Wav2Vec2ConformerConfig.add_adapter",description:`<strong>add_adapter</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether a convolutional network should be stacked on top of the Wav2Vec2Conformer Encoder. Can be very
useful for warm-starting Wav2Vec2Conformer for SpeechEncoderDecoder models.`,name:"add_adapter"},{anchor:"transformers.Wav2Vec2ConformerConfig.adapter_kernel_size",description:`<strong>adapter_kernel_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
Kernel size of the convolutional layers in the adapter network. Only relevant if <code>add_adapter is True</code>.`,name:"adapter_kernel_size"},{anchor:"transformers.Wav2Vec2ConformerConfig.adapter_stride",description:`<strong>adapter_stride</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
Stride of the convolutional layers in the adapter network. Only relevant if <code>add_adapter is True</code>.`,name:"adapter_stride"},{anchor:"transformers.Wav2Vec2ConformerConfig.num_adapter_layers",description:`<strong>num_adapter_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
Number of convolutional layers that should be used in the adapter network. Only relevant if <code>add_adapter is True</code>.`,name:"num_adapter_layers"},{anchor:"transformers.Wav2Vec2ConformerConfig.output_hidden_size",description:`<strong>output_hidden_size</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Dimensionality of the encoder output layer. If not defined, this defaults to <em>hidden-size</em>. Only relevant
if <code>add_adapter is True</code>.`,name:"output_hidden_size"},{anchor:"transformers.Wav2Vec2ConformerConfig.position_embeddings_type",description:`<strong>position_embeddings_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;relative&quot;</code>) &#x2014;
Can be specified to <code>relative</code> or <code>rotary</code> for relative or rotary position embeddings respectively. If left
<code>None</code> no relative position embedding is applied.`,name:"position_embeddings_type"},{anchor:"transformers.Wav2Vec2ConformerConfig.rotary_embedding_base",description:`<strong>rotary_embedding_base</strong> (<code>int</code>, <em>optional</em>, defaults to 10000) &#x2014;
If <code>&quot;rotary&quot;</code> position embeddings are used, defines the size of the embedding base.`,name:"rotary_embedding_base"},{anchor:"transformers.Wav2Vec2ConformerConfig.max_source_positions",description:`<strong>max_source_positions</strong> (<code>int</code>, <em>optional</em>, defaults to 5000) &#x2014;
if <code>&quot;relative&quot;</code> position embeddings are used, defines the maximum source input positions.`,name:"max_source_positions"},{anchor:"transformers.Wav2Vec2ConformerConfig.conv_depthwise_kernel_size",description:`<strong>conv_depthwise_kernel_size</strong> (<code>int</code>, defaults to 31) &#x2014;
Kernel size of convolutional depthwise 1D layer in Conformer blocks.`,name:"conv_depthwise_kernel_size"},{anchor:"transformers.Wav2Vec2ConformerConfig.conformer_conv_dropout",description:`<strong>conformer_conv_dropout</strong> (<code>float</code>, defaults to 0.1) &#x2014;
The dropout probability for all convolutional layers in Conformer blocks.`,name:"conformer_conv_dropout"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/wav2vec2_conformer/configuration_wav2vec2_conformer.py#L33"}}),ye=new it({props:{anchor:"transformers.Wav2Vec2ConformerConfig.example",$$slots:{default:[Mc]},$$scope:{ctx:V}}}),io=new G({}),lo=new P({props:{name:"class transformers.models.wav2vec2_conformer.modeling_wav2vec2_conformer.Wav2Vec2ConformerForPreTrainingOutput",anchor:"transformers.models.wav2vec2_conformer.modeling_wav2vec2_conformer.Wav2Vec2ConformerForPreTrainingOutput",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"},{name:"contrastive_loss",val:": typing.Optional[torch.FloatTensor] = None"},{name:"diversity_loss",val:": typing.Optional[torch.FloatTensor] = None"}],parametersDescription:[{anchor:"transformers.models.wav2vec2_conformer.modeling_wav2vec2_conformer.Wav2Vec2ConformerForPreTrainingOutput.loss",description:`<strong>loss</strong> (<em>optional</em>, returned when <code>sample_negative_indices</code> are passed, <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.wav2vec2_conformer.modeling_wav2vec2_conformer.Wav2Vec2ConformerForPreTrainingOutput.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.wav2vec2_conformer.modeling_wav2vec2_conformer.Wav2Vec2ConformerForPreTrainingOutput.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.wav2vec2_conformer.modeling_wav2vec2_conformer.Wav2Vec2ConformerForPreTrainingOutput.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.wav2vec2_conformer.modeling_wav2vec2_conformer.Wav2Vec2ConformerForPreTrainingOutput.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"},{anchor:"transformers.models.wav2vec2_conformer.modeling_wav2vec2_conformer.Wav2Vec2ConformerForPreTrainingOutput.contrastive_loss",description:`<strong>contrastive_loss</strong> (<em>optional</em>, returned when <code>sample_negative_indices</code> are passed, <code>torch.FloatTensor</code> of shape <code>(1,)</code>) &#x2014;
The contrastive loss (L_m) as stated in the <a href="https://arxiv.org/pdf/2006.11477.pdf" rel="nofollow">official paper</a> .`,name:"contrastive_loss"},{anchor:"transformers.models.wav2vec2_conformer.modeling_wav2vec2_conformer.Wav2Vec2ConformerForPreTrainingOutput.diversity_loss",description:`<strong>diversity_loss</strong> (<em>optional</em>, returned when <code>sample_negative_indices</code> are passed, <code>torch.FloatTensor</code> of shape <code>(1,)</code>) &#x2014;
The diversity loss (L_d) as stated in the <a href="https://arxiv.org/pdf/2006.11477.pdf" rel="nofollow">official paper</a> .`,name:"diversity_loss"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/wav2vec2_conformer/modeling_wav2vec2_conformer.py#L75"}}),mo=new G({}),po=new P({props:{name:"class transformers.Wav2Vec2ConformerModel",anchor:"transformers.Wav2Vec2ConformerModel",parameters:[{name:"config",val:": Wav2Vec2ConformerConfig"}],parametersDescription:[{anchor:"transformers.Wav2Vec2ConformerModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerConfig">Wav2Vec2ConformerConfig</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/main/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/main/src/transformers/models/wav2vec2_conformer/modeling_wav2vec2_conformer.py#L1237"}}),vo=new P({props:{name:"forward",anchor:"transformers.Wav2Vec2ConformerModel.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.Wav2Vec2ConformerModel.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/main/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/main/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor.__call__">Wav2Vec2Processor.<strong>call</strong>()</a> for details.`,name:"input_values"},{anchor:"transformers.Wav2Vec2ConformerModel.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>, such as
<a href="https://huggingface.co/facebook/wav2vec2-conformer-rel-pos-large" rel="nofollow">wav2vec2-conformer-rel-pos-large</a>,
<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.Wav2Vec2ConformerModel.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.Wav2Vec2ConformerModel.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.Wav2Vec2ConformerModel.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/wav2vec2_conformer/modeling_wav2vec2_conformer.py#L1310",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/model_doc/wav2vec2#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/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerConfig"
>Wav2Vec2ConformerConfig</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/main/en/model_doc/wav2vec2#transformers.modeling_outputs.Wav2Vec2BaseModelOutput"
>transformers.modeling_outputs.Wav2Vec2BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),$e=new Dt({props:{$$slots:{default:[zc]},$$scope:{ctx:V}}}),Ve=new it({props:{anchor:"transformers.Wav2Vec2ConformerModel.forward.example",$$slots:{default:[Sc]},$$scope:{ctx:V}}}),bo=new G({}),wo=new P({props:{name:"class transformers.Wav2Vec2ConformerForCTC",anchor:"transformers.Wav2Vec2ConformerForCTC",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.Wav2Vec2ConformerForCTC.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerConfig">Wav2Vec2ConformerConfig</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/main/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/main/src/transformers/models/wav2vec2_conformer/modeling_wav2vec2_conformer.py#L1597"}}),$o=new P({props:{name:"forward",anchor:"transformers.Wav2Vec2ConformerForCTC.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.Wav2Vec2ConformerForCTC.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/main/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/main/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor.__call__">Wav2Vec2Processor.<strong>call</strong>()</a> for details.`,name:"input_values"},{anchor:"transformers.Wav2Vec2ConformerForCTC.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>, such as
<a href="https://huggingface.co/facebook/wav2vec2-conformer-rel-pos-large" rel="nofollow">wav2vec2-conformer-rel-pos-large</a>,
<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.Wav2Vec2ConformerForCTC.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.Wav2Vec2ConformerForCTC.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.Wav2Vec2ConformerForCTC.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.Wav2Vec2ConformerForCTC.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/main/src/transformers/models/wav2vec2_conformer/modeling_wav2vec2_conformer.py#L1628",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerConfig"
>Wav2Vec2ConformerConfig</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/main/en/main_classes/output#transformers.modeling_outputs.CausalLMOutput"
>transformers.modeling_outputs.CausalLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),je=new Dt({props:{$$slots:{default:[Oc]},$$scope:{ctx:V}}}),Fe=new it({props:{anchor:"transformers.Wav2Vec2ConformerForCTC.forward.example",$$slots:{default:[Dc]},$$scope:{ctx:V}}}),Vo=new G({}),Wo=new P({props:{name:"class transformers.Wav2Vec2ConformerForSequenceClassification",anchor:"transformers.Wav2Vec2ConformerForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.Wav2Vec2ConformerForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerConfig">Wav2Vec2ConformerConfig</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/main/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/main/src/transformers/models/wav2vec2_conformer/modeling_wav2vec2_conformer.py#L1717"}}),Ao=new P({props:{name:"forward",anchor:"transformers.Wav2Vec2ConformerForSequenceClassification.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.Wav2Vec2ConformerForSequenceClassification.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/main/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/main/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor.__call__">Wav2Vec2Processor.<strong>call</strong>()</a> for details.`,name:"input_values"},{anchor:"transformers.Wav2Vec2ConformerForSequenceClassification.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>, such as
<a href="https://huggingface.co/facebook/wav2vec2-conformer-rel-pos-large" rel="nofollow">wav2vec2-conformer-rel-pos-large</a>,
<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.Wav2Vec2ConformerForSequenceClassification.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.Wav2Vec2ConformerForSequenceClassification.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.Wav2Vec2ConformerForSequenceClassification.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.Wav2Vec2ConformerForSequenceClassification.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/main/src/transformers/models/wav2vec2_conformer/modeling_wav2vec2_conformer.py#L1753",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerConfig"
>Wav2Vec2ConformerConfig</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/main/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),qe=new Dt({props:{$$slots:{default:[Lc]},$$scope:{ctx:V}}}),Ee=new it({props:{anchor:"transformers.Wav2Vec2ConformerForSequenceClassification.forward.example",$$slots:{default:[Nc]},$$scope:{ctx:V}}}),Po=new G({}),Mo=new P({props:{name:"class transformers.Wav2Vec2ConformerForAudioFrameClassification",anchor:"transformers.Wav2Vec2ConformerForAudioFrameClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.Wav2Vec2ConformerForAudioFrameClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerConfig">Wav2Vec2ConformerConfig</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/main/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/main/src/transformers/models/wav2vec2_conformer/modeling_wav2vec2_conformer.py#L1829"}}),No=new P({props:{name:"forward",anchor:"transformers.Wav2Vec2ConformerForAudioFrameClassification.forward",parameters:[{name:"input_values",val:": typing.Optional[torch.Tensor]"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",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.Wav2Vec2ConformerForAudioFrameClassification.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/main/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/main/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor.__call__">Wav2Vec2Processor.<strong>call</strong>()</a> for details.`,name:"input_values"},{anchor:"transformers.Wav2Vec2ConformerForAudioFrameClassification.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>, such as
<a href="https://huggingface.co/facebook/wav2vec2-conformer-rel-pos-large" rel="nofollow">wav2vec2-conformer-rel-pos-large</a>,
<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.Wav2Vec2ConformerForAudioFrameClassification.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.Wav2Vec2ConformerForAudioFrameClassification.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.Wav2Vec2ConformerForAudioFrameClassification.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.Wav2Vec2ConformerForAudioFrameClassification.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/main/src/transformers/models/wav2vec2_conformer/modeling_wav2vec2_conformer.py#L1865",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</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/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerConfig"
>Wav2Vec2ConformerConfig</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 loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification 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/main/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Pe=new Dt({props:{$$slots:{default:[Ic]},$$scope:{ctx:V}}}),Me=new it({props:{anchor:"transformers.Wav2Vec2ConformerForAudioFrameClassification.forward.example",$$slots:{default:[Xc]},$$scope:{ctx:V}}}),Io=new G({}),Xo=new P({props:{name:"class transformers.Wav2Vec2ConformerForXVector",anchor:"transformers.Wav2Vec2ConformerForXVector",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.Wav2Vec2ConformerForXVector.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerConfig">Wav2Vec2ConformerConfig</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/main/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/main/src/transformers/models/wav2vec2_conformer/modeling_wav2vec2_conformer.py#L1984"}}),Qo=new P({props:{name:"forward",anchor:"transformers.Wav2Vec2ConformerForXVector.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.Wav2Vec2ConformerForXVector.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/main/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/main/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor.__call__">Wav2Vec2Processor.<strong>call</strong>()</a> for details.`,name:"input_values"},{anchor:"transformers.Wav2Vec2ConformerForXVector.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>, such as
<a href="https://huggingface.co/facebook/wav2vec2-conformer-rel-pos-large" rel="nofollow">wav2vec2-conformer-rel-pos-large</a>,
<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.Wav2Vec2ConformerForXVector.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.Wav2Vec2ConformerForXVector.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.Wav2Vec2ConformerForXVector.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.Wav2Vec2ConformerForXVector.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/main/src/transformers/models/wav2vec2_conformer/modeling_wav2vec2_conformer.py#L2037",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.XVectorOutput"
>transformers.modeling_outputs.XVectorOutput</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/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerConfig"
>Wav2Vec2ConformerConfig</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 loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.xvector_output_dim)</code>) \u2014 Classification hidden states before AMSoftmax.</p>
</li>
<li>
<p><strong>embeddings</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.xvector_output_dim)</code>) \u2014 Utterance embeddings used for vector similarity-based retrieval.</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/main/en/main_classes/output#transformers.modeling_outputs.XVectorOutput"
>transformers.modeling_outputs.XVectorOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Se=new Dt({props:{$$slots:{default:[Hc]},$$scope:{ctx:V}}}),Oe=new it({props:{anchor:"transformers.Wav2Vec2ConformerForXVector.forward.example",$$slots:{default:[Bc]},$$scope:{ctx:V}}}),Ko=new G({}),Go=new P({props:{name:"class transformers.Wav2Vec2ConformerForPreTraining",anchor:"transformers.Wav2Vec2ConformerForPreTraining",parameters:[{name:"config",val:": Wav2Vec2ConformerConfig"}],parametersDescription:[{anchor:"transformers.Wav2Vec2ConformerForPreTraining.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerConfig">Wav2Vec2ConformerConfig</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/main/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/main/src/transformers/models/wav2vec2_conformer/modeling_wav2vec2_conformer.py#L1375"}}),tt=new P({props:{name:"forward",anchor:"transformers.Wav2Vec2ConformerForPreTraining.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.BoolTensor] = None"},{name:"sampled_negative_indices",val:": typing.Optional[torch.BoolTensor] = 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.Wav2Vec2ConformerForPreTraining.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/main/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/main/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor.__call__">Wav2Vec2Processor.<strong>call</strong>()</a> for details.`,name:"input_values"},{anchor:"transformers.Wav2Vec2ConformerForPreTraining.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>, such as
<a href="https://huggingface.co/facebook/wav2vec2-conformer-rel-pos-large" rel="nofollow">wav2vec2-conformer-rel-pos-large</a>,
<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.Wav2Vec2ConformerForPreTraining.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.Wav2Vec2ConformerForPreTraining.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.Wav2Vec2ConformerForPreTraining.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.Wav2Vec2ConformerForPreTraining.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.Wav2Vec2ConformerForPreTraining.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/main/src/transformers/models/wav2vec2_conformer/modeling_wav2vec2_conformer.py#L1428",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.models.wav2vec2_conformer.modeling_wav2vec2_conformer.Wav2Vec2ConformerForPreTrainingOutput"
>transformers.models.wav2vec2_conformer.modeling_wav2vec2_conformer.Wav2Vec2ConformerForPreTrainingOutput</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/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerConfig"
>Wav2Vec2ConformerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<em>optional</em>, returned when <code>sample_negative_indices</code> are passed, <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>
<li>
<p><strong>contrastive_loss</strong> (<em>optional</em>, returned when <code>sample_negative_indices</code> are passed, <code>torch.FloatTensor</code> of shape <code>(1,)</code>) \u2014 The contrastive loss (L_m) as stated in the <a
  href="https://arxiv.org/pdf/2006.11477.pdf"
  rel="nofollow"
>official paper</a> .</p>
</li>
<li>
<p><strong>diversity_loss</strong> (<em>optional</em>, returned when <code>sample_negative_indices</code> are passed, <code>torch.FloatTensor</code> of shape <code>(1,)</code>) \u2014 The diversity loss (L_d) as stated in the <a
  href="https://arxiv.org/pdf/2006.11477.pdf"
  rel="nofollow"
>official paper</a> .</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.models.wav2vec2_conformer.modeling_wav2vec2_conformer.Wav2Vec2ConformerForPreTrainingOutput"
>transformers.models.wav2vec2_conformer.modeling_wav2vec2_conformer.Wav2Vec2ConformerForPreTrainingOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Le=new Dt({props:{$$slots:{default:[Rc]},$$scope:{ctx:V}}}),Ne=new it({props:{anchor:"transformers.Wav2Vec2ConformerForPreTraining.forward.example",$$slots:{default:[Uc]},$$scope:{ctx:V}}}),{c(){c=n("meta"),b=p(),u=n("h1"),h=n("a"),v=n("span"),w(l.$$.fragment),m=p(),W=n("span"),Va=r("Wav2Vec2-Conformer"),Fr=p(),J=n("h2"),ve=n("a"),Lt=n("span"),w(Ge.$$.fragment),Wa=p(),Nt=n("span"),ja=r("Overview"),xr=p(),be=n("p"),Fa=r("The Wav2Vec2-Conformer was added to an updated version of "),Je=n("a"),xa=r("fairseq S2T: Fast Speech-to-Text Modeling with fairseq"),qa=r(" by Changhan Wang, Yun Tang, Xutai Ma, Anne Wu, Sravya Popuri, Dmytro Okhonko, Juan Pino."),qr=p(),dt=n("p"),Ea=r("The official results of the model can be found in Table 3 and Table 4 of the paper."),Er=p(),we=n("p"),Aa=r("The Wav2Vec2-Conformer weights were released by the Meta AI team within the "),Ye=n("a"),Pa=r("Fairseq library"),Ma=r("."),Ar=p(),mt=n("p"),za=r("Tips:"),Pr=p(),z=n("ul"),R=n("li"),Sa=r("Wav2Vec2-Conformer follows the same architecture as Wav2Vec2, but replaces the "),It=n("em"),Oa=r("Attention"),Da=r("-block with a "),Xt=n("em"),La=r("Conformer"),Na=r(`-block
as introduced in `),eo=n("a"),Ia=r("Conformer: Convolution-augmented Transformer for Speech Recognition"),Xa=r("."),Ha=p(),Ht=n("li"),Ba=r(`For the same number of layers, Wav2Vec2-Conformer requires more parameters than Wav2Vec2, but also yields
an improved word error rate.`),Ra=p(),Bt=n("li"),Ua=r("Wav2Vec2-Conformer uses the same tokenizer and feature extractor as Wav2Vec2."),Za=p(),oo=n("li"),Qa=r(`Wav2Vec2-Conformer can use either no relative position embeddings, Transformer-XL-like position embeddings, or
rotary position embeddings by setting the correct `),Rt=n("code"),Ka=r("config.position_embeddings_type"),Ga=r("."),Mr=p(),U=n("p"),Ja=r("This model was contributed by "),to=n("a"),Ya=r("patrickvonplaten"),en=r(`.
The original code can be found `),ro=n("a"),on=r("here"),tn=r("."),zr=p(),Y=n("h2"),Ce=n("a"),Ut=n("span"),w(ao.$$.fragment),rn=p(),Zt=n("span"),an=r("Wav2Vec2ConformerConfig"),Sr=p(),M=n("div"),w(no.$$.fragment),nn=p(),ee=n("p"),sn=r("This is the configuration class to store the configuration of a "),pt=n("a"),ln=r("Wav2Vec2ConformerModel"),cn=r(`. It is used to
instantiate an Wav2Vec2Conformer 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 Wav2Vec2Conformer
`),so=n("a"),dn=r("facebook/wav2vec2-conformer-rel-pos-large"),mn=r(`
architecture.`),pn=p(),oe=n("p"),fn=r("Configuration objects inherit from "),ft=n("a"),hn=r("PretrainedConfig"),un=r(` and can be used to control the model outputs. Read the
documentation from `),ht=n("a"),gn=r("PretrainedConfig"),_n=r(" for more information."),vn=p(),w(ye.$$.fragment),Or=p(),te=n("h2"),ke=n("a"),Qt=n("span"),w(io.$$.fragment),bn=p(),Kt=n("span"),wn=r("Wav2Vec2Conformer specific outputs"),Dr=p(),re=n("div"),w(lo.$$.fragment),Cn=p(),co=n("p"),yn=r("Output type of "),ut=n("a"),kn=r("Wav2Vec2ConformerForPreTraining"),Tn=r(", with potential hidden states and attentions."),Lr=p(),ae=n("h2"),Te=n("a"),Gt=n("span"),w(mo.$$.fragment),$n=p(),Jt=n("span"),Vn=r("Wav2Vec2ConformerModel"),Nr=p(),q=n("div"),w(po.$$.fragment),Wn=p(),fo=n("p"),jn=r(`The bare Wav2Vec2Conformer Model transformer outputting raw hidden-states without any specific head on top.
Wav2Vec2Conformer was proposed in `),ho=n("a"),Fn=r(`wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations`),xn=r(` by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`),qn=p(),uo=n("p"),En=r("This model inherits from "),gt=n("a"),An=r("PreTrainedModel"),Pn=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Mn=p(),go=n("p"),zn=r("This model is a PyTorch "),_o=n("a"),Sn=r("nn.Module"),On=r(` sub-class. Use it as a
regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and behavior.`),Dn=p(),S=n("div"),w(vo.$$.fragment),Ln=p(),ne=n("p"),Nn=r("The "),_t=n("a"),In=r("Wav2Vec2ConformerModel"),Xn=r(" forward method, overrides the "),Yt=n("code"),Hn=r("__call__"),Bn=r(" special method."),Rn=p(),w($e.$$.fragment),Un=p(),w(Ve.$$.fragment),Ir=p(),se=n("h2"),We=n("a"),er=n("span"),w(bo.$$.fragment),Zn=p(),or=n("span"),Qn=r("Wav2Vec2ConformerForCTC"),Xr=p(),E=n("div"),w(wo.$$.fragment),Kn=p(),ie=n("p"),Gn=r("Wav2Vec2Conformer Model with a "),tr=n("code"),Jn=r("language modeling"),Yn=r(` head on top for Connectionist Temporal Classification (CTC).
Wav2Vec2Conformer was proposed in `),Co=n("a"),es=r(`wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations`),os=r(` by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`),ts=p(),yo=n("p"),rs=r("This model inherits from "),vt=n("a"),as=r("PreTrainedModel"),ns=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),ss=p(),ko=n("p"),is=r("This model is a PyTorch "),To=n("a"),ls=r("nn.Module"),cs=r(` sub-class. Use it as a
regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and behavior.`),ds=p(),O=n("div"),w($o.$$.fragment),ms=p(),le=n("p"),ps=r("The "),bt=n("a"),fs=r("Wav2Vec2ConformerForCTC"),hs=r(" forward method, overrides the "),rr=n("code"),us=r("__call__"),gs=r(" special method."),_s=p(),w(je.$$.fragment),vs=p(),w(Fe.$$.fragment),Hr=p(),ce=n("h2"),xe=n("a"),ar=n("span"),w(Vo.$$.fragment),bs=p(),nr=n("span"),ws=r("Wav2Vec2ConformerForSequenceClassification"),Br=p(),j=n("div"),w(Wo.$$.fragment),Cs=p(),sr=n("p"),ys=r(`Wav2Vec2Conformer Model with a sequence classification head on top (a linear layer over the pooled output) for
tasks like SUPERB Keyword Spotting.`),ks=p(),jo=n("p"),Ts=r("Wav2Vec2Conformer was proposed in "),Fo=n("a"),$s=r(`wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations`),Vs=r(` by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`),Ws=p(),xo=n("p"),js=r("This model inherits from "),wt=n("a"),Fs=r("PreTrainedModel"),xs=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),qs=p(),qo=n("p"),Es=r("This model is a PyTorch "),Eo=n("a"),As=r("nn.Module"),Ps=r(` sub-class. Use it as a
regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and behavior.`),Ms=p(),D=n("div"),w(Ao.$$.fragment),zs=p(),de=n("p"),Ss=r("The "),Ct=n("a"),Os=r("Wav2Vec2ConformerForSequenceClassification"),Ds=r(" forward method, overrides the "),ir=n("code"),Ls=r("__call__"),Ns=r(" special method."),Is=p(),w(qe.$$.fragment),Xs=p(),w(Ee.$$.fragment),Rr=p(),me=n("h2"),Ae=n("a"),lr=n("span"),w(Po.$$.fragment),Hs=p(),cr=n("span"),Bs=r("Wav2Vec2ConformerForAudioFrameClassification"),Ur=p(),F=n("div"),w(Mo.$$.fragment),Rs=p(),dr=n("p"),Us=r("Wav2Vec2Conformer Model with a frame classification head on top for tasks like Speaker Diarization."),Zs=p(),zo=n("p"),Qs=r("Wav2Vec2Conformer was proposed in "),So=n("a"),Ks=r(`wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations`),Gs=r(` by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`),Js=p(),Oo=n("p"),Ys=r("This model inherits from "),yt=n("a"),ei=r("PreTrainedModel"),oi=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),ti=p(),Do=n("p"),ri=r("This model is a PyTorch "),Lo=n("a"),ai=r("nn.Module"),ni=r(` sub-class. Use it as a
regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and behavior.`),si=p(),L=n("div"),w(No.$$.fragment),ii=p(),pe=n("p"),li=r("The "),kt=n("a"),ci=r("Wav2Vec2ConformerForAudioFrameClassification"),di=r(" forward method, overrides the "),mr=n("code"),mi=r("__call__"),pi=r(" special method."),fi=p(),w(Pe.$$.fragment),hi=p(),w(Me.$$.fragment),Zr=p(),fe=n("h2"),ze=n("a"),pr=n("span"),w(Io.$$.fragment),ui=p(),fr=n("span"),gi=r("Wav2Vec2ConformerForXVector"),Qr=p(),x=n("div"),w(Xo.$$.fragment),_i=p(),hr=n("p"),vi=r("Wav2Vec2Conformer Model with an XVector feature extraction head on top for tasks like Speaker Verification."),bi=p(),Ho=n("p"),wi=r("Wav2Vec2Conformer was proposed in "),Bo=n("a"),Ci=r(`wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations`),yi=r(` by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`),ki=p(),Ro=n("p"),Ti=r("This model inherits from "),Tt=n("a"),$i=r("PreTrainedModel"),Vi=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Wi=p(),Uo=n("p"),ji=r("This model is a PyTorch "),Zo=n("a"),Fi=r("nn.Module"),xi=r(` sub-class. Use it as a
regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and behavior.`),qi=p(),N=n("div"),w(Qo.$$.fragment),Ei=p(),he=n("p"),Ai=r("The "),$t=n("a"),Pi=r("Wav2Vec2ConformerForXVector"),Mi=r(" forward method, overrides the "),ur=n("code"),zi=r("__call__"),Si=r(" special method."),Oi=p(),w(Se.$$.fragment),Di=p(),w(Oe.$$.fragment),Kr=p(),ue=n("h2"),De=n("a"),gr=n("span"),w(Ko.$$.fragment),Li=p(),_r=n("span"),Ni=r("Wav2Vec2ConformerForPreTraining"),Gr=p(),A=n("div"),w(Go.$$.fragment),Ii=p(),ge=n("p"),Xi=r("Wav2Vec2Conformer Model with a quantizer and "),vr=n("code"),Hi=r("VQ"),Bi=r(` head on top.
Wav2Vec2Conformer was proposed in `),Jo=n("a"),Ri=r(`wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations`),Ui=r(` by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`),Zi=p(),Yo=n("p"),Qi=r("This model inherits from "),Vt=n("a"),Ki=r("PreTrainedModel"),Gi=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Ji=p(),et=n("p"),Yi=r("This model is a PyTorch "),ot=n("a"),el=r("nn.Module"),ol=r(` sub-class. Use it as a
regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and behavior.`),tl=p(),I=n("div"),w(tt.$$.fragment),rl=p(),_e=n("p"),al=r("The "),Wt=n("a"),nl=r("Wav2Vec2ConformerForPreTraining"),sl=r(" forward method, overrides the "),br=n("code"),il=r("__call__"),ll=r(" special method."),cl=p(),w(Le.$$.fragment),dl=p(),w(Ne.$$.fragment),this.h()},l(o){const g=Ac('[data-svelte="svelte-1phssyn"]',document.head);c=s(g,"META",{name:!0,content:!0}),g.forEach(t),b=f(o),u=s(o,"H1",{class:!0});var rt=i(u);h=s(rt,"A",{id:!0,class:!0,href:!0});var wr=i(h);v=s(wr,"SPAN",{});var Cr=i(v);C(l.$$.fragment,Cr),Cr.forEach(t),wr.forEach(t),m=f(rt),W=s(rt,"SPAN",{});var yr=i(W);Va=a(yr,"Wav2Vec2-Conformer"),yr.forEach(t),rt.forEach(t),Fr=f(o),J=s(o,"H2",{class:!0});var at=i(J);ve=s(at,"A",{id:!0,class:!0,href:!0});var kr=i(ve);Lt=s(kr,"SPAN",{});var Tr=i(Lt);C(Ge.$$.fragment,Tr),Tr.forEach(t),kr.forEach(t),Wa=f(at),Nt=s(at,"SPAN",{});var $r=i(Nt);ja=a($r,"Overview"),$r.forEach(t),at.forEach(t),xr=f(o),be=s(o,"P",{});var nt=i(be);Fa=a(nt,"The Wav2Vec2-Conformer was added to an updated version of "),Je=s(nt,"A",{href:!0,rel:!0});var Vr=i(Je);xa=a(Vr,"fairseq S2T: Fast Speech-to-Text Modeling with fairseq"),Vr.forEach(t),qa=a(nt," by Changhan Wang, Yun Tang, Xutai Ma, Anne Wu, Sravya Popuri, Dmytro Okhonko, Juan Pino."),nt.forEach(t),qr=f(o),dt=s(o,"P",{});var Wr=i(dt);Ea=a(Wr,"The official results of the model can be found in Table 3 and Table 4 of the paper."),Wr.forEach(t),Er=f(o),we=s(o,"P",{});var st=i(we);Aa=a(st,"The Wav2Vec2-Conformer weights were released by the Meta AI team within the "),Ye=s(st,"A",{href:!0,rel:!0});var jr=i(Ye);Pa=a(jr,"Fairseq library"),jr.forEach(t),Ma=a(st,"."),st.forEach(t),Ar=f(o),mt=s(o,"P",{});var ml=i(mt);za=a(ml,"Tips:"),ml.forEach(t),Pr=f(o),z=s(o,"UL",{});var Ie=i(z);R=s(Ie,"LI",{});var Xe=i(R);Sa=a(Xe,"Wav2Vec2-Conformer follows the same architecture as Wav2Vec2, but replaces the "),It=s(Xe,"EM",{});var pl=i(It);Oa=a(pl,"Attention"),pl.forEach(t),Da=a(Xe,"-block with a "),Xt=s(Xe,"EM",{});var fl=i(Xt);La=a(fl,"Conformer"),fl.forEach(t),Na=a(Xe,`-block
as introduced in `),eo=s(Xe,"A",{href:!0,rel:!0});var hl=i(eo);Ia=a(hl,"Conformer: Convolution-augmented Transformer for Speech Recognition"),hl.forEach(t),Xa=a(Xe,"."),Xe.forEach(t),Ha=f(Ie),Ht=s(Ie,"LI",{});var ul=i(Ht);Ba=a(ul,`For the same number of layers, Wav2Vec2-Conformer requires more parameters than Wav2Vec2, but also yields
an improved word error rate.`),ul.forEach(t),Ra=f(Ie),Bt=s(Ie,"LI",{});var gl=i(Bt);Ua=a(gl,"Wav2Vec2-Conformer uses the same tokenizer and feature extractor as Wav2Vec2."),gl.forEach(t),Za=f(Ie),oo=s(Ie,"LI",{});var Yr=i(oo);Qa=a(Yr,`Wav2Vec2-Conformer can use either no relative position embeddings, Transformer-XL-like position embeddings, or
rotary position embeddings by setting the correct `),Rt=s(Yr,"CODE",{});var _l=i(Rt);Ka=a(_l,"config.position_embeddings_type"),_l.forEach(t),Ga=a(Yr,"."),Yr.forEach(t),Ie.forEach(t),Mr=f(o),U=s(o,"P",{});var jt=i(U);Ja=a(jt,"This model was contributed by "),to=s(jt,"A",{href:!0,rel:!0});var vl=i(to);Ya=a(vl,"patrickvonplaten"),vl.forEach(t),en=a(jt,`.
The original code can be found `),ro=s(jt,"A",{href:!0,rel:!0});var bl=i(ro);on=a(bl,"here"),bl.forEach(t),tn=a(jt,"."),jt.forEach(t),zr=f(o),Y=s(o,"H2",{class:!0});var ea=i(Y);Ce=s(ea,"A",{id:!0,class:!0,href:!0});var wl=i(Ce);Ut=s(wl,"SPAN",{});var Cl=i(Ut);C(ao.$$.fragment,Cl),Cl.forEach(t),wl.forEach(t),rn=f(ea),Zt=s(ea,"SPAN",{});var yl=i(Zt);an=a(yl,"Wav2Vec2ConformerConfig"),yl.forEach(t),ea.forEach(t),Sr=f(o),M=s(o,"DIV",{class:!0});var He=i(M);C(no.$$.fragment,He),nn=f(He),ee=s(He,"P",{});var Ft=i(ee);sn=a(Ft,"This is the configuration class to store the configuration of a "),pt=s(Ft,"A",{href:!0});var kl=i(pt);ln=a(kl,"Wav2Vec2ConformerModel"),kl.forEach(t),cn=a(Ft,`. It is used to
instantiate an Wav2Vec2Conformer 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 Wav2Vec2Conformer
`),so=s(Ft,"A",{href:!0,rel:!0});var Tl=i(so);dn=a(Tl,"facebook/wav2vec2-conformer-rel-pos-large"),Tl.forEach(t),mn=a(Ft,`
architecture.`),Ft.forEach(t),pn=f(He),oe=s(He,"P",{});var xt=i(oe);fn=a(xt,"Configuration objects inherit from "),ft=s(xt,"A",{href:!0});var $l=i(ft);hn=a($l,"PretrainedConfig"),$l.forEach(t),un=a(xt,` and can be used to control the model outputs. Read the
documentation from `),ht=s(xt,"A",{href:!0});var Vl=i(ht);gn=a(Vl,"PretrainedConfig"),Vl.forEach(t),_n=a(xt," for more information."),xt.forEach(t),vn=f(He),C(ye.$$.fragment,He),He.forEach(t),Or=f(o),te=s(o,"H2",{class:!0});var oa=i(te);ke=s(oa,"A",{id:!0,class:!0,href:!0});var Wl=i(ke);Qt=s(Wl,"SPAN",{});var jl=i(Qt);C(io.$$.fragment,jl),jl.forEach(t),Wl.forEach(t),bn=f(oa),Kt=s(oa,"SPAN",{});var Fl=i(Kt);wn=a(Fl,"Wav2Vec2Conformer specific outputs"),Fl.forEach(t),oa.forEach(t),Dr=f(o),re=s(o,"DIV",{class:!0});var ta=i(re);C(lo.$$.fragment,ta),Cn=f(ta),co=s(ta,"P",{});var ra=i(co);yn=a(ra,"Output type of "),ut=s(ra,"A",{href:!0});var xl=i(ut);kn=a(xl,"Wav2Vec2ConformerForPreTraining"),xl.forEach(t),Tn=a(ra,", with potential hidden states and attentions."),ra.forEach(t),ta.forEach(t),Lr=f(o),ae=s(o,"H2",{class:!0});var aa=i(ae);Te=s(aa,"A",{id:!0,class:!0,href:!0});var ql=i(Te);Gt=s(ql,"SPAN",{});var El=i(Gt);C(mo.$$.fragment,El),El.forEach(t),ql.forEach(t),$n=f(aa),Jt=s(aa,"SPAN",{});var Al=i(Jt);Vn=a(Al,"Wav2Vec2ConformerModel"),Al.forEach(t),aa.forEach(t),Nr=f(o),q=s(o,"DIV",{class:!0});var Z=i(q);C(po.$$.fragment,Z),Wn=f(Z),fo=s(Z,"P",{});var na=i(fo);jn=a(na,`The bare Wav2Vec2Conformer Model transformer outputting raw hidden-states without any specific head on top.
Wav2Vec2Conformer was proposed in `),ho=s(na,"A",{href:!0,rel:!0});var Pl=i(ho);Fn=a(Pl,`wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations`),Pl.forEach(t),xn=a(na,` by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`),na.forEach(t),qn=f(Z),uo=s(Z,"P",{});var sa=i(uo);En=a(sa,"This model inherits from "),gt=s(sa,"A",{href:!0});var Ml=i(gt);An=a(Ml,"PreTrainedModel"),Ml.forEach(t),Pn=a(sa,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),sa.forEach(t),Mn=f(Z),go=s(Z,"P",{});var ia=i(go);zn=a(ia,"This model is a PyTorch "),_o=s(ia,"A",{href:!0,rel:!0});var zl=i(_o);Sn=a(zl,"nn.Module"),zl.forEach(t),On=a(ia,` sub-class. Use it as a
regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and behavior.`),ia.forEach(t),Dn=f(Z),S=s(Z,"DIV",{class:!0});var Be=i(S);C(vo.$$.fragment,Be),Ln=f(Be),ne=s(Be,"P",{});var qt=i(ne);Nn=a(qt,"The "),_t=s(qt,"A",{href:!0});var Sl=i(_t);In=a(Sl,"Wav2Vec2ConformerModel"),Sl.forEach(t),Xn=a(qt," forward method, overrides the "),Yt=s(qt,"CODE",{});var Ol=i(Yt);Hn=a(Ol,"__call__"),Ol.forEach(t),Bn=a(qt," special method."),qt.forEach(t),Rn=f(Be),C($e.$$.fragment,Be),Un=f(Be),C(Ve.$$.fragment,Be),Be.forEach(t),Z.forEach(t),Ir=f(o),se=s(o,"H2",{class:!0});var la=i(se);We=s(la,"A",{id:!0,class:!0,href:!0});var Dl=i(We);er=s(Dl,"SPAN",{});var Ll=i(er);C(bo.$$.fragment,Ll),Ll.forEach(t),Dl.forEach(t),Zn=f(la),or=s(la,"SPAN",{});var Nl=i(or);Qn=a(Nl,"Wav2Vec2ConformerForCTC"),Nl.forEach(t),la.forEach(t),Xr=f(o),E=s(o,"DIV",{class:!0});var Q=i(E);C(wo.$$.fragment,Q),Kn=f(Q),ie=s(Q,"P",{});var Et=i(ie);Gn=a(Et,"Wav2Vec2Conformer Model with a "),tr=s(Et,"CODE",{});var Il=i(tr);Jn=a(Il,"language modeling"),Il.forEach(t),Yn=a(Et,` head on top for Connectionist Temporal Classification (CTC).
Wav2Vec2Conformer was proposed in `),Co=s(Et,"A",{href:!0,rel:!0});var Xl=i(Co);es=a(Xl,`wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations`),Xl.forEach(t),os=a(Et,` by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`),Et.forEach(t),ts=f(Q),yo=s(Q,"P",{});var ca=i(yo);rs=a(ca,"This model inherits from "),vt=s(ca,"A",{href:!0});var Hl=i(vt);as=a(Hl,"PreTrainedModel"),Hl.forEach(t),ns=a(ca,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),ca.forEach(t),ss=f(Q),ko=s(Q,"P",{});var da=i(ko);is=a(da,"This model is a PyTorch "),To=s(da,"A",{href:!0,rel:!0});var Bl=i(To);ls=a(Bl,"nn.Module"),Bl.forEach(t),cs=a(da,` sub-class. Use it as a
regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and behavior.`),da.forEach(t),ds=f(Q),O=s(Q,"DIV",{class:!0});var Re=i(O);C($o.$$.fragment,Re),ms=f(Re),le=s(Re,"P",{});var At=i(le);ps=a(At,"The "),bt=s(At,"A",{href:!0});var Rl=i(bt);fs=a(Rl,"Wav2Vec2ConformerForCTC"),Rl.forEach(t),hs=a(At," forward method, overrides the "),rr=s(At,"CODE",{});var Ul=i(rr);us=a(Ul,"__call__"),Ul.forEach(t),gs=a(At," special method."),At.forEach(t),_s=f(Re),C(je.$$.fragment,Re),vs=f(Re),C(Fe.$$.fragment,Re),Re.forEach(t),Q.forEach(t),Hr=f(o),ce=s(o,"H2",{class:!0});var ma=i(ce);xe=s(ma,"A",{id:!0,class:!0,href:!0});var Zl=i(xe);ar=s(Zl,"SPAN",{});var Ql=i(ar);C(Vo.$$.fragment,Ql),Ql.forEach(t),Zl.forEach(t),bs=f(ma),nr=s(ma,"SPAN",{});var Kl=i(nr);ws=a(Kl,"Wav2Vec2ConformerForSequenceClassification"),Kl.forEach(t),ma.forEach(t),Br=f(o),j=s(o,"DIV",{class:!0});var X=i(j);C(Wo.$$.fragment,X),Cs=f(X),sr=s(X,"P",{});var Gl=i(sr);ys=a(Gl,`Wav2Vec2Conformer Model with a sequence classification head on top (a linear layer over the pooled output) for
tasks like SUPERB Keyword Spotting.`),Gl.forEach(t),ks=f(X),jo=s(X,"P",{});var pa=i(jo);Ts=a(pa,"Wav2Vec2Conformer was proposed in "),Fo=s(pa,"A",{href:!0,rel:!0});var Jl=i(Fo);$s=a(Jl,`wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations`),Jl.forEach(t),Vs=a(pa,` by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`),pa.forEach(t),Ws=f(X),xo=s(X,"P",{});var fa=i(xo);js=a(fa,"This model inherits from "),wt=s(fa,"A",{href:!0});var Yl=i(wt);Fs=a(Yl,"PreTrainedModel"),Yl.forEach(t),xs=a(fa,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),fa.forEach(t),qs=f(X),qo=s(X,"P",{});var ha=i(qo);Es=a(ha,"This model is a PyTorch "),Eo=s(ha,"A",{href:!0,rel:!0});var ec=i(Eo);As=a(ec,"nn.Module"),ec.forEach(t),Ps=a(ha,` sub-class. Use it as a
regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and behavior.`),ha.forEach(t),Ms=f(X),D=s(X,"DIV",{class:!0});var Ue=i(D);C(Ao.$$.fragment,Ue),zs=f(Ue),de=s(Ue,"P",{});var Pt=i(de);Ss=a(Pt,"The "),Ct=s(Pt,"A",{href:!0});var oc=i(Ct);Os=a(oc,"Wav2Vec2ConformerForSequenceClassification"),oc.forEach(t),Ds=a(Pt," forward method, overrides the "),ir=s(Pt,"CODE",{});var tc=i(ir);Ls=a(tc,"__call__"),tc.forEach(t),Ns=a(Pt," special method."),Pt.forEach(t),Is=f(Ue),C(qe.$$.fragment,Ue),Xs=f(Ue),C(Ee.$$.fragment,Ue),Ue.forEach(t),X.forEach(t),Rr=f(o),me=s(o,"H2",{class:!0});var ua=i(me);Ae=s(ua,"A",{id:!0,class:!0,href:!0});var rc=i(Ae);lr=s(rc,"SPAN",{});var ac=i(lr);C(Po.$$.fragment,ac),ac.forEach(t),rc.forEach(t),Hs=f(ua),cr=s(ua,"SPAN",{});var nc=i(cr);Bs=a(nc,"Wav2Vec2ConformerForAudioFrameClassification"),nc.forEach(t),ua.forEach(t),Ur=f(o),F=s(o,"DIV",{class:!0});var H=i(F);C(Mo.$$.fragment,H),Rs=f(H),dr=s(H,"P",{});var sc=i(dr);Us=a(sc,"Wav2Vec2Conformer Model with a frame classification head on top for tasks like Speaker Diarization."),sc.forEach(t),Zs=f(H),zo=s(H,"P",{});var ga=i(zo);Qs=a(ga,"Wav2Vec2Conformer was proposed in "),So=s(ga,"A",{href:!0,rel:!0});var ic=i(So);Ks=a(ic,`wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations`),ic.forEach(t),Gs=a(ga,` by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`),ga.forEach(t),Js=f(H),Oo=s(H,"P",{});var _a=i(Oo);Ys=a(_a,"This model inherits from "),yt=s(_a,"A",{href:!0});var lc=i(yt);ei=a(lc,"PreTrainedModel"),lc.forEach(t),oi=a(_a,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),_a.forEach(t),ti=f(H),Do=s(H,"P",{});var va=i(Do);ri=a(va,"This model is a PyTorch "),Lo=s(va,"A",{href:!0,rel:!0});var cc=i(Lo);ai=a(cc,"nn.Module"),cc.forEach(t),ni=a(va,` sub-class. Use it as a
regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and behavior.`),va.forEach(t),si=f(H),L=s(H,"DIV",{class:!0});var Ze=i(L);C(No.$$.fragment,Ze),ii=f(Ze),pe=s(Ze,"P",{});var Mt=i(pe);li=a(Mt,"The "),kt=s(Mt,"A",{href:!0});var dc=i(kt);ci=a(dc,"Wav2Vec2ConformerForAudioFrameClassification"),dc.forEach(t),di=a(Mt," forward method, overrides the "),mr=s(Mt,"CODE",{});var mc=i(mr);mi=a(mc,"__call__"),mc.forEach(t),pi=a(Mt," special method."),Mt.forEach(t),fi=f(Ze),C(Pe.$$.fragment,Ze),hi=f(Ze),C(Me.$$.fragment,Ze),Ze.forEach(t),H.forEach(t),Zr=f(o),fe=s(o,"H2",{class:!0});var ba=i(fe);ze=s(ba,"A",{id:!0,class:!0,href:!0});var pc=i(ze);pr=s(pc,"SPAN",{});var fc=i(pr);C(Io.$$.fragment,fc),fc.forEach(t),pc.forEach(t),ui=f(ba),fr=s(ba,"SPAN",{});var hc=i(fr);gi=a(hc,"Wav2Vec2ConformerForXVector"),hc.forEach(t),ba.forEach(t),Qr=f(o),x=s(o,"DIV",{class:!0});var B=i(x);C(Xo.$$.fragment,B),_i=f(B),hr=s(B,"P",{});var uc=i(hr);vi=a(uc,"Wav2Vec2Conformer Model with an XVector feature extraction head on top for tasks like Speaker Verification."),uc.forEach(t),bi=f(B),Ho=s(B,"P",{});var wa=i(Ho);wi=a(wa,"Wav2Vec2Conformer was proposed in "),Bo=s(wa,"A",{href:!0,rel:!0});var gc=i(Bo);Ci=a(gc,`wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations`),gc.forEach(t),yi=a(wa,` by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`),wa.forEach(t),ki=f(B),Ro=s(B,"P",{});var Ca=i(Ro);Ti=a(Ca,"This model inherits from "),Tt=s(Ca,"A",{href:!0});var _c=i(Tt);$i=a(_c,"PreTrainedModel"),_c.forEach(t),Vi=a(Ca,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Ca.forEach(t),Wi=f(B),Uo=s(B,"P",{});var ya=i(Uo);ji=a(ya,"This model is a PyTorch "),Zo=s(ya,"A",{href:!0,rel:!0});var vc=i(Zo);Fi=a(vc,"nn.Module"),vc.forEach(t),xi=a(ya,` sub-class. Use it as a
regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and behavior.`),ya.forEach(t),qi=f(B),N=s(B,"DIV",{class:!0});var Qe=i(N);C(Qo.$$.fragment,Qe),Ei=f(Qe),he=s(Qe,"P",{});var zt=i(he);Ai=a(zt,"The "),$t=s(zt,"A",{href:!0});var bc=i($t);Pi=a(bc,"Wav2Vec2ConformerForXVector"),bc.forEach(t),Mi=a(zt," forward method, overrides the "),ur=s(zt,"CODE",{});var wc=i(ur);zi=a(wc,"__call__"),wc.forEach(t),Si=a(zt," special method."),zt.forEach(t),Oi=f(Qe),C(Se.$$.fragment,Qe),Di=f(Qe),C(Oe.$$.fragment,Qe),Qe.forEach(t),B.forEach(t),Kr=f(o),ue=s(o,"H2",{class:!0});var ka=i(ue);De=s(ka,"A",{id:!0,class:!0,href:!0});var Cc=i(De);gr=s(Cc,"SPAN",{});var yc=i(gr);C(Ko.$$.fragment,yc),yc.forEach(t),Cc.forEach(t),Li=f(ka),_r=s(ka,"SPAN",{});var kc=i(_r);Ni=a(kc,"Wav2Vec2ConformerForPreTraining"),kc.forEach(t),ka.forEach(t),Gr=f(o),A=s(o,"DIV",{class:!0});var K=i(A);C(Go.$$.fragment,K),Ii=f(K),ge=s(K,"P",{});var St=i(ge);Xi=a(St,"Wav2Vec2Conformer Model with a quantizer and "),vr=s(St,"CODE",{});var Tc=i(vr);Hi=a(Tc,"VQ"),Tc.forEach(t),Bi=a(St,` head on top.
Wav2Vec2Conformer was proposed in `),Jo=s(St,"A",{href:!0,rel:!0});var $c=i(Jo);Ri=a($c,`wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations`),$c.forEach(t),Ui=a(St,` by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`),St.forEach(t),Zi=f(K),Yo=s(K,"P",{});var Ta=i(Yo);Qi=a(Ta,"This model inherits from "),Vt=s(Ta,"A",{href:!0});var Vc=i(Vt);Ki=a(Vc,"PreTrainedModel"),Vc.forEach(t),Gi=a(Ta,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Ta.forEach(t),Ji=f(K),et=s(K,"P",{});var $a=i(et);Yi=a($a,"This model is a PyTorch "),ot=s($a,"A",{href:!0,rel:!0});var Wc=i(ot);el=a(Wc,"nn.Module"),Wc.forEach(t),ol=a($a,` sub-class. Use it as a
regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and behavior.`),$a.forEach(t),tl=f(K),I=s(K,"DIV",{class:!0});var Ke=i(I);C(tt.$$.fragment,Ke),rl=f(Ke),_e=s(Ke,"P",{});var Ot=i(_e);al=a(Ot,"The "),Wt=s(Ot,"A",{href:!0});var jc=i(Wt);nl=a(jc,"Wav2Vec2ConformerForPreTraining"),jc.forEach(t),sl=a(Ot," forward method, overrides the "),br=s(Ot,"CODE",{});var Fc=i(br);il=a(Fc,"__call__"),Fc.forEach(t),ll=a(Ot," special method."),Ot.forEach(t),cl=f(Ke),C(Le.$$.fragment,Ke),dl=f(Ke),C(Ne.$$.fragment,Ke),Ke.forEach(t),K.forEach(t),this.h()},h(){d(c,"name","hf:doc:metadata"),d(c,"content",JSON.stringify(Qc)),d(h,"id","wav2vec2conformer"),d(h,"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"),d(h,"href","#wav2vec2conformer"),d(u,"class","relative group"),d(ve,"id","overview"),d(ve,"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"),d(ve,"href","#overview"),d(J,"class","relative group"),d(Je,"href","https://arxiv.org/abs/2010.05171"),d(Je,"rel","nofollow"),d(Ye,"href","https://github.com/pytorch/fairseq/blob/main/examples/wav2vec/README.md#pre-trained-models"),d(Ye,"rel","nofollow"),d(eo,"href","https://arxiv.org/abs/2005.08100"),d(eo,"rel","nofollow"),d(to,"href","https://huggingface.co/patrickvonplaten"),d(to,"rel","nofollow"),d(ro,"href","https://github.com/pytorch/fairseq/tree/main/examples/wav2vec"),d(ro,"rel","nofollow"),d(Ce,"id","transformers.Wav2Vec2ConformerConfig"),d(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"),d(Ce,"href","#transformers.Wav2Vec2ConformerConfig"),d(Y,"class","relative group"),d(pt,"href","/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerModel"),d(so,"href","https://huggingface.co/facebook/wav2vec2-conformer-rel-pos-large"),d(so,"rel","nofollow"),d(ft,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),d(ht,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),d(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ke,"id","transformers.models.wav2vec2_conformer.modeling_wav2vec2_conformer.Wav2Vec2ConformerForPreTrainingOutput"),d(ke,"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"),d(ke,"href","#transformers.models.wav2vec2_conformer.modeling_wav2vec2_conformer.Wav2Vec2ConformerForPreTrainingOutput"),d(te,"class","relative group"),d(ut,"href","/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerForPreTraining"),d(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Te,"id","transformers.Wav2Vec2ConformerModel"),d(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"),d(Te,"href","#transformers.Wav2Vec2ConformerModel"),d(ae,"class","relative group"),d(ho,"href","https://arxiv.org/abs/2006.11477"),d(ho,"rel","nofollow"),d(gt,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),d(_o,"href","https://pytorch.org/docs/stable/nn.html#nn.Module"),d(_o,"rel","nofollow"),d(_t,"href","/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerModel"),d(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(We,"id","transformers.Wav2Vec2ConformerForCTC"),d(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"),d(We,"href","#transformers.Wav2Vec2ConformerForCTC"),d(se,"class","relative group"),d(Co,"href","https://arxiv.org/abs/2006.11477"),d(Co,"rel","nofollow"),d(vt,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),d(To,"href","https://pytorch.org/docs/stable/nn.html#nn.Module"),d(To,"rel","nofollow"),d(bt,"href","/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerForCTC"),d(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(xe,"id","transformers.Wav2Vec2ConformerForSequenceClassification"),d(xe,"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"),d(xe,"href","#transformers.Wav2Vec2ConformerForSequenceClassification"),d(ce,"class","relative group"),d(Fo,"href","https://arxiv.org/abs/2006.11477"),d(Fo,"rel","nofollow"),d(wt,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),d(Eo,"href","https://pytorch.org/docs/stable/nn.html#nn.Module"),d(Eo,"rel","nofollow"),d(Ct,"href","/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerForSequenceClassification"),d(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ae,"id","transformers.Wav2Vec2ConformerForAudioFrameClassification"),d(Ae,"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"),d(Ae,"href","#transformers.Wav2Vec2ConformerForAudioFrameClassification"),d(me,"class","relative group"),d(So,"href","https://arxiv.org/abs/2006.11477"),d(So,"rel","nofollow"),d(yt,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),d(Lo,"href","https://pytorch.org/docs/stable/nn.html#nn.Module"),d(Lo,"rel","nofollow"),d(kt,"href","/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerForAudioFrameClassification"),d(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ze,"id","transformers.Wav2Vec2ConformerForXVector"),d(ze,"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"),d(ze,"href","#transformers.Wav2Vec2ConformerForXVector"),d(fe,"class","relative group"),d(Bo,"href","https://arxiv.org/abs/2006.11477"),d(Bo,"rel","nofollow"),d(Tt,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),d(Zo,"href","https://pytorch.org/docs/stable/nn.html#nn.Module"),d(Zo,"rel","nofollow"),d($t,"href","/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerForXVector"),d(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(De,"id","transformers.Wav2Vec2ConformerForPreTraining"),d(De,"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"),d(De,"href","#transformers.Wav2Vec2ConformerForPreTraining"),d(ue,"class","relative group"),d(Jo,"href","https://arxiv.org/abs/2006.11477"),d(Jo,"rel","nofollow"),d(Vt,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),d(ot,"href","https://pytorch.org/docs/stable/nn.html#nn.Module"),d(ot,"rel","nofollow"),d(Wt,"href","/docs/transformers/main/en/model_doc/wav2vec2-conformer#transformers.Wav2Vec2ConformerForPreTraining"),d(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(o,g){e(document.head,c),_(o,b,g),_(o,u,g),e(u,h),e(h,v),y(l,v,null),e(u,m),e(u,W),e(W,Va),_(o,Fr,g),_(o,J,g),e(J,ve),e(ve,Lt),y(Ge,Lt,null),e(J,Wa),e(J,Nt),e(Nt,ja),_(o,xr,g),_(o,be,g),e(be,Fa),e(be,Je),e(Je,xa),e(be,qa),_(o,qr,g),_(o,dt,g),e(dt,Ea),_(o,Er,g),_(o,we,g),e(we,Aa),e(we,Ye),e(Ye,Pa),e(we,Ma),_(o,Ar,g),_(o,mt,g),e(mt,za),_(o,Pr,g),_(o,z,g),e(z,R),e(R,Sa),e(R,It),e(It,Oa),e(R,Da),e(R,Xt),e(Xt,La),e(R,Na),e(R,eo),e(eo,Ia),e(R,Xa),e(z,Ha),e(z,Ht),e(Ht,Ba),e(z,Ra),e(z,Bt),e(Bt,Ua),e(z,Za),e(z,oo),e(oo,Qa),e(oo,Rt),e(Rt,Ka),e(oo,Ga),_(o,Mr,g),_(o,U,g),e(U,Ja),e(U,to),e(to,Ya),e(U,en),e(U,ro),e(ro,on),e(U,tn),_(o,zr,g),_(o,Y,g),e(Y,Ce),e(Ce,Ut),y(ao,Ut,null),e(Y,rn),e(Y,Zt),e(Zt,an),_(o,Sr,g),_(o,M,g),y(no,M,null),e(M,nn),e(M,ee),e(ee,sn),e(ee,pt),e(pt,ln),e(ee,cn),e(ee,so),e(so,dn),e(ee,mn),e(M,pn),e(M,oe),e(oe,fn),e(oe,ft),e(ft,hn),e(oe,un),e(oe,ht),e(ht,gn),e(oe,_n),e(M,vn),y(ye,M,null),_(o,Or,g),_(o,te,g),e(te,ke),e(ke,Qt),y(io,Qt,null),e(te,bn),e(te,Kt),e(Kt,wn),_(o,Dr,g),_(o,re,g),y(lo,re,null),e(re,Cn),e(re,co),e(co,yn),e(co,ut),e(ut,kn),e(co,Tn),_(o,Lr,g),_(o,ae,g),e(ae,Te),e(Te,Gt),y(mo,Gt,null),e(ae,$n),e(ae,Jt),e(Jt,Vn),_(o,Nr,g),_(o,q,g),y(po,q,null),e(q,Wn),e(q,fo),e(fo,jn),e(fo,ho),e(ho,Fn),e(fo,xn),e(q,qn),e(q,uo),e(uo,En),e(uo,gt),e(gt,An),e(uo,Pn),e(q,Mn),e(q,go),e(go,zn),e(go,_o),e(_o,Sn),e(go,On),e(q,Dn),e(q,S),y(vo,S,null),e(S,Ln),e(S,ne),e(ne,Nn),e(ne,_t),e(_t,In),e(ne,Xn),e(ne,Yt),e(Yt,Hn),e(ne,Bn),e(S,Rn),y($e,S,null),e(S,Un),y(Ve,S,null),_(o,Ir,g),_(o,se,g),e(se,We),e(We,er),y(bo,er,null),e(se,Zn),e(se,or),e(or,Qn),_(o,Xr,g),_(o,E,g),y(wo,E,null),e(E,Kn),e(E,ie),e(ie,Gn),e(ie,tr),e(tr,Jn),e(ie,Yn),e(ie,Co),e(Co,es),e(ie,os),e(E,ts),e(E,yo),e(yo,rs),e(yo,vt),e(vt,as),e(yo,ns),e(E,ss),e(E,ko),e(ko,is),e(ko,To),e(To,ls),e(ko,cs),e(E,ds),e(E,O),y($o,O,null),e(O,ms),e(O,le),e(le,ps),e(le,bt),e(bt,fs),e(le,hs),e(le,rr),e(rr,us),e(le,gs),e(O,_s),y(je,O,null),e(O,vs),y(Fe,O,null),_(o,Hr,g),_(o,ce,g),e(ce,xe),e(xe,ar),y(Vo,ar,null),e(ce,bs),e(ce,nr),e(nr,ws),_(o,Br,g),_(o,j,g),y(Wo,j,null),e(j,Cs),e(j,sr),e(sr,ys),e(j,ks),e(j,jo),e(jo,Ts),e(jo,Fo),e(Fo,$s),e(jo,Vs),e(j,Ws),e(j,xo),e(xo,js),e(xo,wt),e(wt,Fs),e(xo,xs),e(j,qs),e(j,qo),e(qo,Es),e(qo,Eo),e(Eo,As),e(qo,Ps),e(j,Ms),e(j,D),y(Ao,D,null),e(D,zs),e(D,de),e(de,Ss),e(de,Ct),e(Ct,Os),e(de,Ds),e(de,ir),e(ir,Ls),e(de,Ns),e(D,Is),y(qe,D,null),e(D,Xs),y(Ee,D,null),_(o,Rr,g),_(o,me,g),e(me,Ae),e(Ae,lr),y(Po,lr,null),e(me,Hs),e(me,cr),e(cr,Bs),_(o,Ur,g),_(o,F,g),y(Mo,F,null),e(F,Rs),e(F,dr),e(dr,Us),e(F,Zs),e(F,zo),e(zo,Qs),e(zo,So),e(So,Ks),e(zo,Gs),e(F,Js),e(F,Oo),e(Oo,Ys),e(Oo,yt),e(yt,ei),e(Oo,oi),e(F,ti),e(F,Do),e(Do,ri),e(Do,Lo),e(Lo,ai),e(Do,ni),e(F,si),e(F,L),y(No,L,null),e(L,ii),e(L,pe),e(pe,li),e(pe,kt),e(kt,ci),e(pe,di),e(pe,mr),e(mr,mi),e(pe,pi),e(L,fi),y(Pe,L,null),e(L,hi),y(Me,L,null),_(o,Zr,g),_(o,fe,g),e(fe,ze),e(ze,pr),y(Io,pr,null),e(fe,ui),e(fe,fr),e(fr,gi),_(o,Qr,g),_(o,x,g),y(Xo,x,null),e(x,_i),e(x,hr),e(hr,vi),e(x,bi),e(x,Ho),e(Ho,wi),e(Ho,Bo),e(Bo,Ci),e(Ho,yi),e(x,ki),e(x,Ro),e(Ro,Ti),e(Ro,Tt),e(Tt,$i),e(Ro,Vi),e(x,Wi),e(x,Uo),e(Uo,ji),e(Uo,Zo),e(Zo,Fi),e(Uo,xi),e(x,qi),e(x,N),y(Qo,N,null),e(N,Ei),e(N,he),e(he,Ai),e(he,$t),e($t,Pi),e(he,Mi),e(he,ur),e(ur,zi),e(he,Si),e(N,Oi),y(Se,N,null),e(N,Di),y(Oe,N,null),_(o,Kr,g),_(o,ue,g),e(ue,De),e(De,gr),y(Ko,gr,null),e(ue,Li),e(ue,_r),e(_r,Ni),_(o,Gr,g),_(o,A,g),y(Go,A,null),e(A,Ii),e(A,ge),e(ge,Xi),e(ge,vr),e(vr,Hi),e(ge,Bi),e(ge,Jo),e(Jo,Ri),e(ge,Ui),e(A,Zi),e(A,Yo),e(Yo,Qi),e(Yo,Vt),e(Vt,Ki),e(Yo,Gi),e(A,Ji),e(A,et),e(et,Yi),e(et,ot),e(ot,el),e(et,ol),e(A,tl),e(A,I),y(tt,I,null),e(I,rl),e(I,_e),e(_e,al),e(_e,Wt),e(Wt,nl),e(_e,sl),e(_e,br),e(br,il),e(_e,ll),e(I,cl),y(Le,I,null),e(I,dl),y(Ne,I,null),Jr=!0},p(o,[g]){const rt={};g&2&&(rt.$$scope={dirty:g,ctx:o}),ye.$set(rt);const wr={};g&2&&(wr.$$scope={dirty:g,ctx:o}),$e.$set(wr);const Cr={};g&2&&(Cr.$$scope={dirty:g,ctx:o}),Ve.$set(Cr);const yr={};g&2&&(yr.$$scope={dirty:g,ctx:o}),je.$set(yr);const at={};g&2&&(at.$$scope={dirty:g,ctx:o}),Fe.$set(at);const kr={};g&2&&(kr.$$scope={dirty:g,ctx:o}),qe.$set(kr);const Tr={};g&2&&(Tr.$$scope={dirty:g,ctx:o}),Ee.$set(Tr);const $r={};g&2&&($r.$$scope={dirty:g,ctx:o}),Pe.$set($r);const nt={};g&2&&(nt.$$scope={dirty:g,ctx:o}),Me.$set(nt);const Vr={};g&2&&(Vr.$$scope={dirty:g,ctx:o}),Se.$set(Vr);const Wr={};g&2&&(Wr.$$scope={dirty:g,ctx:o}),Oe.$set(Wr);const st={};g&2&&(st.$$scope={dirty:g,ctx:o}),Le.$set(st);const jr={};g&2&&(jr.$$scope={dirty:g,ctx:o}),Ne.$set(jr)},i(o){Jr||(k(l.$$.fragment,o),k(Ge.$$.fragment,o),k(ao.$$.fragment,o),k(no.$$.fragment,o),k(ye.$$.fragment,o),k(io.$$.fragment,o),k(lo.$$.fragment,o),k(mo.$$.fragment,o),k(po.$$.fragment,o),k(vo.$$.fragment,o),k($e.$$.fragment,o),k(Ve.$$.fragment,o),k(bo.$$.fragment,o),k(wo.$$.fragment,o),k($o.$$.fragment,o),k(je.$$.fragment,o),k(Fe.$$.fragment,o),k(Vo.$$.fragment,o),k(Wo.$$.fragment,o),k(Ao.$$.fragment,o),k(qe.$$.fragment,o),k(Ee.$$.fragment,o),k(Po.$$.fragment,o),k(Mo.$$.fragment,o),k(No.$$.fragment,o),k(Pe.$$.fragment,o),k(Me.$$.fragment,o),k(Io.$$.fragment,o),k(Xo.$$.fragment,o),k(Qo.$$.fragment,o),k(Se.$$.fragment,o),k(Oe.$$.fragment,o),k(Ko.$$.fragment,o),k(Go.$$.fragment,o),k(tt.$$.fragment,o),k(Le.$$.fragment,o),k(Ne.$$.fragment,o),Jr=!0)},o(o){T(l.$$.fragment,o),T(Ge.$$.fragment,o),T(ao.$$.fragment,o),T(no.$$.fragment,o),T(ye.$$.fragment,o),T(io.$$.fragment,o),T(lo.$$.fragment,o),T(mo.$$.fragment,o),T(po.$$.fragment,o),T(vo.$$.fragment,o),T($e.$$.fragment,o),T(Ve.$$.fragment,o),T(bo.$$.fragment,o),T(wo.$$.fragment,o),T($o.$$.fragment,o),T(je.$$.fragment,o),T(Fe.$$.fragment,o),T(Vo.$$.fragment,o),T(Wo.$$.fragment,o),T(Ao.$$.fragment,o),T(qe.$$.fragment,o),T(Ee.$$.fragment,o),T(Po.$$.fragment,o),T(Mo.$$.fragment,o),T(No.$$.fragment,o),T(Pe.$$.fragment,o),T(Me.$$.fragment,o),T(Io.$$.fragment,o),T(Xo.$$.fragment,o),T(Qo.$$.fragment,o),T(Se.$$.fragment,o),T(Oe.$$.fragment,o),T(Ko.$$.fragment,o),T(Go.$$.fragment,o),T(tt.$$.fragment,o),T(Le.$$.fragment,o),T(Ne.$$.fragment,o),Jr=!1},d(o){t(c),o&&t(b),o&&t(u),$(l),o&&t(Fr),o&&t(J),$(Ge),o&&t(xr),o&&t(be),o&&t(qr),o&&t(dt),o&&t(Er),o&&t(we),o&&t(Ar),o&&t(mt),o&&t(Pr),o&&t(z),o&&t(Mr),o&&t(U),o&&t(zr),o&&t(Y),$(ao),o&&t(Sr),o&&t(M),$(no),$(ye),o&&t(Or),o&&t(te),$(io),o&&t(Dr),o&&t(re),$(lo),o&&t(Lr),o&&t(ae),$(mo),o&&t(Nr),o&&t(q),$(po),$(vo),$($e),$(Ve),o&&t(Ir),o&&t(se),$(bo),o&&t(Xr),o&&t(E),$(wo),$($o),$(je),$(Fe),o&&t(Hr),o&&t(ce),$(Vo),o&&t(Br),o&&t(j),$(Wo),$(Ao),$(qe),$(Ee),o&&t(Rr),o&&t(me),$(Po),o&&t(Ur),o&&t(F),$(Mo),$(No),$(Pe),$(Me),o&&t(Zr),o&&t(fe),$(Io),o&&t(Qr),o&&t(x),$(Xo),$(Qo),$(Se),$(Oe),o&&t(Kr),o&&t(ue),$(Ko),o&&t(Gr),o&&t(A),$(Go),$(tt),$(Le),$(Ne)}}}const Qc={local:"wav2vec2conformer",sections:[{local:"overview",title:"Overview"},{local:"transformers.Wav2Vec2ConformerConfig",title:"Wav2Vec2ConformerConfig"},{local:"transformers.models.wav2vec2_conformer.modeling_wav2vec2_conformer.Wav2Vec2ConformerForPreTrainingOutput",title:"Wav2Vec2Conformer specific outputs"},{local:"transformers.Wav2Vec2ConformerModel",title:"Wav2Vec2ConformerModel"},{local:"transformers.Wav2Vec2ConformerForCTC",title:"Wav2Vec2ConformerForCTC"},{local:"transformers.Wav2Vec2ConformerForSequenceClassification",title:"Wav2Vec2ConformerForSequenceClassification"},{local:"transformers.Wav2Vec2ConformerForAudioFrameClassification",title:"Wav2Vec2ConformerForAudioFrameClassification"},{local:"transformers.Wav2Vec2ConformerForXVector",title:"Wav2Vec2ConformerForXVector"},{local:"transformers.Wav2Vec2ConformerForPreTraining",title:"Wav2Vec2ConformerForPreTraining"}],title:"Wav2Vec2-Conformer"};function Kc(V){return Pc(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class rd extends xc{constructor(c){super();qc(this,c,Kc,Zc,Ec,{})}}export{rd as default,Qc as metadata};
