import{s as Vr,o as Hr,n as R}from"../chunks/scheduler.25b97de1.js";import{S as Er,i as Dr,g as r,s as o,r as u,A as Br,h as a,f as c,c as n,j as k,u as f,x as p,k as x,y as t,a as h,v as _,d as g,t as T,w as v}from"../chunks/index.d9030fc9.js";import{T as ko}from"../chunks/Tip.baa67368.js";import{D as w}from"../chunks/Docstring.e257edda.js";import{C as wo}from"../chunks/CodeBlock.e6cd0d95.js";import{E as xo}from"../chunks/ExampleCodeBlock.20db4b6e.js";import{H as js,E as Rr}from"../chunks/EditOnGithub.91d95064.js";function Or(M){let s,b="Example:",l,m,y;return m=new wo({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFNwZWVjaFQ1TW9kZWwlMkMlMjBTcGVlY2hUNUNvbmZpZyUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjAlMjJtaWNyb3NvZnQlMkZzcGVlY2h0NV9hc3IlMjIlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwU3BlZWNoVDVDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtb2RlbCUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwJTIybWljcm9zb2Z0JTJGc3BlZWNodDVfYXNyJTIyJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBTcGVlY2hUNU1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> SpeechT5Model, SpeechT5Config

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a &quot;microsoft/speecht5_asr&quot; style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = SpeechT5Config()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the &quot;microsoft/speecht5_asr&quot; style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SpeechT5Model(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`,wrap:!1}}),{c(){s=r("p"),s.textContent=b,l=o(),u(m.$$.fragment)},l(i){s=a(i,"P",{"data-svelte-h":!0}),p(s)!=="svelte-11lpom8"&&(s.textContent=b),l=n(i),f(m.$$.fragment,i)},m(i,S){h(i,s,S),h(i,l,S),_(m,i,S),y=!0},p:R,i(i){y||(g(m.$$.fragment,i),y=!0)},o(i){T(m.$$.fragment,i),y=!1},d(i){i&&(c(s),c(l)),v(m,i)}}}function Xr(M){let s,b="Example:",l,m,y;return m=new wo({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFNwZWVjaFQ1SGlmaUdhbiUyQyUyMFNwZWVjaFQ1SGlmaUdhbkNvbmZpZyUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjAlMjJtaWNyb3NvZnQlMkZzcGVlY2h0NV9oaWZpZ2FuJTIyJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMFNwZWVjaFQ1SGlmaUdhbkNvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwKHdpdGglMjByYW5kb20lMjB3ZWlnaHRzKSUyMGZyb20lMjB0aGUlMjAlMjJtaWNyb3NvZnQlMkZzcGVlY2h0NV9oaWZpZ2FuJTIyJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBTcGVlY2hUNUhpZmlHYW4oY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> SpeechT5HifiGan, SpeechT5HifiGanConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a &quot;microsoft/speecht5_hifigan&quot; style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = SpeechT5HifiGanConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the &quot;microsoft/speecht5_hifigan&quot; style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SpeechT5HifiGan(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`,wrap:!1}}),{c(){s=r("p"),s.textContent=b,l=o(),u(m.$$.fragment)},l(i){s=a(i,"P",{"data-svelte-h":!0}),p(s)!=="svelte-11lpom8"&&(s.textContent=b),l=n(i),f(m.$$.fragment,i)},m(i,S){h(i,s,S),h(i,l,S),_(m,i,S),y=!0},p:R,i(i){y||(g(m.$$.fragment,i),y=!0)},o(i){T(m.$$.fragment,i),y=!1},d(i){i&&(c(s),c(l)),v(m,i)}}}function Yr(M){let s,b=`This class method is simply calling the feature extractor
<a href="/docs/transformers/pr_30674/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.from_pretrained">from_pretrained()</a>, image processor
<a href="/docs/transformers/pr_30674/en/internal/image_processing_utils#transformers.ImageProcessingMixin">ImageProcessingMixin</a> and the tokenizer
<code>~tokenization_utils_base.PreTrainedTokenizer.from_pretrained</code> methods. Please refer to the docstrings of the
methods above for more information.`;return{c(){s=r("p"),s.innerHTML=b},l(l){s=a(l,"P",{"data-svelte-h":!0}),p(s)!=="svelte-1yyeil9"&&(s.innerHTML=b)},m(l,m){h(l,s,m)},p:R,d(l){l&&c(s)}}}function Qr(M){let s,b=`This class method is simply calling <a href="/docs/transformers/pr_30674/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.save_pretrained">save_pretrained()</a> and
<a href="/docs/transformers/pr_30674/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.save_pretrained">save_pretrained()</a>. Please refer to the docstrings of the
methods above for more information.`;return{c(){s=r("p"),s.innerHTML=b},l(l){s=a(l,"P",{"data-svelte-h":!0}),p(s)!=="svelte-1nsavru"&&(s.innerHTML=b)},m(l,m){h(l,s,m)},p:R,d(l){l&&c(s)}}}function Ar(M){let s,b=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){s=r("p"),s.innerHTML=b},l(l){s=a(l,"P",{"data-svelte-h":!0}),p(s)!=="svelte-fincs2"&&(s.innerHTML=b)},m(l,m){h(l,s,m)},p:R,d(l){l&&c(s)}}}function Kr(M){let s,b=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){s=r("p"),s.innerHTML=b},l(l){s=a(l,"P",{"data-svelte-h":!0}),p(s)!=="svelte-fincs2"&&(s.innerHTML=b)},m(l,m){h(l,s,m)},p:R,d(l){l&&c(s)}}}function ea(M){let s,b="Example:",l,m,y;return m=new wo({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFNwZWVjaFQ1UHJvY2Vzc29yJTJDJTIwU3BlZWNoVDVGb3JTcGVlY2hUb1RleHQlMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUwQSUyMCUyMCUyMCUyMCUyMmhmLWludGVybmFsLXRlc3RpbmclMkZsaWJyaXNwZWVjaF9hc3JfZGVtbyUyMiUyQyUyMCUyMmNsZWFuJTIyJTJDJTIwc3BsaXQlM0QlMjJ2YWxpZGF0aW9uJTIyJTBBKSUyMCUyMCUyMyUyMGRvY3Rlc3QlM0ElMjAlMkJJR05PUkVfUkVTVUxUJTBBZGF0YXNldCUyMCUzRCUyMGRhdGFzZXQuc29ydCglMjJpZCUyMiklMEFzYW1wbGluZ19yYXRlJTIwJTNEJTIwZGF0YXNldC5mZWF0dXJlcyU1QiUyMmF1ZGlvJTIyJTVELnNhbXBsaW5nX3JhdGUlMEElMEFwcm9jZXNzb3IlMjAlM0QlMjBTcGVlY2hUNVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIybWljcm9zb2Z0JTJGc3BlZWNodDVfYXNyJTIyKSUwQW1vZGVsJTIwJTNEJTIwU3BlZWNoVDVGb3JTcGVlY2hUb1RleHQuZnJvbV9wcmV0cmFpbmVkKCUyMm1pY3Jvc29mdCUyRnNwZWVjaHQ1X2FzciUyMiklMEElMEElMjMlMjBhdWRpbyUyMGZpbGUlMjBpcyUyMGRlY29kZWQlMjBvbiUyMHRoZSUyMGZseSUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3NvcihhdWRpbyUzRGRhdGFzZXQlNUIwJTVEJTVCJTIyYXVkaW8lMjIlNUQlNUIlMjJhcnJheSUyMiU1RCUyQyUyMHNhbXBsaW5nX3JhdGUlM0RzYW1wbGluZ19yYXRlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFwcmVkaWN0ZWRfaWRzJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoKippbnB1dHMlMkMlMjBtYXhfbGVuZ3RoJTNEMTAwKSUwQSUwQSUyMyUyMHRyYW5zY3JpYmUlMjBzcGVlY2glMEF0cmFuc2NyaXB0aW9uJTIwJTNEJTIwcHJvY2Vzc29yLmJhdGNoX2RlY29kZShwcmVkaWN0ZWRfaWRzJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUpJTBBdHJhbnNjcmlwdGlvbiU1QjAlNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> SpeechT5Processor, SpeechT5ForSpeechToText
<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-meta">... </span>    <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">... </span>)  <span class="hljs-comment"># doctest: +IGNORE_RESULT</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 = SpeechT5Processor.from_pretrained(<span class="hljs-string">&quot;microsoft/speecht5_asr&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SpeechT5ForSpeechToText.from_pretrained(<span class="hljs-string">&quot;microsoft/speecht5_asr&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(audio=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>predicted_ids = model.generate(**inputs, max_length=<span class="hljs-number">100</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, skip_special_tokens=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>transcription[<span class="hljs-number">0</span>]
<span class="hljs-string">&#x27;mister quilter is the apostle of the middle classes and we are glad to welcome his gospel&#x27;</span>`,wrap:!1}}),{c(){s=r("p"),s.textContent=b,l=o(),u(m.$$.fragment)},l(i){s=a(i,"P",{"data-svelte-h":!0}),p(s)!=="svelte-11lpom8"&&(s.textContent=b),l=n(i),f(m.$$.fragment,i)},m(i,S){h(i,s,S),h(i,l,S),_(m,i,S),y=!0},p:R,i(i){y||(g(m.$$.fragment,i),y=!0)},o(i){T(m.$$.fragment,i),y=!1},d(i){i&&(c(s),c(l)),v(m,i)}}}function ta(M){let s,b;return s=new wo({props:{code:"aW5wdXRzJTVCJTIybGFiZWxzJTIyJTVEJTIwJTNEJTIwcHJvY2Vzc29yKHRleHRfdGFyZ2V0JTNEZGF0YXNldCU1QjAlNUQlNUIlMjJ0ZXh0JTIyJTVEJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMikuaW5wdXRfaWRzJTBBJTBBJTIzJTIwY29tcHV0ZSUyMGxvc3MlMEFsb3NzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvc3MlMEFyb3VuZChsb3NzLml0ZW0oKSUyQyUyMDIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>inputs[<span class="hljs-string">&quot;labels&quot;</span>] = processor(text_target=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">19.68</span>`,wrap:!1}}),{c(){u(s.$$.fragment)},l(l){f(s.$$.fragment,l)},m(l,m){_(s,l,m),b=!0},p:R,i(l){b||(g(s.$$.fragment,l),b=!0)},o(l){T(s.$$.fragment,l),b=!1},d(l){v(s,l)}}}function oa(M){let s,b=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){s=r("p"),s.innerHTML=b},l(l){s=a(l,"P",{"data-svelte-h":!0}),p(s)!=="svelte-fincs2"&&(s.innerHTML=b)},m(l,m){h(l,s,m)},p:R,d(l){l&&c(s)}}}function na(M){let s,b="Example:",l,m,y;return m=new wo({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFNwZWVjaFQ1UHJvY2Vzc29yJTJDJTIwU3BlZWNoVDVGb3JUZXh0VG9TcGVlY2glMkMlMjBTcGVlY2hUNUhpZmlHYW4lMkMlMjBzZXRfc2VlZCUwQWltcG9ydCUyMHRvcmNoJTBBJTBBcHJvY2Vzc29yJTIwJTNEJTIwU3BlZWNoVDVQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMm1pY3Jvc29mdCUyRnNwZWVjaHQ1X3R0cyUyMiklMEFtb2RlbCUyMCUzRCUyMFNwZWVjaFQ1Rm9yVGV4dFRvU3BlZWNoLmZyb21fcHJldHJhaW5lZCglMjJtaWNyb3NvZnQlMkZzcGVlY2h0NV90dHMlMjIpJTBBdm9jb2RlciUyMCUzRCUyMFNwZWVjaFQ1SGlmaUdhbi5mcm9tX3ByZXRyYWluZWQoJTIybWljcm9zb2Z0JTJGc3BlZWNodDVfaGlmaWdhbiUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IodGV4dCUzRCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQXNwZWFrZXJfZW1iZWRkaW5ncyUyMCUzRCUyMHRvcmNoLnplcm9zKCgxJTJDJTIwNTEyKSklMjAlMjAlMjMlMjBvciUyMGxvYWQlMjB4dmVjdG9ycyUyMGZyb20lMjBhJTIwZmlsZSUwQSUwQXNldF9zZWVkKDU1NSklMjAlMjAlMjMlMjBtYWtlJTIwZGV0ZXJtaW5pc3RpYyUwQSUwQSUyMyUyMGdlbmVyYXRlJTIwc3BlZWNoJTBBc3BlZWNoJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoaW5wdXRzJTVCJTIyaW5wdXRfaWRzJTIyJTVEJTJDJTIwc3BlYWtlcl9lbWJlZGRpbmdzJTNEc3BlYWtlcl9lbWJlZGRpbmdzJTJDJTIwdm9jb2RlciUzRHZvY29kZXIpJTBBc3BlZWNoLnNoYXBl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> SpeechT5Processor, SpeechT5ForTextToSpeech, SpeechT5HifiGan, set_seed
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = SpeechT5Processor.from_pretrained(<span class="hljs-string">&quot;microsoft/speecht5_tts&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SpeechT5ForTextToSpeech.from_pretrained(<span class="hljs-string">&quot;microsoft/speecht5_tts&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>vocoder = SpeechT5HifiGan.from_pretrained(<span class="hljs-string">&quot;microsoft/speecht5_hifigan&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(text=<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>speaker_embeddings = torch.zeros((<span class="hljs-number">1</span>, <span class="hljs-number">512</span>))  <span class="hljs-comment"># or load xvectors from a file</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>set_seed(<span class="hljs-number">555</span>)  <span class="hljs-comment"># make deterministic</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># generate speech</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>speech = model.generate(inputs[<span class="hljs-string">&quot;input_ids&quot;</span>], speaker_embeddings=speaker_embeddings, vocoder=vocoder)
<span class="hljs-meta">&gt;&gt;&gt; </span>speech.shape
torch.Size([<span class="hljs-number">15872</span>])`,wrap:!1}}),{c(){s=r("p"),s.textContent=b,l=o(),u(m.$$.fragment)},l(i){s=a(i,"P",{"data-svelte-h":!0}),p(s)!=="svelte-11lpom8"&&(s.textContent=b),l=n(i),f(m.$$.fragment,i)},m(i,S){h(i,s,S),h(i,l,S),_(m,i,S),y=!0},p:R,i(i){y||(g(m.$$.fragment,i),y=!0)},o(i){T(m.$$.fragment,i),y=!1},d(i){i&&(c(s),c(l)),v(m,i)}}}function sa(M){let s,b=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){s=r("p"),s.innerHTML=b},l(l){s=a(l,"P",{"data-svelte-h":!0}),p(s)!=="svelte-fincs2"&&(s.innerHTML=b)},m(l,m){h(l,s,m)},p:R,d(l){l&&c(s)}}}function ra(M){let s,b="Example:",l,m,y;return m=new wo({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFNwZWVjaFQ1UHJvY2Vzc29yJTJDJTIwU3BlZWNoVDVGb3JTcGVlY2hUb1NwZWVjaCUyQyUyMFNwZWVjaFQ1SGlmaUdhbiUyQyUyMHNldF9zZWVkJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBaW1wb3J0JTIwdG9yY2glMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUwQSUyMCUyMCUyMCUyMCUyMmhmLWludGVybmFsLXRlc3RpbmclMkZsaWJyaXNwZWVjaF9hc3JfZGVtbyUyMiUyQyUyMCUyMmNsZWFuJTIyJTJDJTIwc3BsaXQlM0QlMjJ2YWxpZGF0aW9uJTIyJTBBKSUyMCUyMCUyMyUyMGRvY3Rlc3QlM0ElMjAlMkJJR05PUkVfUkVTVUxUJTBBZGF0YXNldCUyMCUzRCUyMGRhdGFzZXQuc29ydCglMjJpZCUyMiklMEFzYW1wbGluZ19yYXRlJTIwJTNEJTIwZGF0YXNldC5mZWF0dXJlcyU1QiUyMmF1ZGlvJTIyJTVELnNhbXBsaW5nX3JhdGUlMEElMEFwcm9jZXNzb3IlMjAlM0QlMjBTcGVlY2hUNVByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIybWljcm9zb2Z0JTJGc3BlZWNodDVfdmMlMjIpJTBBbW9kZWwlMjAlM0QlMjBTcGVlY2hUNUZvclNwZWVjaFRvU3BlZWNoLmZyb21fcHJldHJhaW5lZCglMjJtaWNyb3NvZnQlMkZzcGVlY2h0NV92YyUyMiklMEF2b2NvZGVyJTIwJTNEJTIwU3BlZWNoVDVIaWZpR2FuLmZyb21fcHJldHJhaW5lZCglMjJtaWNyb3NvZnQlMkZzcGVlY2h0NV9oaWZpZ2FuJTIyKSUwQSUwQSUyMyUyMGF1ZGlvJTIwZmlsZSUyMGlzJTIwZGVjb2RlZCUyMG9uJTIwdGhlJTIwZmx5JTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGF1ZGlvJTNEZGF0YXNldCU1QjAlNUQlNUIlMjJhdWRpbyUyMiU1RCU1QiUyMmFycmF5JTIyJTVEJTJDJTIwc2FtcGxpbmdfcmF0ZSUzRHNhbXBsaW5nX3JhdGUlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXNwZWFrZXJfZW1iZWRkaW5ncyUyMCUzRCUyMHRvcmNoLnplcm9zKCgxJTJDJTIwNTEyKSklMjAlMjAlMjMlMjBvciUyMGxvYWQlMjB4dmVjdG9ycyUyMGZyb20lMjBhJTIwZmlsZSUwQSUwQXNldF9zZWVkKDU1NSklMjAlMjAlMjMlMjBtYWtlJTIwZGV0ZXJtaW5pc3RpYyUwQSUwQSUyMyUyMGdlbmVyYXRlJTIwc3BlZWNoJTBBc3BlZWNoJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGVfc3BlZWNoKGlucHV0cyU1QiUyMmlucHV0X3ZhbHVlcyUyMiU1RCUyQyUyMHNwZWFrZXJfZW1iZWRkaW5ncyUyQyUyMHZvY29kZXIlM0R2b2NvZGVyKSUwQXNwZWVjaC5zaGFwZQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> SpeechT5Processor, SpeechT5ForSpeechToSpeech, SpeechT5HifiGan, set_seed
<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-meta">... </span>    <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">... </span>)  <span class="hljs-comment"># doctest: +IGNORE_RESULT</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 = SpeechT5Processor.from_pretrained(<span class="hljs-string">&quot;microsoft/speecht5_vc&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = SpeechT5ForSpeechToSpeech.from_pretrained(<span class="hljs-string">&quot;microsoft/speecht5_vc&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>vocoder = SpeechT5HifiGan.from_pretrained(<span class="hljs-string">&quot;microsoft/speecht5_hifigan&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(audio=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>speaker_embeddings = torch.zeros((<span class="hljs-number">1</span>, <span class="hljs-number">512</span>))  <span class="hljs-comment"># or load xvectors from a file</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>set_seed(<span class="hljs-number">555</span>)  <span class="hljs-comment"># make deterministic</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># generate speech</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>speech = model.generate_speech(inputs[<span class="hljs-string">&quot;input_values&quot;</span>], speaker_embeddings, vocoder=vocoder)
<span class="hljs-meta">&gt;&gt;&gt; </span>speech.shape
torch.Size([<span class="hljs-number">77824</span>])`,wrap:!1}}),{c(){s=r("p"),s.textContent=b,l=o(),u(m.$$.fragment)},l(i){s=a(i,"P",{"data-svelte-h":!0}),p(s)!=="svelte-11lpom8"&&(s.textContent=b),l=n(i),f(m.$$.fragment,i)},m(i,S){h(i,s,S),h(i,l,S),_(m,i,S),y=!0},p:R,i(i){y||(g(m.$$.fragment,i),y=!0)},o(i){T(m.$$.fragment,i),y=!1},d(i){i&&(c(s),c(l)),v(m,i)}}}function aa(M){let s,b,l,m,y,i,S,$o,Ce,Us='The SpeechT5 model was proposed in <a href="https://arxiv.org/abs/2110.07205" rel="nofollow">SpeechT5: Unified-Modal Encoder-Decoder Pre-Training for Spoken Language Processing</a> by Junyi Ao, Rui Wang, Long Zhou, Chengyi Wang, Shuo Ren, Yu Wu, Shujie Liu, Tom Ko, Qing Li, Yu Zhang, Zhihua Wei, Yao Qian, Jinyu Li, Furu Wei.',zo,qe,Ns="The abstract from the paper is the following:",Fo,je,Js="<em>Motivated by the success of T5 (Text-To-Text Transfer Transformer) in pre-trained natural language processing models, we propose a unified-modal SpeechT5 framework that explores the encoder-decoder pre-training for self-supervised speech/text representation learning. The SpeechT5 framework consists of a shared encoder-decoder network and six modal-specific (speech/text) pre/post-nets. After preprocessing the input speech/text through the pre-nets, the shared encoder-decoder network models the sequence-to-sequence transformation, and then the post-nets generate the output in the speech/text modality based on the output of the decoder. Leveraging large-scale unlabeled speech and text data, we pre-train SpeechT5 to learn a unified-modal representation, hoping to improve the modeling capability for both speech and text. To align the textual and speech information into this unified semantic space, we propose a cross-modal vector quantization approach that randomly mixes up speech/text states with latent units as the interface between encoder and decoder. Extensive evaluations show the superiority of the proposed SpeechT5 framework on a wide variety of spoken language processing tasks, including automatic speech recognition, speech synthesis, speech translation, voice conversion, speech enhancement, and speaker identification.</em>",Co,Ue,Ws='This model was contributed by <a href="https://huggingface.co/Matthijs" rel="nofollow">Matthijs</a>. The original code can be found <a href="https://github.com/microsoft/SpeechT5" rel="nofollow">here</a>.',qo,Ne,jo,L,Je,rn,yt,Is=`This is the configuration class to store the configuration of a <a href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5Model">SpeechT5Model</a>. It is used to instantiate a
SpeechT5 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 SpeechT5
<a href="https://huggingface.co/microsoft/speecht5_asr" rel="nofollow">microsoft/speecht5_asr</a> architecture.`,an,kt,Ps=`Configuration objects inherit from <a href="/docs/transformers/pr_30674/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/pr_30674/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,cn,ae,Uo,We,Zs="## SpeechT5HifiGanConfig[[transformers.SpeechT5HifiGanConfig]]",No,G,Ie,dn,xt,Ls=`This is the configuration class to store the configuration of a <code>SpeechT5HifiGanModel</code>. It is used to instantiate
a SpeechT5 HiFi-GAN vocoder 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 SpeechT5
<a href="https://huggingface.co/microsoft/speecht5_hifigan" rel="nofollow">microsoft/speecht5_hifigan</a> architecture.`,ln,wt,Gs=`Configuration objects inherit from <a href="/docs/transformers/pr_30674/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/pr_30674/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,pn,ce,Jo,Pe,Vs="## SpeechT5Tokenizer[[transformers.SpeechT5Tokenizer]]",Wo,F,Ze,hn,St,Hs='Construct a SpeechT5 tokenizer. Based on <a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a>.',mn,Mt,Es=`This tokenizer inherits from <a href="/docs/transformers/pr_30674/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a> which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`,un,de,Le,fn,$t,Ds=`Main method to tokenize and prepare for the model one or several sequence(s) or one or several pair(s) of
sequences.`,_n,zt,Ge,gn,Y,Ve,Tn,Ft,Bs=`Converts a sequence of ids in a string, using the tokenizer and vocabulary with options to remove special
tokens and clean up tokenization spaces.`,vn,Ct,Rs="Similar to doing <code>self.convert_tokens_to_string(self.convert_ids_to_tokens(token_ids))</code>.",bn,ie,He,yn,qt,Os="Convert a list of lists of token ids into a list of strings by calling decode.",Io,Ee,Xs="## SpeechT5FeatureExtractor[[transformers.SpeechT5FeatureExtractor]]",Po,q,De,kn,jt,Ys="Constructs a SpeechT5 feature extractor.",xn,Ut,Qs=`This class can pre-process a raw speech signal by (optionally) normalizing to zero-mean unit-variance, for use by
the SpeechT5 speech encoder prenet.`,wn,Nt,As=`This class can also extract log-mel filter bank features from raw speech, for use by the SpeechT5 speech decoder
prenet.`,Sn,Jt,Ks=`This feature extractor inherits from <a href="/docs/transformers/pr_30674/en/main_classes/feature_extractor#transformers.SequenceFeatureExtractor">SequenceFeatureExtractor</a> which contains
most of the main methods. Users should refer to this superclass for more information regarding those methods.`,Mn,Q,Be,$n,Wt,er="Main method to featurize and prepare for the model one or several sequence(s).",zn,It,tr=`Pass in a value for <code>audio</code> to extract waveform features. Pass in a value for <code>audio_target</code> to extract log-mel
spectrogram features.`,Zo,Re,or="## SpeechT5Processor[[transformers.SpeechT5Processor]]",Lo,$,Oe,Fn,Pt,nr="Constructs a SpeechT5 processor which wraps a feature extractor and a tokenizer into a single processor.",Cn,Zt,sr=`<a href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5Processor">SpeechT5Processor</a> offers all the functionalities of <a href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5FeatureExtractor">SpeechT5FeatureExtractor</a> and <a href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5Tokenizer">SpeechT5Tokenizer</a>. See
the docstring of <a href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5Processor.__call__"><strong>call</strong>()</a> and <a href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5Processor.decode">decode()</a> for more information.`,qn,C,Xe,jn,Lt,rr="Processes audio and text input, as well as audio and text targets.",Un,Gt,ar=`You can process audio by using the argument <code>audio</code>, or process audio targets by using the argument
<code>audio_target</code>. This forwards the arguments to SpeechT5FeatureExtractor’s
<a href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5FeatureExtractor.__call__"><strong>call</strong>()</a>.`,Nn,Vt,cr=`You can process text by using the argument <code>text</code>, or process text labels by using the argument <code>text_target</code>.
This forwards the arguments to SpeechT5Tokenizer’s <a href="/docs/transformers/pr_30674/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__"><strong>call</strong>()</a>.`,Jn,Ht,dr="Valid input combinations are:",Wn,Et,ir="<li><code>text</code> only</li> <li><code>audio</code> only</li> <li><code>text_target</code> only</li> <li><code>audio_target</code> only</li> <li><code>text</code> and <code>audio_target</code></li> <li><code>audio</code> and <code>audio_target</code></li> <li><code>text</code> and <code>text_target</code></li> <li><code>audio</code> and <code>text_target</code></li>",In,Dt,lr="Please refer to the docstring of the above two methods for more information.",Pn,N,Ye,Zn,Bt,pr="Collates the audio and text inputs, as well as their targets, into a padded batch.",Ln,Rt,hr=`Audio inputs are padded by SpeechT5FeatureExtractor’s <a href="/docs/transformers/pr_30674/en/main_classes/feature_extractor#transformers.SequenceFeatureExtractor.pad">pad()</a>. Text inputs are padded
by SpeechT5Tokenizer’s <a href="/docs/transformers/pr_30674/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.pad">pad()</a>.`,Gn,Ot,mr="Valid input combinations are:",Vn,Xt,ur="<li><code>input_ids</code> only</li> <li><code>input_values</code> only</li> <li><code>labels</code> only, either log-mel spectrograms or text tokens</li> <li><code>input_ids</code> and log-mel spectrogram <code>labels</code></li> <li><code>input_values</code> and text <code>labels</code></li>",Hn,Yt,fr="Please refer to the docstring of the above two methods for more information.",En,A,Qe,Dn,Qt,_r="Instantiate a processor associated with a pretrained model.",Bn,le,Rn,K,Ae,On,At,gr=`Saves the attributes of this processor (feature extractor, tokenizer…) in the specified directory so that it
can be reloaded using the <a href="/docs/transformers/pr_30674/en/main_classes/processors#transformers.ProcessorMixin.from_pretrained">from_pretrained()</a> method.`,Xn,pe,Yn,he,Ke,Qn,Kt,Tr=`This method forwards all its arguments to SpeechT5Tokenizer’s <a href="/docs/transformers/pr_30674/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.batch_decode">batch_decode()</a>. Please refer
to the docstring of this method for more information.`,An,me,et,Kn,eo,vr=`This method forwards all its arguments to SpeechT5Tokenizer’s <a href="/docs/transformers/pr_30674/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.decode">decode()</a>. Please refer to
the docstring of this method for more information.`,Go,tt,br="## SpeechT5Model[[transformers.SpeechT5Model]]",Vo,V,ot,es,to,yr=`The bare SpeechT5 Encoder-Decoder Model outputting raw hidden-states without any specific pre- or post-nets.
This model inherits from <a href="/docs/transformers/pr_30674/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,ts,oo,kr=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,os,ee,nt,ns,no,xr='The <a href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5Model">SpeechT5Model</a> forward method, overrides the <code>__call__</code> special method.',ss,ue,Ho,st,wr="## SpeechT5ForSpeechToText[[transformers.SpeechT5ForSpeechToText]]",Eo,H,rt,rs,so,Sr=`SpeechT5 Model with a speech encoder and a text decoder.
This model inherits from <a href="/docs/transformers/pr_30674/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,as,ro,Mr=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,cs,Z,at,ds,ao,$r='The <a href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5ForSpeechToText">SpeechT5ForSpeechToText</a> forward method, overrides the <code>__call__</code> special method.',is,fe,ls,_e,ps,ge,Do,ct,zr="## SpeechT5ForTextToSpeech[[transformers.SpeechT5ForTextToSpeech]]",Bo,J,dt,hs,co,Fr=`SpeechT5 Model with a text encoder and a speech decoder.
This model inherits from <a href="/docs/transformers/pr_30674/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,ms,io,Cr=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,us,D,it,fs,lo,qr='The <a href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5ForTextToSpeech">SpeechT5ForTextToSpeech</a> forward method, overrides the <code>__call__</code> special method.',_s,Te,gs,ve,Ts,be,lt,vs,po,jr=`Converts a sequence of input tokens into a sequence of mel spectrograms, which are subsequently turned into a
speech waveform using a vocoder.`,Ro,pt,Ur="## SpeechT5ForSpeechToSpeech[[transformers.SpeechT5ForSpeechToSpeech]]",Oo,W,ht,bs,ho,Nr=`SpeechT5 Model with a speech encoder and a speech decoder.
This model inherits from <a href="/docs/transformers/pr_30674/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,ys,mo,Jr=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,ks,B,mt,xs,uo,Wr='The <a href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5ForSpeechToSpeech">SpeechT5ForSpeechToSpeech</a> forward method, overrides the <code>__call__</code> special method.',ws,ye,Ss,ke,Ms,xe,ut,$s,fo,Ir=`Converts a raw speech waveform into a sequence of mel spectrograms, which are subsequently turned back into a
speech waveform using a vocoder.`,Xo,ft,Pr="## SpeechT5HifiGan[[transformers.SpeechT5HifiGan]]",Yo,E,_t,zs,_o,Zr=`HiFi-GAN vocoder.
This model inherits from <a href="/docs/transformers/pr_30674/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,Fs,go,Lr=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,Cs,we,gt,qs,To,Gr=`Converts a log-mel spectrogram into a speech waveform. Passing a batch of log-mel spectrograms returns a batch
of speech waveforms. Passing a single, un-batched log-mel spectrogram returns a single, un-batched speech
waveform.`,Qo,Tt,Ao,So,Ko;return y=new js({props:{title:"SpeechT5",local:"speecht5",headingTag:"h1"}}),S=new js({props:{title:"Overview",local:"overview",headingTag:"h2"}}),Ne=new js({props:{title:"SpeechT5Config",local:"transformers.SpeechT5Config",headingTag:"h2"}}),Je=new w({props:{name:"class transformers.SpeechT5Config",anchor:"transformers.SpeechT5Config",parameters:[{name:"vocab_size",val:" = 81"},{name:"hidden_size",val:" = 768"},{name:"encoder_layers",val:" = 12"},{name:"encoder_attention_heads",val:" = 12"},{name:"encoder_ffn_dim",val:" = 3072"},{name:"encoder_layerdrop",val:" = 0.1"},{name:"decoder_layers",val:" = 6"},{name:"decoder_ffn_dim",val:" = 3072"},{name:"decoder_attention_heads",val:" = 12"},{name:"decoder_layerdrop",val:" = 0.1"},{name:"hidden_act",val:" = 'gelu'"},{name:"positional_dropout",val:" = 0.1"},{name:"hidden_dropout",val:" = 0.1"},{name:"attention_dropout",val:" = 0.1"},{name:"activation_dropout",val:" = 0.1"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-05"},{name:"scale_embedding",val:" = False"},{name:"feat_extract_norm",val:" = 'group'"},{name:"feat_proj_dropout",val:" = 0.0"},{name:"feat_extract_activation",val:" = 'gelu'"},{name:"conv_dim",val:" = (512, 512, 512, 512, 512, 512, 512)"},{name:"conv_stride",val:" = (5, 2, 2, 2, 2, 2, 2)"},{name:"conv_kernel",val:" = (10, 3, 3, 3, 3, 2, 2)"},{name:"conv_bias",val:" = False"},{name:"num_conv_pos_embeddings",val:" = 128"},{name:"num_conv_pos_embedding_groups",val:" = 16"},{name:"apply_spec_augment",val:" = True"},{name:"mask_time_prob",val:" = 0.05"},{name:"mask_time_length",val:" = 10"},{name:"mask_time_min_masks",val:" = 2"},{name:"mask_feature_prob",val:" = 0.0"},{name:"mask_feature_length",val:" = 10"},{name:"mask_feature_min_masks",val:" = 0"},{name:"pad_token_id",val:" = 1"},{name:"bos_token_id",val:" = 0"},{name:"eos_token_id",val:" = 2"},{name:"decoder_start_token_id",val:" = 2"},{name:"num_mel_bins",val:" = 80"},{name:"speech_decoder_prenet_layers",val:" = 2"},{name:"speech_decoder_prenet_units",val:" = 256"},{name:"speech_decoder_prenet_dropout",val:" = 0.5"},{name:"speaker_embedding_dim",val:" = 512"},{name:"speech_decoder_postnet_layers",val:" = 5"},{name:"speech_decoder_postnet_units",val:" = 256"},{name:"speech_decoder_postnet_kernel",val:" = 5"},{name:"speech_decoder_postnet_dropout",val:" = 0.5"},{name:"reduction_factor",val:" = 2"},{name:"max_speech_positions",val:" = 4000"},{name:"max_text_positions",val:" = 450"},{name:"encoder_max_relative_position",val:" = 160"},{name:"use_guided_attention_loss",val:" = True"},{name:"guided_attention_loss_num_heads",val:" = 2"},{name:"guided_attention_loss_sigma",val:" = 0.4"},{name:"guided_attention_loss_scale",val:" = 10.0"},{name:"use_cache",val:" = True"},{name:"is_encoder_decoder",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SpeechT5Config.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 81) &#x2014;
Vocabulary size of the SpeechT5 model. Defines the number of different tokens that can be represented by
the <code>inputs_ids</code> passed to the forward method of <a href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5Model">SpeechT5Model</a>.`,name:"vocab_size"},{anchor:"transformers.SpeechT5Config.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.SpeechT5Config.encoder_layers",description:`<strong>encoder_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"encoder_layers"},{anchor:"transformers.SpeechT5Config.encoder_attention_heads",description:`<strong>encoder_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:"encoder_attention_heads"},{anchor:"transformers.SpeechT5Config.encoder_ffn_dim",description:`<strong>encoder_ffn_dim</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:"encoder_ffn_dim"},{anchor:"transformers.SpeechT5Config.encoder_layerdrop",description:`<strong>encoder_layerdrop</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The LayerDrop probability for the encoder. 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:"encoder_layerdrop"},{anchor:"transformers.SpeechT5Config.decoder_layers",description:`<strong>decoder_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 6) &#x2014;
Number of hidden layers in the Transformer decoder.`,name:"decoder_layers"},{anchor:"transformers.SpeechT5Config.decoder_attention_heads",description:`<strong>decoder_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer decoder.`,name:"decoder_attention_heads"},{anchor:"transformers.SpeechT5Config.decoder_ffn_dim",description:`<strong>decoder_ffn_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in the Transformer decoder.`,name:"decoder_ffn_dim"},{anchor:"transformers.SpeechT5Config.decoder_layerdrop",description:`<strong>decoder_layerdrop</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The LayerDrop probability for the decoder. 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:"decoder_layerdrop"},{anchor:"transformers.SpeechT5Config.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.SpeechT5Config.positional_dropout",description:`<strong>positional_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for the text position encoding layers.`,name:"positional_dropout"},{anchor:"transformers.SpeechT5Config.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.SpeechT5Config.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.SpeechT5Config.activation_dropout",description:`<strong>activation_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for activations inside the fully connected layer.`,name:"activation_dropout"},{anchor:"transformers.SpeechT5Config.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.SpeechT5Config.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-5) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.SpeechT5Config.scale_embedding",description:`<strong>scale_embedding</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Scale embeddings by diving by sqrt(d_model).`,name:"scale_embedding"},{anchor:"transformers.SpeechT5Config.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 the speech encoder pre-net. 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.SpeechT5Config.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 speech encoder pre-net.`,name:"feat_proj_dropout"},{anchor:"transformers.SpeechT5Config.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.SpeechT5Config.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
speech encoder pre-net. The length of <em>conv_dim</em> defines the number of 1D convolutional layers.`,name:"conv_dim"},{anchor:"transformers.SpeechT5Config.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 speech encoder pre-net. 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.SpeechT5Config.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 speech encoder pre-net.
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.SpeechT5Config.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.SpeechT5Config.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.SpeechT5Config.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.SpeechT5Config.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 speech encoder pre-net. 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.SpeechT5Config.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.SpeechT5Config.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.SpeechT5Config.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.SpeechT5Config.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.SpeechT5Config.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.SpeechT5Config.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.SpeechT5Config.num_mel_bins",description:`<strong>num_mel_bins</strong> (<code>int</code>, <em>optional</em>, defaults to 80) &#x2014;
Number of mel features used per input features. Used by the speech decoder pre-net. Should correspond to
the value used in the <a href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5Processor">SpeechT5Processor</a> class.`,name:"num_mel_bins"},{anchor:"transformers.SpeechT5Config.speech_decoder_prenet_layers",description:`<strong>speech_decoder_prenet_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
Number of layers in the speech decoder pre-net.`,name:"speech_decoder_prenet_layers"},{anchor:"transformers.SpeechT5Config.speech_decoder_prenet_units",description:`<strong>speech_decoder_prenet_units</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Dimensionality of the layers in the speech decoder pre-net.`,name:"speech_decoder_prenet_units"},{anchor:"transformers.SpeechT5Config.speech_decoder_prenet_dropout",description:`<strong>speech_decoder_prenet_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.5) &#x2014;
The dropout probability for the speech decoder pre-net layers.`,name:"speech_decoder_prenet_dropout"},{anchor:"transformers.SpeechT5Config.speaker_embedding_dim",description:`<strong>speaker_embedding_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Dimensionality of the <em>XVector</em> embedding vectors.`,name:"speaker_embedding_dim"},{anchor:"transformers.SpeechT5Config.speech_decoder_postnet_layers",description:`<strong>speech_decoder_postnet_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 5) &#x2014;
Number of layers in the speech decoder post-net.`,name:"speech_decoder_postnet_layers"},{anchor:"transformers.SpeechT5Config.speech_decoder_postnet_units",description:`<strong>speech_decoder_postnet_units</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Dimensionality of the layers in the speech decoder post-net.`,name:"speech_decoder_postnet_units"},{anchor:"transformers.SpeechT5Config.speech_decoder_postnet_kernel",description:`<strong>speech_decoder_postnet_kernel</strong> (<code>int</code>, <em>optional</em>, defaults to 5) &#x2014;
Number of convolutional filter channels in the speech decoder post-net.`,name:"speech_decoder_postnet_kernel"},{anchor:"transformers.SpeechT5Config.speech_decoder_postnet_dropout",description:`<strong>speech_decoder_postnet_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.5) &#x2014;
The dropout probability for the speech decoder post-net layers.`,name:"speech_decoder_postnet_dropout"},{anchor:"transformers.SpeechT5Config.reduction_factor",description:`<strong>reduction_factor</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
Spectrogram length reduction factor for the speech decoder inputs.`,name:"reduction_factor"},{anchor:"transformers.SpeechT5Config.max_speech_positions",description:`<strong>max_speech_positions</strong> (<code>int</code>, <em>optional</em>, defaults to 4000) &#x2014;
The maximum sequence length of speech features that this model might ever be used with.`,name:"max_speech_positions"},{anchor:"transformers.SpeechT5Config.max_text_positions",description:`<strong>max_text_positions</strong> (<code>int</code>, <em>optional</em>, defaults to 450) &#x2014;
The maximum sequence length of text features that this model might ever be used with.`,name:"max_text_positions"},{anchor:"transformers.SpeechT5Config.encoder_max_relative_position",description:`<strong>encoder_max_relative_position</strong> (<code>int</code>, <em>optional</em>, defaults to 160) &#x2014;
Maximum distance for relative position embedding in the encoder.`,name:"encoder_max_relative_position"},{anchor:"transformers.SpeechT5Config.use_guided_attention_loss",description:`<strong>use_guided_attention_loss</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to apply guided attention loss while training the TTS model.`,name:"use_guided_attention_loss"},{anchor:"transformers.SpeechT5Config.guided_attention_loss_num_heads",description:`<strong>guided_attention_loss_num_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
Number of attention heads the guided attention loss will be applied to. Use -1 to apply this loss to all
attention heads.`,name:"guided_attention_loss_num_heads"},{anchor:"transformers.SpeechT5Config.guided_attention_loss_sigma",description:`<strong>guided_attention_loss_sigma</strong> (<code>float</code>, <em>optional</em>, defaults to 0.4) &#x2014;
Standard deviation for guided attention loss.`,name:"guided_attention_loss_sigma"},{anchor:"transformers.SpeechT5Config.guided_attention_loss_scale",description:`<strong>guided_attention_loss_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 10.0) &#x2014;
Scaling coefficient for guided attention loss (also known as lambda).`,name:"guided_attention_loss_scale"},{anchor:"transformers.SpeechT5Config.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/speecht5/configuration_speecht5.py#L27"}}),ae=new xo({props:{anchor:"transformers.SpeechT5Config.example",$$slots:{default:[Or]},$$scope:{ctx:M}}}),Ie=new w({props:{name:"class transformers.SpeechT5HifiGanConfig",anchor:"transformers.SpeechT5HifiGanConfig",parameters:[{name:"model_in_dim",val:" = 80"},{name:"sampling_rate",val:" = 16000"},{name:"upsample_initial_channel",val:" = 512"},{name:"upsample_rates",val:" = [4, 4, 4, 4]"},{name:"upsample_kernel_sizes",val:" = [8, 8, 8, 8]"},{name:"resblock_kernel_sizes",val:" = [3, 7, 11]"},{name:"resblock_dilation_sizes",val:" = [[1, 3, 5], [1, 3, 5], [1, 3, 5]]"},{name:"initializer_range",val:" = 0.01"},{name:"leaky_relu_slope",val:" = 0.1"},{name:"normalize_before",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SpeechT5HifiGanConfig.model_in_dim",description:`<strong>model_in_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 80) &#x2014;
The number of frequency bins in the input log-mel spectrogram.`,name:"model_in_dim"},{anchor:"transformers.SpeechT5HifiGanConfig.sampling_rate",description:`<strong>sampling_rate</strong> (<code>int</code>, <em>optional</em>, defaults to 16000) &#x2014;
The sampling rate at which the output audio will be generated, expressed in hertz (Hz).`,name:"sampling_rate"},{anchor:"transformers.SpeechT5HifiGanConfig.upsample_initial_channel",description:`<strong>upsample_initial_channel</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The number of input channels into the upsampling network.`,name:"upsample_initial_channel"},{anchor:"transformers.SpeechT5HifiGanConfig.upsample_rates",description:`<strong>upsample_rates</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>[4, 4, 4, 4]</code>) &#x2014;
A tuple of integers defining the stride of each 1D convolutional layer in the upsampling network. The
length of <em>upsample_rates</em> defines the number of convolutional layers and has to match the length of
<em>upsample_kernel_sizes</em>.`,name:"upsample_rates"},{anchor:"transformers.SpeechT5HifiGanConfig.upsample_kernel_sizes",description:`<strong>upsample_kernel_sizes</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>[8, 8, 8, 8]</code>) &#x2014;
A tuple of integers defining the kernel size of each 1D convolutional layer in the upsampling network. The
length of <em>upsample_kernel_sizes</em> defines the number of convolutional layers and has to match the length of
<em>upsample_rates</em>.`,name:"upsample_kernel_sizes"},{anchor:"transformers.SpeechT5HifiGanConfig.resblock_kernel_sizes",description:`<strong>resblock_kernel_sizes</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>[3, 7, 11]</code>) &#x2014;
A tuple of integers defining the kernel sizes of the 1D convolutional layers in the multi-receptive field
fusion (MRF) module.`,name:"resblock_kernel_sizes"},{anchor:"transformers.SpeechT5HifiGanConfig.resblock_dilation_sizes",description:`<strong>resblock_dilation_sizes</strong> (<code>Tuple[Tuple[int]]</code> or <code>List[List[int]]</code>, <em>optional</em>, defaults to <code>[[1, 3, 5], [1, 3, 5], [1, 3, 5]]</code>) &#x2014;
A nested tuple of integers defining the dilation rates of the dilated 1D convolutional layers in the
multi-receptive field fusion (MRF) module.`,name:"resblock_dilation_sizes"},{anchor:"transformers.SpeechT5HifiGanConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.01) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.SpeechT5HifiGanConfig.leaky_relu_slope",description:`<strong>leaky_relu_slope</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The angle of the negative slope used by the leaky ReLU activation.`,name:"leaky_relu_slope"},{anchor:"transformers.SpeechT5HifiGanConfig.normalize_before",description:`<strong>normalize_before</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to normalize the spectrogram before vocoding using the vocoder&#x2019;s learned mean and variance.`,name:"normalize_before"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/speecht5/configuration_speecht5.py#L340"}}),ce=new xo({props:{anchor:"transformers.SpeechT5HifiGanConfig.example",$$slots:{default:[Xr]},$$scope:{ctx:M}}}),Ze=new w({props:{name:"class transformers.SpeechT5Tokenizer",anchor:"transformers.SpeechT5Tokenizer",parameters:[{name:"vocab_file",val:""},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"pad_token",val:" = '<pad>'"},{name:"normalize",val:" = False"},{name:"sp_model_kwargs",val:": Optional = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SpeechT5Tokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
<a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a> file (generally has a <em>.spm</em> extension) that
contains the vocabulary necessary to instantiate a tokenizer.`,name:"vocab_file"},{anchor:"transformers.SpeechT5Tokenizer.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The begin of sequence token.`,name:"bos_token"},{anchor:"transformers.SpeechT5Tokenizer.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The end of sequence token.`,name:"eos_token"},{anchor:"transformers.SpeechT5Tokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.SpeechT5Tokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.SpeechT5Tokenizer.normalize",description:`<strong>normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to convert numeric quantities in the text to their spelt-out english counterparts.`,name:"normalize"},{anchor:"transformers.SpeechT5Tokenizer.sp_model_kwargs",description:`<strong>sp_model_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Will be passed to the <code>SentencePieceProcessor.__init__()</code> method. The <a href="https://github.com/google/sentencepiece/tree/master/python" rel="nofollow">Python wrapper for
SentencePiece</a> can be used, among other things,
to set:</p>
<ul>
<li>
<p><code>enable_sampling</code>: Enable subword regularization.</p>
</li>
<li>
<p><code>nbest_size</code>: Sampling parameters for unigram. Invalid for BPE-Dropout.</p>
<ul>
<li><code>nbest_size = {0,1}</code>: No sampling is performed.</li>
<li><code>nbest_size &gt; 1</code>: samples from the nbest_size results.</li>
<li><code>nbest_size &lt; 0</code>: assuming that nbest_size is infinite and samples from the all hypothesis (lattice)
using forward-filtering-and-backward-sampling algorithm.</li>
</ul>
</li>
<li>
<p><code>alpha</code>: Smoothing parameter for unigram sampling, and dropout probability of merge operations for
BPE-dropout.</p>
</li>
</ul>`,name:"sp_model_kwargs"},{anchor:"transformers.SpeechT5Tokenizer.sp_model",description:`<strong>sp_model</strong> (<code>SentencePieceProcessor</code>) &#x2014;
The <em>SentencePiece</em> processor that is used for every conversion (string, tokens and IDs).`,name:"sp_model"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/speecht5/tokenization_speecht5.py#L33"}}),Le=new w({props:{name:"__call__",anchor:"transformers.SpeechT5Tokenizer.__call__",parameters:[{name:"text",val:": Union = None"},{name:"text_pair",val:": Union = None"},{name:"text_target",val:": Union = None"},{name:"text_pair_target",val:": Union = None"},{name:"add_special_tokens",val:": bool = True"},{name:"padding",val:": Union = False"},{name:"truncation",val:": Union = None"},{name:"max_length",val:": Optional = None"},{name:"stride",val:": int = 0"},{name:"is_split_into_words",val:": bool = False"},{name:"pad_to_multiple_of",val:": Optional = None"},{name:"return_tensors",val:": Union = None"},{name:"return_token_type_ids",val:": Optional = None"},{name:"return_attention_mask",val:": Optional = None"},{name:"return_overflowing_tokens",val:": bool = False"},{name:"return_special_tokens_mask",val:": bool = False"},{name:"return_offsets_mapping",val:": bool = False"},{name:"return_length",val:": bool = False"},{name:"verbose",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SpeechT5Tokenizer.__call__.text",description:`<strong>text</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded. Each sequence can be a string or a list of strings
(pretokenized string). If the sequences are provided as list of strings (pretokenized), you must set
<code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text"},{anchor:"transformers.SpeechT5Tokenizer.__call__.text_pair",description:`<strong>text_pair</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded. Each sequence can be a string or a list of strings
(pretokenized string). If the sequences are provided as list of strings (pretokenized), you must set
<code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text_pair"},{anchor:"transformers.SpeechT5Tokenizer.__call__.text_target",description:`<strong>text_target</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded as target texts. Each sequence can be a string or a
list of strings (pretokenized string). If the sequences are provided as list of strings (pretokenized),
you must set <code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text_target"},{anchor:"transformers.SpeechT5Tokenizer.__call__.text_pair_target",description:`<strong>text_pair_target</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded as target texts. Each sequence can be a string or a
list of strings (pretokenized string). If the sequences are provided as list of strings (pretokenized),
you must set <code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text_pair_target"},{anchor:"transformers.SpeechT5Tokenizer.__call__.add_special_tokens",description:`<strong>add_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to add special tokens when encoding the sequences. This will use the underlying
<code>PretrainedTokenizerBase.build_inputs_with_special_tokens</code> function, which defines which tokens are
automatically added to the input ids. This is usefull if you want to add <code>bos</code> or <code>eos</code> tokens
automatically.`,name:"add_special_tokens"},{anchor:"transformers.SpeechT5Tokenizer.__call__.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/pr_30674/en/internal/file_utils#transformers.utils.PaddingStrategy">PaddingStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls padding. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest&apos;</code>: Pad to the longest sequence in the batch (or no padding if only a single
sequence if provided).</li>
<li><code>&apos;max_length&apos;</code>: Pad to a maximum length specified with the argument <code>max_length</code> or to the maximum
acceptable input length for the model if that argument is not provided.</li>
<li><code>False</code> or <code>&apos;do_not_pad&apos;</code> (default): No padding (i.e., can output a batch with sequences of different
lengths).</li>
</ul>`,name:"padding"},{anchor:"transformers.SpeechT5Tokenizer.__call__.truncation",description:`<strong>truncation</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/pr_30674/en/internal/tokenization_utils#transformers.tokenization_utils_base.TruncationStrategy">TruncationStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls truncation. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or
to the maximum acceptable input length for the model if that argument is not provided. This will
truncate token by token, removing a token from the longest sequence in the pair if a pair of
sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_first&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the
maximum acceptable input length for the model if that argument is not provided. This will only
truncate the first sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_second&apos;</code>: Truncate to a maximum length specified with the argument <code>max_length</code> or to the
maximum acceptable input length for the model if that argument is not provided. This will only
truncate the second sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>False</code> or <code>&apos;do_not_truncate&apos;</code> (default): No truncation (i.e., can output batch with sequence lengths
greater than the model maximum admissible input size).</li>
</ul>`,name:"truncation"},{anchor:"transformers.SpeechT5Tokenizer.__call__.max_length",description:`<strong>max_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Controls the maximum length to use by one of the truncation/padding parameters.</p>
<p>If left unset or set to <code>None</code>, this will use the predefined model maximum length if a maximum length
is required by one of the truncation/padding parameters. If the model has no specific maximum input
length (like XLNet) truncation/padding to a maximum length will be deactivated.`,name:"max_length"},{anchor:"transformers.SpeechT5Tokenizer.__call__.stride",description:`<strong>stride</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
If set to a number along with <code>max_length</code>, the overflowing tokens returned when
<code>return_overflowing_tokens=True</code> will contain some tokens from the end of the truncated sequence
returned to provide some overlap between truncated and overflowing sequences. The value of this
argument defines the number of overlapping tokens.`,name:"stride"},{anchor:"transformers.SpeechT5Tokenizer.__call__.is_split_into_words",description:`<strong>is_split_into_words</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the input is already pre-tokenized (e.g., split into words). If set to <code>True</code>, the
tokenizer assumes the input is already split into words (for instance, by splitting it on whitespace)
which it will tokenize. This is useful for NER or token classification.`,name:"is_split_into_words"},{anchor:"transformers.SpeechT5Tokenizer.__call__.pad_to_multiple_of",description:`<strong>pad_to_multiple_of</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If set will pad the sequence to a multiple of the provided value. Requires <code>padding</code> to be activated.
This is especially useful to enable the use of Tensor Cores on NVIDIA hardware with compute capability
<code>&gt;= 7.5</code> (Volta).`,name:"pad_to_multiple_of"},{anchor:"transformers.SpeechT5Tokenizer.__call__.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <a href="/docs/transformers/pr_30674/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>) &#x2014;
If set, will return tensors instead of list of python integers. Acceptable values are:</p>
<ul>
<li><code>&apos;tf&apos;</code>: Return TensorFlow <code>tf.constant</code> objects.</li>
<li><code>&apos;pt&apos;</code>: Return PyTorch <code>torch.Tensor</code> objects.</li>
<li><code>&apos;np&apos;</code>: Return Numpy <code>np.ndarray</code> objects.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.SpeechT5Tokenizer.__call__.return_token_type_ids",description:`<strong>return_token_type_ids</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to return token type IDs. If left to the default, will return the token type IDs according to
the specific tokenizer&#x2019;s default, defined by the <code>return_outputs</code> attribute.</p>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"return_token_type_ids"},{anchor:"transformers.SpeechT5Tokenizer.__call__.return_attention_mask",description:`<strong>return_attention_mask</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to return the attention mask. If left to the default, will return the attention mask according
to the specific tokenizer&#x2019;s default, defined by the <code>return_outputs</code> attribute.</p>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"return_attention_mask"},{anchor:"transformers.SpeechT5Tokenizer.__call__.return_overflowing_tokens",description:`<strong>return_overflowing_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return overflowing token sequences. If a pair of sequences of input ids (or a batch
of pairs) is provided with <code>truncation_strategy = longest_first</code> or <code>True</code>, an error is raised instead
of returning overflowing tokens.`,name:"return_overflowing_tokens"},{anchor:"transformers.SpeechT5Tokenizer.__call__.return_special_tokens_mask",description:`<strong>return_special_tokens_mask</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return special tokens mask information.`,name:"return_special_tokens_mask"},{anchor:"transformers.SpeechT5Tokenizer.__call__.return_offsets_mapping",description:`<strong>return_offsets_mapping</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return <code>(char_start, char_end)</code> for each token.</p>
<p>This is only available on fast tokenizers inheriting from <a href="/docs/transformers/pr_30674/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast">PreTrainedTokenizerFast</a>, if using
Python&#x2019;s tokenizer, this method will raise <code>NotImplementedError</code>.`,name:"return_offsets_mapping"},{anchor:"transformers.SpeechT5Tokenizer.__call__.return_length",description:`<strong>return_length</strong>  (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return the lengths of the encoded inputs.`,name:"return_length"},{anchor:"transformers.SpeechT5Tokenizer.__call__.verbose",description:`<strong>verbose</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to print more information and warnings.
**kwargs &#x2014; passed to the <code>self.tokenize()</code> method`,name:"verbose"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/tokenization_utils_base.py#L2859",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_30674/en/main_classes/tokenizer#transformers.BatchEncoding"
>BatchEncoding</a> with the following fields:</p>
<ul>
<li>
<p><strong>input_ids</strong> — List of token ids to be fed to a model.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a></p>
</li>
<li>
<p><strong>token_type_ids</strong> — List of token type ids to be fed to a model (when <code>return_token_type_ids=True</code> or
if <em>“token_type_ids”</em> is in <code>self.model_input_names</code>).</p>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a></p>
</li>
<li>
<p><strong>attention_mask</strong> — List of indices specifying which tokens should be attended to by the model (when
<code>return_attention_mask=True</code> or if <em>“attention_mask”</em> is in <code>self.model_input_names</code>).</p>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
</li>
<li>
<p><strong>overflowing_tokens</strong> — List of overflowing tokens sequences (when a <code>max_length</code> is specified and
<code>return_overflowing_tokens=True</code>).</p>
</li>
<li>
<p><strong>num_truncated_tokens</strong> — Number of tokens truncated (when a <code>max_length</code> is specified and
<code>return_overflowing_tokens=True</code>).</p>
</li>
<li>
<p><strong>special_tokens_mask</strong> — List of 0s and 1s, with 1 specifying added special tokens and 0 specifying
regular sequence tokens (when <code>add_special_tokens=True</code> and <code>return_special_tokens_mask=True</code>).</p>
</li>
<li>
<p><strong>length</strong> — The length of the inputs (when <code>return_length=True</code>)</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_30674/en/main_classes/tokenizer#transformers.BatchEncoding"
>BatchEncoding</a></p>
`}}),Ge=new w({props:{name:"save_vocabulary",anchor:"transformers.SpeechT5Tokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": Optional = None"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/speecht5/tokenization_speecht5.py#L203"}}),Ve=new w({props:{name:"decode",anchor:"transformers.SpeechT5Tokenizer.decode",parameters:[{name:"token_ids",val:": Union"},{name:"skip_special_tokens",val:": bool = False"},{name:"clean_up_tokenization_spaces",val:": bool = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SpeechT5Tokenizer.decode.token_ids",description:`<strong>token_ids</strong> (<code>Union[int, List[int], np.ndarray, torch.Tensor, tf.Tensor]</code>) &#x2014;
List of tokenized input ids. Can be obtained using the <code>__call__</code> method.`,name:"token_ids"},{anchor:"transformers.SpeechT5Tokenizer.decode.skip_special_tokens",description:`<strong>skip_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to remove special tokens in the decoding.`,name:"skip_special_tokens"},{anchor:"transformers.SpeechT5Tokenizer.decode.clean_up_tokenization_spaces",description:`<strong>clean_up_tokenization_spaces</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to clean up the tokenization spaces. If <code>None</code>, will default to
<code>self.clean_up_tokenization_spaces</code>.`,name:"clean_up_tokenization_spaces"},{anchor:"transformers.SpeechT5Tokenizer.decode.kwargs",description:`<strong>kwargs</strong> (additional keyword arguments, <em>optional</em>) &#x2014;
Will be passed to the underlying model specific decode method.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/tokenization_utils_base.py#L3865",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The decoded sentence.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>str</code></p>
`}}),He=new w({props:{name:"batch_decode",anchor:"transformers.SpeechT5Tokenizer.batch_decode",parameters:[{name:"sequences",val:": Union"},{name:"skip_special_tokens",val:": bool = False"},{name:"clean_up_tokenization_spaces",val:": bool = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SpeechT5Tokenizer.batch_decode.sequences",description:`<strong>sequences</strong> (<code>Union[List[int], List[List[int]], np.ndarray, torch.Tensor, tf.Tensor]</code>) &#x2014;
List of tokenized input ids. Can be obtained using the <code>__call__</code> method.`,name:"sequences"},{anchor:"transformers.SpeechT5Tokenizer.batch_decode.skip_special_tokens",description:`<strong>skip_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to remove special tokens in the decoding.`,name:"skip_special_tokens"},{anchor:"transformers.SpeechT5Tokenizer.batch_decode.clean_up_tokenization_spaces",description:`<strong>clean_up_tokenization_spaces</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to clean up the tokenization spaces. If <code>None</code>, will default to
<code>self.clean_up_tokenization_spaces</code>.`,name:"clean_up_tokenization_spaces"},{anchor:"transformers.SpeechT5Tokenizer.batch_decode.kwargs",description:`<strong>kwargs</strong> (additional keyword arguments, <em>optional</em>) &#x2014;
Will be passed to the underlying model specific decode method.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/tokenization_utils_base.py#L3831",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The list of decoded sentences.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[str]</code></p>
`}}),De=new w({props:{name:"class transformers.SpeechT5FeatureExtractor",anchor:"transformers.SpeechT5FeatureExtractor",parameters:[{name:"feature_size",val:": int = 1"},{name:"sampling_rate",val:": int = 16000"},{name:"padding_value",val:": float = 0.0"},{name:"do_normalize",val:": bool = False"},{name:"num_mel_bins",val:": int = 80"},{name:"hop_length",val:": int = 16"},{name:"win_length",val:": int = 64"},{name:"win_function",val:": str = 'hann_window'"},{name:"frame_signal_scale",val:": float = 1.0"},{name:"fmin",val:": float = 80"},{name:"fmax",val:": float = 7600"},{name:"mel_floor",val:": float = 1e-10"},{name:"reduction_factor",val:": int = 2"},{name:"return_attention_mask",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SpeechT5FeatureExtractor.feature_size",description:`<strong>feature_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The feature dimension of the extracted features.`,name:"feature_size"},{anchor:"transformers.SpeechT5FeatureExtractor.sampling_rate",description:`<strong>sampling_rate</strong> (<code>int</code>, <em>optional</em>, defaults to 16000) &#x2014;
The sampling rate at which the audio files should be digitalized expressed in hertz (Hz).`,name:"sampling_rate"},{anchor:"transformers.SpeechT5FeatureExtractor.padding_value",description:`<strong>padding_value</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The value that is used to fill the padding values.`,name:"padding_value"},{anchor:"transformers.SpeechT5FeatureExtractor.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to zero-mean unit-variance normalize the input. Normalizing can help to significantly
improve the performance for some models.`,name:"do_normalize"},{anchor:"transformers.SpeechT5FeatureExtractor.num_mel_bins",description:`<strong>num_mel_bins</strong> (<code>int</code>, <em>optional</em>, defaults to 80) &#x2014;
The number of mel-frequency bins in the extracted spectrogram features.`,name:"num_mel_bins"},{anchor:"transformers.SpeechT5FeatureExtractor.hop_length",description:`<strong>hop_length</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Number of ms between windows. Otherwise referred to as &#x201C;shift&#x201D; in many papers.`,name:"hop_length"},{anchor:"transformers.SpeechT5FeatureExtractor.win_length",description:`<strong>win_length</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014;
Number of ms per window.`,name:"win_length"},{anchor:"transformers.SpeechT5FeatureExtractor.win_function",description:`<strong>win_function</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;hann_window&quot;</code>) &#x2014;
Name for the window function used for windowing, must be accessible via <code>torch.{win_function}</code>`,name:"win_function"},{anchor:"transformers.SpeechT5FeatureExtractor.frame_signal_scale",description:`<strong>frame_signal_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
Constant multiplied in creating the frames before applying DFT. This argument is deprecated.`,name:"frame_signal_scale"},{anchor:"transformers.SpeechT5FeatureExtractor.fmin",description:`<strong>fmin</strong> (<code>float</code>, <em>optional</em>, defaults to 80) &#x2014;
Minimum mel frequency in Hz.`,name:"fmin"},{anchor:"transformers.SpeechT5FeatureExtractor.fmax",description:`<strong>fmax</strong> (<code>float</code>, <em>optional</em>, defaults to 7600) &#x2014;
Maximum mel frequency in Hz.`,name:"fmax"},{anchor:"transformers.SpeechT5FeatureExtractor.mel_floor",description:`<strong>mel_floor</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-10) &#x2014;
Minimum value of mel frequency banks.`,name:"mel_floor"},{anchor:"transformers.SpeechT5FeatureExtractor.reduction_factor",description:`<strong>reduction_factor</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
Spectrogram length reduction factor. This argument is deprecated.`,name:"reduction_factor"},{anchor:"transformers.SpeechT5FeatureExtractor.return_attention_mask",description:`<strong>return_attention_mask</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not <a href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5FeatureExtractor.__call__"><strong>call</strong>()</a> should return <code>attention_mask</code>.`,name:"return_attention_mask"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/speecht5/feature_extraction_speecht5.py#L31"}}),Be=new w({props:{name:"__call__",anchor:"transformers.SpeechT5FeatureExtractor.__call__",parameters:[{name:"audio",val:": Union = None"},{name:"audio_target",val:": Union = None"},{name:"padding",val:": Union = False"},{name:"max_length",val:": Optional = None"},{name:"truncation",val:": bool = False"},{name:"pad_to_multiple_of",val:": Optional = None"},{name:"return_attention_mask",val:": Optional = None"},{name:"return_tensors",val:": Union = None"},{name:"sampling_rate",val:": Optional = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SpeechT5FeatureExtractor.__call__.audio",description:`<strong>audio</strong> (<code>np.ndarray</code>, <code>List[float]</code>, <code>List[np.ndarray]</code>, <code>List[List[float]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be processed. Each sequence can be a numpy array, a list of float
values, a list of numpy arrays or a list of list of float values. This outputs waveform features. Must
be mono channel audio, not stereo, i.e. single float per timestep.`,name:"audio"},{anchor:"transformers.SpeechT5FeatureExtractor.__call__.audio_target",description:`<strong>audio_target</strong> (<code>np.ndarray</code>, <code>List[float]</code>, <code>List[np.ndarray]</code>, <code>List[List[float]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be processed as targets. Each sequence can be a numpy array, a
list of float values, a list of numpy arrays or a list of list of float values. This outputs log-mel
spectrogram features.`,name:"audio_target"},{anchor:"transformers.SpeechT5FeatureExtractor.__call__.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/pr_30674/en/internal/file_utils#transformers.utils.PaddingStrategy">PaddingStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Select a strategy to pad the returned sequences (according to the model&#x2019;s padding side and padding
index) among:</p>
<ul>
<li><code>True</code> or <code>&apos;longest&apos;</code>: Pad to the longest sequence in the batch (or no padding if only a single
sequence if provided).</li>
<li><code>&apos;max_length&apos;</code>: Pad to a maximum length specified with the argument <code>max_length</code> or to the maximum
acceptable input length for the model if that argument is not provided.</li>
<li><code>False</code> or <code>&apos;do_not_pad&apos;</code> (default): No padding (i.e., can output a batch with sequences of different
lengths).</li>
</ul>`,name:"padding"},{anchor:"transformers.SpeechT5FeatureExtractor.__call__.max_length",description:`<strong>max_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Maximum length of the returned list and optionally padding length (see above).`,name:"max_length"},{anchor:"transformers.SpeechT5FeatureExtractor.__call__.truncation",description:`<strong>truncation</strong> (<code>bool</code>) &#x2014;
Activates truncation to cut input sequences longer than <em>max_length</em> to <em>max_length</em>.`,name:"truncation"},{anchor:"transformers.SpeechT5FeatureExtractor.__call__.pad_to_multiple_of",description:`<strong>pad_to_multiple_of</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If set will pad the sequence to a multiple of the provided value.</p>
<p>This is especially useful to enable the use of Tensor Cores on NVIDIA hardware with compute capability
<code>&gt;= 7.5</code> (Volta), or on TPUs which benefit from having sequence lengths be a multiple of 128.`,name:"pad_to_multiple_of"},{anchor:"transformers.SpeechT5FeatureExtractor.__call__.return_attention_mask",description:`<strong>return_attention_mask</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to return the attention mask. If left to the default, will return the attention mask according
to the specific feature_extractor&#x2019;s default.</p>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"return_attention_mask"},{anchor:"transformers.SpeechT5FeatureExtractor.__call__.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <a href="/docs/transformers/pr_30674/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>) &#x2014;
If set, will return tensors instead of list of python integers. Acceptable values are:</p>
<ul>
<li><code>&apos;tf&apos;</code>: Return TensorFlow <code>tf.constant</code> objects.</li>
<li><code>&apos;pt&apos;</code>: Return PyTorch <code>torch.Tensor</code> objects.</li>
<li><code>&apos;np&apos;</code>: Return Numpy <code>np.ndarray</code> objects.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.SpeechT5FeatureExtractor.__call__.sampling_rate",description:`<strong>sampling_rate</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The sampling rate at which the <code>audio</code> or <code>audio_target</code> input was sampled. It is strongly recommended
to pass <code>sampling_rate</code> at the forward call to prevent silent errors.`,name:"sampling_rate"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/speecht5/feature_extraction_speecht5.py#L180"}}),Oe=new w({props:{name:"class transformers.SpeechT5Processor",anchor:"transformers.SpeechT5Processor",parameters:[{name:"feature_extractor",val:""},{name:"tokenizer",val:""}],parametersDescription:[{anchor:"transformers.SpeechT5Processor.feature_extractor",description:`<strong>feature_extractor</strong> (<code>SpeechT5FeatureExtractor</code>) &#x2014;
An instance of <a href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5FeatureExtractor">SpeechT5FeatureExtractor</a>. The feature extractor is a required input.`,name:"feature_extractor"},{anchor:"transformers.SpeechT5Processor.tokenizer",description:`<strong>tokenizer</strong> (<code>SpeechT5Tokenizer</code>) &#x2014;
An instance of <a href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5Tokenizer">SpeechT5Tokenizer</a>. The tokenizer is a required input.`,name:"tokenizer"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/speecht5/processing_speecht5.py#L20"}}),Xe=new w({props:{name:"__call__",anchor:"transformers.SpeechT5Processor.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/speecht5/processing_speecht5.py#L40"}}),Ye=new w({props:{name:"pad",anchor:"transformers.SpeechT5Processor.pad",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/speecht5/processing_speecht5.py#L111"}}),Qe=new w({props:{name:"from_pretrained",anchor:"transformers.SpeechT5Processor.from_pretrained",parameters:[{name:"pretrained_model_name_or_path",val:": Union"},{name:"cache_dir",val:": Union = None"},{name:"force_download",val:": bool = False"},{name:"local_files_only",val:": bool = False"},{name:"token",val:": Union = None"},{name:"revision",val:": str = 'main'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SpeechT5Processor.from_pretrained.pretrained_model_name_or_path",description:`<strong>pretrained_model_name_or_path</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
This can be either:</p>
<ul>
<li>a string, the <em>model id</em> of a pretrained feature_extractor hosted inside a model repo on
huggingface.co.</li>
<li>a path to a <em>directory</em> containing a feature extractor file saved using the
<a href="/docs/transformers/pr_30674/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.save_pretrained">save_pretrained()</a> method, e.g., <code>./my_model_directory/</code>.</li>
<li>a path or url to a saved feature extractor JSON <em>file</em>, e.g.,
<code>./my_model_directory/preprocessor_config.json</code>.
**kwargs &#x2014;
Additional keyword arguments passed along to both
<a href="/docs/transformers/pr_30674/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.from_pretrained">from_pretrained()</a> and
<code>~tokenization_utils_base.PreTrainedTokenizer.from_pretrained</code>.</li>
</ul>`,name:"pretrained_model_name_or_path"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/processing_utils.py#L412"}}),le=new ko({props:{$$slots:{default:[Yr]},$$scope:{ctx:M}}}),Ae=new w({props:{name:"save_pretrained",anchor:"transformers.SpeechT5Processor.save_pretrained",parameters:[{name:"save_directory",val:""},{name:"push_to_hub",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SpeechT5Processor.save_pretrained.save_directory",description:`<strong>save_directory</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
Directory where the feature extractor JSON file and the tokenizer files will be saved (directory will
be created if it does not exist).`,name:"save_directory"},{anchor:"transformers.SpeechT5Processor.save_pretrained.push_to_hub",description:`<strong>push_to_hub</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to push your model to the Hugging Face model hub after saving it. You can specify the
repository you want to push to with <code>repo_id</code> (will default to the name of <code>save_directory</code> in your
namespace).`,name:"push_to_hub"},{anchor:"transformers.SpeechT5Processor.save_pretrained.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Additional key word arguments passed along to the <a href="/docs/transformers/pr_30674/en/main_classes/model#transformers.utils.PushToHubMixin.push_to_hub">push_to_hub()</a> method.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/processing_utils.py#L168"}}),pe=new ko({props:{$$slots:{default:[Qr]},$$scope:{ctx:M}}}),Ke=new w({props:{name:"batch_decode",anchor:"transformers.SpeechT5Processor.batch_decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/speecht5/processing_speecht5.py#L171"}}),et=new w({props:{name:"decode",anchor:"transformers.SpeechT5Processor.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/speecht5/processing_speecht5.py#L178"}}),ot=new w({props:{name:"class transformers.SpeechT5Model",anchor:"transformers.SpeechT5Model",parameters:[{name:"config",val:": SpeechT5Config"},{name:"encoder",val:": Optional = None"},{name:"decoder",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.SpeechT5Model.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5Config">SpeechT5Config</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/pr_30674/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.SpeechT5Model.encoder",description:`<strong>encoder</strong> (<code>SpeechT5EncoderWithSpeechPrenet</code> or <code>SpeechT5EncoderWithTextPrenet</code> or <code>None</code>) &#x2014;
The Transformer encoder module that applies the appropiate speech or text encoder prenet. If <code>None</code>,
<code>SpeechT5EncoderWithoutPrenet</code> will be used and the <code>input_values</code> are assumed to be hidden states.`,name:"encoder"},{anchor:"transformers.SpeechT5Model.decoder",description:`<strong>decoder</strong> (<code>SpeechT5DecoderWithSpeechPrenet</code> or <code>SpeechT5DecoderWithTextPrenet</code> or <code>None</code>) &#x2014;
The Transformer decoder module that applies the appropiate speech or text decoder prenet. If <code>None</code>,
<code>SpeechT5DecoderWithoutPrenet</code> will be used and the <code>decoder_input_values</code> are assumed to be hidden
states.`,name:"decoder"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/speecht5/modeling_speecht5.py#L2088"}}),nt=new w({props:{name:"forward",anchor:"transformers.SpeechT5Model.forward",parameters:[{name:"input_values",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"decoder_input_values",val:": Optional = None"},{name:"decoder_attention_mask",val:": Optional = None"},{name:"head_mask",val:": Optional = None"},{name:"decoder_head_mask",val:": Optional = None"},{name:"cross_attn_head_mask",val:": Optional = None"},{name:"encoder_outputs",val:": Optional = None"},{name:"past_key_values",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"speaker_embeddings",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.SpeechT5Model.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing convolution and attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p><code>attention_mask</code> should only be passed if the corresponding processor has <code>config.return_attention_mask == True</code>. For all models whose processor has <code>config.return_attention_mask == False</code>, <code>attention_mask</code> should
<strong>not</strong> be passed to avoid degraded performance when doing batched inference. For such models
<code>input_values</code> should simply be padded with 0 and passed without <code>attention_mask</code>. Be aware that these
models also yield slightly different results depending on whether <code>input_values</code> is padded or not.</p>

					</div>`,name:"attention_mask"},{anchor:"transformers.SpeechT5Model.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_values</code>. Causal mask will
also be used by default.</p>
<p>If you want to change padding behavior, you should read <code>SpeechT5Decoder._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.SpeechT5Model.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.SpeechT5Model.forward.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.SpeechT5Model.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.SpeechT5Model.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.SpeechT5Model.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_values</code> (those
that don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_values</code> of shape <code>(batch_size, sequence_length)</code>. decoder_inputs_embeds (<code>torch.FloatTensor</code>
of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>): Optionally, instead of passing
<code>decoder_input_values</code> you can choose to directly pass an embedded representation. If <code>past_key_values</code> is
used, optionally only the last <code>decoder_inputs_embeds</code> have to be input (see <code>past_key_values</code>). This is
useful if you want more control over how to convert <code>decoder_input_values</code> indices into associated vectors
than the model&#x2019;s internal embedding lookup matrix.`,name:"past_key_values"},{anchor:"transformers.SpeechT5Model.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.SpeechT5Model.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.SpeechT5Model.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.SpeechT5Model.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_30674/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.SpeechT5Model.forward.input_values",description:`<strong>input_values</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Depending on which encoder is being used, the <code>input_values</code> are either: float values of the input raw
speech waveform, or indices of input sequence tokens in the vocabulary, or hidden states.`,name:"input_values"},{anchor:"transformers.SpeechT5Model.forward.decoder_input_values",description:`<strong>decoder_input_values</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Depending on which decoder is being used, the <code>decoder_input_values</code> are either: float values of log-mel
filterbank features extracted from the raw speech waveform, or indices of decoder input sequence tokens in
the vocabulary, or hidden states.`,name:"decoder_input_values"},{anchor:"transformers.SpeechT5Model.forward.speaker_embeddings",description:`<strong>speaker_embeddings</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.speaker_embedding_dim)</code>, <em>optional</em>) &#x2014;
Tensor containing the speaker embeddings.`,name:"speaker_embeddings"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/speecht5/modeling_speecht5.py#L2134",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_30674/en/main_classes/output#transformers.modeling_outputs.Seq2SeqModelOutput"
>transformers.modeling_outputs.Seq2SeqModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5Config"
>SpeechT5Config</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) — Sequence of hidden-states at the output of the last layer of the decoder of the model.</p>
<p>If <code>past_key_values</code> is used only the last hidden-state of the sequences of shape <code>(batch_size, 1, hidden_size)</code> is output.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) — Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder’s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) — Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_30674/en/main_classes/output#transformers.modeling_outputs.Seq2SeqModelOutput"
>transformers.modeling_outputs.Seq2SeqModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ue=new ko({props:{$$slots:{default:[Ar]},$$scope:{ctx:M}}}),rt=new w({props:{name:"class transformers.SpeechT5ForSpeechToText",anchor:"transformers.SpeechT5ForSpeechToText",parameters:[{name:"config",val:": SpeechT5Config"}],parametersDescription:[{anchor:"transformers.SpeechT5ForSpeechToText.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5Config">SpeechT5Config</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/pr_30674/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/speecht5/modeling_speecht5.py#L2236"}}),at=new w({props:{name:"forward",anchor:"transformers.SpeechT5ForSpeechToText.forward",parameters:[{name:"input_values",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"decoder_input_ids",val:": Optional = None"},{name:"decoder_attention_mask",val:": Optional = None"},{name:"head_mask",val:": Optional = None"},{name:"decoder_head_mask",val:": Optional = None"},{name:"cross_attn_head_mask",val:": Optional = None"},{name:"encoder_outputs",val:": Optional = None"},{name:"past_key_values",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"},{name:"labels",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.SpeechT5ForSpeechToText.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing convolution and attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p><code>attention_mask</code> should only be passed if the corresponding processor has <code>config.return_attention_mask == True</code>. For all models whose processor has <code>config.return_attention_mask == False</code>, <code>attention_mask</code> should
<strong>not</strong> be passed to avoid degraded performance when doing batched inference. For such models
<code>input_values</code> should simply be padded with 0 and passed without <code>attention_mask</code>. Be aware that these
models also yield slightly different results depending on whether <code>input_values</code> is padded or not.</p>

					</div>`,name:"attention_mask"},{anchor:"transformers.SpeechT5ForSpeechToText.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_values</code>. Causal mask will
also be used by default.</p>
<p>If you want to change padding behavior, you should read <code>SpeechT5Decoder._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.SpeechT5ForSpeechToText.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.SpeechT5ForSpeechToText.forward.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.SpeechT5ForSpeechToText.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.SpeechT5ForSpeechToText.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.SpeechT5ForSpeechToText.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_values</code> (those
that don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_values</code> of shape <code>(batch_size, sequence_length)</code>. decoder_inputs_embeds (<code>torch.FloatTensor</code>
of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>): Optionally, instead of passing
<code>decoder_input_values</code> you can choose to directly pass an embedded representation. If <code>past_key_values</code> is
used, optionally only the last <code>decoder_inputs_embeds</code> have to be input (see <code>past_key_values</code>). This is
useful if you want more control over how to convert <code>decoder_input_values</code> indices into associated vectors
than the model&#x2019;s internal embedding lookup matrix.`,name:"past_key_values"},{anchor:"transformers.SpeechT5ForSpeechToText.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.SpeechT5ForSpeechToText.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.SpeechT5ForSpeechToText.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.SpeechT5ForSpeechToText.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_30674/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.SpeechT5ForSpeechToText.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 <em>.flac</em> or <em>.wav</em> 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 (<em>pip install
soundfile</em>). To prepare the array into <code>input_values</code>, the <a href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5Processor">SpeechT5Processor</a> should be used for padding
and conversion into a tensor of type <code>torch.FloatTensor</code>. See <a href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5Processor.__call__">SpeechT5Processor.<strong>call</strong>()</a> for details.`,name:"input_values"},{anchor:"transformers.SpeechT5ForSpeechToText.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5Tokenizer">SpeechT5Tokenizer</a>. See <a href="/docs/transformers/pr_30674/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30674/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>SpeechT5 uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).`,name:"decoder_input_ids"},{anchor:"transformers.SpeechT5ForSpeechToText.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the language modeling loss. Indices should either be in <code>[0, ..., config.vocab_size]</code>
or -100 (see <code>input_ids</code> docstring). Tokens with indices set to <code>-100</code> are ignored (masked), the loss is
only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.</p>
<p>Label indices can be obtained using <a href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5Tokenizer">SpeechT5Tokenizer</a>. See <a href="/docs/transformers/pr_30674/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30674/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/speecht5/modeling_speecht5.py#L2282",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_30674/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5Config"
>SpeechT5Config</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) — Language modeling loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) — Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) — Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder’s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) — Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_30674/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),fe=new ko({props:{$$slots:{default:[Kr]},$$scope:{ctx:M}}}),_e=new xo({props:{anchor:"transformers.SpeechT5ForSpeechToText.forward.example",$$slots:{default:[ea]},$$scope:{ctx:M}}}),ge=new xo({props:{anchor:"transformers.SpeechT5ForSpeechToText.forward.example-2",$$slots:{default:[ta]},$$scope:{ctx:M}}}),dt=new w({props:{name:"class transformers.SpeechT5ForTextToSpeech",anchor:"transformers.SpeechT5ForTextToSpeech",parameters:[{name:"config",val:": SpeechT5Config"}],parametersDescription:[{anchor:"transformers.SpeechT5ForTextToSpeech.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5Config">SpeechT5Config</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/pr_30674/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/speecht5/modeling_speecht5.py#L2600"}}),it=new w({props:{name:"forward",anchor:"transformers.SpeechT5ForTextToSpeech.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"decoder_input_values",val:": Optional = None"},{name:"decoder_attention_mask",val:": Optional = None"},{name:"head_mask",val:": Optional = None"},{name:"decoder_head_mask",val:": Optional = None"},{name:"cross_attn_head_mask",val:": Optional = None"},{name:"encoder_outputs",val:": Optional = None"},{name:"past_key_values",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"},{name:"speaker_embeddings",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"stop_labels",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.SpeechT5ForTextToSpeech.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing convolution and attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p><code>attention_mask</code> should only be passed if the corresponding processor has <code>config.return_attention_mask == True</code>. For all models whose processor has <code>config.return_attention_mask == False</code>, <code>attention_mask</code> should
<strong>not</strong> be passed to avoid degraded performance when doing batched inference. For such models
<code>input_values</code> should simply be padded with 0 and passed without <code>attention_mask</code>. Be aware that these
models also yield slightly different results depending on whether <code>input_values</code> is padded or not.</p>

					</div>`,name:"attention_mask"},{anchor:"transformers.SpeechT5ForTextToSpeech.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_values</code>. Causal mask will
also be used by default.</p>
<p>If you want to change padding behavior, you should read <code>SpeechT5Decoder._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.SpeechT5ForTextToSpeech.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.SpeechT5ForTextToSpeech.forward.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.SpeechT5ForTextToSpeech.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.SpeechT5ForTextToSpeech.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.SpeechT5ForTextToSpeech.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_values</code> (those
that don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_values</code> of shape <code>(batch_size, sequence_length)</code>. decoder_inputs_embeds (<code>torch.FloatTensor</code>
of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>): Optionally, instead of passing
<code>decoder_input_values</code> you can choose to directly pass an embedded representation. If <code>past_key_values</code> is
used, optionally only the last <code>decoder_inputs_embeds</code> have to be input (see <code>past_key_values</code>). This is
useful if you want more control over how to convert <code>decoder_input_values</code> indices into associated vectors
than the model&#x2019;s internal embedding lookup matrix.`,name:"past_key_values"},{anchor:"transformers.SpeechT5ForTextToSpeech.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.SpeechT5ForTextToSpeech.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.SpeechT5ForTextToSpeech.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.SpeechT5ForTextToSpeech.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_30674/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.SpeechT5ForTextToSpeech.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5Tokenizer">SpeechT5Tokenizer</a>. See <a href="/docs/transformers/pr_30674/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">encode()</a> and
<a href="/docs/transformers/pr_30674/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__"><strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.SpeechT5ForTextToSpeech.forward.decoder_input_values",description:`<strong>decoder_input_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_mel_bins)</code>) &#x2014;
Float values of input mel spectrogram.</p>
<p>SpeechT5 uses an all-zero spectrum as the starting token for <code>decoder_input_values</code> generation. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_values</code> have to be input (see
<code>past_key_values</code>).`,name:"decoder_input_values"},{anchor:"transformers.SpeechT5ForTextToSpeech.forward.speaker_embeddings",description:`<strong>speaker_embeddings</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.speaker_embedding_dim)</code>, <em>optional</em>) &#x2014;
Tensor containing the speaker embeddings.`,name:"speaker_embeddings"},{anchor:"transformers.SpeechT5ForTextToSpeech.forward.labels",description:`<strong>labels</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_mel_bins)</code>, <em>optional</em>) &#x2014;
Float values of target mel spectrogram. Timesteps set to <code>-100.0</code> are ignored (masked) for the loss
computation. Spectrograms can be obtained using <a href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5Processor">SpeechT5Processor</a>. See <a href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5Processor.__call__">SpeechT5Processor.<strong>call</strong>()</a>
for details.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/speecht5/modeling_speecht5.py#L2633",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_30674/en/main_classes/output#transformers.modeling_outputs.Seq2SeqSpectrogramOutput"
>transformers.modeling_outputs.Seq2SeqSpectrogramOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5Config"
>SpeechT5Config</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) — Spectrogram generation loss.</p>
</li>
<li>
<p><strong>spectrogram</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, num_bins)</code>) — The predicted spectrogram.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) — Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder’s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) — Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_30674/en/main_classes/output#transformers.modeling_outputs.Seq2SeqSpectrogramOutput"
>transformers.modeling_outputs.Seq2SeqSpectrogramOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Te=new ko({props:{$$slots:{default:[oa]},$$scope:{ctx:M}}}),ve=new xo({props:{anchor:"transformers.SpeechT5ForTextToSpeech.forward.example",$$slots:{default:[na]},$$scope:{ctx:M}}}),lt=new w({props:{name:"generate",anchor:"transformers.SpeechT5ForTextToSpeech.generate",parameters:[{name:"input_ids",val:": LongTensor"},{name:"attention_mask",val:": Optional = None"},{name:"speaker_embeddings",val:": Optional = None"},{name:"threshold",val:": float = 0.5"},{name:"minlenratio",val:": float = 0.0"},{name:"maxlenratio",val:": float = 20.0"},{name:"vocoder",val:": Optional = None"},{name:"output_cross_attentions",val:": bool = False"},{name:"return_output_lengths",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.SpeechT5ForTextToSpeech.generate.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5Tokenizer">SpeechT5Tokenizer</a>. See <a href="/docs/transformers/pr_30674/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">encode()</a> and
<a href="/docs/transformers/pr_30674/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__"><strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.SpeechT5ForTextToSpeech.generate.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Attention mask from the tokenizer, required for batched inference to signal to the model where to
ignore padded tokens from the input_ids.`,name:"attention_mask"},{anchor:"transformers.SpeechT5ForTextToSpeech.generate.speaker_embeddings",description:`<strong>speaker_embeddings</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.speaker_embedding_dim)</code>, <em>optional</em>) &#x2014;
Tensor containing the speaker embeddings.`,name:"speaker_embeddings"},{anchor:"transformers.SpeechT5ForTextToSpeech.generate.threshold",description:`<strong>threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.5) &#x2014;
The generated sequence ends when the predicted stop token probability exceeds this value.`,name:"threshold"},{anchor:"transformers.SpeechT5ForTextToSpeech.generate.minlenratio",description:`<strong>minlenratio</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Used to calculate the minimum required length for the output sequence.`,name:"minlenratio"},{anchor:"transformers.SpeechT5ForTextToSpeech.generate.maxlenratio",description:`<strong>maxlenratio</strong> (<code>float</code>, <em>optional</em>, defaults to 20.0) &#x2014;
Used to calculate the maximum allowed length for the output sequence.`,name:"maxlenratio"},{anchor:"transformers.SpeechT5ForTextToSpeech.generate.vocoder",description:`<strong>vocoder</strong> (<code>nn.Module</code>, <em>optional</em>) &#x2014;
The vocoder that converts the mel spectrogram into a speech waveform. If <code>None</code>, the output is the mel
spectrogram.`,name:"vocoder"},{anchor:"transformers.SpeechT5ForTextToSpeech.generate.output_cross_attentions",description:`<strong>output_cross_attentions</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return the attentions tensors of the decoder&#x2019;s cross-attention layers.`,name:"output_cross_attentions"},{anchor:"transformers.SpeechT5ForTextToSpeech.generate.return_output_lengths",description:`<strong>return_output_lengths</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return the concrete spectrogram/waveform lengths.`,name:"return_output_lengths"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/speecht5/modeling_speecht5.py#L2753",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<ul>
<li>when <code>return_output_lengths</code> is False<ul>
<li><strong>spectrogram</strong> (<em>optional</em>, returned when no <code>vocoder</code> is provided) <code>torch.FloatTensor</code> of shape
<code>(output_sequence_length, config.num_mel_bins)</code> — The predicted log-mel spectrogram.</li>
<li><strong>waveform</strong> (<em>optional</em>, returned when a <code>vocoder</code> is provided) <code>torch.FloatTensor</code> of shape
<code>(num_frames,)</code> — The predicted speech waveform.</li>
<li><strong>cross_attentions</strong> (<em>optional</em>, returned when <code>output_cross_attentions</code> is <code>True</code>)
<code>torch.FloatTensor</code> of shape <code>(config.decoder_layers, config.decoder_attention_heads, output_sequence_length, input_sequence_length)</code> — The outputs of the decoder’s cross-attention layers.</li>
</ul></li>
<li>when <code>return_output_lengths</code> is True<ul>
<li><strong>spectrograms</strong> (<em>optional</em>, returned when no <code>vocoder</code> is provided) <code>torch.FloatTensor</code> of shape
<code>(batch_size, output_sequence_length, config.num_mel_bins)</code> — The predicted log-mel spectrograms that
are padded to the maximum length.</li>
<li><strong>spectrogram_lengths</strong> (<em>optional</em>, returned when no <code>vocoder</code> is provided) <code>List[Int]</code> — A list of
all the concrete lengths for each spectrogram.</li>
<li><strong>waveforms</strong> (<em>optional</em>, returned when a <code>vocoder</code> is provided) <code>torch.FloatTensor</code> of shape
<code>(batch_size, num_frames)</code> — The predicted speech waveforms that are padded to the maximum length.</li>
<li><strong>waveform_lengths</strong> (<em>optional</em>, returned when a <code>vocoder</code> is provided) <code>List[Int]</code> — A list of all
the concrete lengths for each waveform.</li>
<li><strong>cross_attentions</strong> (<em>optional</em>, returned when <code>output_cross_attentions</code> is <code>True</code>)
<code>torch.FloatTensor</code> of shape <code>(batch_size, config.decoder_layers, config.decoder_attention_heads, output_sequence_length, input_sequence_length)</code> — The outputs of the decoder’s cross-attention layers.</li>
</ul></li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>tuple(torch.FloatTensor)</code> comprising various elements depending on the inputs</p>
`}}),ht=new w({props:{name:"class transformers.SpeechT5ForSpeechToSpeech",anchor:"transformers.SpeechT5ForSpeechToSpeech",parameters:[{name:"config",val:": SpeechT5Config"}],parametersDescription:[{anchor:"transformers.SpeechT5ForSpeechToSpeech.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5Config">SpeechT5Config</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/pr_30674/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/speecht5/modeling_speecht5.py#L2942"}}),mt=new w({props:{name:"forward",anchor:"transformers.SpeechT5ForSpeechToSpeech.forward",parameters:[{name:"input_values",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"decoder_input_values",val:": Optional = None"},{name:"decoder_attention_mask",val:": Optional = None"},{name:"head_mask",val:": Optional = None"},{name:"decoder_head_mask",val:": Optional = None"},{name:"cross_attn_head_mask",val:": Optional = None"},{name:"encoder_outputs",val:": Optional = None"},{name:"past_key_values",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"},{name:"speaker_embeddings",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"stop_labels",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.SpeechT5ForSpeechToSpeech.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing convolution and attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p><code>attention_mask</code> should only be passed if the corresponding processor has <code>config.return_attention_mask == True</code>. For all models whose processor has <code>config.return_attention_mask == False</code>, <code>attention_mask</code> should
<strong>not</strong> be passed to avoid degraded performance when doing batched inference. For such models
<code>input_values</code> should simply be padded with 0 and passed without <code>attention_mask</code>. Be aware that these
models also yield slightly different results depending on whether <code>input_values</code> is padded or not.</p>

					</div>`,name:"attention_mask"},{anchor:"transformers.SpeechT5ForSpeechToSpeech.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_values</code>. Causal mask will
also be used by default.</p>
<p>If you want to change padding behavior, you should read <code>SpeechT5Decoder._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.SpeechT5ForSpeechToSpeech.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.SpeechT5ForSpeechToSpeech.forward.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.SpeechT5ForSpeechToSpeech.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.SpeechT5ForSpeechToSpeech.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.SpeechT5ForSpeechToSpeech.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_values</code> (those
that don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_values</code> of shape <code>(batch_size, sequence_length)</code>. decoder_inputs_embeds (<code>torch.FloatTensor</code>
of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>): Optionally, instead of passing
<code>decoder_input_values</code> you can choose to directly pass an embedded representation. If <code>past_key_values</code> is
used, optionally only the last <code>decoder_inputs_embeds</code> have to be input (see <code>past_key_values</code>). This is
useful if you want more control over how to convert <code>decoder_input_values</code> indices into associated vectors
than the model&#x2019;s internal embedding lookup matrix.`,name:"past_key_values"},{anchor:"transformers.SpeechT5ForSpeechToSpeech.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.SpeechT5ForSpeechToSpeech.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.SpeechT5ForSpeechToSpeech.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.SpeechT5ForSpeechToSpeech.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_30674/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.SpeechT5ForSpeechToSpeech.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 <em>.flac</em> or <em>.wav</em> 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 (<em>pip install
soundfile</em>). To prepare the array into <code>input_values</code>, the <a href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5Processor">SpeechT5Processor</a> should be used for padding
and conversion into a tensor of type <code>torch.FloatTensor</code>. See <a href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5Processor.__call__">SpeechT5Processor.<strong>call</strong>()</a> for details.`,name:"input_values"},{anchor:"transformers.SpeechT5ForSpeechToSpeech.forward.decoder_input_values",description:`<strong>decoder_input_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_mel_bins)</code>) &#x2014;
Float values of input mel spectrogram.</p>
<p>SpeechT5 uses an all-zero spectrum as the starting token for <code>decoder_input_values</code> generation. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_values</code> have to be input (see
<code>past_key_values</code>).`,name:"decoder_input_values"},{anchor:"transformers.SpeechT5ForSpeechToSpeech.forward.speaker_embeddings",description:`<strong>speaker_embeddings</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.speaker_embedding_dim)</code>, <em>optional</em>) &#x2014;
Tensor containing the speaker embeddings.`,name:"speaker_embeddings"},{anchor:"transformers.SpeechT5ForSpeechToSpeech.forward.labels",description:`<strong>labels</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_mel_bins)</code>, <em>optional</em>) &#x2014;
Float values of target mel spectrogram. Spectrograms can be obtained using <a href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5Processor">SpeechT5Processor</a>. See
<a href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5Processor.__call__">SpeechT5Processor.<strong>call</strong>()</a> for details.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/speecht5/modeling_speecht5.py#L2972",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_30674/en/main_classes/output#transformers.modeling_outputs.Seq2SeqSpectrogramOutput"
>transformers.modeling_outputs.Seq2SeqSpectrogramOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5Config"
>SpeechT5Config</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) — Spectrogram generation loss.</p>
</li>
<li>
<p><strong>spectrogram</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, num_bins)</code>) — The predicted spectrogram.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) — Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder’s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) — Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_30674/en/main_classes/output#transformers.modeling_outputs.Seq2SeqSpectrogramOutput"
>transformers.modeling_outputs.Seq2SeqSpectrogramOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ye=new ko({props:{$$slots:{default:[sa]},$$scope:{ctx:M}}}),ke=new xo({props:{anchor:"transformers.SpeechT5ForSpeechToSpeech.forward.example",$$slots:{default:[ra]},$$scope:{ctx:M}}}),ut=new w({props:{name:"generate_speech",anchor:"transformers.SpeechT5ForSpeechToSpeech.generate_speech",parameters:[{name:"input_values",val:": FloatTensor"},{name:"speaker_embeddings",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"threshold",val:": float = 0.5"},{name:"minlenratio",val:": float = 0.0"},{name:"maxlenratio",val:": float = 20.0"},{name:"vocoder",val:": Optional = None"},{name:"output_cross_attentions",val:": bool = False"},{name:"return_output_lengths",val:": bool = False"}],parametersDescription:[{anchor:"transformers.SpeechT5ForSpeechToSpeech.generate_speech.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.</p>
<p>Values can be obtained by loading a <em>.flac</em> or <em>.wav</em> 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 (<em>pip install soundfile</em>). To prepare the array
into <code>input_values</code>, the <a href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5Processor">SpeechT5Processor</a> should be used for padding and conversion into a tensor
of type <code>torch.FloatTensor</code>. See <a href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5Processor.__call__">SpeechT5Processor.<strong>call</strong>()</a> for details.`,name:"input_values"},{anchor:"transformers.SpeechT5ForSpeechToSpeech.generate_speech.speaker_embeddings",description:`<strong>speaker_embeddings</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.speaker_embedding_dim)</code>, <em>optional</em>) &#x2014;
Tensor containing the speaker embeddings.`,name:"speaker_embeddings"},{anchor:"transformers.SpeechT5ForSpeechToSpeech.generate_speech.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing convolution and attention on padding token indices. Mask values selected in
<code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.SpeechT5ForSpeechToSpeech.generate_speech.threshold",description:`<strong>threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 0.5) &#x2014;
The generated sequence ends when the predicted stop token probability exceeds this value.`,name:"threshold"},{anchor:"transformers.SpeechT5ForSpeechToSpeech.generate_speech.minlenratio",description:`<strong>minlenratio</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Used to calculate the minimum required length for the output sequence.`,name:"minlenratio"},{anchor:"transformers.SpeechT5ForSpeechToSpeech.generate_speech.maxlenratio",description:`<strong>maxlenratio</strong> (<code>float</code>, <em>optional</em>, defaults to 20.0) &#x2014;
Used to calculate the maximum allowed length for the output sequence.`,name:"maxlenratio"},{anchor:"transformers.SpeechT5ForSpeechToSpeech.generate_speech.vocoder",description:`<strong>vocoder</strong> (<code>nn.Module</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The vocoder that converts the mel spectrogram into a speech waveform. If <code>None</code>, the output is the mel
spectrogram.`,name:"vocoder"},{anchor:"transformers.SpeechT5ForSpeechToSpeech.generate_speech.output_cross_attentions",description:`<strong>output_cross_attentions</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return the attentions tensors of the decoder&#x2019;s cross-attention layers.`,name:"output_cross_attentions"},{anchor:"transformers.SpeechT5ForSpeechToSpeech.generate_speech.return_output_lengths",description:`<strong>return_output_lengths</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return the concrete spectrogram/waveform lengths.`,name:"return_output_lengths"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/speecht5/modeling_speecht5.py#L3086",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<ul>
<li>when <code>return_output_lengths</code> is False<ul>
<li><strong>spectrogram</strong> (<em>optional</em>, returned when no <code>vocoder</code> is provided) <code>torch.FloatTensor</code> of shape
<code>(output_sequence_length, config.num_mel_bins)</code> — The predicted log-mel spectrogram.</li>
<li><strong>waveform</strong> (<em>optional</em>, returned when a <code>vocoder</code> is provided) <code>torch.FloatTensor</code> of shape
<code>(num_frames,)</code> — The predicted speech waveform.</li>
<li><strong>cross_attentions</strong> (<em>optional</em>, returned when <code>output_cross_attentions</code> is <code>True</code>)
<code>torch.FloatTensor</code> of shape <code>(config.decoder_layers, config.decoder_attention_heads, output_sequence_length, input_sequence_length)</code> — The outputs of the decoder’s cross-attention layers.</li>
</ul></li>
<li>when <code>return_output_lengths</code> is True<ul>
<li><strong>spectrograms</strong> (<em>optional</em>, returned when no <code>vocoder</code> is provided) <code>torch.FloatTensor</code> of shape
<code>(batch_size, output_sequence_length, config.num_mel_bins)</code> — The predicted log-mel spectrograms that
are padded to the maximum length.</li>
<li><strong>spectrogram_lengths</strong> (<em>optional</em>, returned when no <code>vocoder</code> is provided) <code>List[Int]</code> — A list of
all the concrete lengths for each spectrogram.</li>
<li><strong>waveforms</strong> (<em>optional</em>, returned when a <code>vocoder</code> is provided) <code>torch.FloatTensor</code> of shape
<code>(batch_size, num_frames)</code> — The predicted speech waveforms that are padded to the maximum length.</li>
<li><strong>waveform_lengths</strong> (<em>optional</em>, returned when a <code>vocoder</code> is provided) <code>List[Int]</code> — A list of all
the concrete lengths for each waveform.</li>
<li><strong>cross_attentions</strong> (<em>optional</em>, returned when <code>output_cross_attentions</code> is <code>True</code>)
<code>torch.FloatTensor</code> of shape <code>(batch_size, config.decoder_layers, config.decoder_attention_heads, output_sequence_length, input_sequence_length)</code> — The outputs of the decoder’s cross-attention layers.</li>
</ul></li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>tuple(torch.FloatTensor)</code> comprising various elements depending on the inputs</p>
`}}),_t=new w({props:{name:"class transformers.SpeechT5HifiGan",anchor:"transformers.SpeechT5HifiGan",parameters:[{name:"config",val:": SpeechT5HifiGanConfig"}],parametersDescription:[{anchor:"transformers.SpeechT5HifiGan.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_30674/en/model_doc/speecht5#transformers.SpeechT5HifiGanConfig">SpeechT5HifiGanConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/pr_30674/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/speecht5/modeling_speecht5.py#L3251"}}),gt=new w({props:{name:"forward",anchor:"transformers.SpeechT5HifiGan.forward",parameters:[{name:"spectrogram",val:": FloatTensor"}],parametersDescription:[{anchor:"transformers.SpeechT5HifiGan.forward.spectrogram",description:`<strong>spectrogram</strong> (<code>torch.FloatTensor</code>) &#x2014;
Tensor containing the log-mel spectrograms. Can be batched and of shape <code>(batch_size, sequence_length, config.model_in_dim)</code>, or un-batched and of shape <code>(sequence_length, config.model_in_dim)</code>.`,name:"spectrogram"}],source:"https://github.com/huggingface/transformers/blob/vr_30674/src/transformers/models/speecht5/modeling_speecht5.py#L3320",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>Tensor containing the speech waveform. If the input spectrogram is batched, will be of
shape <code>(batch_size, num_frames,)</code>. If un-batched, will be of shape <code>(num_frames,)</code>.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>torch.FloatTensor</code></p>
`}}),Tt=new Rr({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/speecht5.md"}}),{c(){s=r("meta"),b=o(),l=r("p"),m=o(),u(y.$$.fragment),i=o(),u(S.$$.fragment),$o=o(),Ce=r("p"),Ce.innerHTML=Us,zo=o(),qe=r("p"),qe.textContent=Ns,Fo=o(),je=r("p"),je.innerHTML=Js,Co=o(),Ue=r("p"),Ue.innerHTML=Ws,qo=o(),u(Ne.$$.fragment),jo=o(),L=r("div"),u(Je.$$.fragment),rn=o(),yt=r("p"),yt.innerHTML=Is,an=o(),kt=r("p"),kt.innerHTML=Ps,cn=o(),u(ae.$$.fragment),Uo=o(),We=r("p"),We.textContent=Zs,No=o(),G=r("div"),u(Ie.$$.fragment),dn=o(),xt=r("p"),xt.innerHTML=Ls,ln=o(),wt=r("p"),wt.innerHTML=Gs,pn=o(),u(ce.$$.fragment),Jo=o(),Pe=r("p"),Pe.textContent=Vs,Wo=o(),F=r("div"),u(Ze.$$.fragment),hn=o(),St=r("p"),St.innerHTML=Hs,mn=o(),Mt=r("p"),Mt.innerHTML=Es,un=o(),de=r("div"),u(Le.$$.fragment),fn=o(),$t=r("p"),$t.textContent=Ds,_n=o(),zt=r("div"),u(Ge.$$.fragment),gn=o(),Y=r("div"),u(Ve.$$.fragment),Tn=o(),Ft=r("p"),Ft.textContent=Bs,vn=o(),Ct=r("p"),Ct.innerHTML=Rs,bn=o(),ie=r("div"),u(He.$$.fragment),yn=o(),qt=r("p"),qt.textContent=Os,Io=o(),Ee=r("p"),Ee.textContent=Xs,Po=o(),q=r("div"),u(De.$$.fragment),kn=o(),jt=r("p"),jt.textContent=Ys,xn=o(),Ut=r("p"),Ut.textContent=Qs,wn=o(),Nt=r("p"),Nt.textContent=As,Sn=o(),Jt=r("p"),Jt.innerHTML=Ks,Mn=o(),Q=r("div"),u(Be.$$.fragment),$n=o(),Wt=r("p"),Wt.textContent=er,zn=o(),It=r("p"),It.innerHTML=tr,Zo=o(),Re=r("p"),Re.textContent=or,Lo=o(),$=r("div"),u(Oe.$$.fragment),Fn=o(),Pt=r("p"),Pt.textContent=nr,Cn=o(),Zt=r("p"),Zt.innerHTML=sr,qn=o(),C=r("div"),u(Xe.$$.fragment),jn=o(),Lt=r("p"),Lt.textContent=rr,Un=o(),Gt=r("p"),Gt.innerHTML=ar,Nn=o(),Vt=r("p"),Vt.innerHTML=cr,Jn=o(),Ht=r("p"),Ht.textContent=dr,Wn=o(),Et=r("ul"),Et.innerHTML=ir,In=o(),Dt=r("p"),Dt.textContent=lr,Pn=o(),N=r("div"),u(Ye.$$.fragment),Zn=o(),Bt=r("p"),Bt.textContent=pr,Ln=o(),Rt=r("p"),Rt.innerHTML=hr,Gn=o(),Ot=r("p"),Ot.textContent=mr,Vn=o(),Xt=r("ul"),Xt.innerHTML=ur,Hn=o(),Yt=r("p"),Yt.textContent=fr,En=o(),A=r("div"),u(Qe.$$.fragment),Dn=o(),Qt=r("p"),Qt.textContent=_r,Bn=o(),u(le.$$.fragment),Rn=o(),K=r("div"),u(Ae.$$.fragment),On=o(),At=r("p"),At.innerHTML=gr,Xn=o(),u(pe.$$.fragment),Yn=o(),he=r("div"),u(Ke.$$.fragment),Qn=o(),Kt=r("p"),Kt.innerHTML=Tr,An=o(),me=r("div"),u(et.$$.fragment),Kn=o(),eo=r("p"),eo.innerHTML=vr,Go=o(),tt=r("p"),tt.textContent=br,Vo=o(),V=r("div"),u(ot.$$.fragment),es=o(),to=r("p"),to.innerHTML=yr,ts=o(),oo=r("p"),oo.innerHTML=kr,os=o(),ee=r("div"),u(nt.$$.fragment),ns=o(),no=r("p"),no.innerHTML=xr,ss=o(),u(ue.$$.fragment),Ho=o(),st=r("p"),st.textContent=wr,Eo=o(),H=r("div"),u(rt.$$.fragment),rs=o(),so=r("p"),so.innerHTML=Sr,as=o(),ro=r("p"),ro.innerHTML=Mr,cs=o(),Z=r("div"),u(at.$$.fragment),ds=o(),ao=r("p"),ao.innerHTML=$r,is=o(),u(fe.$$.fragment),ls=o(),u(_e.$$.fragment),ps=o(),u(ge.$$.fragment),Do=o(),ct=r("p"),ct.textContent=zr,Bo=o(),J=r("div"),u(dt.$$.fragment),hs=o(),co=r("p"),co.innerHTML=Fr,ms=o(),io=r("p"),io.innerHTML=Cr,us=o(),D=r("div"),u(it.$$.fragment),fs=o(),lo=r("p"),lo.innerHTML=qr,_s=o(),u(Te.$$.fragment),gs=o(),u(ve.$$.fragment),Ts=o(),be=r("div"),u(lt.$$.fragment),vs=o(),po=r("p"),po.textContent=jr,Ro=o(),pt=r("p"),pt.textContent=Ur,Oo=o(),W=r("div"),u(ht.$$.fragment),bs=o(),ho=r("p"),ho.innerHTML=Nr,ys=o(),mo=r("p"),mo.innerHTML=Jr,ks=o(),B=r("div"),u(mt.$$.fragment),xs=o(),uo=r("p"),uo.innerHTML=Wr,ws=o(),u(ye.$$.fragment),Ss=o(),u(ke.$$.fragment),Ms=o(),xe=r("div"),u(ut.$$.fragment),$s=o(),fo=r("p"),fo.textContent=Ir,Xo=o(),ft=r("p"),ft.textContent=Pr,Yo=o(),E=r("div"),u(_t.$$.fragment),zs=o(),_o=r("p"),_o.innerHTML=Zr,Fs=o(),go=r("p"),go.innerHTML=Lr,Cs=o(),we=r("div"),u(gt.$$.fragment),qs=o(),To=r("p"),To.textContent=Gr,Qo=o(),u(Tt.$$.fragment),Ao=o(),So=r("p"),this.h()},l(e){const d=Br("svelte-u9bgzb",document.head);s=a(d,"META",{name:!0,content:!0}),d.forEach(c),b=n(e),l=a(e,"P",{}),k(l).forEach(c),m=n(e),f(y.$$.fragment,e),i=n(e),f(S.$$.fragment,e),$o=n(e),Ce=a(e,"P",{"data-svelte-h":!0}),p(Ce)!=="svelte-17b0ned"&&(Ce.innerHTML=Us),zo=n(e),qe=a(e,"P",{"data-svelte-h":!0}),p(qe)!=="svelte-vfdo9a"&&(qe.textContent=Ns),Fo=n(e),je=a(e,"P",{"data-svelte-h":!0}),p(je)!=="svelte-y5xjl8"&&(je.innerHTML=Js),Co=n(e),Ue=a(e,"P",{"data-svelte-h":!0}),p(Ue)!=="svelte-th5lle"&&(Ue.innerHTML=Ws),qo=n(e),f(Ne.$$.fragment,e),jo=n(e),L=a(e,"DIV",{class:!0});var O=k(L);f(Je.$$.fragment,O),rn=n(O),yt=a(O,"P",{"data-svelte-h":!0}),p(yt)!=="svelte-15tveq0"&&(yt.innerHTML=Is),an=n(O),kt=a(O,"P",{"data-svelte-h":!0}),p(kt)!=="svelte-ffp72b"&&(kt.innerHTML=Ps),cn=n(O),f(ae.$$.fragment,O),O.forEach(c),Uo=n(e),We=a(e,"P",{"data-svelte-h":!0}),p(We)!=="svelte-xbebes"&&(We.textContent=Zs),No=n(e),G=a(e,"DIV",{class:!0});var X=k(G);f(Ie.$$.fragment,X),dn=n(X),xt=a(X,"P",{"data-svelte-h":!0}),p(xt)!=="svelte-q7odiy"&&(xt.innerHTML=Ls),ln=n(X),wt=a(X,"P",{"data-svelte-h":!0}),p(wt)!=="svelte-ffp72b"&&(wt.innerHTML=Gs),pn=n(X),f(ce.$$.fragment,X),X.forEach(c),Jo=n(e),Pe=a(e,"P",{"data-svelte-h":!0}),p(Pe)!=="svelte-1yvxuis"&&(Pe.textContent=Vs),Wo=n(e),F=a(e,"DIV",{class:!0});var j=k(F);f(Ze.$$.fragment,j),hn=n(j),St=a(j,"P",{"data-svelte-h":!0}),p(St)!=="svelte-13guiap"&&(St.innerHTML=Hs),mn=n(j),Mt=a(j,"P",{"data-svelte-h":!0}),p(Mt)!=="svelte-1rzp4eg"&&(Mt.innerHTML=Es),un=n(j),de=a(j,"DIV",{class:!0});var vt=k(de);f(Le.$$.fragment,vt),fn=n(vt),$t=a(vt,"P",{"data-svelte-h":!0}),p($t)!=="svelte-kpxj0c"&&($t.textContent=Ds),vt.forEach(c),_n=n(j),zt=a(j,"DIV",{class:!0});var Mo=k(zt);f(Ge.$$.fragment,Mo),Mo.forEach(c),gn=n(j),Y=a(j,"DIV",{class:!0});var se=k(Y);f(Ve.$$.fragment,se),Tn=n(se),Ft=a(se,"P",{"data-svelte-h":!0}),p(Ft)!=="svelte-vbfkpu"&&(Ft.textContent=Bs),vn=n(se),Ct=a(se,"P",{"data-svelte-h":!0}),p(Ct)!=="svelte-125uxon"&&(Ct.innerHTML=Rs),se.forEach(c),bn=n(j),ie=a(j,"DIV",{class:!0});var bt=k(ie);f(He.$$.fragment,bt),yn=n(bt),qt=a(bt,"P",{"data-svelte-h":!0}),p(qt)!=="svelte-1deng2j"&&(qt.textContent=Os),bt.forEach(c),j.forEach(c),Io=n(e),Ee=a(e,"P",{"data-svelte-h":!0}),p(Ee)!=="svelte-ftcbh6"&&(Ee.textContent=Xs),Po=n(e),q=a(e,"DIV",{class:!0});var I=k(q);f(De.$$.fragment,I),kn=n(I),jt=a(I,"P",{"data-svelte-h":!0}),p(jt)!=="svelte-hytttm"&&(jt.textContent=Ys),xn=n(I),Ut=a(I,"P",{"data-svelte-h":!0}),p(Ut)!=="svelte-9t836v"&&(Ut.textContent=Qs),wn=n(I),Nt=a(I,"P",{"data-svelte-h":!0}),p(Nt)!=="svelte-10431qd"&&(Nt.textContent=As),Sn=n(I),Jt=a(I,"P",{"data-svelte-h":!0}),p(Jt)!=="svelte-1iwxjrj"&&(Jt.innerHTML=Ks),Mn=n(I),Q=a(I,"DIV",{class:!0});var re=k(Q);f(Be.$$.fragment,re),$n=n(re),Wt=a(re,"P",{"data-svelte-h":!0}),p(Wt)!=="svelte-1a6wgfx"&&(Wt.textContent=er),zn=n(re),It=a(re,"P",{"data-svelte-h":!0}),p(It)!=="svelte-8yitl9"&&(It.innerHTML=tr),re.forEach(c),I.forEach(c),Zo=n(e),Re=a(e,"P",{"data-svelte-h":!0}),p(Re)!=="svelte-1v6udl8"&&(Re.textContent=or),Lo=n(e),$=a(e,"DIV",{class:!0});var z=k($);f(Oe.$$.fragment,z),Fn=n(z),Pt=a(z,"P",{"data-svelte-h":!0}),p(Pt)!=="svelte-1b2vd31"&&(Pt.textContent=nr),Cn=n(z),Zt=a(z,"P",{"data-svelte-h":!0}),p(Zt)!=="svelte-97rr1e"&&(Zt.innerHTML=sr),qn=n(z),C=a(z,"DIV",{class:!0});var U=k(C);f(Xe.$$.fragment,U),jn=n(U),Lt=a(U,"P",{"data-svelte-h":!0}),p(Lt)!=="svelte-ocqtg9"&&(Lt.textContent=rr),Un=n(U),Gt=a(U,"P",{"data-svelte-h":!0}),p(Gt)!=="svelte-zl5we4"&&(Gt.innerHTML=ar),Nn=n(U),Vt=a(U,"P",{"data-svelte-h":!0}),p(Vt)!=="svelte-1c4qy4y"&&(Vt.innerHTML=cr),Jn=n(U),Ht=a(U,"P",{"data-svelte-h":!0}),p(Ht)!=="svelte-bjsvki"&&(Ht.textContent=dr),Wn=n(U),Et=a(U,"UL",{"data-svelte-h":!0}),p(Et)!=="svelte-1gayspi"&&(Et.innerHTML=ir),In=n(U),Dt=a(U,"P",{"data-svelte-h":!0}),p(Dt)!=="svelte-ws0hzs"&&(Dt.textContent=lr),U.forEach(c),Pn=n(z),N=a(z,"DIV",{class:!0});var P=k(N);f(Ye.$$.fragment,P),Zn=n(P),Bt=a(P,"P",{"data-svelte-h":!0}),p(Bt)!=="svelte-1n59xk4"&&(Bt.textContent=pr),Ln=n(P),Rt=a(P,"P",{"data-svelte-h":!0}),p(Rt)!=="svelte-wcrk4o"&&(Rt.innerHTML=hr),Gn=n(P),Ot=a(P,"P",{"data-svelte-h":!0}),p(Ot)!=="svelte-bjsvki"&&(Ot.textContent=mr),Vn=n(P),Xt=a(P,"UL",{"data-svelte-h":!0}),p(Xt)!=="svelte-25scwy"&&(Xt.innerHTML=ur),Hn=n(P),Yt=a(P,"P",{"data-svelte-h":!0}),p(Yt)!=="svelte-ws0hzs"&&(Yt.textContent=fr),P.forEach(c),En=n(z),A=a(z,"DIV",{class:!0});var vo=k(A);f(Qe.$$.fragment,vo),Dn=n(vo),Qt=a(vo,"P",{"data-svelte-h":!0}),p(Qt)!=="svelte-1cj8dcb"&&(Qt.textContent=_r),Bn=n(vo),f(le.$$.fragment,vo),vo.forEach(c),Rn=n(z),K=a(z,"DIV",{class:!0});var bo=k(K);f(Ae.$$.fragment,bo),On=n(bo),At=a(bo,"P",{"data-svelte-h":!0}),p(At)!=="svelte-wwm3j5"&&(At.innerHTML=gr),Xn=n(bo),f(pe.$$.fragment,bo),bo.forEach(c),Yn=n(z),he=a(z,"DIV",{class:!0});var en=k(he);f(Ke.$$.fragment,en),Qn=n(en),Kt=a(en,"P",{"data-svelte-h":!0}),p(Kt)!=="svelte-gvp98o"&&(Kt.innerHTML=Tr),en.forEach(c),An=n(z),me=a(z,"DIV",{class:!0});var tn=k(me);f(et.$$.fragment,tn),Kn=n(tn),eo=a(tn,"P",{"data-svelte-h":!0}),p(eo)!=="svelte-9ea7b2"&&(eo.innerHTML=vr),tn.forEach(c),z.forEach(c),Go=n(e),tt=a(e,"P",{"data-svelte-h":!0}),p(tt)!=="svelte-13gomv8"&&(tt.textContent=br),Vo=n(e),V=a(e,"DIV",{class:!0});var Se=k(V);f(ot.$$.fragment,Se),es=n(Se),to=a(Se,"P",{"data-svelte-h":!0}),p(to)!=="svelte-p8fnsc"&&(to.innerHTML=yr),ts=n(Se),oo=a(Se,"P",{"data-svelte-h":!0}),p(oo)!=="svelte-1ydu1el"&&(oo.innerHTML=kr),os=n(Se),ee=a(Se,"DIV",{class:!0});var yo=k(ee);f(nt.$$.fragment,yo),ns=n(yo),no=a(yo,"P",{"data-svelte-h":!0}),p(no)!=="svelte-z7z7rm"&&(no.innerHTML=xr),ss=n(yo),f(ue.$$.fragment,yo),yo.forEach(c),Se.forEach(c),Ho=n(e),st=a(e,"P",{"data-svelte-h":!0}),p(st)!=="svelte-42uh4o"&&(st.textContent=wr),Eo=n(e),H=a(e,"DIV",{class:!0});var Me=k(H);f(rt.$$.fragment,Me),rs=n(Me),so=a(Me,"P",{"data-svelte-h":!0}),p(so)!=="svelte-1oegkja"&&(so.innerHTML=Sr),as=n(Me),ro=a(Me,"P",{"data-svelte-h":!0}),p(ro)!=="svelte-1ydu1el"&&(ro.innerHTML=Mr),cs=n(Me),Z=a(Me,"DIV",{class:!0});var te=k(Z);f(at.$$.fragment,te),ds=n(te),ao=a(te,"P",{"data-svelte-h":!0}),p(ao)!=="svelte-1tofypu"&&(ao.innerHTML=$r),is=n(te),f(fe.$$.fragment,te),ls=n(te),f(_e.$$.fragment,te),ps=n(te),f(ge.$$.fragment,te),te.forEach(c),Me.forEach(c),Do=n(e),ct=a(e,"P",{"data-svelte-h":!0}),p(ct)!=="svelte-16kahs"&&(ct.textContent=zr),Bo=n(e),J=a(e,"DIV",{class:!0});var oe=k(J);f(dt.$$.fragment,oe),hs=n(oe),co=a(oe,"P",{"data-svelte-h":!0}),p(co)!=="svelte-1dh42w"&&(co.innerHTML=Fr),ms=n(oe),io=a(oe,"P",{"data-svelte-h":!0}),p(io)!=="svelte-1ydu1el"&&(io.innerHTML=Cr),us=n(oe),D=a(oe,"DIV",{class:!0});var $e=k(D);f(it.$$.fragment,$e),fs=n($e),lo=a($e,"P",{"data-svelte-h":!0}),p(lo)!=="svelte-1wlo4m2"&&(lo.innerHTML=qr),_s=n($e),f(Te.$$.fragment,$e),gs=n($e),f(ve.$$.fragment,$e),$e.forEach(c),Ts=n(oe),be=a(oe,"DIV",{class:!0});var on=k(be);f(lt.$$.fragment,on),vs=n(on),po=a(on,"P",{"data-svelte-h":!0}),p(po)!=="svelte-1bjnl76"&&(po.textContent=jr),on.forEach(c),oe.forEach(c),Ro=n(e),pt=a(e,"P",{"data-svelte-h":!0}),p(pt)!=="svelte-1osp7fc"&&(pt.textContent=Ur),Oo=n(e),W=a(e,"DIV",{class:!0});var ne=k(W);f(ht.$$.fragment,ne),bs=n(ne),ho=a(ne,"P",{"data-svelte-h":!0}),p(ho)!=="svelte-1bmz0ir"&&(ho.innerHTML=Nr),ys=n(ne),mo=a(ne,"P",{"data-svelte-h":!0}),p(mo)!=="svelte-1ydu1el"&&(mo.innerHTML=Jr),ks=n(ne),B=a(ne,"DIV",{class:!0});var ze=k(B);f(mt.$$.fragment,ze),xs=n(ze),uo=a(ze,"P",{"data-svelte-h":!0}),p(uo)!=="svelte-1f8vumi"&&(uo.innerHTML=Wr),ws=n(ze),f(ye.$$.fragment,ze),Ss=n(ze),f(ke.$$.fragment,ze),ze.forEach(c),Ms=n(ne),xe=a(ne,"DIV",{class:!0});var nn=k(xe);f(ut.$$.fragment,nn),$s=n(nn),fo=a(nn,"P",{"data-svelte-h":!0}),p(fo)!=="svelte-mx15yu"&&(fo.textContent=Ir),nn.forEach(c),ne.forEach(c),Xo=n(e),ft=a(e,"P",{"data-svelte-h":!0}),p(ft)!=="svelte-1dx9ou4"&&(ft.textContent=Pr),Yo=n(e),E=a(e,"DIV",{class:!0});var Fe=k(E);f(_t.$$.fragment,Fe),zs=n(Fe),_o=a(Fe,"P",{"data-svelte-h":!0}),p(_o)!=="svelte-171mcmx"&&(_o.innerHTML=Zr),Fs=n(Fe),go=a(Fe,"P",{"data-svelte-h":!0}),p(go)!=="svelte-1ydu1el"&&(go.innerHTML=Lr),Cs=n(Fe),we=a(Fe,"DIV",{class:!0});var sn=k(we);f(gt.$$.fragment,sn),qs=n(sn),To=a(sn,"P",{"data-svelte-h":!0}),p(To)!=="svelte-qef8w5"&&(To.textContent=Gr),sn.forEach(c),Fe.forEach(c),Qo=n(e),f(Tt.$$.fragment,e),Ao=n(e),So=a(e,"P",{}),k(So).forEach(c),this.h()},h(){x(s,"name","hf:doc:metadata"),x(s,"content",ca),x(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(zt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(we,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,d){t(document.head,s),h(e,b,d),h(e,l,d),h(e,m,d),_(y,e,d),h(e,i,d),_(S,e,d),h(e,$o,d),h(e,Ce,d),h(e,zo,d),h(e,qe,d),h(e,Fo,d),h(e,je,d),h(e,Co,d),h(e,Ue,d),h(e,qo,d),_(Ne,e,d),h(e,jo,d),h(e,L,d),_(Je,L,null),t(L,rn),t(L,yt),t(L,an),t(L,kt),t(L,cn),_(ae,L,null),h(e,Uo,d),h(e,We,d),h(e,No,d),h(e,G,d),_(Ie,G,null),t(G,dn),t(G,xt),t(G,ln),t(G,wt),t(G,pn),_(ce,G,null),h(e,Jo,d),h(e,Pe,d),h(e,Wo,d),h(e,F,d),_(Ze,F,null),t(F,hn),t(F,St),t(F,mn),t(F,Mt),t(F,un),t(F,de),_(Le,de,null),t(de,fn),t(de,$t),t(F,_n),t(F,zt),_(Ge,zt,null),t(F,gn),t(F,Y),_(Ve,Y,null),t(Y,Tn),t(Y,Ft),t(Y,vn),t(Y,Ct),t(F,bn),t(F,ie),_(He,ie,null),t(ie,yn),t(ie,qt),h(e,Io,d),h(e,Ee,d),h(e,Po,d),h(e,q,d),_(De,q,null),t(q,kn),t(q,jt),t(q,xn),t(q,Ut),t(q,wn),t(q,Nt),t(q,Sn),t(q,Jt),t(q,Mn),t(q,Q),_(Be,Q,null),t(Q,$n),t(Q,Wt),t(Q,zn),t(Q,It),h(e,Zo,d),h(e,Re,d),h(e,Lo,d),h(e,$,d),_(Oe,$,null),t($,Fn),t($,Pt),t($,Cn),t($,Zt),t($,qn),t($,C),_(Xe,C,null),t(C,jn),t(C,Lt),t(C,Un),t(C,Gt),t(C,Nn),t(C,Vt),t(C,Jn),t(C,Ht),t(C,Wn),t(C,Et),t(C,In),t(C,Dt),t($,Pn),t($,N),_(Ye,N,null),t(N,Zn),t(N,Bt),t(N,Ln),t(N,Rt),t(N,Gn),t(N,Ot),t(N,Vn),t(N,Xt),t(N,Hn),t(N,Yt),t($,En),t($,A),_(Qe,A,null),t(A,Dn),t(A,Qt),t(A,Bn),_(le,A,null),t($,Rn),t($,K),_(Ae,K,null),t(K,On),t(K,At),t(K,Xn),_(pe,K,null),t($,Yn),t($,he),_(Ke,he,null),t(he,Qn),t(he,Kt),t($,An),t($,me),_(et,me,null),t(me,Kn),t(me,eo),h(e,Go,d),h(e,tt,d),h(e,Vo,d),h(e,V,d),_(ot,V,null),t(V,es),t(V,to),t(V,ts),t(V,oo),t(V,os),t(V,ee),_(nt,ee,null),t(ee,ns),t(ee,no),t(ee,ss),_(ue,ee,null),h(e,Ho,d),h(e,st,d),h(e,Eo,d),h(e,H,d),_(rt,H,null),t(H,rs),t(H,so),t(H,as),t(H,ro),t(H,cs),t(H,Z),_(at,Z,null),t(Z,ds),t(Z,ao),t(Z,is),_(fe,Z,null),t(Z,ls),_(_e,Z,null),t(Z,ps),_(ge,Z,null),h(e,Do,d),h(e,ct,d),h(e,Bo,d),h(e,J,d),_(dt,J,null),t(J,hs),t(J,co),t(J,ms),t(J,io),t(J,us),t(J,D),_(it,D,null),t(D,fs),t(D,lo),t(D,_s),_(Te,D,null),t(D,gs),_(ve,D,null),t(J,Ts),t(J,be),_(lt,be,null),t(be,vs),t(be,po),h(e,Ro,d),h(e,pt,d),h(e,Oo,d),h(e,W,d),_(ht,W,null),t(W,bs),t(W,ho),t(W,ys),t(W,mo),t(W,ks),t(W,B),_(mt,B,null),t(B,xs),t(B,uo),t(B,ws),_(ye,B,null),t(B,Ss),_(ke,B,null),t(W,Ms),t(W,xe),_(ut,xe,null),t(xe,$s),t(xe,fo),h(e,Xo,d),h(e,ft,d),h(e,Yo,d),h(e,E,d),_(_t,E,null),t(E,zs),t(E,_o),t(E,Fs),t(E,go),t(E,Cs),t(E,we),_(gt,we,null),t(we,qs),t(we,To),h(e,Qo,d),_(Tt,e,d),h(e,Ao,d),h(e,So,d),Ko=!0},p(e,[d]){const O={};d&2&&(O.$$scope={dirty:d,ctx:e}),ae.$set(O);const X={};d&2&&(X.$$scope={dirty:d,ctx:e}),ce.$set(X);const j={};d&2&&(j.$$scope={dirty:d,ctx:e}),le.$set(j);const vt={};d&2&&(vt.$$scope={dirty:d,ctx:e}),pe.$set(vt);const Mo={};d&2&&(Mo.$$scope={dirty:d,ctx:e}),ue.$set(Mo);const se={};d&2&&(se.$$scope={dirty:d,ctx:e}),fe.$set(se);const bt={};d&2&&(bt.$$scope={dirty:d,ctx:e}),_e.$set(bt);const I={};d&2&&(I.$$scope={dirty:d,ctx:e}),ge.$set(I);const re={};d&2&&(re.$$scope={dirty:d,ctx:e}),Te.$set(re);const z={};d&2&&(z.$$scope={dirty:d,ctx:e}),ve.$set(z);const U={};d&2&&(U.$$scope={dirty:d,ctx:e}),ye.$set(U);const P={};d&2&&(P.$$scope={dirty:d,ctx:e}),ke.$set(P)},i(e){Ko||(g(y.$$.fragment,e),g(S.$$.fragment,e),g(Ne.$$.fragment,e),g(Je.$$.fragment,e),g(ae.$$.fragment,e),g(Ie.$$.fragment,e),g(ce.$$.fragment,e),g(Ze.$$.fragment,e),g(Le.$$.fragment,e),g(Ge.$$.fragment,e),g(Ve.$$.fragment,e),g(He.$$.fragment,e),g(De.$$.fragment,e),g(Be.$$.fragment,e),g(Oe.$$.fragment,e),g(Xe.$$.fragment,e),g(Ye.$$.fragment,e),g(Qe.$$.fragment,e),g(le.$$.fragment,e),g(Ae.$$.fragment,e),g(pe.$$.fragment,e),g(Ke.$$.fragment,e),g(et.$$.fragment,e),g(ot.$$.fragment,e),g(nt.$$.fragment,e),g(ue.$$.fragment,e),g(rt.$$.fragment,e),g(at.$$.fragment,e),g(fe.$$.fragment,e),g(_e.$$.fragment,e),g(ge.$$.fragment,e),g(dt.$$.fragment,e),g(it.$$.fragment,e),g(Te.$$.fragment,e),g(ve.$$.fragment,e),g(lt.$$.fragment,e),g(ht.$$.fragment,e),g(mt.$$.fragment,e),g(ye.$$.fragment,e),g(ke.$$.fragment,e),g(ut.$$.fragment,e),g(_t.$$.fragment,e),g(gt.$$.fragment,e),g(Tt.$$.fragment,e),Ko=!0)},o(e){T(y.$$.fragment,e),T(S.$$.fragment,e),T(Ne.$$.fragment,e),T(Je.$$.fragment,e),T(ae.$$.fragment,e),T(Ie.$$.fragment,e),T(ce.$$.fragment,e),T(Ze.$$.fragment,e),T(Le.$$.fragment,e),T(Ge.$$.fragment,e),T(Ve.$$.fragment,e),T(He.$$.fragment,e),T(De.$$.fragment,e),T(Be.$$.fragment,e),T(Oe.$$.fragment,e),T(Xe.$$.fragment,e),T(Ye.$$.fragment,e),T(Qe.$$.fragment,e),T(le.$$.fragment,e),T(Ae.$$.fragment,e),T(pe.$$.fragment,e),T(Ke.$$.fragment,e),T(et.$$.fragment,e),T(ot.$$.fragment,e),T(nt.$$.fragment,e),T(ue.$$.fragment,e),T(rt.$$.fragment,e),T(at.$$.fragment,e),T(fe.$$.fragment,e),T(_e.$$.fragment,e),T(ge.$$.fragment,e),T(dt.$$.fragment,e),T(it.$$.fragment,e),T(Te.$$.fragment,e),T(ve.$$.fragment,e),T(lt.$$.fragment,e),T(ht.$$.fragment,e),T(mt.$$.fragment,e),T(ye.$$.fragment,e),T(ke.$$.fragment,e),T(ut.$$.fragment,e),T(_t.$$.fragment,e),T(gt.$$.fragment,e),T(Tt.$$.fragment,e),Ko=!1},d(e){e&&(c(b),c(l),c(m),c(i),c($o),c(Ce),c(zo),c(qe),c(Fo),c(je),c(Co),c(Ue),c(qo),c(jo),c(L),c(Uo),c(We),c(No),c(G),c(Jo),c(Pe),c(Wo),c(F),c(Io),c(Ee),c(Po),c(q),c(Zo),c(Re),c(Lo),c($),c(Go),c(tt),c(Vo),c(V),c(Ho),c(st),c(Eo),c(H),c(Do),c(ct),c(Bo),c(J),c(Ro),c(pt),c(Oo),c(W),c(Xo),c(ft),c(Yo),c(E),c(Qo),c(Ao),c(So)),c(s),v(y,e),v(S,e),v(Ne,e),v(Je),v(ae),v(Ie),v(ce),v(Ze),v(Le),v(Ge),v(Ve),v(He),v(De),v(Be),v(Oe),v(Xe),v(Ye),v(Qe),v(le),v(Ae),v(pe),v(Ke),v(et),v(ot),v(nt),v(ue),v(rt),v(at),v(fe),v(_e),v(ge),v(dt),v(it),v(Te),v(ve),v(lt),v(ht),v(mt),v(ye),v(ke),v(ut),v(_t),v(gt),v(Tt,e)}}}const ca='{"title":"SpeechT5","local":"speecht5","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"SpeechT5Config","local":"transformers.SpeechT5Config","sections":[],"depth":2}],"depth":1}';function da(M){return Hr(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class _a extends Er{constructor(s){super(),Dr(this,s,da,aa,Vr,{})}}export{_a as component};
