import{S as Bc,i as Ic,s as qc,e as n,k as p,w as y,t as r,M as Rc,c as a,d as o,m as h,a as s,x as S,h as i,b as d,G as e,g as _,y as w,q as T,o as U,B as M,v as Pc,L as so}from"../../chunks/vendor-hf-doc-builder.js";import{T as Bo}from"../../chunks/Tip-hf-doc-builder.js";import{D as E}from"../../chunks/Docstring-hf-doc-builder.js";import{C as ro}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as R}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as ao}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Yc(k){let c,b,g,u,v;return u=new ro({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFVuaVNwZWVjaFNhdE1vZGVsJTJDJTIwVW5pU3BlZWNoU2F0Q29uZmlnJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMFVuaVNwZWVjaFNhdCUyMG1pY3Jvc29mdCUyRnVuaXNwZWVjaC1zYXQtYmFzZS0xMDBoLWxpYnJpLWZ0JTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMFVuaVNwZWVjaFNhdENvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwZnJvbSUyMHRoZSUyMG1pY3Jvc29mdCUyRnVuaXNwZWVjaC1zYXQtYmFzZS0xMDBoLWxpYnJpLWZ0JTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBVbmlTcGVlY2hTYXRNb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> UniSpeechSatModel, UniSpeechSatConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a UniSpeechSat microsoft/unispeech-sat-base-100h-libri-ft style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = UniSpeechSatConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the microsoft/unispeech-sat-base-100h-libri-ft style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = UniSpeechSatModel(configuration)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;hf-internal-testing/librispeech_asr_demo&quot;</span>, <span class="hljs-string">&quot;clean&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = dataset.sort(<span class="hljs-string">&quot;id&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>sampling_rate = dataset.features[<span class="hljs-string">&quot;audio&quot;</span>].sampling_rate

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;microsoft/unispeech-sat-base-100h-libri-ft&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = UniSpeechSatModel.from_pretrained(<span class="hljs-string">&quot;microsoft/unispeech-sat-base-100h-libri-ft&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># audio file is decoded on the fly</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(dataset[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>], sampling_rate=sampling_rate, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    outputs = model(**inputs)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;hf-internal-testing/librispeech_asr_demo&quot;</span>, <span class="hljs-string">&quot;clean&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = dataset.sort(<span class="hljs-string">&quot;id&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>sampling_rate = dataset.features[<span class="hljs-string">&quot;audio&quot;</span>].sampling_rate

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;microsoft/unispeech-sat-base-100h-libri-ft&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = UniSpeechSatForCTC.from_pretrained(<span class="hljs-string">&quot;microsoft/unispeech-sat-base-100h-libri-ft&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># audio file is decoded on the fly</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(dataset[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>], sampling_rate=sampling_rate, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_ids = torch.argmax(logits, dim=-<span class="hljs-number">1</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># transcribe speech</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>transcription = processor.batch_decode(predicted_ids)
<span class="hljs-meta">&gt;&gt;&gt; </span>transcription[<span class="hljs-number">0</span>]
<span class="hljs-string">&#x27;MISTER QUILDER 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">39.88</span>`}}),{c(){c=n("p"),b=r("Example:"),g=p(),y(u.$$.fragment)},l(l){c=a(l,"P",{});var m=s(c);b=i(m,"Example:"),m.forEach(o),g=h(l),S(u.$$.fragment,l)},m(l,m){_(l,c,m),e(c,b),_(l,g,m),w(u,l,m),v=!0},p:so,i(l){v||(T(u.$$.fragment,l),v=!0)},o(l){U(u.$$.fragment,l),v=!1},d(l){l&&o(c),l&&o(g),M(u,l)}}}function Oc(k){let c,b,g,u,v;return{c(){c=n("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),u=r("Module"),v=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){c=a(l,"P",{});var m=s(c);b=i(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a(m,"CODE",{});var j=s(g);u=i(j,"Module"),j.forEach(o),v=i(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(o)},m(l,m){_(l,c,m),e(c,b),e(c,g),e(g,u),e(c,v)},d(l){l&&o(c)}}}function Kc(k){let c,b,g,u,v;return u=new ro({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9GZWF0dXJlRXh0cmFjdG9yJTJDJTIwVW5pU3BlZWNoU2F0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbiUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQWltcG9ydCUyMHRvcmNoJTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJoZi1pbnRlcm5hbC10ZXN0aW5nJTJGbGlicmlzcGVlY2hfYXNyX2RlbW8lMjIlMkMlMjAlMjJjbGVhbiUyMiUyQyUyMHNwbGl0JTNEJTIydmFsaWRhdGlvbiUyMiklMEFkYXRhc2V0JTIwJTNEJTIwZGF0YXNldC5zb3J0KCUyMmlkJTIyKSUwQXNhbXBsaW5nX3JhdGUlMjAlM0QlMjBkYXRhc2V0LmZlYXR1cmVzJTVCJTIyYXVkaW8lMjIlNUQuc2FtcGxpbmdfcmF0ZSUwQSUwQWZlYXR1cmVfZXh0cmFjdG9yJTIwJTNEJTIwQXV0b0ZlYXR1cmVFeHRyYWN0b3IuZnJvbV9wcmV0cmFpbmVkKCUyMm1pY3Jvc29mdCUyRnVuaXNwZWVjaC1zYXQtYmFzZS0xMDBoLWxpYnJpLWZ0JTIyKSUwQW1vZGVsJTIwJTNEJTIwVW5pU3BlZWNoU2F0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIybWljcm9zb2Z0JTJGdW5pc3BlZWNoLXNhdC1iYXNlLTEwMGgtbGlicmktZnQlMjIpJTBBJTBBJTIzJTIwYXVkaW8lMjBmaWxlJTIwaXMlMjBkZWNvZGVkJTIwb24lMjB0aGUlMjBmbHklMEFpbnB1dHMlMjAlM0QlMjBmZWF0dXJlX2V4dHJhY3RvcihkYXRhc2V0JTVCMCU1RCU1QiUyMmF1ZGlvJTIyJTVEJTVCJTIyYXJyYXklMjIlNUQlMkMlMjBzYW1wbGluZ19yYXRlJTNEc2FtcGxpbmdfcmF0ZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEFwcmVkaWN0ZWRfY2xhc3NfaWRzJTIwJTNEJTIwdG9yY2guYXJnbWF4KGxvZ2l0cyUyQyUyMGRpbSUzRC0xKS5pdGVtKCklMEFwcmVkaWN0ZWRfbGFiZWwlMjAlM0QlMjBtb2RlbC5jb25maWcuaWQybGFiZWwlNUJwcmVkaWN0ZWRfY2xhc3NfaWRzJTVEJTBBJTBBJTIzJTIwY29tcHV0ZSUyMGxvc3MlMjAtJTIwdGFyZ2V0X2xhYmVsJTIwaXMlMjBlLmcuJTIwJTIyZG93biUyMiUwQXRhcmdldF9sYWJlbCUyMCUzRCUyMG1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QjAlNUQlMEFpbnB1dHMlNUIlMjJsYWJlbHMlMjIlNUQlMjAlM0QlMjB0b3JjaC50ZW5zb3IoJTVCbW9kZWwuY29uZmlnLmxhYmVsMmlkJTVCdGFyZ2V0X2xhYmVsJTVEJTVEKSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9zcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor, UniSpeechSatForSequenceClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;hf-internal-testing/librispeech_asr_demo&quot;</span>, <span class="hljs-string">&quot;clean&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = dataset.sort(<span class="hljs-string">&quot;id&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>sampling_rate = dataset.features[<span class="hljs-string">&quot;audio&quot;</span>].sampling_rate

<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;microsoft/unispeech-sat-base-100h-libri-ft&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = UniSpeechSatForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;microsoft/unispeech-sat-base-100h-libri-ft&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># audio file is decoded on the fly</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = feature_extractor(dataset[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>], sampling_rate=sampling_rate, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_ids = torch.argmax(logits, dim=-<span class="hljs-number">1</span>).item()
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_label = model.config.id2label[predicted_class_ids]

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

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;hf-internal-testing/librispeech_asr_demo&quot;</span>, <span class="hljs-string">&quot;clean&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = dataset.sort(<span class="hljs-string">&quot;id&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>sampling_rate = dataset.features[<span class="hljs-string">&quot;audio&quot;</span>].sampling_rate

<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;microsoft/unispeech-sat-base-plus-sd&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = UniSpeechSatForAudioFrameClassification.from_pretrained(<span class="hljs-string">&quot;microsoft/unispeech-sat-base-plus-sd&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()
<span class="hljs-meta">&gt;&gt;&gt; </span>labels[<span class="hljs-number">0</span>].tolist()
[<span class="hljs-number">0</span>, <span class="hljs-number">0</span>]`}}),{c(){c=n("p"),b=r("Example:"),g=p(),y(u.$$.fragment)},l(l){c=a(l,"P",{});var m=s(c);b=i(m,"Example:"),m.forEach(o),g=h(l),S(u.$$.fragment,l)},m(l,m){_(l,c,m),e(c,b),_(l,g,m),w(u,l,m),v=!0},p:so,i(l){v||(T(u.$$.fragment,l),v=!0)},o(l){U(u.$$.fragment,l),v=!1},d(l){l&&o(c),l&&o(g),M(u,l)}}}function od(k){let c,b,g,u,v;return{c(){c=n("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),u=r("Module"),v=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){c=a(l,"P",{});var m=s(c);b=i(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a(m,"CODE",{});var j=s(g);u=i(j,"Module"),j.forEach(o),v=i(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(o)},m(l,m){_(l,c,m),e(c,b),e(c,g),e(g,u),e(c,v)},d(l){l&&o(c)}}}function nd(k){let c,b,g,u,v;return u=new ro({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9GZWF0dXJlRXh0cmFjdG9yJTJDJTIwVW5pU3BlZWNoU2F0Rm9yWFZlY3RvciUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQWltcG9ydCUyMHRvcmNoJTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJoZi1pbnRlcm5hbC10ZXN0aW5nJTJGbGlicmlzcGVlY2hfYXNyX2RlbW8lMjIlMkMlMjAlMjJjbGVhbiUyMiUyQyUyMHNwbGl0JTNEJTIydmFsaWRhdGlvbiUyMiklMEFkYXRhc2V0JTIwJTNEJTIwZGF0YXNldC5zb3J0KCUyMmlkJTIyKSUwQXNhbXBsaW5nX3JhdGUlMjAlM0QlMjBkYXRhc2V0LmZlYXR1cmVzJTVCJTIyYXVkaW8lMjIlNUQuc2FtcGxpbmdfcmF0ZSUwQSUwQWZlYXR1cmVfZXh0cmFjdG9yJTIwJTNEJTIwQXV0b0ZlYXR1cmVFeHRyYWN0b3IuZnJvbV9wcmV0cmFpbmVkKCUyMm1pY3Jvc29mdCUyRnVuaXNwZWVjaC1zYXQtYmFzZS1wbHVzLXN2JTIyKSUwQW1vZGVsJTIwJTNEJTIwVW5pU3BlZWNoU2F0Rm9yWFZlY3Rvci5mcm9tX3ByZXRyYWluZWQoJTIybWljcm9zb2Z0JTJGdW5pc3BlZWNoLXNhdC1iYXNlLXBsdXMtc3YlMjIpJTBBJTBBJTIzJTIwYXVkaW8lMjBmaWxlJTIwaXMlMjBkZWNvZGVkJTIwb24lMjB0aGUlMjBmbHklMEFpbnB1dHMlMjAlM0QlMjBmZWF0dXJlX2V4dHJhY3RvciglMEElMjAlMjAlMjAlMjAlNUJkJTVCJTIyYXJyYXklMjIlNUQlMjBmb3IlMjBkJTIwaW4lMjBkYXRhc2V0JTVCJTNBMiU1RCU1QiUyMmF1ZGlvJTIyJTVEJTVEJTJDJTIwc2FtcGxpbmdfcmF0ZSUzRHNhbXBsaW5nX3JhdGUlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyJTJDJTIwcGFkZGluZyUzRFRydWUlMEEpJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGVtYmVkZGluZ3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykuZW1iZWRkaW5ncyUwQSUwQWVtYmVkZGluZ3MlMjAlM0QlMjB0b3JjaC5ubi5mdW5jdGlvbmFsLm5vcm1hbGl6ZShlbWJlZGRpbmdzJTJDJTIwZGltJTNELTEpLmNwdSgpJTBBJTBBJTIzJTIwdGhlJTIwcmVzdWx0aW5nJTIwZW1iZWRkaW5ncyUyMGNhbiUyMGJlJTIwdXNlZCUyMGZvciUyMGNvc2luZSUyMHNpbWlsYXJpdHktYmFzZWQlMjByZXRyaWV2YWwlMEFjb3NpbmVfc2ltJTIwJTNEJTIwdG9yY2gubm4uQ29zaW5lU2ltaWxhcml0eShkaW0lM0QtMSklMEFzaW1pbGFyaXR5JTIwJTNEJTIwY29zaW5lX3NpbShlbWJlZGRpbmdzJTVCMCU1RCUyQyUyMGVtYmVkZGluZ3MlNUIxJTVEKSUwQXRocmVzaG9sZCUyMCUzRCUyMDAuNyUyMCUyMCUyMyUyMHRoZSUyMG9wdGltYWwlMjB0aHJlc2hvbGQlMjBpcyUyMGRhdGFzZXQtZGVwZW5kZW50JTBBaWYlMjBzaW1pbGFyaXR5JTIwJTNDJTIwdGhyZXNob2xkJTNBJTBBJTIwJTIwJTIwJTIwcHJpbnQoJTIyU3BlYWtlcnMlMjBhcmUlMjBub3QlMjB0aGUlMjBzYW1lISUyMiklMEFyb3VuZChzaW1pbGFyaXR5Lml0ZW0oKSUyQyUyMDIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor, UniSpeechSatForXVector
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;hf-internal-testing/librispeech_asr_demo&quot;</span>, <span class="hljs-string">&quot;clean&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = dataset.sort(<span class="hljs-string">&quot;id&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>sampling_rate = dataset.features[<span class="hljs-string">&quot;audio&quot;</span>].sampling_rate

<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;microsoft/unispeech-sat-base-plus-sv&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = UniSpeechSatForXVector.from_pretrained(<span class="hljs-string">&quot;microsoft/unispeech-sat-base-plus-sv&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>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(similarity.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">0.97</span>`}}),{c(){c=n("p"),b=r("Example:"),g=p(),y(u.$$.fragment)},l(l){c=a(l,"P",{});var m=s(c);b=i(m,"Example:"),m.forEach(o),g=h(l),S(u.$$.fragment,l)},m(l,m){_(l,c,m),e(c,b),_(l,g,m),w(u,l,m),v=!0},p:so,i(l){v||(T(u.$$.fragment,l),v=!0)},o(l){U(u.$$.fragment,l),v=!1},d(l){l&&o(c),l&&o(g),M(u,l)}}}function ad(k){let c,b,g,u,v;return{c(){c=n("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),u=r("Module"),v=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){c=a(l,"P",{});var m=s(c);b=i(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=a(m,"CODE",{});var j=s(g);u=i(j,"Module"),j.forEach(o),v=i(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(o)},m(l,m){_(l,c,m),e(c,b),e(c,g),e(g,u),e(c,v)},d(l){l&&o(c)}}}function sd(k){let c,b,g,u,v;return u=new ro({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b0ZlYXR1cmVFeHRyYWN0b3IlMkMlMjBVbmlTcGVlY2hTYXRGb3JQcmVUcmFpbmluZyUwQWZyb20lMjB0cmFuc2Zvcm1lcnMubW9kZWxzLnVuaXNwZWVjaF9zYXQubW9kZWxpbmdfdW5pc3BlZWNoX3NhdCUyMGltcG9ydCUyMF9jb21wdXRlX21hc2tfaW5kaWNlcyUwQSUwQWZlYXR1cmVfZXh0cmFjdG9yJTIwJTNEJTIwQXV0b0ZlYXR1cmVFeHRyYWN0b3IuZnJvbV9wcmV0cmFpbmVkKCUyMm1pY3Jvc29mdCUyRnVuaXNwZWVjaC1zYXQtYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMFVuaVNwZWVjaFNhdEZvclByZVRyYWluaW5nLmZyb21fcHJldHJhaW5lZCglMjJtaWNyb3NvZnQlMkZ1bmlzcGVlY2gtc2F0LWJhc2UlMjIpJTBBJTIzJTIwVE9ETyUzQSUyMEFkZCUyMGZ1bGwlMjBwcmV0cmFpbmluZyUyMGV4YW1wbGU=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor, UniSpeechSatForPreTraining
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers.models.unispeech_sat.modeling_unispeech_sat <span class="hljs-keyword">import</span> _compute_mask_indices

<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;microsoft/unispeech-sat-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = UniSpeechSatForPreTraining.from_pretrained(<span class="hljs-string">&quot;microsoft/unispeech-sat-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># <span class="hljs-doctag">TODO:</span> Add full pretraining example</span>`}}),{c(){c=n("p"),b=r("Example:"),g=p(),y(u.$$.fragment)},l(l){c=a(l,"P",{});var m=s(c);b=i(m,"Example:"),m.forEach(o),g=h(l),S(u.$$.fragment,l)},m(l,m){_(l,c,m),e(c,b),_(l,g,m),w(u,l,m),v=!0},p:so,i(l){v||(T(u.$$.fragment,l),v=!0)},o(l){U(u.$$.fragment,l),v=!1},d(l){l&&o(c),l&&o(g),M(u,l)}}}function rd(k){let c,b,g,u,v,l,m,j,Xa,Vn,H,ve,Io,De,za,qo,Aa,Nn,be,Ga,He,Ba,Ia,Xn,io,qa,zn,lo,Ro,Ra,An,co,Pa,Gn,P,Oe,Ya,po,Qa,La,Da,Ke,Ha,ho,Oa,Ka,es,Po,ts,Bn,Y,os,et,ns,as,tt,ss,rs,In,O,ye,Yo,ot,is,Qo,ls,qn,Se,Lo,mo,cs,ds,Do,uo,ps,Rn,K,we,Ho,nt,hs,Oo,ms,Pn,Z,at,us,ee,fs,fo,gs,_s,st,vs,bs,ys,te,Ss,go,ws,Ts,_o,Us,Ms,ks,Te,Yn,oe,Ue,Ko,rt,js,en,Fs,Qn,ne,it,Cs,lt,$s,tn,Js,Ws,Ln,ae,Me,on,ct,xs,nn,Es,Dn,J,dt,Zs,pt,Vs,ht,Ns,Xs,zs,mt,As,vo,Gs,Bs,Is,ut,qs,ft,Rs,Ps,Ys,V,gt,Qs,se,Ls,bo,Ds,Hs,an,Os,Ks,er,ke,tr,je,Hn,re,Fe,sn,_t,or,rn,nr,On,W,vt,ar,ie,sr,ln,rr,ir,bt,lr,cr,dr,yt,pr,yo,hr,mr,ur,St,fr,wt,gr,_r,vr,N,Tt,br,le,yr,So,Sr,wr,cn,Tr,Ur,Mr,Ce,kr,$e,Kn,ce,Je,dn,Ut,jr,pn,Fr,ea,F,Mt,Cr,hn,$r,Jr,kt,Wr,jt,xr,Er,Zr,Ft,Vr,wo,Nr,Xr,zr,Ct,Ar,$t,Gr,Br,Ir,X,Jt,qr,de,Rr,To,Pr,Yr,mn,Qr,Lr,Dr,We,Hr,xe,ta,pe,Ee,un,Wt,Or,fn,Kr,oa,C,xt,ei,gn,ti,oi,Et,ni,Zt,ai,si,ri,Vt,ii,Uo,li,ci,di,Nt,pi,Xt,hi,mi,ui,z,zt,fi,he,gi,Mo,_i,vi,_n,bi,yi,Si,Ze,wi,Ve,na,me,Ne,vn,At,Ti,bn,Ui,aa,$,Gt,Mi,yn,ki,ji,Bt,Fi,It,Ci,$i,Ji,qt,Wi,ko,xi,Ei,Zi,Rt,Vi,Pt,Ni,Xi,zi,A,Yt,Ai,ue,Gi,jo,Bi,Ii,Sn,qi,Ri,Pi,Xe,Yi,ze,sa,fe,Ae,wn,Qt,Qi,Tn,Li,ra,x,Lt,Di,ge,Hi,Un,Oi,Ki,Dt,el,tl,ol,Ht,nl,Fo,al,sl,rl,Ot,il,Kt,ll,cl,dl,G,eo,pl,_e,hl,Co,ml,ul,Mn,fl,gl,_l,Ge,vl,Be,ia;return l=new R({}),De=new R({}),ot=new R({}),nt=new R({}),at=new E({props:{name:"class transformers.UniSpeechSatConfig",anchor:"transformers.UniSpeechSatConfig",parameters:[{name:"vocab_size",val:" = 32"},{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"intermediate_size",val:" = 3072"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout",val:" = 0.1"},{name:"activation_dropout",val:" = 0.1"},{name:"attention_dropout",val:" = 0.1"},{name:"feat_proj_dropout",val:" = 0.0"},{name:"feat_quantizer_dropout",val:" = 0.0"},{name:"final_dropout",val:" = 0.1"},{name:"layerdrop",val:" = 0.1"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-05"},{name:"feat_extract_norm",val:" = 'group'"},{name:"feat_extract_activation",val:" = 'gelu'"},{name:"conv_dim",val:" = (512, 512, 512, 512, 512, 512, 512)"},{name:"conv_stride",val:" = (5, 2, 2, 2, 2, 2, 2)"},{name:"conv_kernel",val:" = (10, 3, 3, 3, 3, 2, 2)"},{name:"conv_bias",val:" = False"},{name:"num_conv_pos_embeddings",val:" = 128"},{name:"num_conv_pos_embedding_groups",val:" = 16"},{name:"do_stable_layer_norm",val:" = False"},{name:"apply_spec_augment",val:" = True"},{name:"mask_time_prob",val:" = 0.05"},{name:"mask_time_length",val:" = 10"},{name:"mask_time_min_masks",val:" = 2"},{name:"mask_feature_prob",val:" = 0.0"},{name:"mask_feature_length",val:" = 10"},{name:"mask_feature_min_masks",val:" = 0"},{name:"num_codevectors_per_group",val:" = 320"},{name:"num_codevector_groups",val:" = 2"},{name:"contrastive_logits_temperature",val:" = 0.1"},{name:"num_negatives",val:" = 100"},{name:"codevector_dim",val:" = 256"},{name:"proj_codevector_dim",val:" = 256"},{name:"diversity_loss_weight",val:" = 0.1"},{name:"ctc_loss_reduction",val:" = 'mean'"},{name:"ctc_zero_infinity",val:" = False"},{name:"use_weighted_layer_sum",val:" = False"},{name:"classifier_proj_size",val:" = 256"},{name:"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:"num_clusters",val:" = 504"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.UniSpeechSatConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
Vocabulary size of the UniSpeechSat model. Defines the number of different tokens that can be represented
by the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.31.0/en/model_doc/unispeech-sat#transformers.UniSpeechSatModel">UniSpeechSatModel</a>. Vocabulary size of the model. Defines the
different tokens that can be represented by the <em>inputs_ids</em> passed to the forward method of
<a href="/docs/transformers/v4.31.0/en/model_doc/unispeech-sat#transformers.UniSpeechSatModel">UniSpeechSatModel</a>.`,name:"vocab_size"},{anchor:"transformers.UniSpeechSatConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.UniSpeechSatConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.UniSpeechSatConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.UniSpeechSatConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.UniSpeechSatConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.UniSpeechSatConfig.hidden_dropout",description:`<strong>hidden_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout"},{anchor:"transformers.UniSpeechSatConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.UniSpeechSatConfig.final_dropout",description:`<strong>final_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for the final projection layer of <a href="/docs/transformers/v4.31.0/en/model_doc/unispeech-sat#transformers.UniSpeechSatForCTC">UniSpeechSatForCTC</a>.`,name:"final_dropout"},{anchor:"transformers.UniSpeechSatConfig.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.UniSpeechSatConfig.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.UniSpeechSatConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.UniSpeechSatConfig.feat_extract_norm",description:`<strong>feat_extract_norm</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;group&quot;</code>) &#x2014;
The norm to be applied to 1D convolutional layers in feature encoder. One of <code>&quot;group&quot;</code> for group
normalization of only the first 1D convolutional layer or <code>&quot;layer&quot;</code> for layer normalization of all 1D
convolutional layers.`,name:"feat_extract_norm"},{anchor:"transformers.UniSpeechSatConfig.feat_proj_dropout",description:`<strong>feat_proj_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probability for output of the feature encoder.`,name:"feat_proj_dropout"},{anchor:"transformers.UniSpeechSatConfig.feat_extract_activation",description:"<strong>feat_extract_activation</strong> (<code>str, </code>optional<code>, defaults to </code>&#x201C;gelu&#x201D;<code>) -- The non-linear activation function (function or string) in the 1D convolutional layers of the feature extractor. If string, </code>&#x201C;gelu&#x201D;<code>, </code>&#x201C;relu&#x201D;<code>, </code>&#x201C;selu&#x201D;<code>and</code>&#x201C;gelu_new&#x201D;` are supported.",name:"feat_extract_activation"},{anchor:"transformers.UniSpeechSatConfig.feat_quantizer_dropout",description:`<strong>feat_quantizer_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probabilitiy for quantized feature encoder states.`,name:"feat_quantizer_dropout"},{anchor:"transformers.UniSpeechSatConfig.conv_dim",description:`<strong>conv_dim</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>(512, 512, 512, 512, 512, 512, 512)</code>) &#x2014;
A tuple of integers defining the number of input and output channels of each 1D convolutional layer in the
feature encoder. The length of <em>conv_dim</em> defines the number of 1D convolutional layers.`,name:"conv_dim"},{anchor:"transformers.UniSpeechSatConfig.conv_stride",description:`<strong>conv_stride</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>(5, 2, 2, 2, 2, 2, 2)</code>) &#x2014;
A tuple of integers defining the stride of each 1D convolutional layer in the feature encoder. The length
of <em>conv_stride</em> defines the number of convolutional layers and has to match the length of <em>conv_dim</em>.`,name:"conv_stride"},{anchor:"transformers.UniSpeechSatConfig.conv_kernel",description:`<strong>conv_kernel</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>(10, 3, 3, 3, 3, 3, 3)</code>) &#x2014;
A tuple of integers defining the kernel size of each 1D convolutional layer in the feature encoder. The
length of <em>conv_kernel</em> defines the number of convolutional layers and has to match the length of
<em>conv_dim</em>.`,name:"conv_kernel"},{anchor:"transformers.UniSpeechSatConfig.conv_bias",description:`<strong>conv_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the 1D convolutional layers have a bias.`,name:"conv_bias"},{anchor:"transformers.UniSpeechSatConfig.num_conv_pos_embeddings",description:`<strong>num_conv_pos_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 128) &#x2014;
Number of convolutional positional embeddings. Defines the kernel size of 1D convolutional positional
embeddings layer.`,name:"num_conv_pos_embeddings"},{anchor:"transformers.UniSpeechSatConfig.num_conv_pos_embedding_groups",description:`<strong>num_conv_pos_embedding_groups</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Number of groups of 1D convolutional positional embeddings layer.`,name:"num_conv_pos_embedding_groups"},{anchor:"transformers.UniSpeechSatConfig.do_stable_layer_norm",description:`<strong>do_stable_layer_norm</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to apply <em>stable</em> layer norm architecture of the Transformer encoder. <code>do_stable_layer_norm is True</code> corresponds to applying layer norm before the attention layer, whereas <code>do_stable_layer_norm is False</code> corresponds to applying layer norm after the attention layer.`,name:"do_stable_layer_norm"},{anchor:"transformers.UniSpeechSatConfig.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.UniSpeechSatConfig.mask_time_prob",description:`<strong>mask_time_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.05) &#x2014;
Percentage (between 0 and 1) of all feature vectors along the time axis which will be masked. The masking
procecure generates &#x201D;mask_time_prob<em>len(time_axis)/mask_time_length&#x201D; independent masks over the axis. If
reasoning from the propability of each feature vector to be chosen as the start of the vector span to be
masked, </em>mask_time_prob<em> should be \`prob_vector_start</em>mask_time_length<code>. Note that overlap may decrease the actual percentage of masked vectors. This is only relevant if </code>apply_spec_augment is True\`.`,name:"mask_time_prob"},{anchor:"transformers.UniSpeechSatConfig.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.UniSpeechSatConfig.mask_time_min_masks",description:`<strong>mask_time_min_masks</strong> (<code>int</code>, <em>optional</em>, defaults to 2), &#x2014;
The minimum number of masks of length <code>mask_feature_length</code> generated along the time axis, each time step,
irrespectively of <code>mask_feature_prob</code>. Only relevant if &#x201D;mask_time_prob*len(time_axis)/mask_time_length &lt;
mask_time_min_masks&#x201D;`,name:"mask_time_min_masks"},{anchor:"transformers.UniSpeechSatConfig.mask_feature_prob",description:`<strong>mask_feature_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Percentage (between 0 and 1) of all feature vectors along the feature axis which will be masked. The
masking procecure generates &#x201D;mask_feature_prob<em>len(feature_axis)/mask_time_length&#x201D; independent masks over
the axis. If reasoning from the propability of each feature vector to be chosen as the start of the vector
span to be masked, </em>mask_feature_prob<em> should be \`prob_vector_start</em>mask_feature_length<code>. Note that overlap may decrease the actual percentage of masked vectors. This is only relevant if </code>apply_spec_augment is
True\`.`,name:"mask_feature_prob"},{anchor:"transformers.UniSpeechSatConfig.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.UniSpeechSatConfig.mask_feature_min_masks",description:`<strong>mask_feature_min_masks</strong> (<code>int</code>, <em>optional</em>, defaults to 0), &#x2014;
The minimum number of masks of length <code>mask_feature_length</code> generated along the feature axis, each time
step, irrespectively of <code>mask_feature_prob</code>. Only relevant if
&#x201D;mask_feature_prob*len(feature_axis)/mask_feature_length &lt; mask_feature_min_masks&#x201D;`,name:"mask_feature_min_masks"},{anchor:"transformers.UniSpeechSatConfig.num_codevectors_per_group",description:`<strong>num_codevectors_per_group</strong> (<code>int</code>, <em>optional</em>, defaults to 320) &#x2014;
Number of entries in each quantization codebook (group).`,name:"num_codevectors_per_group"},{anchor:"transformers.UniSpeechSatConfig.num_codevector_groups",description:`<strong>num_codevector_groups</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
Number of codevector groups for product codevector quantization.`,name:"num_codevector_groups"},{anchor:"transformers.UniSpeechSatConfig.contrastive_logits_temperature",description:`<strong>contrastive_logits_temperature</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The temperature <em>kappa</em> in the contrastive loss.`,name:"contrastive_logits_temperature"},{anchor:"transformers.UniSpeechSatConfig.feat_quantizer_dropout",description:`<strong>feat_quantizer_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probabilitiy for the output of the feature encoder that&#x2019;s used by the quantizer.`,name:"feat_quantizer_dropout"},{anchor:"transformers.UniSpeechSatConfig.num_negatives",description:`<strong>num_negatives</strong> (<code>int</code>, <em>optional</em>, defaults to 100) &#x2014;
Number of negative samples for the contrastive loss.`,name:"num_negatives"},{anchor:"transformers.UniSpeechSatConfig.codevector_dim",description:`<strong>codevector_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Dimensionality of the quantized feature vectors.`,name:"codevector_dim"},{anchor:"transformers.UniSpeechSatConfig.proj_codevector_dim",description:`<strong>proj_codevector_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Dimensionality of the final projection of both the quantized and the transformer features.`,name:"proj_codevector_dim"},{anchor:"transformers.UniSpeechSatConfig.diversity_loss_weight",description:`<strong>diversity_loss_weight</strong> (<code>int</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The weight of the codebook diversity loss component.`,name:"diversity_loss_weight"},{anchor:"transformers.UniSpeechSatConfig.ctc_loss_reduction",description:`<strong>ctc_loss_reduction</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;mean&quot;</code>) &#x2014;
Specifies the reduction to apply to the output of <code>torch.nn.CTCLoss</code>. Only relevant when training an
instance of <a href="/docs/transformers/v4.31.0/en/model_doc/unispeech-sat#transformers.UniSpeechSatForCTC">UniSpeechSatForCTC</a>.`,name:"ctc_loss_reduction"},{anchor:"transformers.UniSpeechSatConfig.ctc_zero_infinity",description:`<strong>ctc_zero_infinity</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to zero infinite losses and the associated gradients of <code>torch.nn.CTCLoss</code>. Infinite losses mainly
occur when the inputs are too short to be aligned to the targets. Only relevant when training an instance
of <a href="/docs/transformers/v4.31.0/en/model_doc/unispeech-sat#transformers.UniSpeechSatForCTC">UniSpeechSatForCTC</a>.`,name:"ctc_zero_infinity"},{anchor:"transformers.UniSpeechSatConfig.use_weighted_layer_sum",description:`<strong>use_weighted_layer_sum</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use a weighted average of layer outputs with learned weights. Only relevant when using an
instance of <a href="/docs/transformers/v4.31.0/en/model_doc/unispeech-sat#transformers.UniSpeechSatForSequenceClassification">UniSpeechSatForSequenceClassification</a>.`,name:"use_weighted_layer_sum"},{anchor:"transformers.UniSpeechSatConfig.classifier_proj_size",description:`<strong>classifier_proj_size</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Dimensionality of the projection before token mean-pooling for classification.`,name:"classifier_proj_size"},{anchor:"transformers.UniSpeechSatConfig.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.UniSpeechSatConfig.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.UniSpeechSatConfig.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.UniSpeechSatConfig.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"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/unispeech_sat/configuration_unispeech_sat.py#L34"}}),Te=new ao({props:{anchor:"transformers.UniSpeechSatConfig.example",$$slots:{default:[Yc]},$$scope:{ctx:k}}}),rt=new R({}),it=new E({props:{name:"class transformers.models.unispeech_sat.modeling_unispeech_sat.UniSpeechSatForPreTrainingOutput",anchor:"transformers.models.unispeech_sat.modeling_unispeech_sat.UniSpeechSatForPreTrainingOutput",parameters:[{name:"loss",val:": typing.Optional[torch.FloatTensor] = None"},{name:"logits",val:": FloatTensor = None"},{name:"projected_states",val:": FloatTensor = None"},{name:"projected_quantized_states",val:": FloatTensor = None"},{name:"codevector_perplexity",val:": FloatTensor = None"},{name:"hidden_states",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"attentions",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"}],parametersDescription:[{anchor:"transformers.models.unispeech_sat.modeling_unispeech_sat.UniSpeechSatForPreTrainingOutput.loss",description:`<strong>loss</strong> (<em>optional</em>, returned when model is in train mode, <code>torch.FloatTensor</code> of shape <code>(1,)</code>) &#x2014;
Total loss as the sum of the contrastive loss (L_m) and the diversity loss (L_d) as stated in the <a href="https://arxiv.org/pdf/2006.11477.pdf" rel="nofollow">official
paper</a> . (classification) loss.`,name:"loss"},{anchor:"transformers.models.unispeech_sat.modeling_unispeech_sat.UniSpeechSatForPreTrainingOutput.projected_states",description:`<strong>projected_states</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.proj_codevector_dim)</code>) &#x2014;
Hidden-states of the model projected to <em>config.proj_codevector_dim</em> that can be used to predict the masked
projected quantized states.`,name:"projected_states"},{anchor:"transformers.models.unispeech_sat.modeling_unispeech_sat.UniSpeechSatForPreTrainingOutput.projected_quantized_states",description:`<strong>projected_quantized_states</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.proj_codevector_dim)</code>) &#x2014;
Quantized extracted feature vectors projected to <em>config.proj_codevector_dim</em> representing the positive
target vectors for contrastive loss.`,name:"projected_quantized_states"},{anchor:"transformers.models.unispeech_sat.modeling_unispeech_sat.UniSpeechSatForPreTrainingOutput.hidden_states",description:`<strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) &#x2014;
Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.`,name:"hidden_states"},{anchor:"transformers.models.unispeech_sat.modeling_unispeech_sat.UniSpeechSatForPreTrainingOutput.attentions",description:`<strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) &#x2014;
Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.`,name:"attentions"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/unispeech_sat/modeling_unispeech_sat.py#L80"}}),ct=new R({}),dt=new E({props:{name:"class transformers.UniSpeechSatModel",anchor:"transformers.UniSpeechSatModel",parameters:[{name:"config",val:": UniSpeechSatConfig"}],parametersDescription:[{anchor:"transformers.UniSpeechSatModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/unispeech-sat#transformers.UniSpeechSatConfig">UniSpeechSatConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/unispeech_sat/modeling_unispeech_sat.py#L1123"}}),gt=new E({props:{name:"forward",anchor:"transformers.UniSpeechSatModel.forward",parameters:[{name:"input_values",val:": typing.Optional[torch.Tensor]"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"mask_time_indices",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.UniSpeechSatModel.forward.input_values",description:`<strong>input_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Float values of input raw speech waveform. Values can be obtained by loading a <code>.flac</code> or <code>.wav</code> audio file
into an array of type <code>List[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em> via the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_values</code>, the <a href="/docs/transformers/v4.31.0/en/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a> should be used for padding and
conversion into a tensor of type <code>torch.FloatTensor</code>. See <a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor.__call__">Wav2Vec2Processor.<strong>call</strong>()</a> for details.`,name:"input_values"},{anchor:"transformers.UniSpeechSatModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing convolution and attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p><code>attention_mask</code> should only be passed if the corresponding processor has <code>config.return_attention_mask == True</code>. For all models whose processor has <code>config.return_attention_mask == False</code>, such as
<a href="https://huggingface.co/microsoft/unispeech-sat-base-100h-libri-ft" rel="nofollow">microsoft/unispeech-sat-base-100h-libri-ft</a>,
<code>attention_mask</code> should <strong>not</strong> be passed to avoid degraded performance when doing batched inference. For
such models <code>input_values</code> should simply be padded with 0 and passed without <code>attention_mask</code>. Be aware
that these models also yield slightly different results depending on whether <code>input_values</code> is padded or
not.</p>

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

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

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

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

					</div>`,name:"attention_mask"},{anchor:"transformers.UniSpeechSatForXVector.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.UniSpeechSatForXVector.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.UniSpeechSatForXVector.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.UniSpeechSatForXVector.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/unispeech_sat/modeling_unispeech_sat.py#L1896",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/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/v4.31.0/en/model_doc/unispeech-sat#transformers.UniSpeechSatConfig"
>UniSpeechSatConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.xvector_output_dim)</code>) \u2014 Classification hidden states before AMSoftmax.</p>
</li>
<li>
<p><strong>embeddings</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.xvector_output_dim)</code>) \u2014 Utterance embeddings used for vector similarity-based retrieval.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_outputs.XVectorOutput"
>transformers.modeling_outputs.XVectorOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Xe=new Bo({props:{$$slots:{default:[od]},$$scope:{ctx:k}}}),ze=new ao({props:{anchor:"transformers.UniSpeechSatForXVector.forward.example",$$slots:{default:[nd]},$$scope:{ctx:k}}}),Qt=new R({}),Lt=new E({props:{name:"class transformers.UniSpeechSatForPreTraining",anchor:"transformers.UniSpeechSatForPreTraining",parameters:[{name:"config",val:": UniSpeechSatConfig"}],parametersDescription:[{anchor:"transformers.UniSpeechSatForPreTraining.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/unispeech-sat#transformers.UniSpeechSatConfig">UniSpeechSatConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/unispeech_sat/modeling_unispeech_sat.py#L1244"}}),eo=new E({props:{name:"forward",anchor:"transformers.UniSpeechSatForPreTraining.forward",parameters:[{name:"input_values",val:": typing.Optional[torch.Tensor]"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.UniSpeechSatForPreTraining.forward.input_values",description:`<strong>input_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Float values of input raw speech waveform. Values can be obtained by loading a <code>.flac</code> or <code>.wav</code> audio file
into an array of type <code>List[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em> via the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_values</code>, the <a href="/docs/transformers/v4.31.0/en/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a> should be used for padding and
conversion into a tensor of type <code>torch.FloatTensor</code>. See <a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor.__call__">Wav2Vec2Processor.<strong>call</strong>()</a> for details.`,name:"input_values"},{anchor:"transformers.UniSpeechSatForPreTraining.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing convolution and attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p><code>attention_mask</code> should only be passed if the corresponding processor has <code>config.return_attention_mask == True</code>. For all models whose processor has <code>config.return_attention_mask == False</code>, such as
<a href="https://huggingface.co/microsoft/unispeech-sat-base-100h-libri-ft" rel="nofollow">microsoft/unispeech-sat-base-100h-libri-ft</a>,
<code>attention_mask</code> should <strong>not</strong> be passed to avoid degraded performance when doing batched inference. For
such models <code>input_values</code> should simply be padded with 0 and passed without <code>attention_mask</code>. Be aware
that these models also yield slightly different results depending on whether <code>input_values</code> is padded or
not.</p>

					</div>`,name:"attention_mask"},{anchor:"transformers.UniSpeechSatForPreTraining.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.UniSpeechSatForPreTraining.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.UniSpeechSatForPreTraining.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/unispeech_sat/modeling_unispeech_sat.py#L1312",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/en/model_doc/unispeech-sat#transformers.models.unispeech_sat.modeling_unispeech_sat.UniSpeechSatForPreTrainingOutput"
>transformers.models.unispeech_sat.modeling_unispeech_sat.UniSpeechSatForPreTrainingOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.31.0/en/model_doc/unispeech-sat#transformers.UniSpeechSatConfig"
>UniSpeechSatConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<em>optional</em>, returned when model is in train mode, <code>torch.FloatTensor</code> of shape <code>(1,)</code>) \u2014 Total loss as the sum of the contrastive loss (L_m) and the diversity loss (L_d) as stated in the <a
  href="https://arxiv.org/pdf/2006.11477.pdf"
  rel="nofollow"
>official
paper</a> . (classification) loss.</p>
</li>
<li>
<p><strong>projected_states</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.proj_codevector_dim)</code>) \u2014 Hidden-states of the model projected to <em>config.proj_codevector_dim</em> that can be used to predict the masked
projected quantized states.</p>
</li>
<li>
<p><strong>projected_quantized_states</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.proj_codevector_dim)</code>) \u2014 Quantized extracted feature vectors projected to <em>config.proj_codevector_dim</em> representing the positive
target vectors for contrastive loss.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.31.0/en/model_doc/unispeech-sat#transformers.models.unispeech_sat.modeling_unispeech_sat.UniSpeechSatForPreTrainingOutput"
>transformers.models.unispeech_sat.modeling_unispeech_sat.UniSpeechSatForPreTrainingOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ge=new Bo({props:{$$slots:{default:[ad]},$$scope:{ctx:k}}}),Be=new ao({props:{anchor:"transformers.UniSpeechSatForPreTraining.forward.example",$$slots:{default:[sd]},$$scope:{ctx:k}}}),{c(){c=n("meta"),b=p(),g=n("h1"),u=n("a"),v=n("span"),y(l.$$.fragment),m=p(),j=n("span"),Xa=r("UniSpeech-SAT"),Vn=p(),H=n("h2"),ve=n("a"),Io=n("span"),y(De.$$.fragment),za=p(),qo=n("span"),Aa=r("Overview"),Nn=p(),be=n("p"),Ga=r("The UniSpeech-SAT model was proposed in "),He=n("a"),Ba=r(`UniSpeech-SAT: Universal Speech Representation Learning with Speaker Aware
Pre-Training`),Ia=r(` by Sanyuan Chen, Yu Wu, Chengyi Wang, Zhengyang Chen, Zhuo Chen,
Shujie Liu, Jian Wu, Yao Qian, Furu Wei, Jinyu Li, Xiangzhan Yu .`),Xn=p(),io=n("p"),qa=r("The abstract from the paper is the following:"),zn=p(),lo=n("p"),Ro=n("em"),Ra=r(`Self-supervised learning (SSL) is a long-standing goal for speech processing, since it utilizes large-scale unlabeled
data and avoids extensive human labeling. Recent years witness great successes in applying self-supervised learning in
speech recognition, while limited exploration was attempted in applying SSL for modeling speaker characteristics. In
this paper, we aim to improve the existing SSL framework for speaker representation learning. Two methods are
introduced for enhancing the unsupervised speaker information extraction. First, we apply the multi-task learning to
the current SSL framework, where we integrate the utterance-wise contrastive loss with the SSL objective function.
Second, for better speaker discrimination, we propose an utterance mixing strategy for data augmentation, where
additional overlapped utterances are created unsupervisely and incorporate during training. We integrate the proposed
methods into the HuBERT framework. Experiment results on SUPERB benchmark show that the proposed system achieves
state-of-the-art performance in universal representation learning, especially for speaker identification oriented
tasks. An ablation study is performed verifying the efficacy of each proposed method. Finally, we scale up training
dataset to 94 thousand hours public audio data and achieve further performance improvement in all SUPERB tasks.`),An=p(),co=n("p"),Pa=r("Tips:"),Gn=p(),P=n("ul"),Oe=n("li"),Ya=r(`UniSpeechSat is a speech model that accepts a float array corresponding to the raw waveform of the speech signal.
Please use `),po=n("a"),Qa=r("Wav2Vec2Processor"),La=r(" for the feature extraction."),Da=p(),Ke=n("li"),Ha=r(`UniSpeechSat model can be fine-tuned using connectionist temporal classification (CTC) so the model output has to be
decoded using `),ho=n("a"),Oa=r("Wav2Vec2CTCTokenizer"),Ka=r("."),es=p(),Po=n("li"),ts=r("UniSpeechSat performs especially well on speaker verification, speaker identification, and speaker diarization tasks."),Bn=p(),Y=n("p"),os=r("This model was contributed by "),et=n("a"),ns=r("patrickvonplaten"),as=r(`. The Authors\u2019 code can be
found `),tt=n("a"),ss=r("here"),rs=r("."),In=p(),O=n("h2"),ye=n("a"),Yo=n("span"),y(ot.$$.fragment),is=p(),Qo=n("span"),ls=r("Documentation resources"),qn=p(),Se=n("ul"),Lo=n("li"),mo=n("a"),cs=r("Audio classification task guide"),ds=p(),Do=n("li"),uo=n("a"),ps=r("Automatic speech recognition task guide"),Rn=p(),K=n("h2"),we=n("a"),Ho=n("span"),y(nt.$$.fragment),hs=p(),Oo=n("span"),ms=r("UniSpeechSatConfig"),Pn=p(),Z=n("div"),y(at.$$.fragment),us=p(),ee=n("p"),fs=r("This is the configuration class to store the configuration of a "),fo=n("a"),gs=r("UniSpeechSatModel"),_s=r(`. It is used to instantiate an
UniSpeechSat 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 UniSpeechSat
`),st=n("a"),vs=r("microsoft/unispeech-sat-base-100h-libri-ft"),bs=r(`
architecture.`),ys=p(),te=n("p"),Ss=r("Configuration objects inherit from "),go=n("a"),ws=r("PretrainedConfig"),Ts=r(` and can be used to control the model outputs. Read the
documentation from `),_o=n("a"),Us=r("PretrainedConfig"),Ms=r(" for more information."),ks=p(),y(Te.$$.fragment),Yn=p(),oe=n("h2"),Ue=n("a"),Ko=n("span"),y(rt.$$.fragment),js=p(),en=n("span"),Fs=r("UniSpeechSat specific outputs"),Qn=p(),ne=n("div"),y(it.$$.fragment),Cs=p(),lt=n("p"),$s=r("Output type of "),tn=n("code"),Js=r("UniSpeechSatForPreTrainingOutput"),Ws=r(", with potential hidden states and attentions."),Ln=p(),ae=n("h2"),Me=n("a"),on=n("span"),y(ct.$$.fragment),xs=p(),nn=n("span"),Es=r("UniSpeechSatModel"),Dn=p(),J=n("div"),y(dt.$$.fragment),Zs=p(),pt=n("p"),Vs=r(`The bare UniSpeechSat Model transformer outputting raw hidden-states without any specific head on top.
UniSpeechSat was proposed in `),ht=n("a"),Ns=r(`wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations`),Xs=r(` by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`),zs=p(),mt=n("p"),As=r("This model inherits from "),vo=n("a"),Gs=r("PreTrainedModel"),Bs=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Is=p(),ut=n("p"),qs=r("This model is a PyTorch "),ft=n("a"),Rs=r("torch.nn.Module"),Ps=r(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ys=p(),V=n("div"),y(gt.$$.fragment),Qs=p(),se=n("p"),Ls=r("The "),bo=n("a"),Ds=r("UniSpeechSatModel"),Hs=r(" forward method, overrides the "),an=n("code"),Os=r("__call__"),Ks=r(" special method."),er=p(),y(ke.$$.fragment),tr=p(),y(je.$$.fragment),Hn=p(),re=n("h2"),Fe=n("a"),sn=n("span"),y(_t.$$.fragment),or=p(),rn=n("span"),nr=r("UniSpeechSatForCTC"),On=p(),W=n("div"),y(vt.$$.fragment),ar=p(),ie=n("p"),sr=r("UniSpeechSat Model with a "),ln=n("code"),rr=r("language modeling"),ir=r(` head on top for Connectionist Temporal Classification (CTC).
UniSpeechSat was proposed in `),bt=n("a"),lr=r(`wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations`),cr=r(` by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`),dr=p(),yt=n("p"),pr=r("This model inherits from "),yo=n("a"),hr=r("PreTrainedModel"),mr=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),ur=p(),St=n("p"),fr=r("This model is a PyTorch "),wt=n("a"),gr=r("torch.nn.Module"),_r=r(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),vr=p(),N=n("div"),y(Tt.$$.fragment),br=p(),le=n("p"),yr=r("The "),So=n("a"),Sr=r("UniSpeechSatForCTC"),wr=r(" forward method, overrides the "),cn=n("code"),Tr=r("__call__"),Ur=r(" special method."),Mr=p(),y(Ce.$$.fragment),kr=p(),y($e.$$.fragment),Kn=p(),ce=n("h2"),Je=n("a"),dn=n("span"),y(Ut.$$.fragment),jr=p(),pn=n("span"),Fr=r("UniSpeechSatForSequenceClassification"),ea=p(),F=n("div"),y(Mt.$$.fragment),Cr=p(),hn=n("p"),$r=r(`UniSpeechSat Model with a sequence classification head on top (a linear layer over the pooled output) for tasks
like SUPERB Keyword Spotting.`),Jr=p(),kt=n("p"),Wr=r("UniSpeechSat was proposed in "),jt=n("a"),xr=r(`wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations`),Er=r(` by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`),Zr=p(),Ft=n("p"),Vr=r("This model inherits from "),wo=n("a"),Nr=r("PreTrainedModel"),Xr=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),zr=p(),Ct=n("p"),Ar=r("This model is a PyTorch "),$t=n("a"),Gr=r("torch.nn.Module"),Br=r(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ir=p(),X=n("div"),y(Jt.$$.fragment),qr=p(),de=n("p"),Rr=r("The "),To=n("a"),Pr=r("UniSpeechSatForSequenceClassification"),Yr=r(" forward method, overrides the "),mn=n("code"),Qr=r("__call__"),Lr=r(" special method."),Dr=p(),y(We.$$.fragment),Hr=p(),y(xe.$$.fragment),ta=p(),pe=n("h2"),Ee=n("a"),un=n("span"),y(Wt.$$.fragment),Or=p(),fn=n("span"),Kr=r("UniSpeechSatForAudioFrameClassification"),oa=p(),C=n("div"),y(xt.$$.fragment),ei=p(),gn=n("p"),ti=r("UniSpeech-SAT Model with a frame classification head on top for tasks like Speaker Diarization."),oi=p(),Et=n("p"),ni=r("UniSpeechSat was proposed in "),Zt=n("a"),ai=r(`wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations`),si=r(` by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`),ri=p(),Vt=n("p"),ii=r("This model inherits from "),Uo=n("a"),li=r("PreTrainedModel"),ci=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),di=p(),Nt=n("p"),pi=r("This model is a PyTorch "),Xt=n("a"),hi=r("torch.nn.Module"),mi=r(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ui=p(),z=n("div"),y(zt.$$.fragment),fi=p(),he=n("p"),gi=r("The "),Mo=n("a"),_i=r("UniSpeechSatForAudioFrameClassification"),vi=r(" forward method, overrides the "),_n=n("code"),bi=r("__call__"),yi=r(" special method."),Si=p(),y(Ze.$$.fragment),wi=p(),y(Ve.$$.fragment),na=p(),me=n("h2"),Ne=n("a"),vn=n("span"),y(At.$$.fragment),Ti=p(),bn=n("span"),Ui=r("UniSpeechSatForXVector"),aa=p(),$=n("div"),y(Gt.$$.fragment),Mi=p(),yn=n("p"),ki=r("UniSpeech-SAT Model with an XVector feature extraction head on top for tasks like Speaker Verification."),ji=p(),Bt=n("p"),Fi=r("UniSpeechSat was proposed in "),It=n("a"),Ci=r(`wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations`),$i=r(` by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`),Ji=p(),qt=n("p"),Wi=r("This model inherits from "),ko=n("a"),xi=r("PreTrainedModel"),Ei=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Zi=p(),Rt=n("p"),Vi=r("This model is a PyTorch "),Pt=n("a"),Ni=r("torch.nn.Module"),Xi=r(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),zi=p(),A=n("div"),y(Yt.$$.fragment),Ai=p(),ue=n("p"),Gi=r("The "),jo=n("a"),Bi=r("UniSpeechSatForXVector"),Ii=r(" forward method, overrides the "),Sn=n("code"),qi=r("__call__"),Ri=r(" special method."),Pi=p(),y(Xe.$$.fragment),Yi=p(),y(ze.$$.fragment),sa=p(),fe=n("h2"),Ae=n("a"),wn=n("span"),y(Qt.$$.fragment),Qi=p(),Tn=n("span"),Li=r("UniSpeechSatForPreTraining"),ra=p(),x=n("div"),y(Lt.$$.fragment),Di=p(),ge=n("p"),Hi=r("UniSpeechSat Model with a quantizer and "),Un=n("code"),Oi=r("VQ"),Ki=r(` head on top.
UniSpeechSat was proposed in `),Dt=n("a"),el=r(`wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations`),tl=r(` by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`),ol=p(),Ht=n("p"),nl=r("This model inherits from "),Fo=n("a"),al=r("PreTrainedModel"),sl=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),rl=p(),Ot=n("p"),il=r("This model is a PyTorch "),Kt=n("a"),ll=r("torch.nn.Module"),cl=r(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),dl=p(),G=n("div"),y(eo.$$.fragment),pl=p(),_e=n("p"),hl=r("The "),Co=n("a"),ml=r("UniSpeechSatForPreTraining"),ul=r(" forward method, overrides the "),Mn=n("code"),fl=r("__call__"),gl=r(" special method."),_l=p(),y(Ge.$$.fragment),vl=p(),y(Be.$$.fragment),this.h()},l(t){const f=Rc('[data-svelte="svelte-1phssyn"]',document.head);c=a(f,"META",{name:!0,content:!0}),f.forEach(o),b=h(t),g=a(t,"H1",{class:!0});var to=s(g);u=a(to,"A",{id:!0,class:!0,href:!0});var kn=s(u);v=a(kn,"SPAN",{});var jn=s(v);S(l.$$.fragment,jn),jn.forEach(o),kn.forEach(o),m=h(to),j=a(to,"SPAN",{});var Fn=s(j);Xa=i(Fn,"UniSpeech-SAT"),Fn.forEach(o),to.forEach(o),Vn=h(t),H=a(t,"H2",{class:!0});var oo=s(H);ve=a(oo,"A",{id:!0,class:!0,href:!0});var Cn=s(ve);Io=a(Cn,"SPAN",{});var $n=s(Io);S(De.$$.fragment,$n),$n.forEach(o),Cn.forEach(o),za=h(oo),qo=a(oo,"SPAN",{});var Jn=s(qo);Aa=i(Jn,"Overview"),Jn.forEach(o),oo.forEach(o),Nn=h(t),be=a(t,"P",{});var no=s(be);Ga=i(no,"The UniSpeech-SAT model was proposed in "),He=a(no,"A",{href:!0,rel:!0});var Wn=s(He);Ba=i(Wn,`UniSpeech-SAT: Universal Speech Representation Learning with Speaker Aware
Pre-Training`),Wn.forEach(o),Ia=i(no,` by Sanyuan Chen, Yu Wu, Chengyi Wang, Zhengyang Chen, Zhuo Chen,
Shujie Liu, Jian Wu, Yao Qian, Furu Wei, Jinyu Li, Xiangzhan Yu .`),no.forEach(o),Xn=h(t),io=a(t,"P",{});var xn=s(io);qa=i(xn,"The abstract from the paper is the following:"),xn.forEach(o),zn=h(t),lo=a(t,"P",{});var En=s(lo);Ro=a(En,"EM",{});var Zn=s(Ro);Ra=i(Zn,`Self-supervised learning (SSL) is a long-standing goal for speech processing, since it utilizes large-scale unlabeled
data and avoids extensive human labeling. Recent years witness great successes in applying self-supervised learning in
speech recognition, while limited exploration was attempted in applying SSL for modeling speaker characteristics. In
this paper, we aim to improve the existing SSL framework for speaker representation learning. Two methods are
introduced for enhancing the unsupervised speaker information extraction. First, we apply the multi-task learning to
the current SSL framework, where we integrate the utterance-wise contrastive loss with the SSL objective function.
Second, for better speaker discrimination, we propose an utterance mixing strategy for data augmentation, where
additional overlapped utterances are created unsupervisely and incorporate during training. We integrate the proposed
methods into the HuBERT framework. Experiment results on SUPERB benchmark show that the proposed system achieves
state-of-the-art performance in universal representation learning, especially for speaker identification oriented
tasks. An ablation study is performed verifying the efficacy of each proposed method. Finally, we scale up training
dataset to 94 thousand hours public audio data and achieve further performance improvement in all SUPERB tasks.`),Zn.forEach(o),En.forEach(o),An=h(t),co=a(t,"P",{});var bl=s(co);Pa=i(bl,"Tips:"),bl.forEach(o),Gn=h(t),P=a(t,"UL",{});var $o=s(P);Oe=a($o,"LI",{});var la=s(Oe);Ya=i(la,`UniSpeechSat is a speech model that accepts a float array corresponding to the raw waveform of the speech signal.
Please use `),po=a(la,"A",{href:!0});var yl=s(po);Qa=i(yl,"Wav2Vec2Processor"),yl.forEach(o),La=i(la," for the feature extraction."),la.forEach(o),Da=h($o),Ke=a($o,"LI",{});var ca=s(Ke);Ha=i(ca,`UniSpeechSat model can be fine-tuned using connectionist temporal classification (CTC) so the model output has to be
decoded using `),ho=a(ca,"A",{href:!0});var Sl=s(ho);Oa=i(Sl,"Wav2Vec2CTCTokenizer"),Sl.forEach(o),Ka=i(ca,"."),ca.forEach(o),es=h($o),Po=a($o,"LI",{});var wl=s(Po);ts=i(wl,"UniSpeechSat performs especially well on speaker verification, speaker identification, and speaker diarization tasks."),wl.forEach(o),$o.forEach(o),Bn=h(t),Y=a(t,"P",{});var Jo=s(Y);os=i(Jo,"This model was contributed by "),et=a(Jo,"A",{href:!0,rel:!0});var Tl=s(et);ns=i(Tl,"patrickvonplaten"),Tl.forEach(o),as=i(Jo,`. The Authors\u2019 code can be
found `),tt=a(Jo,"A",{href:!0,rel:!0});var Ul=s(tt);ss=i(Ul,"here"),Ul.forEach(o),rs=i(Jo,"."),Jo.forEach(o),In=h(t),O=a(t,"H2",{class:!0});var da=s(O);ye=a(da,"A",{id:!0,class:!0,href:!0});var Ml=s(ye);Yo=a(Ml,"SPAN",{});var kl=s(Yo);S(ot.$$.fragment,kl),kl.forEach(o),Ml.forEach(o),is=h(da),Qo=a(da,"SPAN",{});var jl=s(Qo);ls=i(jl,"Documentation resources"),jl.forEach(o),da.forEach(o),qn=h(t),Se=a(t,"UL",{});var pa=s(Se);Lo=a(pa,"LI",{});var Fl=s(Lo);mo=a(Fl,"A",{href:!0});var Cl=s(mo);cs=i(Cl,"Audio classification task guide"),Cl.forEach(o),Fl.forEach(o),ds=h(pa),Do=a(pa,"LI",{});var $l=s(Do);uo=a($l,"A",{href:!0});var Jl=s(uo);ps=i(Jl,"Automatic speech recognition task guide"),Jl.forEach(o),$l.forEach(o),pa.forEach(o),Rn=h(t),K=a(t,"H2",{class:!0});var ha=s(K);we=a(ha,"A",{id:!0,class:!0,href:!0});var Wl=s(we);Ho=a(Wl,"SPAN",{});var xl=s(Ho);S(nt.$$.fragment,xl),xl.forEach(o),Wl.forEach(o),hs=h(ha),Oo=a(ha,"SPAN",{});var El=s(Oo);ms=i(El,"UniSpeechSatConfig"),El.forEach(o),ha.forEach(o),Pn=h(t),Z=a(t,"DIV",{class:!0});var Ie=s(Z);S(at.$$.fragment,Ie),us=h(Ie),ee=a(Ie,"P",{});var Wo=s(ee);fs=i(Wo,"This is the configuration class to store the configuration of a "),fo=a(Wo,"A",{href:!0});var Zl=s(fo);gs=i(Zl,"UniSpeechSatModel"),Zl.forEach(o),_s=i(Wo,`. It is used to instantiate an
UniSpeechSat 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 UniSpeechSat
`),st=a(Wo,"A",{href:!0,rel:!0});var Vl=s(st);vs=i(Vl,"microsoft/unispeech-sat-base-100h-libri-ft"),Vl.forEach(o),bs=i(Wo,`
architecture.`),Wo.forEach(o),ys=h(Ie),te=a(Ie,"P",{});var xo=s(te);Ss=i(xo,"Configuration objects inherit from "),go=a(xo,"A",{href:!0});var Nl=s(go);ws=i(Nl,"PretrainedConfig"),Nl.forEach(o),Ts=i(xo,` and can be used to control the model outputs. Read the
documentation from `),_o=a(xo,"A",{href:!0});var Xl=s(_o);Us=i(Xl,"PretrainedConfig"),Xl.forEach(o),Ms=i(xo," for more information."),xo.forEach(o),ks=h(Ie),S(Te.$$.fragment,Ie),Ie.forEach(o),Yn=h(t),oe=a(t,"H2",{class:!0});var ma=s(oe);Ue=a(ma,"A",{id:!0,class:!0,href:!0});var zl=s(Ue);Ko=a(zl,"SPAN",{});var Al=s(Ko);S(rt.$$.fragment,Al),Al.forEach(o),zl.forEach(o),js=h(ma),en=a(ma,"SPAN",{});var Gl=s(en);Fs=i(Gl,"UniSpeechSat specific outputs"),Gl.forEach(o),ma.forEach(o),Qn=h(t),ne=a(t,"DIV",{class:!0});var ua=s(ne);S(it.$$.fragment,ua),Cs=h(ua),lt=a(ua,"P",{});var fa=s(lt);$s=i(fa,"Output type of "),tn=a(fa,"CODE",{});var Bl=s(tn);Js=i(Bl,"UniSpeechSatForPreTrainingOutput"),Bl.forEach(o),Ws=i(fa,", with potential hidden states and attentions."),fa.forEach(o),ua.forEach(o),Ln=h(t),ae=a(t,"H2",{class:!0});var ga=s(ae);Me=a(ga,"A",{id:!0,class:!0,href:!0});var Il=s(Me);on=a(Il,"SPAN",{});var ql=s(on);S(ct.$$.fragment,ql),ql.forEach(o),Il.forEach(o),xs=h(ga),nn=a(ga,"SPAN",{});var Rl=s(nn);Es=i(Rl,"UniSpeechSatModel"),Rl.forEach(o),ga.forEach(o),Dn=h(t),J=a(t,"DIV",{class:!0});var Q=s(J);S(dt.$$.fragment,Q),Zs=h(Q),pt=a(Q,"P",{});var _a=s(pt);Vs=i(_a,`The bare UniSpeechSat Model transformer outputting raw hidden-states without any specific head on top.
UniSpeechSat was proposed in `),ht=a(_a,"A",{href:!0,rel:!0});var Pl=s(ht);Ns=i(Pl,`wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations`),Pl.forEach(o),Xs=i(_a,` by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`),_a.forEach(o),zs=h(Q),mt=a(Q,"P",{});var va=s(mt);As=i(va,"This model inherits from "),vo=a(va,"A",{href:!0});var Yl=s(vo);Gs=i(Yl,"PreTrainedModel"),Yl.forEach(o),Bs=i(va,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),va.forEach(o),Is=h(Q),ut=a(Q,"P",{});var ba=s(ut);qs=i(ba,"This model is a PyTorch "),ft=a(ba,"A",{href:!0,rel:!0});var Ql=s(ft);Rs=i(Ql,"torch.nn.Module"),Ql.forEach(o),Ps=i(ba,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ba.forEach(o),Ys=h(Q),V=a(Q,"DIV",{class:!0});var qe=s(V);S(gt.$$.fragment,qe),Qs=h(qe),se=a(qe,"P",{});var Eo=s(se);Ls=i(Eo,"The "),bo=a(Eo,"A",{href:!0});var Ll=s(bo);Ds=i(Ll,"UniSpeechSatModel"),Ll.forEach(o),Hs=i(Eo," forward method, overrides the "),an=a(Eo,"CODE",{});var Dl=s(an);Os=i(Dl,"__call__"),Dl.forEach(o),Ks=i(Eo," special method."),Eo.forEach(o),er=h(qe),S(ke.$$.fragment,qe),tr=h(qe),S(je.$$.fragment,qe),qe.forEach(o),Q.forEach(o),Hn=h(t),re=a(t,"H2",{class:!0});var ya=s(re);Fe=a(ya,"A",{id:!0,class:!0,href:!0});var Hl=s(Fe);sn=a(Hl,"SPAN",{});var Ol=s(sn);S(_t.$$.fragment,Ol),Ol.forEach(o),Hl.forEach(o),or=h(ya),rn=a(ya,"SPAN",{});var Kl=s(rn);nr=i(Kl,"UniSpeechSatForCTC"),Kl.forEach(o),ya.forEach(o),On=h(t),W=a(t,"DIV",{class:!0});var L=s(W);S(vt.$$.fragment,L),ar=h(L),ie=a(L,"P",{});var Zo=s(ie);sr=i(Zo,"UniSpeechSat Model with a "),ln=a(Zo,"CODE",{});var ec=s(ln);rr=i(ec,"language modeling"),ec.forEach(o),ir=i(Zo,` head on top for Connectionist Temporal Classification (CTC).
UniSpeechSat was proposed in `),bt=a(Zo,"A",{href:!0,rel:!0});var tc=s(bt);lr=i(tc,`wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations`),tc.forEach(o),cr=i(Zo,` by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`),Zo.forEach(o),dr=h(L),yt=a(L,"P",{});var Sa=s(yt);pr=i(Sa,"This model inherits from "),yo=a(Sa,"A",{href:!0});var oc=s(yo);hr=i(oc,"PreTrainedModel"),oc.forEach(o),mr=i(Sa,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Sa.forEach(o),ur=h(L),St=a(L,"P",{});var wa=s(St);fr=i(wa,"This model is a PyTorch "),wt=a(wa,"A",{href:!0,rel:!0});var nc=s(wt);gr=i(nc,"torch.nn.Module"),nc.forEach(o),_r=i(wa,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),wa.forEach(o),vr=h(L),N=a(L,"DIV",{class:!0});var Re=s(N);S(Tt.$$.fragment,Re),br=h(Re),le=a(Re,"P",{});var Vo=s(le);yr=i(Vo,"The "),So=a(Vo,"A",{href:!0});var ac=s(So);Sr=i(ac,"UniSpeechSatForCTC"),ac.forEach(o),wr=i(Vo," forward method, overrides the "),cn=a(Vo,"CODE",{});var sc=s(cn);Tr=i(sc,"__call__"),sc.forEach(o),Ur=i(Vo," special method."),Vo.forEach(o),Mr=h(Re),S(Ce.$$.fragment,Re),kr=h(Re),S($e.$$.fragment,Re),Re.forEach(o),L.forEach(o),Kn=h(t),ce=a(t,"H2",{class:!0});var Ta=s(ce);Je=a(Ta,"A",{id:!0,class:!0,href:!0});var rc=s(Je);dn=a(rc,"SPAN",{});var ic=s(dn);S(Ut.$$.fragment,ic),ic.forEach(o),rc.forEach(o),jr=h(Ta),pn=a(Ta,"SPAN",{});var lc=s(pn);Fr=i(lc,"UniSpeechSatForSequenceClassification"),lc.forEach(o),Ta.forEach(o),ea=h(t),F=a(t,"DIV",{class:!0});var B=s(F);S(Mt.$$.fragment,B),Cr=h(B),hn=a(B,"P",{});var cc=s(hn);$r=i(cc,`UniSpeechSat Model with a sequence classification head on top (a linear layer over the pooled output) for tasks
like SUPERB Keyword Spotting.`),cc.forEach(o),Jr=h(B),kt=a(B,"P",{});var Ua=s(kt);Wr=i(Ua,"UniSpeechSat was proposed in "),jt=a(Ua,"A",{href:!0,rel:!0});var dc=s(jt);xr=i(dc,`wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations`),dc.forEach(o),Er=i(Ua,` by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`),Ua.forEach(o),Zr=h(B),Ft=a(B,"P",{});var Ma=s(Ft);Vr=i(Ma,"This model inherits from "),wo=a(Ma,"A",{href:!0});var pc=s(wo);Nr=i(pc,"PreTrainedModel"),pc.forEach(o),Xr=i(Ma,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Ma.forEach(o),zr=h(B),Ct=a(B,"P",{});var ka=s(Ct);Ar=i(ka,"This model is a PyTorch "),$t=a(ka,"A",{href:!0,rel:!0});var hc=s($t);Gr=i(hc,"torch.nn.Module"),hc.forEach(o),Br=i(ka,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ka.forEach(o),Ir=h(B),X=a(B,"DIV",{class:!0});var Pe=s(X);S(Jt.$$.fragment,Pe),qr=h(Pe),de=a(Pe,"P",{});var No=s(de);Rr=i(No,"The "),To=a(No,"A",{href:!0});var mc=s(To);Pr=i(mc,"UniSpeechSatForSequenceClassification"),mc.forEach(o),Yr=i(No," forward method, overrides the "),mn=a(No,"CODE",{});var uc=s(mn);Qr=i(uc,"__call__"),uc.forEach(o),Lr=i(No," special method."),No.forEach(o),Dr=h(Pe),S(We.$$.fragment,Pe),Hr=h(Pe),S(xe.$$.fragment,Pe),Pe.forEach(o),B.forEach(o),ta=h(t),pe=a(t,"H2",{class:!0});var ja=s(pe);Ee=a(ja,"A",{id:!0,class:!0,href:!0});var fc=s(Ee);un=a(fc,"SPAN",{});var gc=s(un);S(Wt.$$.fragment,gc),gc.forEach(o),fc.forEach(o),Or=h(ja),fn=a(ja,"SPAN",{});var _c=s(fn);Kr=i(_c,"UniSpeechSatForAudioFrameClassification"),_c.forEach(o),ja.forEach(o),oa=h(t),C=a(t,"DIV",{class:!0});var I=s(C);S(xt.$$.fragment,I),ei=h(I),gn=a(I,"P",{});var vc=s(gn);ti=i(vc,"UniSpeech-SAT Model with a frame classification head on top for tasks like Speaker Diarization."),vc.forEach(o),oi=h(I),Et=a(I,"P",{});var Fa=s(Et);ni=i(Fa,"UniSpeechSat was proposed in "),Zt=a(Fa,"A",{href:!0,rel:!0});var bc=s(Zt);ai=i(bc,`wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations`),bc.forEach(o),si=i(Fa,` by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`),Fa.forEach(o),ri=h(I),Vt=a(I,"P",{});var Ca=s(Vt);ii=i(Ca,"This model inherits from "),Uo=a(Ca,"A",{href:!0});var yc=s(Uo);li=i(yc,"PreTrainedModel"),yc.forEach(o),ci=i(Ca,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Ca.forEach(o),di=h(I),Nt=a(I,"P",{});var $a=s(Nt);pi=i($a,"This model is a PyTorch "),Xt=a($a,"A",{href:!0,rel:!0});var Sc=s(Xt);hi=i(Sc,"torch.nn.Module"),Sc.forEach(o),mi=i($a,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),$a.forEach(o),ui=h(I),z=a(I,"DIV",{class:!0});var Ye=s(z);S(zt.$$.fragment,Ye),fi=h(Ye),he=a(Ye,"P",{});var Xo=s(he);gi=i(Xo,"The "),Mo=a(Xo,"A",{href:!0});var wc=s(Mo);_i=i(wc,"UniSpeechSatForAudioFrameClassification"),wc.forEach(o),vi=i(Xo," forward method, overrides the "),_n=a(Xo,"CODE",{});var Tc=s(_n);bi=i(Tc,"__call__"),Tc.forEach(o),yi=i(Xo," special method."),Xo.forEach(o),Si=h(Ye),S(Ze.$$.fragment,Ye),wi=h(Ye),S(Ve.$$.fragment,Ye),Ye.forEach(o),I.forEach(o),na=h(t),me=a(t,"H2",{class:!0});var Ja=s(me);Ne=a(Ja,"A",{id:!0,class:!0,href:!0});var Uc=s(Ne);vn=a(Uc,"SPAN",{});var Mc=s(vn);S(At.$$.fragment,Mc),Mc.forEach(o),Uc.forEach(o),Ti=h(Ja),bn=a(Ja,"SPAN",{});var kc=s(bn);Ui=i(kc,"UniSpeechSatForXVector"),kc.forEach(o),Ja.forEach(o),aa=h(t),$=a(t,"DIV",{class:!0});var q=s($);S(Gt.$$.fragment,q),Mi=h(q),yn=a(q,"P",{});var jc=s(yn);ki=i(jc,"UniSpeech-SAT Model with an XVector feature extraction head on top for tasks like Speaker Verification."),jc.forEach(o),ji=h(q),Bt=a(q,"P",{});var Wa=s(Bt);Fi=i(Wa,"UniSpeechSat was proposed in "),It=a(Wa,"A",{href:!0,rel:!0});var Fc=s(It);Ci=i(Fc,`wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations`),Fc.forEach(o),$i=i(Wa,` by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`),Wa.forEach(o),Ji=h(q),qt=a(q,"P",{});var xa=s(qt);Wi=i(xa,"This model inherits from "),ko=a(xa,"A",{href:!0});var Cc=s(ko);xi=i(Cc,"PreTrainedModel"),Cc.forEach(o),Ei=i(xa,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),xa.forEach(o),Zi=h(q),Rt=a(q,"P",{});var Ea=s(Rt);Vi=i(Ea,"This model is a PyTorch "),Pt=a(Ea,"A",{href:!0,rel:!0});var $c=s(Pt);Ni=i($c,"torch.nn.Module"),$c.forEach(o),Xi=i(Ea,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ea.forEach(o),zi=h(q),A=a(q,"DIV",{class:!0});var Qe=s(A);S(Yt.$$.fragment,Qe),Ai=h(Qe),ue=a(Qe,"P",{});var zo=s(ue);Gi=i(zo,"The "),jo=a(zo,"A",{href:!0});var Jc=s(jo);Bi=i(Jc,"UniSpeechSatForXVector"),Jc.forEach(o),Ii=i(zo," forward method, overrides the "),Sn=a(zo,"CODE",{});var Wc=s(Sn);qi=i(Wc,"__call__"),Wc.forEach(o),Ri=i(zo," special method."),zo.forEach(o),Pi=h(Qe),S(Xe.$$.fragment,Qe),Yi=h(Qe),S(ze.$$.fragment,Qe),Qe.forEach(o),q.forEach(o),sa=h(t),fe=a(t,"H2",{class:!0});var Za=s(fe);Ae=a(Za,"A",{id:!0,class:!0,href:!0});var xc=s(Ae);wn=a(xc,"SPAN",{});var Ec=s(wn);S(Qt.$$.fragment,Ec),Ec.forEach(o),xc.forEach(o),Qi=h(Za),Tn=a(Za,"SPAN",{});var Zc=s(Tn);Li=i(Zc,"UniSpeechSatForPreTraining"),Zc.forEach(o),Za.forEach(o),ra=h(t),x=a(t,"DIV",{class:!0});var D=s(x);S(Lt.$$.fragment,D),Di=h(D),ge=a(D,"P",{});var Ao=s(ge);Hi=i(Ao,"UniSpeechSat Model with a quantizer and "),Un=a(Ao,"CODE",{});var Vc=s(Un);Oi=i(Vc,"VQ"),Vc.forEach(o),Ki=i(Ao,` head on top.
UniSpeechSat was proposed in `),Dt=a(Ao,"A",{href:!0,rel:!0});var Nc=s(Dt);el=i(Nc,`wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations`),Nc.forEach(o),tl=i(Ao,` by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael
Auli.`),Ao.forEach(o),ol=h(D),Ht=a(D,"P",{});var Va=s(Ht);nl=i(Va,"This model inherits from "),Fo=a(Va,"A",{href:!0});var Xc=s(Fo);al=i(Xc,"PreTrainedModel"),Xc.forEach(o),sl=i(Va,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving etc.).`),Va.forEach(o),rl=h(D),Ot=a(D,"P",{});var Na=s(Ot);il=i(Na,"This model is a PyTorch "),Kt=a(Na,"A",{href:!0,rel:!0});var zc=s(Kt);ll=i(zc,"torch.nn.Module"),zc.forEach(o),cl=i(Na,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Na.forEach(o),dl=h(D),G=a(D,"DIV",{class:!0});var Le=s(G);S(eo.$$.fragment,Le),pl=h(Le),_e=a(Le,"P",{});var Go=s(_e);hl=i(Go,"The "),Co=a(Go,"A",{href:!0});var Ac=s(Co);ml=i(Ac,"UniSpeechSatForPreTraining"),Ac.forEach(o),ul=i(Go," forward method, overrides the "),Mn=a(Go,"CODE",{});var Gc=s(Mn);fl=i(Gc,"__call__"),Gc.forEach(o),gl=i(Go," special method."),Go.forEach(o),_l=h(Le),S(Ge.$$.fragment,Le),vl=h(Le),S(Be.$$.fragment,Le),Le.forEach(o),D.forEach(o),this.h()},h(){d(c,"name","hf:doc:metadata"),d(c,"content",JSON.stringify(id)),d(u,"id","unispeechsat"),d(u,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(u,"href","#unispeechsat"),d(g,"class","relative group"),d(ve,"id","overview"),d(ve,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(ve,"href","#overview"),d(H,"class","relative group"),d(He,"href","https://arxiv.org/abs/2110.05752"),d(He,"rel","nofollow"),d(po,"href","/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2Processor"),d(ho,"href","/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer"),d(et,"href","https://huggingface.co/patrickvonplaten"),d(et,"rel","nofollow"),d(tt,"href","https://github.com/microsoft/UniSpeech/tree/main/UniSpeech-SAT"),d(tt,"rel","nofollow"),d(ye,"id","documentation-resources"),d(ye,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(ye,"href","#documentation-resources"),d(O,"class","relative group"),d(mo,"href","../tasks/audio_classification"),d(uo,"href","../tasks/asr"),d(we,"id","transformers.UniSpeechSatConfig"),d(we,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(we,"href","#transformers.UniSpeechSatConfig"),d(K,"class","relative group"),d(fo,"href","/docs/transformers/v4.31.0/en/model_doc/unispeech-sat#transformers.UniSpeechSatModel"),d(st,"href","https://huggingface.co/microsoft/unispeech-sat-base-100h-libri-ft"),d(st,"rel","nofollow"),d(go,"href","/docs/transformers/v4.31.0/en/main_classes/configuration#transformers.PretrainedConfig"),d(_o,"href","/docs/transformers/v4.31.0/en/main_classes/configuration#transformers.PretrainedConfig"),d(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ue,"id","transformers.models.unispeech_sat.modeling_unispeech_sat.UniSpeechSatForPreTrainingOutput"),d(Ue,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Ue,"href","#transformers.models.unispeech_sat.modeling_unispeech_sat.UniSpeechSatForPreTrainingOutput"),d(oe,"class","relative group"),d(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Me,"id","transformers.UniSpeechSatModel"),d(Me,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Me,"href","#transformers.UniSpeechSatModel"),d(ae,"class","relative group"),d(ht,"href","https://arxiv.org/abs/2006.11477"),d(ht,"rel","nofollow"),d(vo,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel"),d(ft,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(ft,"rel","nofollow"),d(bo,"href","/docs/transformers/v4.31.0/en/model_doc/unispeech-sat#transformers.UniSpeechSatModel"),d(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Fe,"id","transformers.UniSpeechSatForCTC"),d(Fe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Fe,"href","#transformers.UniSpeechSatForCTC"),d(re,"class","relative group"),d(bt,"href","https://arxiv.org/abs/2006.11477"),d(bt,"rel","nofollow"),d(yo,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel"),d(wt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(wt,"rel","nofollow"),d(So,"href","/docs/transformers/v4.31.0/en/model_doc/unispeech-sat#transformers.UniSpeechSatForCTC"),d(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Je,"id","transformers.UniSpeechSatForSequenceClassification"),d(Je,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Je,"href","#transformers.UniSpeechSatForSequenceClassification"),d(ce,"class","relative group"),d(jt,"href","https://arxiv.org/abs/2006.11477"),d(jt,"rel","nofollow"),d(wo,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel"),d($t,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d($t,"rel","nofollow"),d(To,"href","/docs/transformers/v4.31.0/en/model_doc/unispeech-sat#transformers.UniSpeechSatForSequenceClassification"),d(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ee,"id","transformers.UniSpeechSatForAudioFrameClassification"),d(Ee,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Ee,"href","#transformers.UniSpeechSatForAudioFrameClassification"),d(pe,"class","relative group"),d(Zt,"href","https://arxiv.org/abs/2006.11477"),d(Zt,"rel","nofollow"),d(Uo,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel"),d(Xt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(Xt,"rel","nofollow"),d(Mo,"href","/docs/transformers/v4.31.0/en/model_doc/unispeech-sat#transformers.UniSpeechSatForAudioFrameClassification"),d(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ne,"id","transformers.UniSpeechSatForXVector"),d(Ne,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Ne,"href","#transformers.UniSpeechSatForXVector"),d(me,"class","relative group"),d(It,"href","https://arxiv.org/abs/2006.11477"),d(It,"rel","nofollow"),d(ko,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel"),d(Pt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(Pt,"rel","nofollow"),d(jo,"href","/docs/transformers/v4.31.0/en/model_doc/unispeech-sat#transformers.UniSpeechSatForXVector"),d(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ae,"id","transformers.UniSpeechSatForPreTraining"),d(Ae,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Ae,"href","#transformers.UniSpeechSatForPreTraining"),d(fe,"class","relative group"),d(Dt,"href","https://arxiv.org/abs/2006.11477"),d(Dt,"rel","nofollow"),d(Fo,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel"),d(Kt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(Kt,"rel","nofollow"),d(Co,"href","/docs/transformers/v4.31.0/en/model_doc/unispeech-sat#transformers.UniSpeechSatForPreTraining"),d(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,f){e(document.head,c),_(t,b,f),_(t,g,f),e(g,u),e(u,v),w(l,v,null),e(g,m),e(g,j),e(j,Xa),_(t,Vn,f),_(t,H,f),e(H,ve),e(ve,Io),w(De,Io,null),e(H,za),e(H,qo),e(qo,Aa),_(t,Nn,f),_(t,be,f),e(be,Ga),e(be,He),e(He,Ba),e(be,Ia),_(t,Xn,f),_(t,io,f),e(io,qa),_(t,zn,f),_(t,lo,f),e(lo,Ro),e(Ro,Ra),_(t,An,f),_(t,co,f),e(co,Pa),_(t,Gn,f),_(t,P,f),e(P,Oe),e(Oe,Ya),e(Oe,po),e(po,Qa),e(Oe,La),e(P,Da),e(P,Ke),e(Ke,Ha),e(Ke,ho),e(ho,Oa),e(Ke,Ka),e(P,es),e(P,Po),e(Po,ts),_(t,Bn,f),_(t,Y,f),e(Y,os),e(Y,et),e(et,ns),e(Y,as),e(Y,tt),e(tt,ss),e(Y,rs),_(t,In,f),_(t,O,f),e(O,ye),e(ye,Yo),w(ot,Yo,null),e(O,is),e(O,Qo),e(Qo,ls),_(t,qn,f),_(t,Se,f),e(Se,Lo),e(Lo,mo),e(mo,cs),e(Se,ds),e(Se,Do),e(Do,uo),e(uo,ps),_(t,Rn,f),_(t,K,f),e(K,we),e(we,Ho),w(nt,Ho,null),e(K,hs),e(K,Oo),e(Oo,ms),_(t,Pn,f),_(t,Z,f),w(at,Z,null),e(Z,us),e(Z,ee),e(ee,fs),e(ee,fo),e(fo,gs),e(ee,_s),e(ee,st),e(st,vs),e(ee,bs),e(Z,ys),e(Z,te),e(te,Ss),e(te,go),e(go,ws),e(te,Ts),e(te,_o),e(_o,Us),e(te,Ms),e(Z,ks),w(Te,Z,null),_(t,Yn,f),_(t,oe,f),e(oe,Ue),e(Ue,Ko),w(rt,Ko,null),e(oe,js),e(oe,en),e(en,Fs),_(t,Qn,f),_(t,ne,f),w(it,ne,null),e(ne,Cs),e(ne,lt),e(lt,$s),e(lt,tn),e(tn,Js),e(lt,Ws),_(t,Ln,f),_(t,ae,f),e(ae,Me),e(Me,on),w(ct,on,null),e(ae,xs),e(ae,nn),e(nn,Es),_(t,Dn,f),_(t,J,f),w(dt,J,null),e(J,Zs),e(J,pt),e(pt,Vs),e(pt,ht),e(ht,Ns),e(pt,Xs),e(J,zs),e(J,mt),e(mt,As),e(mt,vo),e(vo,Gs),e(mt,Bs),e(J,Is),e(J,ut),e(ut,qs),e(ut,ft),e(ft,Rs),e(ut,Ps),e(J,Ys),e(J,V),w(gt,V,null),e(V,Qs),e(V,se),e(se,Ls),e(se,bo),e(bo,Ds),e(se,Hs),e(se,an),e(an,Os),e(se,Ks),e(V,er),w(ke,V,null),e(V,tr),w(je,V,null),_(t,Hn,f),_(t,re,f),e(re,Fe),e(Fe,sn),w(_t,sn,null),e(re,or),e(re,rn),e(rn,nr),_(t,On,f),_(t,W,f),w(vt,W,null),e(W,ar),e(W,ie),e(ie,sr),e(ie,ln),e(ln,rr),e(ie,ir),e(ie,bt),e(bt,lr),e(ie,cr),e(W,dr),e(W,yt),e(yt,pr),e(yt,yo),e(yo,hr),e(yt,mr),e(W,ur),e(W,St),e(St,fr),e(St,wt),e(wt,gr),e(St,_r),e(W,vr),e(W,N),w(Tt,N,null),e(N,br),e(N,le),e(le,yr),e(le,So),e(So,Sr),e(le,wr),e(le,cn),e(cn,Tr),e(le,Ur),e(N,Mr),w(Ce,N,null),e(N,kr),w($e,N,null),_(t,Kn,f),_(t,ce,f),e(ce,Je),e(Je,dn),w(Ut,dn,null),e(ce,jr),e(ce,pn),e(pn,Fr),_(t,ea,f),_(t,F,f),w(Mt,F,null),e(F,Cr),e(F,hn),e(hn,$r),e(F,Jr),e(F,kt),e(kt,Wr),e(kt,jt),e(jt,xr),e(kt,Er),e(F,Zr),e(F,Ft),e(Ft,Vr),e(Ft,wo),e(wo,Nr),e(Ft,Xr),e(F,zr),e(F,Ct),e(Ct,Ar),e(Ct,$t),e($t,Gr),e(Ct,Br),e(F,Ir),e(F,X),w(Jt,X,null),e(X,qr),e(X,de),e(de,Rr),e(de,To),e(To,Pr),e(de,Yr),e(de,mn),e(mn,Qr),e(de,Lr),e(X,Dr),w(We,X,null),e(X,Hr),w(xe,X,null),_(t,ta,f),_(t,pe,f),e(pe,Ee),e(Ee,un),w(Wt,un,null),e(pe,Or),e(pe,fn),e(fn,Kr),_(t,oa,f),_(t,C,f),w(xt,C,null),e(C,ei),e(C,gn),e(gn,ti),e(C,oi),e(C,Et),e(Et,ni),e(Et,Zt),e(Zt,ai),e(Et,si),e(C,ri),e(C,Vt),e(Vt,ii),e(Vt,Uo),e(Uo,li),e(Vt,ci),e(C,di),e(C,Nt),e(Nt,pi),e(Nt,Xt),e(Xt,hi),e(Nt,mi),e(C,ui),e(C,z),w(zt,z,null),e(z,fi),e(z,he),e(he,gi),e(he,Mo),e(Mo,_i),e(he,vi),e(he,_n),e(_n,bi),e(he,yi),e(z,Si),w(Ze,z,null),e(z,wi),w(Ve,z,null),_(t,na,f),_(t,me,f),e(me,Ne),e(Ne,vn),w(At,vn,null),e(me,Ti),e(me,bn),e(bn,Ui),_(t,aa,f),_(t,$,f),w(Gt,$,null),e($,Mi),e($,yn),e(yn,ki),e($,ji),e($,Bt),e(Bt,Fi),e(Bt,It),e(It,Ci),e(Bt,$i),e($,Ji),e($,qt),e(qt,Wi),e(qt,ko),e(ko,xi),e(qt,Ei),e($,Zi),e($,Rt),e(Rt,Vi),e(Rt,Pt),e(Pt,Ni),e(Rt,Xi),e($,zi),e($,A),w(Yt,A,null),e(A,Ai),e(A,ue),e(ue,Gi),e(ue,jo),e(jo,Bi),e(ue,Ii),e(ue,Sn),e(Sn,qi),e(ue,Ri),e(A,Pi),w(Xe,A,null),e(A,Yi),w(ze,A,null),_(t,sa,f),_(t,fe,f),e(fe,Ae),e(Ae,wn),w(Qt,wn,null),e(fe,Qi),e(fe,Tn),e(Tn,Li),_(t,ra,f),_(t,x,f),w(Lt,x,null),e(x,Di),e(x,ge),e(ge,Hi),e(ge,Un),e(Un,Oi),e(ge,Ki),e(ge,Dt),e(Dt,el),e(ge,tl),e(x,ol),e(x,Ht),e(Ht,nl),e(Ht,Fo),e(Fo,al),e(Ht,sl),e(x,rl),e(x,Ot),e(Ot,il),e(Ot,Kt),e(Kt,ll),e(Ot,cl),e(x,dl),e(x,G),w(eo,G,null),e(G,pl),e(G,_e),e(_e,hl),e(_e,Co),e(Co,ml),e(_e,ul),e(_e,Mn),e(Mn,fl),e(_e,gl),e(G,_l),w(Ge,G,null),e(G,vl),w(Be,G,null),ia=!0},p(t,[f]){const to={};f&2&&(to.$$scope={dirty:f,ctx:t}),Te.$set(to);const kn={};f&2&&(kn.$$scope={dirty:f,ctx:t}),ke.$set(kn);const jn={};f&2&&(jn.$$scope={dirty:f,ctx:t}),je.$set(jn);const Fn={};f&2&&(Fn.$$scope={dirty:f,ctx:t}),Ce.$set(Fn);const oo={};f&2&&(oo.$$scope={dirty:f,ctx:t}),$e.$set(oo);const Cn={};f&2&&(Cn.$$scope={dirty:f,ctx:t}),We.$set(Cn);const $n={};f&2&&($n.$$scope={dirty:f,ctx:t}),xe.$set($n);const Jn={};f&2&&(Jn.$$scope={dirty:f,ctx:t}),Ze.$set(Jn);const no={};f&2&&(no.$$scope={dirty:f,ctx:t}),Ve.$set(no);const Wn={};f&2&&(Wn.$$scope={dirty:f,ctx:t}),Xe.$set(Wn);const xn={};f&2&&(xn.$$scope={dirty:f,ctx:t}),ze.$set(xn);const En={};f&2&&(En.$$scope={dirty:f,ctx:t}),Ge.$set(En);const Zn={};f&2&&(Zn.$$scope={dirty:f,ctx:t}),Be.$set(Zn)},i(t){ia||(T(l.$$.fragment,t),T(De.$$.fragment,t),T(ot.$$.fragment,t),T(nt.$$.fragment,t),T(at.$$.fragment,t),T(Te.$$.fragment,t),T(rt.$$.fragment,t),T(it.$$.fragment,t),T(ct.$$.fragment,t),T(dt.$$.fragment,t),T(gt.$$.fragment,t),T(ke.$$.fragment,t),T(je.$$.fragment,t),T(_t.$$.fragment,t),T(vt.$$.fragment,t),T(Tt.$$.fragment,t),T(Ce.$$.fragment,t),T($e.$$.fragment,t),T(Ut.$$.fragment,t),T(Mt.$$.fragment,t),T(Jt.$$.fragment,t),T(We.$$.fragment,t),T(xe.$$.fragment,t),T(Wt.$$.fragment,t),T(xt.$$.fragment,t),T(zt.$$.fragment,t),T(Ze.$$.fragment,t),T(Ve.$$.fragment,t),T(At.$$.fragment,t),T(Gt.$$.fragment,t),T(Yt.$$.fragment,t),T(Xe.$$.fragment,t),T(ze.$$.fragment,t),T(Qt.$$.fragment,t),T(Lt.$$.fragment,t),T(eo.$$.fragment,t),T(Ge.$$.fragment,t),T(Be.$$.fragment,t),ia=!0)},o(t){U(l.$$.fragment,t),U(De.$$.fragment,t),U(ot.$$.fragment,t),U(nt.$$.fragment,t),U(at.$$.fragment,t),U(Te.$$.fragment,t),U(rt.$$.fragment,t),U(it.$$.fragment,t),U(ct.$$.fragment,t),U(dt.$$.fragment,t),U(gt.$$.fragment,t),U(ke.$$.fragment,t),U(je.$$.fragment,t),U(_t.$$.fragment,t),U(vt.$$.fragment,t),U(Tt.$$.fragment,t),U(Ce.$$.fragment,t),U($e.$$.fragment,t),U(Ut.$$.fragment,t),U(Mt.$$.fragment,t),U(Jt.$$.fragment,t),U(We.$$.fragment,t),U(xe.$$.fragment,t),U(Wt.$$.fragment,t),U(xt.$$.fragment,t),U(zt.$$.fragment,t),U(Ze.$$.fragment,t),U(Ve.$$.fragment,t),U(At.$$.fragment,t),U(Gt.$$.fragment,t),U(Yt.$$.fragment,t),U(Xe.$$.fragment,t),U(ze.$$.fragment,t),U(Qt.$$.fragment,t),U(Lt.$$.fragment,t),U(eo.$$.fragment,t),U(Ge.$$.fragment,t),U(Be.$$.fragment,t),ia=!1},d(t){o(c),t&&o(b),t&&o(g),M(l),t&&o(Vn),t&&o(H),M(De),t&&o(Nn),t&&o(be),t&&o(Xn),t&&o(io),t&&o(zn),t&&o(lo),t&&o(An),t&&o(co),t&&o(Gn),t&&o(P),t&&o(Bn),t&&o(Y),t&&o(In),t&&o(O),M(ot),t&&o(qn),t&&o(Se),t&&o(Rn),t&&o(K),M(nt),t&&o(Pn),t&&o(Z),M(at),M(Te),t&&o(Yn),t&&o(oe),M(rt),t&&o(Qn),t&&o(ne),M(it),t&&o(Ln),t&&o(ae),M(ct),t&&o(Dn),t&&o(J),M(dt),M(gt),M(ke),M(je),t&&o(Hn),t&&o(re),M(_t),t&&o(On),t&&o(W),M(vt),M(Tt),M(Ce),M($e),t&&o(Kn),t&&o(ce),M(Ut),t&&o(ea),t&&o(F),M(Mt),M(Jt),M(We),M(xe),t&&o(ta),t&&o(pe),M(Wt),t&&o(oa),t&&o(C),M(xt),M(zt),M(Ze),M(Ve),t&&o(na),t&&o(me),M(At),t&&o(aa),t&&o($),M(Gt),M(Yt),M(Xe),M(ze),t&&o(sa),t&&o(fe),M(Qt),t&&o(ra),t&&o(x),M(Lt),M(eo),M(Ge),M(Be)}}}const id={local:"unispeechsat",sections:[{local:"overview",title:"Overview"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.UniSpeechSatConfig",title:"UniSpeechSatConfig"},{local:"transformers.models.unispeech_sat.modeling_unispeech_sat.UniSpeechSatForPreTrainingOutput",title:"UniSpeechSat specific outputs"},{local:"transformers.UniSpeechSatModel",title:"UniSpeechSatModel"},{local:"transformers.UniSpeechSatForCTC",title:"UniSpeechSatForCTC"},{local:"transformers.UniSpeechSatForSequenceClassification",title:"UniSpeechSatForSequenceClassification"},{local:"transformers.UniSpeechSatForAudioFrameClassification",title:"UniSpeechSatForAudioFrameClassification"},{local:"transformers.UniSpeechSatForXVector",title:"UniSpeechSatForXVector"},{local:"transformers.UniSpeechSatForPreTraining",title:"UniSpeechSatForPreTraining"}],title:"UniSpeech-SAT"};function ld(k){return Pc(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class fd extends Bc{constructor(c){super();Ic(this,c,ld,rd,qc,{})}}export{fd as default,id as metadata};
