import{s as mn,o as pn,n as L}from"../chunks/scheduler.25b97de1.js";import{S as fn,i as un,g as i,s as n,r as u,A as hn,h as c,f as l,c as s,j as k,u as h,x as f,k as $,y as o,a as m,v as g,d as _,t as v,w as b}from"../chunks/index.d9030fc9.js";import{T as It}from"../chunks/Tip.baa67368.js";import{D as C}from"../chunks/Docstring.e257edda.js";import{C as Rt}from"../chunks/CodeBlock.e6cd0d95.js";import{E as qt}from"../chunks/ExampleCodeBlock.20db4b6e.js";import{P as dn}from"../chunks/PipelineTag.5f100392.js";import{H as A,E as gn}from"../chunks/EditOnGithub.91d95064.js";function _n(M){let t,y="Example:",d,p,w;return p=new Rt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFdhdjJWZWMyQmVydENvbmZpZyUyQyUyMFdhdjJWZWMyQmVydE1vZGVsJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMFdhdjJWZWMyQmVydCUyMGZhY2Vib29rJTJGd2F2MnZlYzItYmVydC1yZWwtcG9zLWxhcmdlJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMFdhdjJWZWMyQmVydENvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwKHdpdGglMjByYW5kb20lMjB3ZWlnaHRzKSUyMGZyb20lMjB0aGUlMjBmYWNlYm9vayUyRndhdjJ2ZWMyLWJlcnQtcmVsLXBvcy1sYXJnZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwV2F2MlZlYzJCZXJ0TW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Wav2Vec2BertConfig, Wav2Vec2BertModel

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the facebook/wav2vec2-bert-rel-pos-large style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Wav2Vec2BertModel(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`,wrap:!1}}),{c(){t=i("p"),t.textContent=y,d=n(),u(p.$$.fragment)},l(a){t=c(a,"P",{"data-svelte-h":!0}),f(t)!=="svelte-11lpom8"&&(t.textContent=y),d=s(a),h(p.$$.fragment,a)},m(a,T){m(a,t,T),m(a,d,T),g(p,a,T),w=!0},p:L,i(a){w||(_(p.$$.fragment,a),w=!0)},o(a){v(p.$$.fragment,a),w=!1},d(a){a&&(l(t),l(d)),b(p,a)}}}function vn(M){let t,y=`This class method is simply calling <a href="/docs/transformers/pr_30356/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.save_pretrained">save_pretrained()</a> and
<a href="/docs/transformers/pr_30356/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.save_pretrained">save_pretrained()</a>. Please refer to the docstrings of the
methods above for more information.`;return{c(){t=i("p"),t.innerHTML=y},l(d){t=c(d,"P",{"data-svelte-h":!0}),f(t)!=="svelte-137xuyo"&&(t.innerHTML=y)},m(d,p){m(d,t,p)},p:L,d(d){d&&l(t)}}}function bn(M){let t,y=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=i("p"),t.innerHTML=y},l(d){t=c(d,"P",{"data-svelte-h":!0}),f(t)!=="svelte-fincs2"&&(t.innerHTML=y)},m(d,p){m(d,t,p)},p:L,d(d){d&&l(t)}}}function yn(M){let t,y="Example:",d,p,w;return p=new Rt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMkMlMjBXYXYyVmVjMkJlcnRNb2RlbCUwQWltcG9ydCUyMHRvcmNoJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJoZi1pbnRlcm5hbC10ZXN0aW5nJTJGbGlicmlzcGVlY2hfYXNyX2RlbW8lMjIlMkMlMjAlMjJjbGVhbiUyMiUyQyUyMHNwbGl0JTNEJTIydmFsaWRhdGlvbiUyMiUyQyUyMHRydXN0X3JlbW90ZV9jb2RlJTNEVHJ1ZSklMEFkYXRhc2V0JTIwJTNEJTIwZGF0YXNldC5zb3J0KCUyMmlkJTIyKSUwQXNhbXBsaW5nX3JhdGUlMjAlM0QlMjBkYXRhc2V0LmZlYXR1cmVzJTVCJTIyYXVkaW8lMjIlNUQuc2FtcGxpbmdfcmF0ZSUwQSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmhmLWF1ZGlvJTJGd2F2MnZlYzItYmVydC1DVjE2LWVuJTIyKSUwQW1vZGVsJTIwJTNEJTIwV2F2MlZlYzJCZXJ0TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmhmLWF1ZGlvJTJGd2F2MnZlYzItYmVydC1DVjE2LWVuJTIyKSUwQSUwQSUyMyUyMGF1ZGlvJTIwZmlsZSUyMGlzJTIwZGVjb2RlZCUyMG9uJTIwdGhlJTIwZmx5JTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGRhdGFzZXQlNUIwJTVEJTVCJTIyYXVkaW8lMjIlNUQlNUIlMjJhcnJheSUyMiU1RCUyQyUyMHNhbXBsaW5nX3JhdGUlM0RzYW1wbGluZ19yYXRlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGUlMEFsaXN0KGxhc3RfaGlkZGVuX3N0YXRlcy5zaGFwZSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, Wav2Vec2BertModel
<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>, trust_remote_code=<span class="hljs-literal">True</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;hf-audio/wav2vec2-bert-CV16-en&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Wav2Vec2BertModel.from_pretrained(<span class="hljs-string">&quot;hf-audio/wav2vec2-bert-CV16-en&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">146</span>, <span class="hljs-number">1024</span>]`,wrap:!1}}),{c(){t=i("p"),t.textContent=y,d=n(),u(p.$$.fragment)},l(a){t=c(a,"P",{"data-svelte-h":!0}),f(t)!=="svelte-11lpom8"&&(t.textContent=y),d=s(a),h(p.$$.fragment,a)},m(a,T){m(a,t,T),m(a,d,T),g(p,a,T),w=!0},p:L,i(a){w||(_(p.$$.fragment,a),w=!0)},o(a){v(p.$$.fragment,a),w=!1},d(a){a&&(l(t),l(d)),b(p,a)}}}function wn(M){let t,y=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=i("p"),t.innerHTML=y},l(d){t=c(d,"P",{"data-svelte-h":!0}),f(t)!=="svelte-fincs2"&&(t.innerHTML=y)},m(d,p){m(d,t,p)},p:L,d(d){d&&l(t)}}}function Tn(M){let t,y="Example:",d,p,w;return p=new Rt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMkMlMjBXYXYyVmVjMkJlcnRGb3JDVEMlMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQWRhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaGYtaW50ZXJuYWwtdGVzdGluZyUyRmxpYnJpc3BlZWNoX2Fzcl9kZW1vJTIyJTJDJTIwJTIyY2xlYW4lMjIlMkMlMjBzcGxpdCUzRCUyMnZhbGlkYXRpb24lMjIlMkMlMjB0cnVzdF9yZW1vdGVfY29kZSUzRFRydWUpJTBBZGF0YXNldCUyMCUzRCUyMGRhdGFzZXQuc29ydCglMjJpZCUyMiklMEFzYW1wbGluZ19yYXRlJTIwJTNEJTIwZGF0YXNldC5mZWF0dXJlcyU1QiUyMmF1ZGlvJTIyJTVELnNhbXBsaW5nX3JhdGUlMEElMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJoZi1hdWRpbyUyRndhdjJ2ZWMyLWJlcnQtQ1YxNi1lbiUyMiklMEFtb2RlbCUyMCUzRCUyMFdhdjJWZWMyQmVydEZvckNUQy5mcm9tX3ByZXRyYWluZWQoJTIyaGYtYXVkaW8lMkZ3YXYydmVjMi1iZXJ0LUNWMTYtZW4lMjIpJTBBJTBBJTIzJTIwYXVkaW8lMjBmaWxlJTIwaXMlMjBkZWNvZGVkJTIwb24lMjB0aGUlMjBmbHklMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoZGF0YXNldCU1QjAlNUQlNUIlMjJhdWRpbyUyMiU1RCU1QiUyMmFycmF5JTIyJTVEJTJDJTIwc2FtcGxpbmdfcmF0ZSUzRHNhbXBsaW5nX3JhdGUlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBcHJlZGljdGVkX2lkcyUyMCUzRCUyMHRvcmNoLmFyZ21heChsb2dpdHMlMkMlMjBkaW0lM0QtMSklMEElMEElMjMlMjB0cmFuc2NyaWJlJTIwc3BlZWNoJTBBdHJhbnNjcmlwdGlvbiUyMCUzRCUyMHByb2Nlc3Nvci5iYXRjaF9kZWNvZGUocHJlZGljdGVkX2lkcyklMEF0cmFuc2NyaXB0aW9uJTVCMCU1RCUwQSUwQWlucHV0cyU1QiUyMmxhYmVscyUyMiU1RCUyMCUzRCUyMHByb2Nlc3Nvcih0ZXh0JTNEZGF0YXNldCU1QjAlNUQlNUIlMjJ0ZXh0JTIyJTVEJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMikuaW5wdXRfaWRzJTBBJTBBJTIzJTIwY29tcHV0ZSUyMGxvc3MlMEFsb3NzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvc3MlMEFyb3VuZChsb3NzLml0ZW0oKSUyQyUyMDIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, Wav2Vec2BertForCTC
<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>, trust_remote_code=<span class="hljs-literal">True</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;hf-audio/wav2vec2-bert-CV16-en&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Wav2Vec2BertForCTC.from_pretrained(<span class="hljs-string">&quot;hf-audio/wav2vec2-bert-CV16-en&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;mr 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">17.04</span>`,wrap:!1}}),{c(){t=i("p"),t.textContent=y,d=n(),u(p.$$.fragment)},l(a){t=c(a,"P",{"data-svelte-h":!0}),f(t)!=="svelte-11lpom8"&&(t.textContent=y),d=s(a),h(p.$$.fragment,a)},m(a,T){m(a,t,T),m(a,d,T),g(p,a,T),w=!0},p:L,i(a){w||(_(p.$$.fragment,a),w=!0)},o(a){v(p.$$.fragment,a),w=!1},d(a){a&&(l(t),l(d)),b(p,a)}}}function Mn(M){let t,y=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=i("p"),t.innerHTML=y},l(d){t=c(d,"P",{"data-svelte-h":!0}),f(t)!=="svelte-fincs2"&&(t.innerHTML=y)},m(d,p){m(d,t,p)},p:L,d(d){d&&l(t)}}}function Wn(M){let t,y="Example:",d,p,w;return p=new Rt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9GZWF0dXJlRXh0cmFjdG9yJTJDJTIwV2F2MlZlYzJCZXJ0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbiUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQWltcG9ydCUyMHRvcmNoJTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJoZi1pbnRlcm5hbC10ZXN0aW5nJTJGbGlicmlzcGVlY2hfYXNyX2RlbW8lMjIlMkMlMjAlMjJjbGVhbiUyMiUyQyUyMHNwbGl0JTNEJTIydmFsaWRhdGlvbiUyMiUyQyUyMHRydXN0X3JlbW90ZV9jb2RlJTNEVHJ1ZSklMEFkYXRhc2V0JTIwJTNEJTIwZGF0YXNldC5zb3J0KCUyMmlkJTIyKSUwQXNhbXBsaW5nX3JhdGUlMjAlM0QlMjBkYXRhc2V0LmZlYXR1cmVzJTVCJTIyYXVkaW8lMjIlNUQuc2FtcGxpbmdfcmF0ZSUwQSUwQWZlYXR1cmVfZXh0cmFjdG9yJTIwJTNEJTIwQXV0b0ZlYXR1cmVFeHRyYWN0b3IuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGdzJ2LWJlcnQtMi4wJTIyKSUwQW1vZGVsJTIwJTNEJTIwV2F2MlZlYzJCZXJ0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZ3MnYtYmVydC0yLjAlMjIpJTBBJTBBJTIzJTIwYXVkaW8lMjBmaWxlJTIwaXMlMjBkZWNvZGVkJTIwb24lMjB0aGUlMjBmbHklMEFpbnB1dHMlMjAlM0QlMjBmZWF0dXJlX2V4dHJhY3RvcihkYXRhc2V0JTVCMCU1RCU1QiUyMmF1ZGlvJTIyJTVEJTVCJTIyYXJyYXklMjIlNUQlMkMlMjBzYW1wbGluZ19yYXRlJTNEc2FtcGxpbmdfcmF0ZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEFwcmVkaWN0ZWRfY2xhc3NfaWRzJTIwJTNEJTIwdG9yY2guYXJnbWF4KGxvZ2l0cyUyQyUyMGRpbSUzRC0xKS5pdGVtKCklMEFwcmVkaWN0ZWRfbGFiZWwlMjAlM0QlMjBtb2RlbC5jb25maWcuaWQybGFiZWwlNUJwcmVkaWN0ZWRfY2xhc3NfaWRzJTVEJTBBJTBBJTIzJTIwY29tcHV0ZSUyMGxvc3MlMjAtJTIwdGFyZ2V0X2xhYmVsJTIwaXMlMjBlLmcuJTIwJTIyZG93biUyMiUwQXRhcmdldF9sYWJlbCUyMCUzRCUyMG1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QjAlNUQlMEFpbnB1dHMlNUIlMjJsYWJlbHMlMjIlNUQlMjAlM0QlMjB0b3JjaC50ZW5zb3IoJTVCbW9kZWwuY29uZmlnLmxhYmVsMmlkJTVCdGFyZ2V0X2xhYmVsJTVEJTVEKSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9zcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor, Wav2Vec2BertForSequenceClassification
<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>, trust_remote_code=<span class="hljs-literal">True</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/w2v-bert-2.0&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Wav2Vec2BertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;facebook/w2v-bert-2.0&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`,wrap:!1}}),{c(){t=i("p"),t.textContent=y,d=n(),u(p.$$.fragment)},l(a){t=c(a,"P",{"data-svelte-h":!0}),f(t)!=="svelte-11lpom8"&&(t.textContent=y),d=s(a),h(p.$$.fragment,a)},m(a,T){m(a,t,T),m(a,d,T),g(p,a,T),w=!0},p:L,i(a){w||(_(p.$$.fragment,a),w=!0)},o(a){v(p.$$.fragment,a),w=!1},d(a){a&&(l(t),l(d)),b(p,a)}}}function Vn(M){let t,y=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=i("p"),t.innerHTML=y},l(d){t=c(d,"P",{"data-svelte-h":!0}),f(t)!=="svelte-fincs2"&&(t.innerHTML=y)},m(d,p){m(d,t,p)},p:L,d(d){d&&l(t)}}}function kn(M){let t,y="Example:",d,p,w;return p=new Rt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9GZWF0dXJlRXh0cmFjdG9yJTJDJTIwV2F2MlZlYzJCZXJ0Rm9yQXVkaW9GcmFtZUNsYXNzaWZpY2F0aW9uJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBaW1wb3J0JTIwdG9yY2glMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmhmLWludGVybmFsLXRlc3RpbmclMkZsaWJyaXNwZWVjaF9hc3JfZGVtbyUyMiUyQyUyMCUyMmNsZWFuJTIyJTJDJTIwc3BsaXQlM0QlMjJ2YWxpZGF0aW9uJTIyJTJDJTIwdHJ1c3RfcmVtb3RlX2NvZGUlM0RUcnVlKSUwQWRhdGFzZXQlMjAlM0QlMjBkYXRhc2V0LnNvcnQoJTIyaWQlMjIpJTBBc2FtcGxpbmdfcmF0ZSUyMCUzRCUyMGRhdGFzZXQuZmVhdHVyZXMlNUIlMjJhdWRpbyUyMiU1RC5zYW1wbGluZ19yYXRlJTBBJTBBZmVhdHVyZV9leHRyYWN0b3IlMjAlM0QlMjBBdXRvRmVhdHVyZUV4dHJhY3Rvci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZ3MnYtYmVydC0yLjAlMjIpJTBBbW9kZWwlMjAlM0QlMjBXYXYyVmVjMkJlcnRGb3JBdWRpb0ZyYW1lQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGdzJ2LWJlcnQtMi4wJTIyKSUwQSUwQSUyMyUyMGF1ZGlvJTIwZmlsZSUyMGlzJTIwZGVjb2RlZCUyMG9uJTIwdGhlJTIwZmx5JTBBaW5wdXRzJTIwJTNEJTIwZmVhdHVyZV9leHRyYWN0b3IoZGF0YXNldCU1QjAlNUQlNUIlMjJhdWRpbyUyMiU1RCU1QiUyMmFycmF5JTIyJTVEJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiUyQyUyMHNhbXBsaW5nX3JhdGUlM0RzYW1wbGluZ19yYXRlKSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJvYmFiaWxpdGllcyUyMCUzRCUyMHRvcmNoLnNpZ21vaWQobG9naXRzJTVCMCU1RCklMEElMjMlMjBsYWJlbHMlMjBpcyUyMGElMjBvbmUtaG90JTIwYXJyYXklMjBvZiUyMHNoYXBlJTIwKG51bV9mcmFtZXMlMkMlMjBudW1fc3BlYWtlcnMpJTBBbGFiZWxzJTIwJTNEJTIwKHByb2JhYmlsaXRpZXMlMjAlM0UlMjAwLjUpLmxvbmcoKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor, Wav2Vec2BertForAudioFrameClassification
<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>, trust_remote_code=<span class="hljs-literal">True</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/w2v-bert-2.0&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Wav2Vec2BertForAudioFrameClassification.from_pretrained(<span class="hljs-string">&quot;facebook/w2v-bert-2.0&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()`,wrap:!1}}),{c(){t=i("p"),t.textContent=y,d=n(),u(p.$$.fragment)},l(a){t=c(a,"P",{"data-svelte-h":!0}),f(t)!=="svelte-11lpom8"&&(t.textContent=y),d=s(a),h(p.$$.fragment,a)},m(a,T){m(a,t,T),m(a,d,T),g(p,a,T),w=!0},p:L,i(a){w||(_(p.$$.fragment,a),w=!0)},o(a){v(p.$$.fragment,a),w=!1},d(a){a&&(l(t),l(d)),b(p,a)}}}function $n(M){let t,y=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){t=i("p"),t.innerHTML=y},l(d){t=c(d,"P",{"data-svelte-h":!0}),f(t)!=="svelte-fincs2"&&(t.innerHTML=y)},m(d,p){m(d,t,p)},p:L,d(d){d&&l(t)}}}function Cn(M){let t,y="Example:",d,p,w;return p=new Rt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9GZWF0dXJlRXh0cmFjdG9yJTJDJTIwV2F2MlZlYzJCZXJ0Rm9yWFZlY3RvciUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQWltcG9ydCUyMHRvcmNoJTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJoZi1pbnRlcm5hbC10ZXN0aW5nJTJGbGlicmlzcGVlY2hfYXNyX2RlbW8lMjIlMkMlMjAlMjJjbGVhbiUyMiUyQyUyMHNwbGl0JTNEJTIydmFsaWRhdGlvbiUyMiUyQyUyMHRydXN0X3JlbW90ZV9jb2RlJTNEVHJ1ZSklMEFkYXRhc2V0JTIwJTNEJTIwZGF0YXNldC5zb3J0KCUyMmlkJTIyKSUwQXNhbXBsaW5nX3JhdGUlMjAlM0QlMjBkYXRhc2V0LmZlYXR1cmVzJTVCJTIyYXVkaW8lMjIlNUQuc2FtcGxpbmdfcmF0ZSUwQSUwQWZlYXR1cmVfZXh0cmFjdG9yJTIwJTNEJTIwQXV0b0ZlYXR1cmVFeHRyYWN0b3IuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGdzJ2LWJlcnQtMi4wJTIyKSUwQW1vZGVsJTIwJTNEJTIwV2F2MlZlYzJCZXJ0Rm9yWFZlY3Rvci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZ3MnYtYmVydC0yLjAlMjIpJTBBJTBBJTIzJTIwYXVkaW8lMjBmaWxlJTIwaXMlMjBkZWNvZGVkJTIwb24lMjB0aGUlMjBmbHklMEFpbnB1dHMlMjAlM0QlMjBmZWF0dXJlX2V4dHJhY3RvciglMEElMjAlMjAlMjAlMjAlNUJkJTVCJTIyYXJyYXklMjIlNUQlMjBmb3IlMjBkJTIwaW4lMjBkYXRhc2V0JTVCJTNBMiU1RCU1QiUyMmF1ZGlvJTIyJTVEJTVEJTJDJTIwc2FtcGxpbmdfcmF0ZSUzRHNhbXBsaW5nX3JhdGUlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyJTJDJTIwcGFkZGluZyUzRFRydWUlMEEpJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGVtYmVkZGluZ3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykuZW1iZWRkaW5ncyUwQSUwQWVtYmVkZGluZ3MlMjAlM0QlMjB0b3JjaC5ubi5mdW5jdGlvbmFsLm5vcm1hbGl6ZShlbWJlZGRpbmdzJTJDJTIwZGltJTNELTEpLmNwdSgpJTBBJTBBJTIzJTIwdGhlJTIwcmVzdWx0aW5nJTIwZW1iZWRkaW5ncyUyMGNhbiUyMGJlJTIwdXNlZCUyMGZvciUyMGNvc2luZSUyMHNpbWlsYXJpdHktYmFzZWQlMjByZXRyaWV2YWwlMEFjb3NpbmVfc2ltJTIwJTNEJTIwdG9yY2gubm4uQ29zaW5lU2ltaWxhcml0eShkaW0lM0QtMSklMEFzaW1pbGFyaXR5JTIwJTNEJTIwY29zaW5lX3NpbShlbWJlZGRpbmdzJTVCMCU1RCUyQyUyMGVtYmVkZGluZ3MlNUIxJTVEKSUwQXRocmVzaG9sZCUyMCUzRCUyMDAuNyUyMCUyMCUyMyUyMHRoZSUyMG9wdGltYWwlMjB0aHJlc2hvbGQlMjBpcyUyMGRhdGFzZXQtZGVwZW5kZW50JTBBaWYlMjBzaW1pbGFyaXR5JTIwJTNDJTIwdGhyZXNob2xkJTNBJTBBJTIwJTIwJTIwJTIwcHJpbnQoJTIyU3BlYWtlcnMlMjBhcmUlMjBub3QlMjB0aGUlMjBzYW1lISUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor, Wav2Vec2BertForXVector
<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>, trust_remote_code=<span class="hljs-literal">True</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/w2v-bert-2.0&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Wav2Vec2BertForXVector.from_pretrained(<span class="hljs-string">&quot;facebook/w2v-bert-2.0&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>)`,wrap:!1}}),{c(){t=i("p"),t.textContent=y,d=n(),u(p.$$.fragment)},l(a){t=c(a,"P",{"data-svelte-h":!0}),f(t)!=="svelte-11lpom8"&&(t.textContent=y),d=s(a),h(p.$$.fragment,a)},m(a,T){m(a,t,T),m(a,d,T),g(p,a,T),w=!0},p:L,i(a){w||(_(p.$$.fragment,a),w=!0)},o(a){v(p.$$.fragment,a),w=!1},d(a){a&&(l(t),l(d)),b(p,a)}}}function Bn(M){let t,y,d,p,w,a,T,Yt,_e,Ta='The Wav2Vec2-BERT model was proposed in <a href="https://ai.meta.com/research/publications/seamless-multilingual-expressive-and-streaming-speech-translation/" rel="nofollow">Seamless: Multilingual Expressive and Streaming Speech Translation</a> by the Seamless Communication team from Meta AI.',Lt,ve,Ma="This model was pre-trained on 4.5M hours of unlabeled audio data covering more than 143 languages. It requires finetuning to be used for downstream tasks such as Automatic Speech Recognition (ASR), or Audio Classification.",Et,be,Wa="The official results of the model can be found in Section 3.2.1 of the paper.",Ht,ye,Va="The abstract from the paper is the following:",Pt,we,ka="<em>Recent advancements in automatic speech translation have dramatically expanded language coverage, improved multimodal capabilities, and enabled a wide range of tasks and functionalities. That said, large-scale automatic speech translation systems today lack key features that help machine-mediated communication feel seamless when compared to human-to-human dialogue. In this work, we introduce a family of models that enable end-to-end expressive and multilingual translations in a streaming fashion. First, we contribute an improved version of the massively multilingual and multimodal SeamlessM4T model—SeamlessM4T v2. This newer model, incorporating an updated UnitY2 framework, was trained on more low-resource language data. The expanded version of SeamlessAlign adds 114,800 hours of automatically aligned data for a total of 76 languages. SeamlessM4T v2 provides the foundation on which our two newest models, SeamlessExpressive and SeamlessStreaming, are initiated. SeamlessExpressive enables translation that preserves vocal styles and prosody. Compared to previous efforts in expressive speech research, our work addresses certain underexplored aspects of prosody, such as speech rate and pauses, while also preserving the style of one’s voice. As for SeamlessStreaming, our model leverages the Efficient Monotonic Multihead Attention (EMMA) mechanism to generate low-latency target translations without waiting for complete source utterances. As the first of its kind, SeamlessStreaming enables simultaneous speech-to-speech/text translation for multiple source and target languages. To understand the performance of these models, we combined novel and modified versions of existing automatic metrics to evaluate prosody, latency, and robustness. For human evaluations, we adapted existing protocols tailored for measuring the most relevant attributes in the preservation of meaning, naturalness, and expressivity. To ensure that our models can be used safely and responsibly, we implemented the first known red-teaming effort for multimodal machine translation, a system for the detection and mitigation of added toxicity, a systematic evaluation of gender bias, and an inaudible localized watermarking mechanism designed to dampen the impact of deepfakes. Consequently, we bring major components from SeamlessExpressive and SeamlessStreaming together to form Seamless, the first publicly available system that unlocks expressive cross-lingual communication in real-time. In sum, Seamless gives us a pivotal look at the technical foundation needed to turn the Universal Speech Translator from a science fiction concept into a real-world technology. Finally, contributions in this work—including models, code, and a watermark detector—are publicly released and accessible at the link below.</em>",At,Te,$a='This model was contributed by <a href="https://huggingface.co/ylacombe" rel="nofollow">ylacombe</a>. The original code can be found <a href="https://github.com/facebookresearch/seamless_communication" rel="nofollow">here</a>.',Qt,Me,Dt,We,Ca=`<li>Wav2Vec2-BERT follows the same architecture as Wav2Vec2-Conformer, but employs a causal depthwise convolutional layer and uses as input a mel-spectrogram representation of the audio instead of the raw waveform.</li> <li>Wav2Vec2-BERT can use either no relative position embeddings, Shaw-like position embeddings, Transformer-XL-like position embeddings, or
rotary position embeddings by setting the correct <code>config.position_embeddings_type</code>.</li> <li>Wav2Vec2-BERT also introduces a Conformer-based adapter network instead of a simple convolutional network.</li>`,Ot,Ve,Kt,ke,eo,$e,Ba='<li><a href="/docs/transformers/pr_30356/en/model_doc/wav2vec2-bert#transformers.Wav2Vec2BertForCTC">Wav2Vec2BertForCTC</a> is supported by this <a href="https://github.com/huggingface/transformers/tree/main/examples/pytorch/speech-recognition" rel="nofollow">example script</a>.</li> <li>You can also adapt these notebooks on <a href="https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/speech_recognition.ipynb" rel="nofollow">how to finetune a speech recognition model in English</a>, and <a href="https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/multi_lingual_speech_recognition.ipynb" rel="nofollow">how to finetune a speech recognition model in any language</a>.</li>',to,Ce,oo,Be,ja='<li><a href="/docs/transformers/pr_30356/en/model_doc/wav2vec2-bert#transformers.Wav2Vec2BertForSequenceClassification">Wav2Vec2BertForSequenceClassification</a> can be used by adapting this <a href="https://github.com/huggingface/transformers/tree/main/examples/pytorch/audio-classification" rel="nofollow">example script</a>.</li> <li>See also: <a href="../tasks/audio_classification">Audio classification task guide</a></li>',ao,je,no,U,Je,wo,rt,Ja=`This is the configuration class to store the configuration of a <a href="/docs/transformers/pr_30356/en/model_doc/wav2vec2-bert#transformers.Wav2Vec2BertModel">Wav2Vec2BertModel</a>. It is used to
instantiate an Wav2Vec2Bert 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 Wav2Vec2Bert
<a href="https://huggingface.co/facebook/wav2vec2-bert-rel-pos-large" rel="nofollow">facebook/wav2vec2-bert-rel-pos-large</a>
architecture.`,To,lt,xa=`Configuration objects inherit from <a href="/docs/transformers/pr_30356/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/pr_30356/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Mo,O,so,xe,ro,W,Fe,Wo,it,Fa=`Constructs a Wav2Vec2-BERT processor which wraps a Wav2Vec2-BERT feature extractor and a Wav2Vec2 CTC tokenizer into a single
processor.`,Vo,ct,Ua=`<a href="/docs/transformers/pr_30356/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor">Wav2Vec2Processor</a> offers all the functionalities of <a href="/docs/transformers/pr_30356/en/model_doc/seamless_m4t#transformers.SeamlessM4TFeatureExtractor">SeamlessM4TFeatureExtractor</a> and <a href="/docs/transformers/pr_30356/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>.
See the docstring of <a href="/docs/transformers/pr_30356/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor.__call__"><strong>call</strong>()</a> and <a href="/docs/transformers/pr_30356/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor.decode">decode()</a> for more information.`,ko,K,Ue,$o,dt,Za=`Main method to prepare for the model one or several sequences(s) and audio(s). This method forwards the <code>audio</code>
and <code>kwargs</code> arguments to SeamlessM4TFeatureExtractor’s <a href="/docs/transformers/pr_30356/en/model_doc/seamless_m4t#transformers.SeamlessM4TFeatureExtractor.__call__"><strong>call</strong>()</a> if <code>audio</code> is not
<code>None</code> to pre-process the audio. To prepare the target sequences(s), this method forwards the <code>text</code> and <code>kwargs</code> arguments to
PreTrainedTokenizer’s <a href="/docs/transformers/pr_30356/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__"><strong>call</strong>()</a> if <code>text</code> is not <code>None</code>. Please refer to the doctsring of the above two methods for more information.`,Co,ee,Ze,Bo,mt,za=`If <code>input_features</code> is not <code>None</code>, this method forwards the <code>input_features</code> and <code>kwargs</code> arguments to SeamlessM4TFeatureExtractor’s <a href="/docs/transformers/pr_30356/en/main_classes/feature_extractor#transformers.SequenceFeatureExtractor.pad">pad()</a> to pad the input features.
If <code>labels</code> is not <code>None</code>, this method forwards the <code>labels</code> and <code>kwargs</code> arguments to PreTrainedTokenizer’s <a href="/docs/transformers/pr_30356/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.pad">pad()</a> to pad the label(s).
Please refer to the doctsring of the above two methods for more information.`,jo,pt,ze,Jo,Q,Ge,xo,ft,Ga=`Saves the attributes of this processor (feature extractor, tokenizer…) in the specified directory so that it
can be reloaded using the <a href="/docs/transformers/pr_30356/en/main_classes/processors#transformers.ProcessorMixin.from_pretrained">from_pretrained()</a> method.`,Fo,te,Uo,oe,Xe,Zo,ut,Xa=`This method forwards all its arguments to PreTrainedTokenizer’s <a href="/docs/transformers/pr_30356/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.batch_decode">batch_decode()</a>. Please
refer to the docstring of this method for more information.`,zo,ae,Ie,Go,ht,Ia=`This method forwards all its arguments to PreTrainedTokenizer’s <a href="/docs/transformers/pr_30356/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.decode">decode()</a>. Please refer
to the docstring of this method for more information.`,lo,qe,io,x,Re,Xo,gt,qa=`The bare Wav2Vec2Bert Model transformer outputting raw hidden-states without any specific head on top.
Wav2Vec2Bert was proposed in <a href="https://arxiv.org/abs/2006.11477" rel="nofollow">wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations</a> by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`,Io,_t,Ra=`This model inherits from <a href="/docs/transformers/pr_30356/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`,qo,vt,Na=`This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#nn.Module" rel="nofollow">nn.Module</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.`,Ro,G,Ne,No,bt,Sa='The <a href="/docs/transformers/pr_30356/en/model_doc/wav2vec2-bert#transformers.Wav2Vec2BertModel">Wav2Vec2BertModel</a> forward method, overrides the <code>__call__</code> special method.',So,ne,Yo,se,co,Se,mo,F,Ye,Lo,yt,Ya=`Wav2Vec2Bert Model with a <code>language modeling</code> head on top for Connectionist Temporal Classification (CTC).
Wav2Vec2Bert was proposed in <a href="https://arxiv.org/abs/2006.11477" rel="nofollow">wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations</a> by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`,Eo,wt,La=`This model inherits from <a href="/docs/transformers/pr_30356/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`,Ho,Tt,Ea=`This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#nn.Module" rel="nofollow">nn.Module</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.`,Po,X,Le,Ao,Mt,Ha='The <a href="/docs/transformers/pr_30356/en/model_doc/wav2vec2-bert#transformers.Wav2Vec2BertForCTC">Wav2Vec2BertForCTC</a> forward method, overrides the <code>__call__</code> special method.',Qo,re,Do,le,po,Ee,fo,B,He,Oo,Wt,Pa=`Wav2Vec2Bert Model with a sequence classification head on top (a linear layer over the pooled output) for
tasks like SUPERB Keyword Spotting.`,Ko,Vt,Aa=`Wav2Vec2Bert was proposed in <a href="https://arxiv.org/abs/2006.11477" rel="nofollow">wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations</a> by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`,ea,kt,Qa=`This model inherits from <a href="/docs/transformers/pr_30356/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`,ta,$t,Da=`This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#nn.Module" rel="nofollow">nn.Module</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.`,oa,I,Pe,aa,Ct,Oa='The <a href="/docs/transformers/pr_30356/en/model_doc/wav2vec2-bert#transformers.Wav2Vec2BertForSequenceClassification">Wav2Vec2BertForSequenceClassification</a> forward method, overrides the <code>__call__</code> special method.',na,ie,sa,ce,uo,Ae,ho,j,Qe,ra,Bt,Ka="Wav2Vec2Bert Model with a frame classification head on top for tasks like Speaker Diarization.",la,jt,en=`Wav2Vec2Bert was proposed in <a href="https://arxiv.org/abs/2006.11477" rel="nofollow">wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations</a> by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`,ia,Jt,tn=`This model inherits from <a href="/docs/transformers/pr_30356/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`,ca,xt,on=`This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#nn.Module" rel="nofollow">nn.Module</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.`,da,q,De,ma,Ft,an='The <a href="/docs/transformers/pr_30356/en/model_doc/wav2vec2-bert#transformers.Wav2Vec2BertForAudioFrameClassification">Wav2Vec2BertForAudioFrameClassification</a> forward method, overrides the <code>__call__</code> special method.',pa,de,fa,me,go,Oe,_o,J,Ke,ua,Ut,nn="Wav2Vec2Bert Model with an XVector feature extraction head on top for tasks like Speaker Verification.",ha,Zt,sn=`Wav2Vec2Bert was proposed in <a href="https://arxiv.org/abs/2006.11477" rel="nofollow">wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations</a> by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`,ga,zt,rn=`This model inherits from <a href="/docs/transformers/pr_30356/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`,_a,Gt,ln=`This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#nn.Module" rel="nofollow">nn.Module</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.`,va,R,et,ba,Xt,cn='The <a href="/docs/transformers/pr_30356/en/model_doc/wav2vec2-bert#transformers.Wav2Vec2BertForXVector">Wav2Vec2BertForXVector</a> forward method, overrides the <code>__call__</code> special method.',ya,pe,wa,fe,vo,tt,bo,Nt,yo;return w=new A({props:{title:"Wav2Vec2-BERT",local:"wav2vec2-bert",headingTag:"h1"}}),T=new A({props:{title:"Overview",local:"overview",headingTag:"h2"}}),Me=new A({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),Ve=new A({props:{title:"Resources",local:"resources",headingTag:"h2"}}),ke=new dn({props:{pipeline:"automatic-speech-recognition"}}),Ce=new dn({props:{pipeline:"audio-classification"}}),je=new A({props:{title:"Wav2Vec2BertConfig",local:"transformers.Wav2Vec2BertConfig",headingTag:"h2"}}),Je=new C({props:{name:"class transformers.Wav2Vec2BertConfig",anchor:"transformers.Wav2Vec2BertConfig",parameters:[{name:"vocab_size",val:" = None"},{name:"hidden_size",val:" = 1024"},{name:"num_hidden_layers",val:" = 24"},{name:"num_attention_heads",val:" = 16"},{name:"intermediate_size",val:" = 4096"},{name:"feature_projection_input_dim",val:" = 160"},{name:"hidden_act",val:" = 'swish'"},{name:"hidden_dropout",val:" = 0.0"},{name:"activation_dropout",val:" = 0.0"},{name:"attention_dropout",val:" = 0.0"},{name:"feat_proj_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:"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:"ctc_loss_reduction",val:" = 'sum'"},{name:"ctc_zero_infinity",val:" = False"},{name:"use_weighted_layer_sum",val:" = False"},{name:"classifier_proj_size",val:" = 768"},{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:" = 1"},{name:"adapter_act",val:" = 'relu'"},{name:"use_intermediate_ffn_before_adapter",val:" = False"},{name:"output_hidden_size",val:" = None"},{name:"position_embeddings_type",val:" = 'relative_key'"},{name:"rotary_embedding_base",val:" = 10000"},{name:"max_source_positions",val:" = 5000"},{name:"left_max_position_embeddings",val:" = 64"},{name:"right_max_position_embeddings",val:" = 8"},{name:"conv_depthwise_kernel_size",val:" = 31"},{name:"conformer_conv_dropout",val:" = 0.1"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Wav2Vec2BertConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Vocabulary size of the Wav2Vec2Bert model. Defines the number of different tokens that can be
represented by the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/pr_30356/en/model_doc/wav2vec2-bert#transformers.Wav2Vec2BertModel">Wav2Vec2BertModel</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/pr_30356/en/model_doc/wav2vec2-bert#transformers.Wav2Vec2BertModel">Wav2Vec2BertModel</a>.`,name:"vocab_size"},{anchor:"transformers.Wav2Vec2BertConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.Wav2Vec2BertConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 24) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.Wav2Vec2BertConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.Wav2Vec2BertConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 4096) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.Wav2Vec2BertConfig.feature_projection_input_dim",description:`<strong>feature_projection_input_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 160) &#x2014;
Input dimension of this model, i.e the dimension after processing input audios with <a href="/docs/transformers/pr_30356/en/model_doc/seamless_m4t#transformers.SeamlessM4TFeatureExtractor">SeamlessM4TFeatureExtractor</a> or <a href="/docs/transformers/pr_30356/en/model_doc/wav2vec2-bert#transformers.Wav2Vec2BertProcessor">Wav2Vec2BertProcessor</a>.`,name:"feature_projection_input_dim"},{anchor:"transformers.Wav2Vec2BertConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;swish&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>, <code>&quot;swish&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.Wav2Vec2BertConfig.hidden_dropout",description:`<strong>hidden_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout"},{anchor:"transformers.Wav2Vec2BertConfig.activation_dropout",description:`<strong>activation_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for activations inside the fully connected layer.`,name:"activation_dropout"},{anchor:"transformers.Wav2Vec2BertConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.Wav2Vec2BertConfig.feat_proj_dropout",description:`<strong>feat_proj_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probability for the feature projection.`,name:"feat_proj_dropout"},{anchor:"transformers.Wav2Vec2BertConfig.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/pr_30356/en/model_doc/wav2vec2-bert#transformers.Wav2Vec2BertForCTC">Wav2Vec2BertForCTC</a>.`,name:"final_dropout"},{anchor:"transformers.Wav2Vec2BertConfig.layerdrop",description:`<strong>layerdrop</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The LayerDrop probability. See the [LayerDrop paper](see <a href="https://arxiv.org/abs/1909.11556" rel="nofollow">https://arxiv.org/abs/1909.11556</a>) for more
details.`,name:"layerdrop"},{anchor:"transformers.Wav2Vec2BertConfig.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.Wav2Vec2BertConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-05) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.Wav2Vec2BertConfig.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.Wav2Vec2BertConfig.mask_time_prob",description:"<strong>mask_time_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.05) &#x2014;\nPercentage (between 0 and 1) of all feature vectors along the time axis which will be masked. The masking\nprocecure generates <code>mask_time_prob*len(time_axis)/mask_time_length ``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, *mask_time_prob* should be </code>prob_vector_start*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.Wav2Vec2BertConfig.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.Wav2Vec2BertConfig.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 <code>mask_time_prob*len(time_axis)/mask_time_length &lt; mask_time_min_masks</code>.`,name:"mask_time_min_masks"},{anchor:"transformers.Wav2Vec2BertConfig.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 <code>mask_feature_prob*len(feature_axis)/mask_time_length</code> 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 <code>prob_vector_start*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</code>.`,name:"mask_feature_prob"},{anchor:"transformers.Wav2Vec2BertConfig.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.Wav2Vec2BertConfig.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
<code>mask_feature_prob*len(feature_axis)/mask_feature_length &lt; mask_feature_min_masks</code>.`,name:"mask_feature_min_masks"},{anchor:"transformers.Wav2Vec2BertConfig.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/pr_30356/en/model_doc/wav2vec2-bert#transformers.Wav2Vec2BertForCTC">Wav2Vec2BertForCTC</a>.`,name:"ctc_loss_reduction"},{anchor:"transformers.Wav2Vec2BertConfig.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/pr_30356/en/model_doc/wav2vec2-bert#transformers.Wav2Vec2BertForCTC">Wav2Vec2BertForCTC</a>.`,name:"ctc_zero_infinity"},{anchor:"transformers.Wav2Vec2BertConfig.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/pr_30356/en/model_doc/wav2vec2-bert#transformers.Wav2Vec2BertForSequenceClassification">Wav2Vec2BertForSequenceClassification</a>.`,name:"use_weighted_layer_sum"},{anchor:"transformers.Wav2Vec2BertConfig.classifier_proj_size",description:`<strong>classifier_proj_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the projection before token mean-pooling for classification.`,name:"classifier_proj_size"},{anchor:"transformers.Wav2Vec2BertConfig.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.Wav2Vec2BertConfig.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.Wav2Vec2BertConfig.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.Wav2Vec2BertConfig.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.Wav2Vec2BertConfig.pad_token_id",description:"<strong>pad_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014; The id of the <em>beginning-of-stream</em> token.",name:"pad_token_id"},{anchor:"transformers.Wav2Vec2BertConfig.bos_token_id",description:"<strong>bos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014; The id of the <em>padding</em> token.",name:"bos_token_id"},{anchor:"transformers.Wav2Vec2BertConfig.eos_token_id",description:"<strong>eos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014; The id of the <em>end-of-stream</em> token.",name:"eos_token_id"},{anchor:"transformers.Wav2Vec2BertConfig.add_adapter",description:`<strong>add_adapter</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether a convolutional attention network should be stacked on top of the Wav2Vec2Bert Encoder. Can be very
useful for warm-starting Wav2Vec2Bert for SpeechEncoderDecoder models.`,name:"add_adapter"},{anchor:"transformers.Wav2Vec2BertConfig.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.Wav2Vec2BertConfig.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.Wav2Vec2BertConfig.num_adapter_layers",description:`<strong>num_adapter_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#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.Wav2Vec2BertConfig.adapter_act",description:`<strong>adapter_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;relu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the adapter layers. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;selu&quot;</code>, <code>&quot;swish&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"adapter_act"},{anchor:"transformers.Wav2Vec2BertConfig.use_intermediate_ffn_before_adapter",description:`<strong>use_intermediate_ffn_before_adapter</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether an intermediate feed-forward block should be stacked on top of the Wav2Vec2Bert Encoder and before the adapter network.
Only relevant if <code>add_adapter is True</code>.`,name:"use_intermediate_ffn_before_adapter"},{anchor:"transformers.Wav2Vec2BertConfig.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.Wav2Vec2BertConfig.position_embeddings_type",description:`<strong>position_embeddings_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;relative_key&quot;</code>) &#x2014;
Can be specified to :<ul>
<li><code>rotary</code>, for rotary position embeddings.</li>
<li><code>relative</code>, for relative position embeddings.</li>
<li><code>relative_key</code>, for relative position embeddings as defined by Shaw in <a href="https://arxiv.org/abs/1803.02155" rel="nofollow">Self-Attention
with Relative Position Representations (Shaw et al.)</a>.
If left to <code>None</code>, no relative position embeddings is applied.</li>
</ul>`,name:"position_embeddings_type"},{anchor:"transformers.Wav2Vec2BertConfig.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.Wav2Vec2BertConfig.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.Wav2Vec2BertConfig.left_max_position_embeddings",description:`<strong>left_max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014;
If <code>&quot;relative_key&quot;</code> (aka Shaw) position embeddings are used, defines the left clipping value for relative positions.`,name:"left_max_position_embeddings"},{anchor:"transformers.Wav2Vec2BertConfig.right_max_position_embeddings",description:`<strong>right_max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
If <code>&quot;relative_key&quot;</code> (aka Shaw) position embeddings are used, defines the right clipping value for relative positions.`,name:"right_max_position_embeddings"},{anchor:"transformers.Wav2Vec2BertConfig.conv_depthwise_kernel_size",description:`<strong>conv_depthwise_kernel_size</strong> (<code>int</code>, <em>optional</em>, defaults to 31) &#x2014;
Kernel size of convolutional depthwise 1D layer in Conformer blocks.`,name:"conv_depthwise_kernel_size"},{anchor:"transformers.Wav2Vec2BertConfig.conformer_conv_dropout",description:`<strong>conformer_conv_dropout</strong> (<code>float</code>, <em>optional</em>, 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/vr_30356/src/transformers/models/wav2vec2_bert/configuration_wav2vec2_bert.py#L24"}}),O=new qt({props:{anchor:"transformers.Wav2Vec2BertConfig.example",$$slots:{default:[_n]},$$scope:{ctx:M}}}),xe=new A({props:{title:"Wav2Vec2BertProcessor",local:"transformers.Wav2Vec2BertProcessor",headingTag:"h2"}}),Fe=new C({props:{name:"class transformers.Wav2Vec2BertProcessor",anchor:"transformers.Wav2Vec2BertProcessor",parameters:[{name:"feature_extractor",val:""},{name:"tokenizer",val:""}],parametersDescription:[{anchor:"transformers.Wav2Vec2BertProcessor.feature_extractor",description:`<strong>feature_extractor</strong> (<code>SeamlessM4TFeatureExtractor</code>) &#x2014;
An instance of <a href="/docs/transformers/pr_30356/en/model_doc/seamless_m4t#transformers.SeamlessM4TFeatureExtractor">SeamlessM4TFeatureExtractor</a>. The feature extractor is a required input.`,name:"feature_extractor"},{anchor:"transformers.Wav2Vec2BertProcessor.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/pr_30356/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>) &#x2014;
An instance of <a href="/docs/transformers/pr_30356/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>. The tokenizer is a required input.`,name:"tokenizer"}],source:"https://github.com/huggingface/transformers/blob/vr_30356/src/transformers/models/wav2vec2_bert/processing_wav2vec2_bert.py#L26"}}),Ue=new C({props:{name:"__call__",anchor:"transformers.Wav2Vec2BertProcessor.__call__",parameters:[{name:"audio",val:" = None"},{name:"text",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Wav2Vec2BertProcessor.__call__.text",description:`<strong>text</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>) &#x2014;
The sequence or batch of sequences to be encoded. Each sequence can be a string or a list of strings
(pretokenized string). If the sequences are provided as list of strings (pretokenized), you must set
<code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text"},{anchor:"transformers.Wav2Vec2BertProcessor.__call__.audio",description:`<strong>audio</strong> (<code>np.ndarray</code>, <code>torch.Tensor</code>, <code>List[np.ndarray]</code>, <code>List[torch.Tensor]</code>) &#x2014;
The audio or batch of audios to be prepared. Each audio can be NumPy array or PyTorch tensor. In case
of a NumPy array/PyTorch tensor, each audio should be of shape (C, T), where C is a number of channels,
and T the sample length of the audio.`,name:"audio"},{anchor:"transformers.Wav2Vec2BertProcessor.__call__.kwargs",description:`<strong>kwargs</strong> (<em>optional</em>) &#x2014;
Remaining dictionary of keyword arguments that will be passed to the feature extractor and/or the
tokenizer.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/vr_30356/src/transformers/models/wav2vec2_bert/processing_wav2vec2_bert.py#L66",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_30356/en/main_classes/tokenizer#transformers.BatchEncoding"
>BatchEncoding</a> with the following fields:</p>
<ul>
<li><strong>input_features</strong> — Audio input features to be fed to a model. Returned when <code>audio</code> is not <code>None</code>.</li>
<li><strong>attention_mask</strong> — List of indices specifying which timestamps should be attended to by the model when <code>audio</code> is not <code>None</code>.
When only <code>text</code> is specified, returns the token attention mask.</li>
<li><strong>labels</strong> — List of token ids to be fed to a model. Returned when both <code>text</code> and <code>audio</code> are not <code>None</code>.</li>
<li><strong>input_ids</strong> — List of token ids to be fed to a model. Returned when <code>text</code> is not <code>None</code> and <code>audio</code> is <code>None</code>.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_30356/en/main_classes/tokenizer#transformers.BatchEncoding"
>BatchEncoding</a></p>
`}}),Ze=new C({props:{name:"pad",anchor:"transformers.Wav2Vec2BertProcessor.pad",parameters:[{name:"input_features",val:" = None"},{name:"labels",val:" = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30356/src/transformers/models/wav2vec2_bert/processing_wav2vec2_bert.py#L112"}}),ze=new C({props:{name:"from_pretrained",anchor:"transformers.Wav2Vec2BertProcessor.from_pretrained",parameters:[{name:"pretrained_model_name_or_path",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30356/src/transformers/models/wav2vec2_bert/processing_wav2vec2_bert.py#L47"}}),Ge=new C({props:{name:"save_pretrained",anchor:"transformers.Wav2Vec2BertProcessor.save_pretrained",parameters:[{name:"save_directory",val:""},{name:"push_to_hub",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Wav2Vec2BertProcessor.save_pretrained.save_directory",description:`<strong>save_directory</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
Directory where the feature extractor JSON file and the tokenizer files will be saved (directory will
be created if it does not exist).`,name:"save_directory"},{anchor:"transformers.Wav2Vec2BertProcessor.save_pretrained.push_to_hub",description:`<strong>push_to_hub</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to push your model to the Hugging Face model hub after saving it. You can specify the
repository you want to push to with <code>repo_id</code> (will default to the name of <code>save_directory</code> in your
namespace).`,name:"push_to_hub"},{anchor:"transformers.Wav2Vec2BertProcessor.save_pretrained.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Additional key word arguments passed along to the <a href="/docs/transformers/pr_30356/en/main_classes/model#transformers.utils.PushToHubMixin.push_to_hub">push_to_hub()</a> method.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/vr_30356/src/transformers/processing_utils.py#L429"}}),te=new It({props:{$$slots:{default:[vn]},$$scope:{ctx:M}}}),Xe=new C({props:{name:"batch_decode",anchor:"transformers.Wav2Vec2BertProcessor.batch_decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30356/src/transformers/models/wav2vec2_bert/processing_wav2vec2_bert.py#L134"}}),Ie=new C({props:{name:"decode",anchor:"transformers.Wav2Vec2BertProcessor.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30356/src/transformers/models/wav2vec2_bert/processing_wav2vec2_bert.py#L141"}}),qe=new A({props:{title:"Wav2Vec2BertModel",local:"transformers.Wav2Vec2BertModel",headingTag:"h2"}}),Re=new C({props:{name:"class transformers.Wav2Vec2BertModel",anchor:"transformers.Wav2Vec2BertModel",parameters:[{name:"config",val:": Wav2Vec2BertConfig"}],parametersDescription:[{anchor:"transformers.Wav2Vec2BertModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_30356/en/model_doc/wav2vec2-bert#transformers.Wav2Vec2BertConfig">Wav2Vec2BertConfig</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/pr_30356/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/vr_30356/src/transformers/models/wav2vec2_bert/modeling_wav2vec2_bert.py#L1041"}}),Ne=new C({props:{name:"forward",anchor:"transformers.Wav2Vec2BertModel.forward",parameters:[{name:"input_features",val:": Optional"},{name:"attention_mask",val:": Optional = None"},{name:"mask_time_indices",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.Wav2Vec2BertModel.forward.input_features",description:`<strong>input_features</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_features</code>, the <a href="/docs/transformers/pr_30356/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/pr_30356/en/model_doc/wav2vec2-bert#transformers.Wav2Vec2BertProcessor.__call__">Wav2Vec2BertProcessor.<strong>call</strong>()</a> for details.`,name:"input_features"},{anchor:"transformers.Wav2Vec2BertModel.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>`,name:"attention_mask"},{anchor:"transformers.Wav2Vec2BertModel.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.Wav2Vec2BertModel.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.Wav2Vec2BertModel.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/pr_30356/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_30356/src/transformers/models/wav2vec2_bert/modeling_wav2vec2_bert.py#L1113",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_30356/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/pr_30356/en/model_doc/wav2vec2-bert#transformers.Wav2Vec2BertConfig"
>Wav2Vec2BertConfig</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>) — 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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_30356/en/model_doc/wav2vec2#transformers.modeling_outputs.Wav2Vec2BaseModelOutput"
>transformers.modeling_outputs.Wav2Vec2BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ne=new It({props:{$$slots:{default:[bn]},$$scope:{ctx:M}}}),se=new qt({props:{anchor:"transformers.Wav2Vec2BertModel.forward.example",$$slots:{default:[yn]},$$scope:{ctx:M}}}),Se=new A({props:{title:"Wav2Vec2BertForCTC",local:"transformers.Wav2Vec2BertForCTC",headingTag:"h2"}}),Ye=new C({props:{name:"class transformers.Wav2Vec2BertForCTC",anchor:"transformers.Wav2Vec2BertForCTC",parameters:[{name:"config",val:""},{name:"target_lang",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.Wav2Vec2BertForCTC.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_30356/en/model_doc/wav2vec2-bert#transformers.Wav2Vec2BertConfig">Wav2Vec2BertConfig</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/pr_30356/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/vr_30356/src/transformers/models/wav2vec2_bert/modeling_wav2vec2_bert.py#L1169"}}),Le=new C({props:{name:"forward",anchor:"transformers.Wav2Vec2BertForCTC.forward",parameters:[{name:"input_features",val:": Optional"},{name:"attention_mask",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"},{name:"labels",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.Wav2Vec2BertForCTC.forward.input_features",description:`<strong>input_features</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_features</code>, the <a href="/docs/transformers/pr_30356/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/pr_30356/en/model_doc/wav2vec2-bert#transformers.Wav2Vec2BertProcessor.__call__">Wav2Vec2BertProcessor.<strong>call</strong>()</a> for details.`,name:"input_features"},{anchor:"transformers.Wav2Vec2BertForCTC.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>`,name:"attention_mask"},{anchor:"transformers.Wav2Vec2BertForCTC.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.Wav2Vec2BertForCTC.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.Wav2Vec2BertForCTC.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/pr_30356/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.Wav2Vec2BertForCTC.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/vr_30356/src/transformers/models/wav2vec2_bert/modeling_wav2vec2_bert.py#L1198",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_30356/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/pr_30356/en/model_doc/wav2vec2-bert#transformers.Wav2Vec2BertConfig"
>Wav2Vec2BertConfig</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) — 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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_30356/en/main_classes/output#transformers.modeling_outputs.CausalLMOutput"
>transformers.modeling_outputs.CausalLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),re=new It({props:{$$slots:{default:[wn]},$$scope:{ctx:M}}}),le=new qt({props:{anchor:"transformers.Wav2Vec2BertForCTC.forward.example",$$slots:{default:[Tn]},$$scope:{ctx:M}}}),Ee=new A({props:{title:"Wav2Vec2BertForSequenceClassification",local:"transformers.Wav2Vec2BertForSequenceClassification",headingTag:"h2"}}),He=new C({props:{name:"class transformers.Wav2Vec2BertForSequenceClassification",anchor:"transformers.Wav2Vec2BertForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.Wav2Vec2BertForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_30356/en/model_doc/wav2vec2-bert#transformers.Wav2Vec2BertConfig">Wav2Vec2BertConfig</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/pr_30356/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/vr_30356/src/transformers/models/wav2vec2_bert/modeling_wav2vec2_bert.py#L1279"}}),Pe=new C({props:{name:"forward",anchor:"transformers.Wav2Vec2BertForSequenceClassification.forward",parameters:[{name:"input_features",val:": Optional"},{name:"attention_mask",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"},{name:"labels",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.Wav2Vec2BertForSequenceClassification.forward.input_features",description:`<strong>input_features</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_features</code>, the <a href="/docs/transformers/pr_30356/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/pr_30356/en/model_doc/wav2vec2-bert#transformers.Wav2Vec2BertProcessor.__call__">Wav2Vec2BertProcessor.<strong>call</strong>()</a> for details.`,name:"input_features"},{anchor:"transformers.Wav2Vec2BertForSequenceClassification.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>`,name:"attention_mask"},{anchor:"transformers.Wav2Vec2BertForSequenceClassification.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.Wav2Vec2BertForSequenceClassification.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.Wav2Vec2BertForSequenceClassification.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/pr_30356/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.Wav2Vec2BertForSequenceClassification.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/vr_30356/src/transformers/models/wav2vec2_bert/modeling_wav2vec2_bert.py#L1313",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_30356/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/pr_30356/en/model_doc/wav2vec2-bert#transformers.Wav2Vec2BertConfig"
>Wav2Vec2BertConfig</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) — 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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_30356/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ie=new It({props:{$$slots:{default:[Mn]},$$scope:{ctx:M}}}),ce=new qt({props:{anchor:"transformers.Wav2Vec2BertForSequenceClassification.forward.example",$$slots:{default:[Wn]},$$scope:{ctx:M}}}),Ae=new A({props:{title:"Wav2Vec2BertForAudioFrameClassification",local:"transformers.Wav2Vec2BertForAudioFrameClassification",headingTag:"h2"}}),Qe=new C({props:{name:"class transformers.Wav2Vec2BertForAudioFrameClassification",anchor:"transformers.Wav2Vec2BertForAudioFrameClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.Wav2Vec2BertForAudioFrameClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_30356/en/model_doc/wav2vec2-bert#transformers.Wav2Vec2BertConfig">Wav2Vec2BertConfig</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/pr_30356/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/vr_30356/src/transformers/models/wav2vec2_bert/modeling_wav2vec2_bert.py#L1383"}}),De=new C({props:{name:"forward",anchor:"transformers.Wav2Vec2BertForAudioFrameClassification.forward",parameters:[{name:"input_features",val:": Optional"},{name:"attention_mask",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.Wav2Vec2BertForAudioFrameClassification.forward.input_features",description:`<strong>input_features</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_features</code>, the <a href="/docs/transformers/pr_30356/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/pr_30356/en/model_doc/wav2vec2-bert#transformers.Wav2Vec2BertProcessor.__call__">Wav2Vec2BertProcessor.<strong>call</strong>()</a> for details.`,name:"input_features"},{anchor:"transformers.Wav2Vec2BertForAudioFrameClassification.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>`,name:"attention_mask"},{anchor:"transformers.Wav2Vec2BertForAudioFrameClassification.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.Wav2Vec2BertForAudioFrameClassification.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.Wav2Vec2BertForAudioFrameClassification.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/pr_30356/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.Wav2Vec2BertForAudioFrameClassification.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/vr_30356/src/transformers/models/wav2vec2_bert/modeling_wav2vec2_bert.py#L1416",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_30356/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/pr_30356/en/model_doc/wav2vec2-bert#transformers.Wav2Vec2BertConfig"
>Wav2Vec2BertConfig</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)  — Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_30356/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),de=new It({props:{$$slots:{default:[Vn]},$$scope:{ctx:M}}}),me=new qt({props:{anchor:"transformers.Wav2Vec2BertForAudioFrameClassification.forward.example",$$slots:{default:[kn]},$$scope:{ctx:M}}}),Oe=new A({props:{title:"Wav2Vec2BertForXVector",local:"transformers.Wav2Vec2BertForXVector",headingTag:"h2"}}),Ke=new C({props:{name:"class transformers.Wav2Vec2BertForXVector",anchor:"transformers.Wav2Vec2BertForXVector",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.Wav2Vec2BertForXVector.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_30356/en/model_doc/wav2vec2-bert#transformers.Wav2Vec2BertConfig">Wav2Vec2BertConfig</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/pr_30356/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/vr_30356/src/transformers/models/wav2vec2_bert/modeling_wav2vec2_bert.py#L1534"}}),et=new C({props:{name:"forward",anchor:"transformers.Wav2Vec2BertForXVector.forward",parameters:[{name:"input_features",val:": Optional"},{name:"attention_mask",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"},{name:"labels",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.Wav2Vec2BertForXVector.forward.input_features",description:`<strong>input_features</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_features</code>, the <a href="/docs/transformers/pr_30356/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/pr_30356/en/model_doc/wav2vec2-bert#transformers.Wav2Vec2BertProcessor.__call__">Wav2Vec2BertProcessor.<strong>call</strong>()</a> for details.`,name:"input_features"},{anchor:"transformers.Wav2Vec2BertForXVector.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>`,name:"attention_mask"},{anchor:"transformers.Wav2Vec2BertForXVector.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.Wav2Vec2BertForXVector.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.Wav2Vec2BertForXVector.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/pr_30356/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.Wav2Vec2BertForXVector.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/vr_30356/src/transformers/models/wav2vec2_bert/modeling_wav2vec2_bert.py#L1586",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_30356/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/pr_30356/en/model_doc/wav2vec2-bert#transformers.Wav2Vec2BertConfig"
>Wav2Vec2BertConfig</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) — Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.xvector_output_dim)</code>) — 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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_30356/en/main_classes/output#transformers.modeling_outputs.XVectorOutput"
>transformers.modeling_outputs.XVectorOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),pe=new It({props:{$$slots:{default:[$n]},$$scope:{ctx:M}}}),fe=new qt({props:{anchor:"transformers.Wav2Vec2BertForXVector.forward.example",$$slots:{default:[Cn]},$$scope:{ctx:M}}}),tt=new gn({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/wav2vec2-bert.md"}}),{c(){t=i("meta"),y=n(),d=i("p"),p=n(),u(w.$$.fragment),a=n(),u(T.$$.fragment),Yt=n(),_e=i("p"),_e.innerHTML=Ta,Lt=n(),ve=i("p"),ve.textContent=Ma,Et=n(),be=i("p"),be.textContent=Wa,Ht=n(),ye=i("p"),ye.textContent=Va,Pt=n(),we=i("p"),we.innerHTML=ka,At=n(),Te=i("p"),Te.innerHTML=$a,Qt=n(),u(Me.$$.fragment),Dt=n(),We=i("ul"),We.innerHTML=Ca,Ot=n(),u(Ve.$$.fragment),Kt=n(),u(ke.$$.fragment),eo=n(),$e=i("ul"),$e.innerHTML=Ba,to=n(),u(Ce.$$.fragment),oo=n(),Be=i("ul"),Be.innerHTML=ja,ao=n(),u(je.$$.fragment),no=n(),U=i("div"),u(Je.$$.fragment),wo=n(),rt=i("p"),rt.innerHTML=Ja,To=n(),lt=i("p"),lt.innerHTML=xa,Mo=n(),u(O.$$.fragment),so=n(),u(xe.$$.fragment),ro=n(),W=i("div"),u(Fe.$$.fragment),Wo=n(),it=i("p"),it.textContent=Fa,Vo=n(),ct=i("p"),ct.innerHTML=Ua,ko=n(),K=i("div"),u(Ue.$$.fragment),$o=n(),dt=i("p"),dt.innerHTML=Za,Co=n(),ee=i("div"),u(Ze.$$.fragment),Bo=n(),mt=i("p"),mt.innerHTML=za,jo=n(),pt=i("div"),u(ze.$$.fragment),Jo=n(),Q=i("div"),u(Ge.$$.fragment),xo=n(),ft=i("p"),ft.innerHTML=Ga,Fo=n(),u(te.$$.fragment),Uo=n(),oe=i("div"),u(Xe.$$.fragment),Zo=n(),ut=i("p"),ut.innerHTML=Xa,zo=n(),ae=i("div"),u(Ie.$$.fragment),Go=n(),ht=i("p"),ht.innerHTML=Ia,lo=n(),u(qe.$$.fragment),io=n(),x=i("div"),u(Re.$$.fragment),Xo=n(),gt=i("p"),gt.innerHTML=qa,Io=n(),_t=i("p"),_t.innerHTML=Ra,qo=n(),vt=i("p"),vt.innerHTML=Na,Ro=n(),G=i("div"),u(Ne.$$.fragment),No=n(),bt=i("p"),bt.innerHTML=Sa,So=n(),u(ne.$$.fragment),Yo=n(),u(se.$$.fragment),co=n(),u(Se.$$.fragment),mo=n(),F=i("div"),u(Ye.$$.fragment),Lo=n(),yt=i("p"),yt.innerHTML=Ya,Eo=n(),wt=i("p"),wt.innerHTML=La,Ho=n(),Tt=i("p"),Tt.innerHTML=Ea,Po=n(),X=i("div"),u(Le.$$.fragment),Ao=n(),Mt=i("p"),Mt.innerHTML=Ha,Qo=n(),u(re.$$.fragment),Do=n(),u(le.$$.fragment),po=n(),u(Ee.$$.fragment),fo=n(),B=i("div"),u(He.$$.fragment),Oo=n(),Wt=i("p"),Wt.textContent=Pa,Ko=n(),Vt=i("p"),Vt.innerHTML=Aa,ea=n(),kt=i("p"),kt.innerHTML=Qa,ta=n(),$t=i("p"),$t.innerHTML=Da,oa=n(),I=i("div"),u(Pe.$$.fragment),aa=n(),Ct=i("p"),Ct.innerHTML=Oa,na=n(),u(ie.$$.fragment),sa=n(),u(ce.$$.fragment),uo=n(),u(Ae.$$.fragment),ho=n(),j=i("div"),u(Qe.$$.fragment),ra=n(),Bt=i("p"),Bt.textContent=Ka,la=n(),jt=i("p"),jt.innerHTML=en,ia=n(),Jt=i("p"),Jt.innerHTML=tn,ca=n(),xt=i("p"),xt.innerHTML=on,da=n(),q=i("div"),u(De.$$.fragment),ma=n(),Ft=i("p"),Ft.innerHTML=an,pa=n(),u(de.$$.fragment),fa=n(),u(me.$$.fragment),go=n(),u(Oe.$$.fragment),_o=n(),J=i("div"),u(Ke.$$.fragment),ua=n(),Ut=i("p"),Ut.textContent=nn,ha=n(),Zt=i("p"),Zt.innerHTML=sn,ga=n(),zt=i("p"),zt.innerHTML=rn,_a=n(),Gt=i("p"),Gt.innerHTML=ln,va=n(),R=i("div"),u(et.$$.fragment),ba=n(),Xt=i("p"),Xt.innerHTML=cn,ya=n(),u(pe.$$.fragment),wa=n(),u(fe.$$.fragment),vo=n(),u(tt.$$.fragment),bo=n(),Nt=i("p"),this.h()},l(e){const r=hn("svelte-u9bgzb",document.head);t=c(r,"META",{name:!0,content:!0}),r.forEach(l),y=s(e),d=c(e,"P",{}),k(d).forEach(l),p=s(e),h(w.$$.fragment,e),a=s(e),h(T.$$.fragment,e),Yt=s(e),_e=c(e,"P",{"data-svelte-h":!0}),f(_e)!=="svelte-zyaorv"&&(_e.innerHTML=Ta),Lt=s(e),ve=c(e,"P",{"data-svelte-h":!0}),f(ve)!=="svelte-klyyhl"&&(ve.textContent=Ma),Et=s(e),be=c(e,"P",{"data-svelte-h":!0}),f(be)!=="svelte-1rgpbum"&&(be.textContent=Wa),Ht=s(e),ye=c(e,"P",{"data-svelte-h":!0}),f(ye)!=="svelte-vfdo9a"&&(ye.textContent=Va),Pt=s(e),we=c(e,"P",{"data-svelte-h":!0}),f(we)!=="svelte-1vw0n52"&&(we.innerHTML=ka),At=s(e),Te=c(e,"P",{"data-svelte-h":!0}),f(Te)!=="svelte-mez4is"&&(Te.innerHTML=$a),Qt=s(e),h(Me.$$.fragment,e),Dt=s(e),We=c(e,"UL",{"data-svelte-h":!0}),f(We)!=="svelte-13pou99"&&(We.innerHTML=Ca),Ot=s(e),h(Ve.$$.fragment,e),Kt=s(e),h(ke.$$.fragment,e),eo=s(e),$e=c(e,"UL",{"data-svelte-h":!0}),f($e)!=="svelte-1g0z8be"&&($e.innerHTML=Ba),to=s(e),h(Ce.$$.fragment,e),oo=s(e),Be=c(e,"UL",{"data-svelte-h":!0}),f(Be)!=="svelte-13ka6wg"&&(Be.innerHTML=ja),ao=s(e),h(je.$$.fragment,e),no=s(e),U=c(e,"DIV",{class:!0});var E=k(U);h(Je.$$.fragment,E),wo=s(E),rt=c(E,"P",{"data-svelte-h":!0}),f(rt)!=="svelte-vnygz6"&&(rt.innerHTML=Ja),To=s(E),lt=c(E,"P",{"data-svelte-h":!0}),f(lt)!=="svelte-1moyp4z"&&(lt.innerHTML=xa),Mo=s(E),h(O.$$.fragment,E),E.forEach(l),so=s(e),h(xe.$$.fragment,e),ro=s(e),W=c(e,"DIV",{class:!0});var V=k(W);h(Fe.$$.fragment,V),Wo=s(V),it=c(V,"P",{"data-svelte-h":!0}),f(it)!=="svelte-1q4hwoc"&&(it.textContent=Fa),Vo=s(V),ct=c(V,"P",{"data-svelte-h":!0}),f(ct)!=="svelte-1ir7s8o"&&(ct.innerHTML=Ua),ko=s(V),K=c(V,"DIV",{class:!0});var ot=k(K);h(Ue.$$.fragment,ot),$o=s(ot),dt=c(ot,"P",{"data-svelte-h":!0}),f(dt)!=="svelte-19myans"&&(dt.innerHTML=Za),ot.forEach(l),Co=s(V),ee=c(V,"DIV",{class:!0});var at=k(ee);h(Ze.$$.fragment,at),Bo=s(at),mt=c(at,"P",{"data-svelte-h":!0}),f(mt)!=="svelte-jhx01y"&&(mt.innerHTML=za),at.forEach(l),jo=s(V),pt=c(V,"DIV",{class:!0});var St=k(pt);h(ze.$$.fragment,St),St.forEach(l),Jo=s(V),Q=c(V,"DIV",{class:!0});var D=k(Q);h(Ge.$$.fragment,D),xo=s(D),ft=c(D,"P",{"data-svelte-h":!0}),f(ft)!=="svelte-1gffxjo"&&(ft.innerHTML=Ga),Fo=s(D),h(te.$$.fragment,D),D.forEach(l),Uo=s(V),oe=c(V,"DIV",{class:!0});var nt=k(oe);h(Xe.$$.fragment,nt),Zo=s(nt),ut=c(nt,"P",{"data-svelte-h":!0}),f(ut)!=="svelte-1awolbc"&&(ut.innerHTML=Xa),nt.forEach(l),zo=s(V),ae=c(V,"DIV",{class:!0});var st=k(ae);h(Ie.$$.fragment,st),Go=s(st),ht=c(st,"P",{"data-svelte-h":!0}),f(ht)!=="svelte-1yfdsm6"&&(ht.innerHTML=Ia),st.forEach(l),V.forEach(l),lo=s(e),h(qe.$$.fragment,e),io=s(e),x=c(e,"DIV",{class:!0});var Z=k(x);h(Re.$$.fragment,Z),Xo=s(Z),gt=c(Z,"P",{"data-svelte-h":!0}),f(gt)!=="svelte-1ex4b09"&&(gt.innerHTML=qa),Io=s(Z),_t=c(Z,"P",{"data-svelte-h":!0}),f(_t)!=="svelte-1olhhex"&&(_t.innerHTML=Ra),qo=s(Z),vt=c(Z,"P",{"data-svelte-h":!0}),f(vt)!=="svelte-1uzc5pd"&&(vt.innerHTML=Na),Ro=s(Z),G=c(Z,"DIV",{class:!0});var H=k(G);h(Ne.$$.fragment,H),No=s(H),bt=c(H,"P",{"data-svelte-h":!0}),f(bt)!=="svelte-1rdqpkq"&&(bt.innerHTML=Sa),So=s(H),h(ne.$$.fragment,H),Yo=s(H),h(se.$$.fragment,H),H.forEach(l),Z.forEach(l),co=s(e),h(Se.$$.fragment,e),mo=s(e),F=c(e,"DIV",{class:!0});var z=k(F);h(Ye.$$.fragment,z),Lo=s(z),yt=c(z,"P",{"data-svelte-h":!0}),f(yt)!=="svelte-in2qpi"&&(yt.innerHTML=Ya),Eo=s(z),wt=c(z,"P",{"data-svelte-h":!0}),f(wt)!=="svelte-1olhhex"&&(wt.innerHTML=La),Ho=s(z),Tt=c(z,"P",{"data-svelte-h":!0}),f(Tt)!=="svelte-1uzc5pd"&&(Tt.innerHTML=Ea),Po=s(z),X=c(z,"DIV",{class:!0});var P=k(X);h(Le.$$.fragment,P),Ao=s(P),Mt=c(P,"P",{"data-svelte-h":!0}),f(Mt)!=="svelte-gfktwm"&&(Mt.innerHTML=Ha),Qo=s(P),h(re.$$.fragment,P),Do=s(P),h(le.$$.fragment,P),P.forEach(l),z.forEach(l),po=s(e),h(Ee.$$.fragment,e),fo=s(e),B=c(e,"DIV",{class:!0});var N=k(B);h(He.$$.fragment,N),Oo=s(N),Wt=c(N,"P",{"data-svelte-h":!0}),f(Wt)!=="svelte-1s90cnz"&&(Wt.textContent=Pa),Ko=s(N),Vt=c(N,"P",{"data-svelte-h":!0}),f(Vt)!=="svelte-1pxfert"&&(Vt.innerHTML=Aa),ea=s(N),kt=c(N,"P",{"data-svelte-h":!0}),f(kt)!=="svelte-1olhhex"&&(kt.innerHTML=Qa),ta=s(N),$t=c(N,"P",{"data-svelte-h":!0}),f($t)!=="svelte-1uzc5pd"&&($t.innerHTML=Da),oa=s(N),I=c(N,"DIV",{class:!0});var ue=k(I);h(Pe.$$.fragment,ue),aa=s(ue),Ct=c(ue,"P",{"data-svelte-h":!0}),f(Ct)!=="svelte-1fy91fq"&&(Ct.innerHTML=Oa),na=s(ue),h(ie.$$.fragment,ue),sa=s(ue),h(ce.$$.fragment,ue),ue.forEach(l),N.forEach(l),uo=s(e),h(Ae.$$.fragment,e),ho=s(e),j=c(e,"DIV",{class:!0});var S=k(j);h(Qe.$$.fragment,S),ra=s(S),Bt=c(S,"P",{"data-svelte-h":!0}),f(Bt)!=="svelte-13ubh7v"&&(Bt.textContent=Ka),la=s(S),jt=c(S,"P",{"data-svelte-h":!0}),f(jt)!=="svelte-1pxfert"&&(jt.innerHTML=en),ia=s(S),Jt=c(S,"P",{"data-svelte-h":!0}),f(Jt)!=="svelte-1olhhex"&&(Jt.innerHTML=tn),ca=s(S),xt=c(S,"P",{"data-svelte-h":!0}),f(xt)!=="svelte-1uzc5pd"&&(xt.innerHTML=on),da=s(S),q=c(S,"DIV",{class:!0});var he=k(q);h(De.$$.fragment,he),ma=s(he),Ft=c(he,"P",{"data-svelte-h":!0}),f(Ft)!=="svelte-nbc0ta"&&(Ft.innerHTML=an),pa=s(he),h(de.$$.fragment,he),fa=s(he),h(me.$$.fragment,he),he.forEach(l),S.forEach(l),go=s(e),h(Oe.$$.fragment,e),_o=s(e),J=c(e,"DIV",{class:!0});var Y=k(J);h(Ke.$$.fragment,Y),ua=s(Y),Ut=c(Y,"P",{"data-svelte-h":!0}),f(Ut)!=="svelte-coi2qb"&&(Ut.textContent=nn),ha=s(Y),Zt=c(Y,"P",{"data-svelte-h":!0}),f(Zt)!=="svelte-1pxfert"&&(Zt.innerHTML=sn),ga=s(Y),zt=c(Y,"P",{"data-svelte-h":!0}),f(zt)!=="svelte-1olhhex"&&(zt.innerHTML=rn),_a=s(Y),Gt=c(Y,"P",{"data-svelte-h":!0}),f(Gt)!=="svelte-1uzc5pd"&&(Gt.innerHTML=ln),va=s(Y),R=c(Y,"DIV",{class:!0});var ge=k(R);h(et.$$.fragment,ge),ba=s(ge),Xt=c(ge,"P",{"data-svelte-h":!0}),f(Xt)!=="svelte-ujqyq8"&&(Xt.innerHTML=cn),ya=s(ge),h(pe.$$.fragment,ge),wa=s(ge),h(fe.$$.fragment,ge),ge.forEach(l),Y.forEach(l),vo=s(e),h(tt.$$.fragment,e),bo=s(e),Nt=c(e,"P",{}),k(Nt).forEach(l),this.h()},h(){$(t,"name","hf:doc:metadata"),$(t,"content",jn),$(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,r){o(document.head,t),m(e,y,r),m(e,d,r),m(e,p,r),g(w,e,r),m(e,a,r),g(T,e,r),m(e,Yt,r),m(e,_e,r),m(e,Lt,r),m(e,ve,r),m(e,Et,r),m(e,be,r),m(e,Ht,r),m(e,ye,r),m(e,Pt,r),m(e,we,r),m(e,At,r),m(e,Te,r),m(e,Qt,r),g(Me,e,r),m(e,Dt,r),m(e,We,r),m(e,Ot,r),g(Ve,e,r),m(e,Kt,r),g(ke,e,r),m(e,eo,r),m(e,$e,r),m(e,to,r),g(Ce,e,r),m(e,oo,r),m(e,Be,r),m(e,ao,r),g(je,e,r),m(e,no,r),m(e,U,r),g(Je,U,null),o(U,wo),o(U,rt),o(U,To),o(U,lt),o(U,Mo),g(O,U,null),m(e,so,r),g(xe,e,r),m(e,ro,r),m(e,W,r),g(Fe,W,null),o(W,Wo),o(W,it),o(W,Vo),o(W,ct),o(W,ko),o(W,K),g(Ue,K,null),o(K,$o),o(K,dt),o(W,Co),o(W,ee),g(Ze,ee,null),o(ee,Bo),o(ee,mt),o(W,jo),o(W,pt),g(ze,pt,null),o(W,Jo),o(W,Q),g(Ge,Q,null),o(Q,xo),o(Q,ft),o(Q,Fo),g(te,Q,null),o(W,Uo),o(W,oe),g(Xe,oe,null),o(oe,Zo),o(oe,ut),o(W,zo),o(W,ae),g(Ie,ae,null),o(ae,Go),o(ae,ht),m(e,lo,r),g(qe,e,r),m(e,io,r),m(e,x,r),g(Re,x,null),o(x,Xo),o(x,gt),o(x,Io),o(x,_t),o(x,qo),o(x,vt),o(x,Ro),o(x,G),g(Ne,G,null),o(G,No),o(G,bt),o(G,So),g(ne,G,null),o(G,Yo),g(se,G,null),m(e,co,r),g(Se,e,r),m(e,mo,r),m(e,F,r),g(Ye,F,null),o(F,Lo),o(F,yt),o(F,Eo),o(F,wt),o(F,Ho),o(F,Tt),o(F,Po),o(F,X),g(Le,X,null),o(X,Ao),o(X,Mt),o(X,Qo),g(re,X,null),o(X,Do),g(le,X,null),m(e,po,r),g(Ee,e,r),m(e,fo,r),m(e,B,r),g(He,B,null),o(B,Oo),o(B,Wt),o(B,Ko),o(B,Vt),o(B,ea),o(B,kt),o(B,ta),o(B,$t),o(B,oa),o(B,I),g(Pe,I,null),o(I,aa),o(I,Ct),o(I,na),g(ie,I,null),o(I,sa),g(ce,I,null),m(e,uo,r),g(Ae,e,r),m(e,ho,r),m(e,j,r),g(Qe,j,null),o(j,ra),o(j,Bt),o(j,la),o(j,jt),o(j,ia),o(j,Jt),o(j,ca),o(j,xt),o(j,da),o(j,q),g(De,q,null),o(q,ma),o(q,Ft),o(q,pa),g(de,q,null),o(q,fa),g(me,q,null),m(e,go,r),g(Oe,e,r),m(e,_o,r),m(e,J,r),g(Ke,J,null),o(J,ua),o(J,Ut),o(J,ha),o(J,Zt),o(J,ga),o(J,zt),o(J,_a),o(J,Gt),o(J,va),o(J,R),g(et,R,null),o(R,ba),o(R,Xt),o(R,ya),g(pe,R,null),o(R,wa),g(fe,R,null),m(e,vo,r),g(tt,e,r),m(e,bo,r),m(e,Nt,r),yo=!0},p(e,[r]){const E={};r&2&&(E.$$scope={dirty:r,ctx:e}),O.$set(E);const V={};r&2&&(V.$$scope={dirty:r,ctx:e}),te.$set(V);const ot={};r&2&&(ot.$$scope={dirty:r,ctx:e}),ne.$set(ot);const at={};r&2&&(at.$$scope={dirty:r,ctx:e}),se.$set(at);const St={};r&2&&(St.$$scope={dirty:r,ctx:e}),re.$set(St);const D={};r&2&&(D.$$scope={dirty:r,ctx:e}),le.$set(D);const nt={};r&2&&(nt.$$scope={dirty:r,ctx:e}),ie.$set(nt);const st={};r&2&&(st.$$scope={dirty:r,ctx:e}),ce.$set(st);const Z={};r&2&&(Z.$$scope={dirty:r,ctx:e}),de.$set(Z);const H={};r&2&&(H.$$scope={dirty:r,ctx:e}),me.$set(H);const z={};r&2&&(z.$$scope={dirty:r,ctx:e}),pe.$set(z);const P={};r&2&&(P.$$scope={dirty:r,ctx:e}),fe.$set(P)},i(e){yo||(_(w.$$.fragment,e),_(T.$$.fragment,e),_(Me.$$.fragment,e),_(Ve.$$.fragment,e),_(ke.$$.fragment,e),_(Ce.$$.fragment,e),_(je.$$.fragment,e),_(Je.$$.fragment,e),_(O.$$.fragment,e),_(xe.$$.fragment,e),_(Fe.$$.fragment,e),_(Ue.$$.fragment,e),_(Ze.$$.fragment,e),_(ze.$$.fragment,e),_(Ge.$$.fragment,e),_(te.$$.fragment,e),_(Xe.$$.fragment,e),_(Ie.$$.fragment,e),_(qe.$$.fragment,e),_(Re.$$.fragment,e),_(Ne.$$.fragment,e),_(ne.$$.fragment,e),_(se.$$.fragment,e),_(Se.$$.fragment,e),_(Ye.$$.fragment,e),_(Le.$$.fragment,e),_(re.$$.fragment,e),_(le.$$.fragment,e),_(Ee.$$.fragment,e),_(He.$$.fragment,e),_(Pe.$$.fragment,e),_(ie.$$.fragment,e),_(ce.$$.fragment,e),_(Ae.$$.fragment,e),_(Qe.$$.fragment,e),_(De.$$.fragment,e),_(de.$$.fragment,e),_(me.$$.fragment,e),_(Oe.$$.fragment,e),_(Ke.$$.fragment,e),_(et.$$.fragment,e),_(pe.$$.fragment,e),_(fe.$$.fragment,e),_(tt.$$.fragment,e),yo=!0)},o(e){v(w.$$.fragment,e),v(T.$$.fragment,e),v(Me.$$.fragment,e),v(Ve.$$.fragment,e),v(ke.$$.fragment,e),v(Ce.$$.fragment,e),v(je.$$.fragment,e),v(Je.$$.fragment,e),v(O.$$.fragment,e),v(xe.$$.fragment,e),v(Fe.$$.fragment,e),v(Ue.$$.fragment,e),v(Ze.$$.fragment,e),v(ze.$$.fragment,e),v(Ge.$$.fragment,e),v(te.$$.fragment,e),v(Xe.$$.fragment,e),v(Ie.$$.fragment,e),v(qe.$$.fragment,e),v(Re.$$.fragment,e),v(Ne.$$.fragment,e),v(ne.$$.fragment,e),v(se.$$.fragment,e),v(Se.$$.fragment,e),v(Ye.$$.fragment,e),v(Le.$$.fragment,e),v(re.$$.fragment,e),v(le.$$.fragment,e),v(Ee.$$.fragment,e),v(He.$$.fragment,e),v(Pe.$$.fragment,e),v(ie.$$.fragment,e),v(ce.$$.fragment,e),v(Ae.$$.fragment,e),v(Qe.$$.fragment,e),v(De.$$.fragment,e),v(de.$$.fragment,e),v(me.$$.fragment,e),v(Oe.$$.fragment,e),v(Ke.$$.fragment,e),v(et.$$.fragment,e),v(pe.$$.fragment,e),v(fe.$$.fragment,e),v(tt.$$.fragment,e),yo=!1},d(e){e&&(l(y),l(d),l(p),l(a),l(Yt),l(_e),l(Lt),l(ve),l(Et),l(be),l(Ht),l(ye),l(Pt),l(we),l(At),l(Te),l(Qt),l(Dt),l(We),l(Ot),l(Kt),l(eo),l($e),l(to),l(oo),l(Be),l(ao),l(no),l(U),l(so),l(ro),l(W),l(lo),l(io),l(x),l(co),l(mo),l(F),l(po),l(fo),l(B),l(uo),l(ho),l(j),l(go),l(_o),l(J),l(vo),l(bo),l(Nt)),l(t),b(w,e),b(T,e),b(Me,e),b(Ve,e),b(ke,e),b(Ce,e),b(je,e),b(Je),b(O),b(xe,e),b(Fe),b(Ue),b(Ze),b(ze),b(Ge),b(te),b(Xe),b(Ie),b(qe,e),b(Re),b(Ne),b(ne),b(se),b(Se,e),b(Ye),b(Le),b(re),b(le),b(Ee,e),b(He),b(Pe),b(ie),b(ce),b(Ae,e),b(Qe),b(De),b(de),b(me),b(Oe,e),b(Ke),b(et),b(pe),b(fe),b(tt,e)}}}const jn='{"title":"Wav2Vec2-BERT","local":"wav2vec2-bert","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Usage tips","local":"usage-tips","sections":[],"depth":2},{"title":"Resources","local":"resources","sections":[],"depth":2},{"title":"Wav2Vec2BertConfig","local":"transformers.Wav2Vec2BertConfig","sections":[],"depth":2},{"title":"Wav2Vec2BertProcessor","local":"transformers.Wav2Vec2BertProcessor","sections":[],"depth":2},{"title":"Wav2Vec2BertModel","local":"transformers.Wav2Vec2BertModel","sections":[],"depth":2},{"title":"Wav2Vec2BertForCTC","local":"transformers.Wav2Vec2BertForCTC","sections":[],"depth":2},{"title":"Wav2Vec2BertForSequenceClassification","local":"transformers.Wav2Vec2BertForSequenceClassification","sections":[],"depth":2},{"title":"Wav2Vec2BertForAudioFrameClassification","local":"transformers.Wav2Vec2BertForAudioFrameClassification","sections":[],"depth":2},{"title":"Wav2Vec2BertForXVector","local":"transformers.Wav2Vec2BertForXVector","sections":[],"depth":2}],"depth":1}';function Jn(M){return pn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class qn extends fn{constructor(t){super(),un(this,t,Jn,Bn,mn,{})}}export{qn as component};
