import{S as Uu,i as ju,s as Ju,e as n,k as i,w as T,t as s,M as Iu,c as r,d as o,m as d,a,x as v,h as c,b as l,G as e,g as _,y as b,q as y,o as k,B as w,v as Wu,L as Xn}from"../../chunks/vendor-hf-doc-builder.js";import{T as Hn}from"../../chunks/Tip-hf-doc-builder.js";import{D as $}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Qn}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as re}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Yn}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Zu(z){let h,x,m,f,S;return f=new Qn({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`}}),{c(){h=n("p"),x=s("Example:"),m=i(),T(f.$$.fragment)},l(p){h=r(p,"P",{});var g=a(h);x=c(g,"Example:"),g.forEach(o),m=d(p),v(f.$$.fragment,p)},m(p,g){_(p,h,g),e(h,x),_(p,m,g),b(f,p,g),S=!0},p:Xn,i(p){S||(y(f.$$.fragment,p),S=!0)},o(p){k(f.$$.fragment,p),S=!1},d(p){p&&o(h),p&&o(m),w(f,p)}}}function Du(z){let h,x,m,f,S;return f=new Qn({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`}}),{c(){h=n("p"),x=s("Example:"),m=i(),T(f.$$.fragment)},l(p){h=r(p,"P",{});var g=a(h);x=c(g,"Example:"),g.forEach(o),m=d(p),v(f.$$.fragment,p)},m(p,g){_(p,h,g),e(h,x),_(p,m,g),b(f,p,g),S=!0},p:Xn,i(p){S||(y(f.$$.fragment,p),S=!0)},o(p){k(f.$$.fragment,p),S=!1},d(p){p&&o(h),p&&o(m),w(f,p)}}}function Gu(z){let h,x,m,f,S,p,g,F,D,P,J;return{c(){h=n("p"),x=s(`This class method is simply calling the feature extractor
`),m=n("a"),f=s("from_pretrained()"),S=s(`, image processor
`),p=n("a"),g=s("ImageProcessingMixin"),F=s(` and the tokenizer
`),D=n("code"),P=s("~tokenization_utils_base.PreTrainedTokenizer.from_pretrained"),J=s(` methods. Please refer to the docstrings of the
methods above for more information.`),this.h()},l(U){h=r(U,"P",{});var I=a(h);x=c(I,`This class method is simply calling the feature extractor
`),m=r(I,"A",{href:!0});var ie=a(m);f=c(ie,"from_pretrained()"),ie.forEach(o),S=c(I,`, image processor
`),p=r(I,"A",{href:!0});var Yt=a(p);g=c(Yt,"ImageProcessingMixin"),Yt.forEach(o),F=c(I,` and the tokenizer
`),D=r(I,"CODE",{});var We=a(D);P=c(We,"~tokenization_utils_base.PreTrainedTokenizer.from_pretrained"),We.forEach(o),J=c(I,` methods. Please refer to the docstrings of the
methods above for more information.`),I.forEach(o),this.h()},h(){l(m,"href","/docs/transformers/v4.32.0/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.from_pretrained"),l(p,"href","/docs/transformers/v4.32.0/en/internal/image_processing_utils#transformers.ImageProcessingMixin")},m(U,I){_(U,h,I),e(h,x),e(h,m),e(m,f),e(h,S),e(h,p),e(p,g),e(h,F),e(h,D),e(D,P),e(h,J)},d(U){U&&o(h)}}}function Vu(z){let h,x,m,f,S,p,g,F;return{c(){h=n("p"),x=s("This class method is simply calling "),m=n("a"),f=s("save_pretrained()"),S=s(` and
`),p=n("a"),g=s("save_pretrained()"),F=s(`. Please refer to the docstrings of the
methods above for more information.`),this.h()},l(D){h=r(D,"P",{});var P=a(h);x=c(P,"This class method is simply calling "),m=r(P,"A",{href:!0});var J=a(m);f=c(J,"save_pretrained()"),J.forEach(o),S=c(P,` and
`),p=r(P,"A",{href:!0});var U=a(p);g=c(U,"save_pretrained()"),U.forEach(o),F=c(P,`. Please refer to the docstrings of the
methods above for more information.`),P.forEach(o),this.h()},h(){l(m,"href","/docs/transformers/v4.32.0/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.save_pretrained"),l(p,"href","/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.save_pretrained")},m(D,P){_(D,h,P),e(h,x),e(h,m),e(m,f),e(h,S),e(h,p),e(p,g),e(h,F)},d(D){D&&o(h)}}}function Lu(z){let h,x,m,f,S;return{c(){h=n("p"),x=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),f=s("Module"),S=s(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(p){h=r(p,"P",{});var g=a(h);x=c(g,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(g,"CODE",{});var F=a(m);f=c(F,"Module"),F.forEach(o),S=c(g,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),g.forEach(o)},m(p,g){_(p,h,g),e(h,x),e(h,m),e(m,f),e(h,S)},d(p){p&&o(h)}}}function Au(z){let h,x,m,f,S;return{c(){h=n("p"),x=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),f=s("Module"),S=s(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(p){h=r(p,"P",{});var g=a(h);x=c(g,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(g,"CODE",{});var F=a(m);f=c(F,"Module"),F.forEach(o),S=c(g,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),g.forEach(o)},m(p,g){_(p,h,g),e(h,x),e(h,m),e(m,f),e(h,S)},d(p){p&&o(h)}}}function Bu(z){let h,x,m,f,S;return f=new Qn({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>`}}),{c(){h=n("p"),x=s("Example:"),m=i(),T(f.$$.fragment)},l(p){h=r(p,"P",{});var g=a(h);x=c(g,"Example:"),g.forEach(o),m=d(p),v(f.$$.fragment,p)},m(p,g){_(p,h,g),e(h,x),_(p,m,g),b(f,p,g),S=!0},p:Xn,i(p){S||(y(f.$$.fragment,p),S=!0)},o(p){k(f.$$.fragment,p),S=!1},d(p){p&&o(h),p&&o(m),w(f,p)}}}function Ou(z){let h,x;return h=new Qn({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>`}}),{c(){T(h.$$.fragment)},l(m){v(h.$$.fragment,m)},m(m,f){b(h,m,f),x=!0},p:Xn,i(m){x||(y(h.$$.fragment,m),x=!0)},o(m){k(h.$$.fragment,m),x=!1},d(m){w(h,m)}}}function Ru(z){let h,x,m,f,S;return{c(){h=n("p"),x=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),f=s("Module"),S=s(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(p){h=r(p,"P",{});var g=a(h);x=c(g,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(g,"CODE",{});var F=a(m);f=c(F,"Module"),F.forEach(o),S=c(g,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),g.forEach(o)},m(p,g){_(p,h,g),e(h,x),e(h,m),e(m,f),e(h,S)},d(p){p&&o(h)}}}function Hu(z){let h,x,m,f,S;return f=new Qn({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFNwZWVjaFQ1UHJvY2Vzc29yJTJDJTIwU3BlZWNoVDVGb3JUZXh0VG9TcGVlY2glMkMlMjBTcGVlY2hUNUhpZmlHYW4lMkMlMjBzZXRfc2VlZCUwQWltcG9ydCUyMHRvcmNoJTBBJTBBcHJvY2Vzc29yJTIwJTNEJTIwU3BlZWNoVDVQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMm1pY3Jvc29mdCUyRnNwZWVjaHQ1X3R0cyUyMiklMEFtb2RlbCUyMCUzRCUyMFNwZWVjaFQ1Rm9yVGV4dFRvU3BlZWNoLmZyb21fcHJldHJhaW5lZCglMjJtaWNyb3NvZnQlMkZzcGVlY2h0NV90dHMlMjIpJTBBdm9jb2RlciUyMCUzRCUyMFNwZWVjaFQ1SGlmaUdhbi5mcm9tX3ByZXRyYWluZWQoJTIybWljcm9zb2Z0JTJGc3BlZWNodDVfaGlmaWdhbiUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IodGV4dCUzRCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQXNwZWFrZXJfZW1iZWRkaW5ncyUyMCUzRCUyMHRvcmNoLnplcm9zKCgxJTJDJTIwNTEyKSklMjAlMjAlMjMlMjBvciUyMGxvYWQlMjB4dmVjdG9ycyUyMGZyb20lMjBhJTIwZmlsZSUwQSUwQXNldF9zZWVkKDU1NSklMjAlMjAlMjMlMjBtYWtlJTIwZGV0ZXJtaW5pc3RpYyUwQSUwQSUyMyUyMGdlbmVyYXRlJTIwc3BlZWNoJTBBc3BlZWNoJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoaW5wdXRzJTVCJTIyaW5wdXRfaWRzJTIyJTVEJTJDJTIwc3BlYWtlcl9lbWJlZGRpbmdzJTJDJTIwdm9jb2RlciUzRHZvY29kZXIpJTBBc3BlZWNoLnNoYXBl",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, vocoder=vocoder)
<span class="hljs-meta">&gt;&gt;&gt; </span>speech.shape
torch.Size([<span class="hljs-number">15872</span>])`}}),{c(){h=n("p"),x=s("Example:"),m=i(),T(f.$$.fragment)},l(p){h=r(p,"P",{});var g=a(h);x=c(g,"Example:"),g.forEach(o),m=d(p),v(f.$$.fragment,p)},m(p,g){_(p,h,g),e(h,x),_(p,m,g),b(f,p,g),S=!0},p:Xn,i(p){S||(y(f.$$.fragment,p),S=!0)},o(p){k(f.$$.fragment,p),S=!1},d(p){p&&o(h),p&&o(m),w(f,p)}}}function Yu(z){let h,x,m,f,S;return{c(){h=n("p"),x=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),f=s("Module"),S=s(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(p){h=r(p,"P",{});var g=a(h);x=c(g,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(g,"CODE",{});var F=a(m);f=c(F,"Module"),F.forEach(o),S=c(g,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),g.forEach(o)},m(p,g){_(p,h,g),e(h,x),e(h,m),e(m,f),e(h,S)},d(p){p&&o(h)}}}function Xu(z){let h,x,m,f,S;return f=new Qn({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>])`}}),{c(){h=n("p"),x=s("Example:"),m=i(),T(f.$$.fragment)},l(p){h=r(p,"P",{});var g=a(h);x=c(g,"Example:"),g.forEach(o),m=d(p),v(f.$$.fragment,p)},m(p,g){_(p,h,g),e(h,x),_(p,m,g),b(f,p,g),S=!0},p:Xn,i(p){S||(y(f.$$.fragment,p),S=!0)},o(p){k(f.$$.fragment,p),S=!1},d(p){p&&o(h),p&&o(m),w(f,p)}}}function Qu(z){let h,x,m,f,S,p,g,F,D,P,J,U,I,ie,Yt,We,Is,za,Ze,Ws,$o,Zs,Ds,Fa,Xt,Gs,Ma,Qt,Kn,Vs,Ea,de,Ls,zo,As,Bs,Fo,Os,Rs,qa,ve,De,er,Mo,Hs,or,Ys,Na,R,Eo,Xs,be,Qs,Kt,Ks,ec,qo,oc,tc,nc,ye,rc,en,ac,sc,on,cc,ic,dc,Ge,Ca,ke,Ve,tr,No,lc,nr,pc,Pa,H,Co,hc,we,mc,rr,uc,fc,Po,gc,_c,Tc,Se,vc,tn,bc,yc,nn,kc,wc,Sc,Le,Ua,xe,Ae,ar,Uo,xc,sr,$c,ja,E,jo,zc,Jo,Fc,Io,Mc,Ec,qc,Wo,Nc,rn,Cc,Pc,Uc,Be,Zo,jc,cr,Jc,Ic,an,Do,Wc,le,Go,Zc,ir,Dc,Gc,Vo,Vc,dr,Lc,Ac,Bc,Oe,Lo,Oc,lr,Rc,Ja,$e,Re,pr,Ao,Hc,hr,Yc,Ia,j,Bo,Xc,mr,Qc,Kc,ur,ei,oi,fr,ti,ni,Oo,ri,sn,ai,si,ci,pe,Ro,ii,gr,di,li,ze,pi,_r,hi,mi,Tr,ui,fi,Wa,Fe,He,vr,Ho,gi,br,_i,Za,M,Yo,Ti,yr,vi,bi,L,cn,yi,ki,dn,wi,Si,ln,xi,$i,Xo,kr,zi,Fi,Mi,pn,Ei,qi,Ni,N,Qo,Ci,wr,Pi,Ui,ae,ji,Sr,Ji,Ii,xr,Wi,Zi,Ko,$r,Di,Gi,Vi,Li,se,Ai,zr,Bi,Oi,Fr,Ri,Hi,et,Mr,Yi,Xi,Qi,Ki,Er,ed,od,q,hn,qr,td,nd,rd,mn,Nr,ad,sd,cd,un,Cr,id,dd,ld,fn,Pr,pd,hd,md,ot,Ur,ud,fd,jr,gd,_d,tt,Jr,Td,vd,Ir,bd,yd,nt,Wr,kd,wd,Zr,Sd,xd,rt,Dr,$d,zd,Gr,Fd,Md,Vr,Ed,qd,W,at,Nd,Lr,Cd,Pd,Me,Ud,gn,jd,Jd,_n,Id,Wd,Zd,Ar,Dd,Gd,Y,Tn,Br,Vd,Ld,Ad,vn,Or,Bd,Od,Rd,bn,Rr,Hd,Yd,Xd,st,Hr,Qd,Kd,Yr,el,ol,ct,Xr,tl,nl,Qr,rl,al,Kr,sl,cl,he,it,il,ea,dl,ll,Ye,pl,me,dt,hl,lt,ml,yn,ul,fl,gl,Xe,_l,Qe,pt,Tl,ht,vl,kn,bl,yl,kl,Ke,mt,wl,ut,Sl,wn,xl,$l,Da,Ee,eo,oa,ft,zl,ta,Fl,Ga,X,gt,Ml,_t,El,Sn,ql,Nl,Cl,Tt,Pl,vt,Ul,jl,Jl,ue,bt,Il,qe,Wl,xn,Zl,Dl,na,Gl,Vl,Ll,oo,Va,Ne,to,ra,yt,Al,aa,Bl,La,Q,kt,Ol,wt,Rl,$n,Hl,Yl,Xl,St,Ql,xt,Kl,ep,op,A,$t,tp,Ce,np,zn,rp,ap,sa,sp,cp,ip,no,dp,ro,lp,ao,Aa,Pe,so,ca,zt,pp,ia,hp,Ba,G,Ft,mp,Mt,up,Fn,fp,gp,_p,Et,Tp,qt,vp,bp,yp,ee,Nt,kp,Ue,wp,Mn,Sp,xp,da,$p,zp,Fp,co,Mp,io,Ep,lo,Ct,qp,la,Np,Oa,je,po,pa,Pt,Cp,ha,Pp,Ra,V,Ut,Up,jt,jp,En,Jp,Ip,Wp,Jt,Zp,It,Dp,Gp,Vp,oe,Wt,Lp,Je,Ap,qn,Bp,Op,ma,Rp,Hp,Yp,ho,Xp,mo,Qp,uo,Zt,Kp,ua,eh,Ha,Ie,fo,fa,Dt,oh,ga,th,Ya,K,Gt,nh,Vt,rh,Nn,ah,sh,ch,Lt,ih,At,dh,lh,ph,go,Bt,hh,_a,mh,Xa;return p=new re({}),ie=new re({}),Mo=new re({}),Eo=new $({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/v4.32.0/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/v4.32.0/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/v4.32.0/src/transformers/models/speecht5/configuration_speecht5.py#L37"}}),Ge=new Yn({props:{anchor:"transformers.SpeechT5Config.example",$$slots:{default:[Zu]},$$scope:{ctx:z}}}),No=new re({}),Co=new $({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/v4.32.0/src/transformers/models/speecht5/configuration_speecht5.py#L349"}}),Le=new Yn({props:{anchor:"transformers.SpeechT5HifiGanConfig.example",$$slots:{default:[Du]},$$scope:{ctx:z}}}),Uo=new re({}),jo=new $({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:"sp_model_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = 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.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.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.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.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/v4.32.0/src/transformers/models/speecht5/tokenization_speecht5.py#L47"}}),Zo=new $({props:{name:"__call__",anchor:"transformers.SpeechT5Tokenizer.__call__",parameters:[{name:"text",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]]] = None"},{name:"text_pair",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]], NoneType] = None"},{name:"text_target",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]]] = None"},{name:"text_pair_target",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]], NoneType] = None"},{name:"add_special_tokens",val:": bool = True"},{name:"padding",val:": typing.Union[bool, str, transformers.utils.generic.PaddingStrategy] = False"},{name:"truncation",val:": typing.Union[bool, str, transformers.tokenization_utils_base.TruncationStrategy] = None"},{name:"max_length",val:": typing.Optional[int] = None"},{name:"stride",val:": int = 0"},{name:"is_split_into_words",val:": bool = False"},{name:"pad_to_multiple_of",val:": typing.Optional[int] = None"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"return_token_type_ids",val:": typing.Optional[bool] = None"},{name:"return_attention_mask",val:": typing.Optional[bool] = 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 encode the sequences with the special tokens relative to their model.`,name:"add_special_tokens"},{anchor:"transformers.SpeechT5Tokenizer.__call__.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/src/transformers/tokenization_utils_base.py#L2528",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/tokenizer#transformers.BatchEncoding"
>BatchEncoding</a> with the following fields:</p>
<ul>
<li>
<p><strong>input_ids</strong> \u2014 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> \u2014 List of token type ids to be fed to a model (when <code>return_token_type_ids=True</code> or
if <em>\u201Ctoken_type_ids\u201D</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> \u2014 List of indices specifying which tokens should be attended to by the model (when
<code>return_attention_mask=True</code> or if <em>\u201Cattention_mask\u201D</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> \u2014 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> \u2014 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> \u2014 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> \u2014 The length of the inputs (when <code>return_length=True</code>)</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/tokenizer#transformers.BatchEncoding"
>BatchEncoding</a></p>
`}}),Do=new $({props:{name:"save_vocabulary",anchor:"transformers.SpeechT5Tokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/speecht5/tokenization_speecht5.py#L190"}}),Go=new $({props:{name:"decode",anchor:"transformers.SpeechT5Tokenizer.decode",parameters:[{name:"token_ids",val:": typing.Union[int, typing.List[int], ForwardRef('np.ndarray'), ForwardRef('torch.Tensor'), ForwardRef('tf.Tensor')]"},{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/v4.32.0/src/transformers/tokenization_utils_base.py#L3520",returnDescription:`
<p>The decoded sentence.</p>
`,returnType:`
<p><code>str</code></p>
`}}),Lo=new $({props:{name:"batch_decode",anchor:"transformers.SpeechT5Tokenizer.batch_decode",parameters:[{name:"sequences",val:": typing.Union[typing.List[int], typing.List[typing.List[int]], ForwardRef('np.ndarray'), ForwardRef('torch.Tensor'), ForwardRef('tf.Tensor')]"},{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/v4.32.0/src/transformers/tokenization_utils_base.py#L3486",returnDescription:`
<p>The list of decoded sentences.</p>
`,returnType:`
<p><code>List[str]</code></p>
`}}),Ao=new re({}),Bo=new $({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/v4.32.0/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/v4.32.0/src/transformers/models/speecht5/feature_extraction_speecht5.py#L31"}}),Ro=new $({props:{name:"__call__",anchor:"transformers.SpeechT5FeatureExtractor.__call__",parameters:[{name:"audio",val:": typing.Union[numpy.ndarray, typing.List[float], typing.List[numpy.ndarray], typing.List[typing.List[float]], NoneType] = None"},{name:"audio_target",val:": typing.Union[numpy.ndarray, typing.List[float], typing.List[numpy.ndarray], typing.List[typing.List[float]], NoneType] = None"},{name:"padding",val:": typing.Union[bool, str, transformers.utils.generic.PaddingStrategy] = False"},{name:"max_length",val:": typing.Optional[int] = None"},{name:"truncation",val:": bool = False"},{name:"pad_to_multiple_of",val:": typing.Optional[int] = None"},{name:"return_attention_mask",val:": typing.Optional[bool] = None"},{name:"return_tensors",val:": typing.Union[transformers.utils.generic.TensorType, str, NoneType] = None"},{name:"sampling_rate",val:": typing.Optional[int] = 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/v4.32.0/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/v4.32.0/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/v4.32.0/src/transformers/models/speecht5/feature_extraction_speecht5.py#L180"}}),Ho=new re({}),Yo=new $({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/v4.32.0/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/v4.32.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer">SpeechT5Tokenizer</a>. The tokenizer is a required input.`,name:"tokenizer"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/speecht5/processing_speecht5.py#L20"}}),Qo=new $({props:{name:"__call__",anchor:"transformers.SpeechT5Processor.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/speecht5/processing_speecht5.py#L39"}}),at=new $({props:{name:"pad",anchor:"transformers.SpeechT5Processor.pad",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/speecht5/processing_speecht5.py#L110"}}),it=new $({props:{name:"from_pretrained",anchor:"transformers.SpeechT5Processor.from_pretrained",parameters:[{name:"pretrained_model_name_or_path",val:": typing.Union[str, os.PathLike]"},{name:"cache_dir",val:": typing.Union[str, os.PathLike, NoneType] = None"},{name:"force_download",val:": bool = False"},{name:"local_files_only",val:": bool = False"},{name:"token",val:": typing.Union[bool, str, NoneType] = 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. Valid model ids can be located at the root-level, like <code>bert-base-uncased</code>, or
namespaced under a user or organization name, like <code>dbmdz/bert-base-german-cased</code>.</li>
<li>a path to a <em>directory</em> containing a feature extractor file saved using the
<a href="/docs/transformers/v4.32.0/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/v4.32.0/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/v4.32.0/src/transformers/processing_utils.py#L167"}}),Ye=new Hn({props:{$$slots:{default:[Gu]},$$scope:{ctx:z}}}),dt=new $({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/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.push_to_hub">push_to_hub()</a> method.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/processing_utils.py#L93"}}),Xe=new Hn({props:{$$slots:{default:[Vu]},$$scope:{ctx:z}}}),pt=new $({props:{name:"batch_decode",anchor:"transformers.SpeechT5Processor.batch_decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/speecht5/processing_speecht5.py#L170"}}),mt=new $({props:{name:"decode",anchor:"transformers.SpeechT5Processor.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/speecht5/processing_speecht5.py#L177"}}),ft=new re({}),gt=new $({props:{name:"class transformers.SpeechT5Model",anchor:"transformers.SpeechT5Model",parameters:[{name:"config",val:": SpeechT5Config"},{name:"encoder",val:": typing.Optional[torch.nn.modules.module.Module] = None"},{name:"decoder",val:": typing.Optional[torch.nn.modules.module.Module] = None"}],parametersDescription:[{anchor:"transformers.SpeechT5Model.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/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/v4.32.0/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/v4.32.0/src/transformers/models/speecht5/modeling_speecht5.py#L2178"}}),bt=new $({props:{name:"forward",anchor:"transformers.SpeechT5Model.forward",parameters:[{name:"input_values",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_input_values",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_outputs",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"speaker_embeddings",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.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/v4.32.0/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/v4.32.0/src/transformers/models/speecht5/modeling_speecht5.py#L2220",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/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/v4.32.0/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>) \u2014 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>) \u2014 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>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the 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>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights 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>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s 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>) \u2014 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>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the 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>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqModelOutput"
>transformers.modeling_outputs.Seq2SeqModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),oo=new Hn({props:{$$slots:{default:[Lu]},$$scope:{ctx:z}}}),yt=new re({}),kt=new $({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/v4.32.0/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/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/speecht5/modeling_speecht5.py#L2326"}}),$t=new $({props:{name:"forward",anchor:"transformers.SpeechT5ForSpeechToText.forward",parameters:[{name:"input_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_outputs",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = 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/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer">SpeechT5Tokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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/v4.32.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer">SpeechT5Tokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/speecht5/modeling_speecht5.py#L2368",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/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/v4.32.0/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) \u2014 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>) \u2014 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>) \u2014 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>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the 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>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights 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>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s 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>) \u2014 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>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the 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>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),no=new Hn({props:{$$slots:{default:[Au]},$$scope:{ctx:z}}}),ro=new Yn({props:{anchor:"transformers.SpeechT5ForSpeechToText.forward.example",$$slots:{default:[Bu]},$$scope:{ctx:z}}}),ao=new Yn({props:{anchor:"transformers.SpeechT5ForSpeechToText.forward.example-2",$$slots:{default:[Ou]},$$scope:{ctx:z}}}),zt=new re({}),Ft=new $({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/v4.32.0/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/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/speecht5/modeling_speecht5.py#L2627"}}),Nt=new $({props:{name:"forward",anchor:"transformers.SpeechT5ForTextToSpeech.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_input_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_outputs",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"speaker_embeddings",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.FloatTensor] = None"},{name:"stop_labels",val:": typing.Optional[torch.Tensor] = 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/v4.32.0/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. The <code>batch_size</code> should be 1 currently.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer">SpeechT5Tokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">encode()</a> and
<a href="/docs/transformers/v4.32.0/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/v4.32.0/en/model_doc/speecht5#transformers.SpeechT5Processor">SpeechT5Processor</a>. See <a href="/docs/transformers/v4.32.0/en/model_doc/speecht5#transformers.SpeechT5Processor.__call__">SpeechT5Processor.<strong>call</strong>()</a>
for details.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/speecht5/modeling_speecht5.py#L2656",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/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/v4.32.0/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) \u2014 Spectrogram generation loss.</p>
</li>
<li>
<p><strong>spectrogram</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, num_bins)</code>) \u2014 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>) \u2014 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>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the 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>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights 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>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s 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>) \u2014 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>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the 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>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqSpectrogramOutput"
>transformers.modeling_outputs.Seq2SeqSpectrogramOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),co=new Hn({props:{$$slots:{default:[Ru]},$$scope:{ctx:z}}}),io=new Yn({props:{anchor:"transformers.SpeechT5ForTextToSpeech.forward.example",$$slots:{default:[Hu]},$$scope:{ctx:z}}}),Ct=new $({props:{name:"generate",anchor:"transformers.SpeechT5ForTextToSpeech.generate",parameters:[{name:"input_ids",val:": LongTensor"},{name:"speaker_embeddings",val:": typing.Optional[torch.FloatTensor] = None"},{name:"threshold",val:": float = 0.5"},{name:"minlenratio",val:": float = 0.0"},{name:"maxlenratio",val:": float = 20.0"},{name:"vocoder",val:": typing.Optional[torch.nn.modules.module.Module] = None"},{name:"output_cross_attentions",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. The <code>batch_size</code> should be 1 currently.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer">SpeechT5Tokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">encode()</a> and
<a href="/docs/transformers/v4.32.0/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.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"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/speecht5/modeling_speecht5.py#L2789",returnDescription:`
<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> \u2014 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> \u2014 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> \u2014 The outputs of the decoder\u2019s cross-attention layers.</li>
</ul>
`,returnType:`
<p><code>tuple(torch.FloatTensor)</code> comprising various elements depending on the inputs</p>
`}}),Pt=new re({}),Ut=new $({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/v4.32.0/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/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/speecht5/modeling_speecht5.py#L2911"}}),Wt=new $({props:{name:"forward",anchor:"transformers.SpeechT5ForSpeechToSpeech.forward",parameters:[{name:"input_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_input_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_outputs",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"speaker_embeddings",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.FloatTensor] = None"},{name:"stop_labels",val:": typing.Optional[torch.Tensor] = 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/v4.32.0/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/v4.32.0/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/v4.32.0/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/v4.32.0/en/model_doc/speecht5#transformers.SpeechT5Processor">SpeechT5Processor</a>. See
<a href="/docs/transformers/v4.32.0/en/model_doc/speecht5#transformers.SpeechT5Processor.__call__">SpeechT5Processor.<strong>call</strong>()</a> for details.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/speecht5/modeling_speecht5.py#L2937",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/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/v4.32.0/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) \u2014 Spectrogram generation loss.</p>
</li>
<li>
<p><strong>spectrogram</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, num_bins)</code>) \u2014 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>) \u2014 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>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the 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>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights 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>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s 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>) \u2014 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>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the 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>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqSpectrogramOutput"
>transformers.modeling_outputs.Seq2SeqSpectrogramOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ho=new Hn({props:{$$slots:{default:[Yu]},$$scope:{ctx:z}}}),mo=new Yn({props:{anchor:"transformers.SpeechT5ForSpeechToSpeech.forward.example",$$slots:{default:[Xu]},$$scope:{ctx:z}}}),Zt=new $({props:{name:"generate_speech",anchor:"transformers.SpeechT5ForSpeechToSpeech.generate_speech",parameters:[{name:"input_values",val:": FloatTensor"},{name:"speaker_embeddings",val:": typing.Optional[torch.FloatTensor] = None"},{name:"threshold",val:": float = 0.5"},{name:"minlenratio",val:": float = 0.0"},{name:"maxlenratio",val:": float = 20.0"},{name:"vocoder",val:": typing.Optional[torch.nn.modules.module.Module] = None"},{name:"output_cross_attentions",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. The <code>batch_size</code> should be 1 currently.</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/v4.32.0/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/v4.32.0/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.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"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/speecht5/modeling_speecht5.py#L3057",returnDescription:`
<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> \u2014 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> \u2014 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> \u2014 The outputs of the decoder\u2019s cross-attention layers.</li>
</ul>
`,returnType:`
<p><code>tuple(torch.FloatTensor)</code> comprising various elements depending on the inputs</p>
`}}),Dt=new re({}),Gt=new $({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/v4.32.0/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/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/speecht5/modeling_speecht5.py#L3198"}}),Bt=new $({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/v4.32.0/src/transformers/models/speecht5/modeling_speecht5.py#L3263",returnDescription:`
<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:`
<p><code>torch.FloatTensor</code></p>
`}}),{c(){h=n("meta"),x=i(),m=n("h1"),f=n("a"),S=n("span"),T(p.$$.fragment),g=i(),F=n("span"),D=s("SpeechT5"),P=i(),J=n("h2"),U=n("a"),I=n("span"),T(ie.$$.fragment),Yt=i(),We=n("span"),Is=s("Overview"),za=i(),Ze=n("p"),Ws=s("The SpeechT5 model was proposed in "),$o=n("a"),Zs=s("SpeechT5: Unified-Modal Encoder-Decoder Pre-Training for Spoken Language Processing"),Ds=s(" 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."),Fa=i(),Xt=n("p"),Gs=s("The abstract from the paper is the following:"),Ma=i(),Qt=n("p"),Kn=n("em"),Vs=s("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."),Ea=i(),de=n("p"),Ls=s("This model was contributed by "),zo=n("a"),As=s("Matthijs"),Bs=s(". The original code can be found "),Fo=n("a"),Os=s("here"),Rs=s("."),qa=i(),ve=n("h2"),De=n("a"),er=n("span"),T(Mo.$$.fragment),Hs=i(),or=n("span"),Ys=s("SpeechT5Config"),Na=i(),R=n("div"),T(Eo.$$.fragment),Xs=i(),be=n("p"),Qs=s("This is the configuration class to store the configuration of a "),Kt=n("a"),Ks=s("SpeechT5Model"),ec=s(`. 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
`),qo=n("a"),oc=s("microsoft/speecht5_asr"),tc=s(" architecture."),nc=i(),ye=n("p"),rc=s("Configuration objects inherit from "),en=n("a"),ac=s("PretrainedConfig"),sc=s(` and can be used to control the model outputs. Read the
documentation from `),on=n("a"),cc=s("PretrainedConfig"),ic=s(" for more information."),dc=i(),T(Ge.$$.fragment),Ca=i(),ke=n("h2"),Ve=n("a"),tr=n("span"),T(No.$$.fragment),lc=i(),nr=n("span"),pc=s("SpeechT5HifiGanConfig"),Pa=i(),H=n("div"),T(Co.$$.fragment),hc=i(),we=n("p"),mc=s("This is the configuration class to store the configuration of a "),rr=n("code"),uc=s("SpeechT5HifiGanModel"),fc=s(`. 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
`),Po=n("a"),gc=s("microsoft/speecht5_hifigan"),_c=s(" architecture."),Tc=i(),Se=n("p"),vc=s("Configuration objects inherit from "),tn=n("a"),bc=s("PretrainedConfig"),yc=s(` and can be used to control the model outputs. Read the
documentation from `),nn=n("a"),kc=s("PretrainedConfig"),wc=s(" for more information."),Sc=i(),T(Le.$$.fragment),Ua=i(),xe=n("h2"),Ae=n("a"),ar=n("span"),T(Uo.$$.fragment),xc=i(),sr=n("span"),$c=s("SpeechT5Tokenizer"),ja=i(),E=n("div"),T(jo.$$.fragment),zc=i(),Jo=n("p"),Fc=s("Construct a SpeechT5 tokenizer. Based on "),Io=n("a"),Mc=s("SentencePiece"),Ec=s("."),qc=i(),Wo=n("p"),Nc=s("This tokenizer inherits from "),rn=n("a"),Cc=s("PreTrainedTokenizer"),Pc=s(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Uc=i(),Be=n("div"),T(Zo.$$.fragment),jc=i(),cr=n("p"),Jc=s(`Main method to tokenize and prepare for the model one or several sequence(s) or one or several pair(s) of
sequences.`),Ic=i(),an=n("div"),T(Do.$$.fragment),Wc=i(),le=n("div"),T(Go.$$.fragment),Zc=i(),ir=n("p"),Dc=s(`Converts a sequence of ids in a string, using the tokenizer and vocabulary with options to remove special
tokens and clean up tokenization spaces.`),Gc=i(),Vo=n("p"),Vc=s("Similar to doing "),dr=n("code"),Lc=s("self.convert_tokens_to_string(self.convert_ids_to_tokens(token_ids))"),Ac=s("."),Bc=i(),Oe=n("div"),T(Lo.$$.fragment),Oc=i(),lr=n("p"),Rc=s("Convert a list of lists of token ids into a list of strings by calling decode."),Ja=i(),$e=n("h2"),Re=n("a"),pr=n("span"),T(Ao.$$.fragment),Hc=i(),hr=n("span"),Yc=s("SpeechT5FeatureExtractor"),Ia=i(),j=n("div"),T(Bo.$$.fragment),Xc=i(),mr=n("p"),Qc=s("Constructs a SpeechT5 feature extractor."),Kc=i(),ur=n("p"),ei=s(`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.`),oi=i(),fr=n("p"),ti=s(`This class can also extract log-mel filter bank features from raw speech, for use by the SpeechT5 speech decoder
prenet.`),ni=i(),Oo=n("p"),ri=s("This feature extractor inherits from "),sn=n("a"),ai=s("SequenceFeatureExtractor"),si=s(` which contains
most of the main methods. Users should refer to this superclass for more information regarding those methods.`),ci=i(),pe=n("div"),T(Ro.$$.fragment),ii=i(),gr=n("p"),di=s("Main method to featurize and prepare for the model one or several sequence(s)."),li=i(),ze=n("p"),pi=s("Pass in a value for "),_r=n("code"),hi=s("audio"),mi=s(" to extract waveform features. Pass in a value for "),Tr=n("code"),ui=s("audio_target"),fi=s(` to extract log-mel
spectrogram features.`),Wa=i(),Fe=n("h2"),He=n("a"),vr=n("span"),T(Ho.$$.fragment),gi=i(),br=n("span"),_i=s("SpeechT5Processor"),Za=i(),M=n("div"),T(Yo.$$.fragment),Ti=i(),yr=n("p"),vi=s("Constructs a SpeechT5 processor which wraps a feature extractor and a tokenizer into a single processor."),bi=i(),L=n("p"),cn=n("a"),yi=s("SpeechT5Processor"),ki=s(" offers all the functionalities of "),dn=n("a"),wi=s("SpeechT5FeatureExtractor"),Si=s(" and "),ln=n("a"),xi=s("SpeechT5Tokenizer"),$i=s(`. See
the docstring of `),Xo=n("a"),kr=n("strong"),zi=s("call"),Fi=s("()"),Mi=s(" and "),pn=n("a"),Ei=s("decode()"),qi=s(" for more information."),Ni=i(),N=n("div"),T(Qo.$$.fragment),Ci=i(),wr=n("p"),Pi=s("Processes audio and text input, as well as audio and text targets."),Ui=i(),ae=n("p"),ji=s("You can process audio by using the argument "),Sr=n("code"),Ji=s("audio"),Ii=s(`, or process audio targets by using the argument
`),xr=n("code"),Wi=s("audio_target"),Zi=s(`. This forwards the arguments to SpeechT5FeatureExtractor\u2019s
`),Ko=n("a"),$r=n("strong"),Di=s("call"),Gi=s("()"),Vi=s("."),Li=i(),se=n("p"),Ai=s("You can process text by using the argument "),zr=n("code"),Bi=s("text"),Oi=s(", or process text labels by using the argument "),Fr=n("code"),Ri=s("text_target"),Hi=s(`.
This forwards the arguments to SpeechT5Tokenizer\u2019s `),et=n("a"),Mr=n("strong"),Yi=s("call"),Xi=s("()"),Qi=s("."),Ki=i(),Er=n("p"),ed=s("Valid input combinations are:"),od=i(),q=n("ul"),hn=n("li"),qr=n("code"),td=s("text"),nd=s(" only"),rd=i(),mn=n("li"),Nr=n("code"),ad=s("audio"),sd=s(" only"),cd=i(),un=n("li"),Cr=n("code"),id=s("text_target"),dd=s(" only"),ld=i(),fn=n("li"),Pr=n("code"),pd=s("audio_target"),hd=s(" only"),md=i(),ot=n("li"),Ur=n("code"),ud=s("text"),fd=s(" and "),jr=n("code"),gd=s("audio_target"),_d=i(),tt=n("li"),Jr=n("code"),Td=s("audio"),vd=s(" and "),Ir=n("code"),bd=s("audio_target"),yd=i(),nt=n("li"),Wr=n("code"),kd=s("text"),wd=s(" and "),Zr=n("code"),Sd=s("text_target"),xd=i(),rt=n("li"),Dr=n("code"),$d=s("audio"),zd=s(" and "),Gr=n("code"),Fd=s("text_target"),Md=i(),Vr=n("p"),Ed=s("Please refer to the docstring of the above two methods for more information."),qd=i(),W=n("div"),T(at.$$.fragment),Nd=i(),Lr=n("p"),Cd=s("Collates the audio and text inputs, as well as their targets, into a padded batch."),Pd=i(),Me=n("p"),Ud=s("Audio inputs are padded by SpeechT5FeatureExtractor\u2019s "),gn=n("a"),jd=s("pad()"),Jd=s(`. Text inputs are padded
by SpeechT5Tokenizer\u2019s `),_n=n("a"),Id=s("pad()"),Wd=s("."),Zd=i(),Ar=n("p"),Dd=s("Valid input combinations are:"),Gd=i(),Y=n("ul"),Tn=n("li"),Br=n("code"),Vd=s("input_ids"),Ld=s(" only"),Ad=i(),vn=n("li"),Or=n("code"),Bd=s("input_values"),Od=s(" only"),Rd=i(),bn=n("li"),Rr=n("code"),Hd=s("labels"),Yd=s(" only, either log-mel spectrograms or text tokens"),Xd=i(),st=n("li"),Hr=n("code"),Qd=s("input_ids"),Kd=s(" and log-mel spectrogram "),Yr=n("code"),el=s("labels"),ol=i(),ct=n("li"),Xr=n("code"),tl=s("input_values"),nl=s(" and text "),Qr=n("code"),rl=s("labels"),al=i(),Kr=n("p"),sl=s("Please refer to the docstring of the above two methods for more information."),cl=i(),he=n("div"),T(it.$$.fragment),il=i(),ea=n("p"),dl=s("Instantiate a processor associated with a pretrained model."),ll=i(),T(Ye.$$.fragment),pl=i(),me=n("div"),T(dt.$$.fragment),hl=i(),lt=n("p"),ml=s(`Saves the attributes of this processor (feature extractor, tokenizer\u2026) in the specified directory so that it
can be reloaded using the `),yn=n("a"),ul=s("from_pretrained()"),fl=s(" method."),gl=i(),T(Xe.$$.fragment),_l=i(),Qe=n("div"),T(pt.$$.fragment),Tl=i(),ht=n("p"),vl=s("This method forwards all its arguments to SpeechT5Tokenizer\u2019s "),kn=n("a"),bl=s("batch_decode()"),yl=s(`. Please refer
to the docstring of this method for more information.`),kl=i(),Ke=n("div"),T(mt.$$.fragment),wl=i(),ut=n("p"),Sl=s("This method forwards all its arguments to SpeechT5Tokenizer\u2019s "),wn=n("a"),xl=s("decode()"),$l=s(`. Please refer to
the docstring of this method for more information.`),Da=i(),Ee=n("h2"),eo=n("a"),oa=n("span"),T(ft.$$.fragment),zl=i(),ta=n("span"),Fl=s("SpeechT5Model"),Ga=i(),X=n("div"),T(gt.$$.fragment),Ml=i(),_t=n("p"),El=s(`The bare SpeechT5 Encoder-Decoder Model outputting raw hidden-states without any specific pre- or post-nets.
This model inherits from `),Sn=n("a"),ql=s("PreTrainedModel"),Nl=s(`. 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.)`),Cl=i(),Tt=n("p"),Pl=s("This model is also a PyTorch "),vt=n("a"),Ul=s("torch.nn.Module"),jl=s(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Jl=i(),ue=n("div"),T(bt.$$.fragment),Il=i(),qe=n("p"),Wl=s("The "),xn=n("a"),Zl=s("SpeechT5Model"),Dl=s(" forward method, overrides the "),na=n("code"),Gl=s("__call__"),Vl=s(" special method."),Ll=i(),T(oo.$$.fragment),Va=i(),Ne=n("h2"),to=n("a"),ra=n("span"),T(yt.$$.fragment),Al=i(),aa=n("span"),Bl=s("SpeechT5ForSpeechToText"),La=i(),Q=n("div"),T(kt.$$.fragment),Ol=i(),wt=n("p"),Rl=s(`SpeechT5 Model with a speech encoder and a text decoder.
This model inherits from `),$n=n("a"),Hl=s("PreTrainedModel"),Yl=s(`. 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.)`),Xl=i(),St=n("p"),Ql=s("This model is also a PyTorch "),xt=n("a"),Kl=s("torch.nn.Module"),ep=s(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),op=i(),A=n("div"),T($t.$$.fragment),tp=i(),Ce=n("p"),np=s("The "),zn=n("a"),rp=s("SpeechT5ForSpeechToText"),ap=s(" forward method, overrides the "),sa=n("code"),sp=s("__call__"),cp=s(" special method."),ip=i(),T(no.$$.fragment),dp=i(),T(ro.$$.fragment),lp=i(),T(ao.$$.fragment),Aa=i(),Pe=n("h2"),so=n("a"),ca=n("span"),T(zt.$$.fragment),pp=i(),ia=n("span"),hp=s("SpeechT5ForTextToSpeech"),Ba=i(),G=n("div"),T(Ft.$$.fragment),mp=i(),Mt=n("p"),up=s(`SpeechT5 Model with a text encoder and a speech decoder.
This model inherits from `),Fn=n("a"),fp=s("PreTrainedModel"),gp=s(`. 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.)`),_p=i(),Et=n("p"),Tp=s("This model is also a PyTorch "),qt=n("a"),vp=s("torch.nn.Module"),bp=s(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),yp=i(),ee=n("div"),T(Nt.$$.fragment),kp=i(),Ue=n("p"),wp=s("The "),Mn=n("a"),Sp=s("SpeechT5ForTextToSpeech"),xp=s(" forward method, overrides the "),da=n("code"),$p=s("__call__"),zp=s(" special method."),Fp=i(),T(co.$$.fragment),Mp=i(),T(io.$$.fragment),Ep=i(),lo=n("div"),T(Ct.$$.fragment),qp=i(),la=n("p"),Np=s(`Converts a sequence of input tokens into a sequence of mel spectrograms, which are subsequently turned into a
speech waveform using a vocoder.`),Oa=i(),je=n("h2"),po=n("a"),pa=n("span"),T(Pt.$$.fragment),Cp=i(),ha=n("span"),Pp=s("SpeechT5ForSpeechToSpeech"),Ra=i(),V=n("div"),T(Ut.$$.fragment),Up=i(),jt=n("p"),jp=s(`SpeechT5 Model with a speech encoder and a speech decoder.
This model inherits from `),En=n("a"),Jp=s("PreTrainedModel"),Ip=s(`. 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.)`),Wp=i(),Jt=n("p"),Zp=s("This model is also a PyTorch "),It=n("a"),Dp=s("torch.nn.Module"),Gp=s(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Vp=i(),oe=n("div"),T(Wt.$$.fragment),Lp=i(),Je=n("p"),Ap=s("The "),qn=n("a"),Bp=s("SpeechT5ForSpeechToSpeech"),Op=s(" forward method, overrides the "),ma=n("code"),Rp=s("__call__"),Hp=s(" special method."),Yp=i(),T(ho.$$.fragment),Xp=i(),T(mo.$$.fragment),Qp=i(),uo=n("div"),T(Zt.$$.fragment),Kp=i(),ua=n("p"),eh=s(`Converts a raw speech waveform into a sequence of mel spectrograms, which are subsequently turned back into a
speech waveform using a vocoder.`),Ha=i(),Ie=n("h2"),fo=n("a"),fa=n("span"),T(Dt.$$.fragment),oh=i(),ga=n("span"),th=s("SpeechT5HifiGan"),Ya=i(),K=n("div"),T(Gt.$$.fragment),nh=i(),Vt=n("p"),rh=s(`HiFi-GAN vocoder.
This model inherits from `),Nn=n("a"),ah=s("PreTrainedModel"),sh=s(`. 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.)`),ch=i(),Lt=n("p"),ih=s("This model is also a PyTorch "),At=n("a"),dh=s("torch.nn.Module"),lh=s(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ph=i(),go=n("div"),T(Bt.$$.fragment),hh=i(),_a=n("p"),mh=s(`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.`),this.h()},l(t){const u=Iu('[data-svelte="svelte-1phssyn"]',document.head);h=r(u,"META",{name:!0,content:!0}),u.forEach(o),x=d(t),m=r(t,"H1",{class:!0});var Ot=a(m);f=r(Ot,"A",{id:!0,class:!0,href:!0});var Ta=a(f);S=r(Ta,"SPAN",{});var va=a(S);v(p.$$.fragment,va),va.forEach(o),Ta.forEach(o),g=d(Ot),F=r(Ot,"SPAN",{});var ba=a(F);D=c(ba,"SpeechT5"),ba.forEach(o),Ot.forEach(o),P=d(t),J=r(t,"H2",{class:!0});var Rt=a(J);U=r(Rt,"A",{id:!0,class:!0,href:!0});var ya=a(U);I=r(ya,"SPAN",{});var ka=a(I);v(ie.$$.fragment,ka),ka.forEach(o),ya.forEach(o),Yt=d(Rt),We=r(Rt,"SPAN",{});var wa=a(We);Is=c(wa,"Overview"),wa.forEach(o),Rt.forEach(o),za=d(t),Ze=r(t,"P",{});var Ht=a(Ze);Ws=c(Ht,"The SpeechT5 model was proposed in "),$o=r(Ht,"A",{href:!0,rel:!0});var Sa=a($o);Zs=c(Sa,"SpeechT5: Unified-Modal Encoder-Decoder Pre-Training for Spoken Language Processing"),Sa.forEach(o),Ds=c(Ht," 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."),Ht.forEach(o),Fa=d(t),Xt=r(t,"P",{});var xa=a(Xt);Gs=c(xa,"The abstract from the paper is the following:"),xa.forEach(o),Ma=d(t),Qt=r(t,"P",{});var $a=a(Qt);Kn=r($a,"EM",{});var Sh=a(Kn);Vs=c(Sh,"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."),Sh.forEach(o),$a.forEach(o),Ea=d(t),de=r(t,"P",{});var Cn=a(de);Ls=c(Cn,"This model was contributed by "),zo=r(Cn,"A",{href:!0,rel:!0});var xh=a(zo);As=c(xh,"Matthijs"),xh.forEach(o),Bs=c(Cn,". The original code can be found "),Fo=r(Cn,"A",{href:!0,rel:!0});var $h=a(Fo);Os=c($h,"here"),$h.forEach(o),Rs=c(Cn,"."),Cn.forEach(o),qa=d(t),ve=r(t,"H2",{class:!0});var Qa=a(ve);De=r(Qa,"A",{id:!0,class:!0,href:!0});var zh=a(De);er=r(zh,"SPAN",{});var Fh=a(er);v(Mo.$$.fragment,Fh),Fh.forEach(o),zh.forEach(o),Hs=d(Qa),or=r(Qa,"SPAN",{});var Mh=a(or);Ys=c(Mh,"SpeechT5Config"),Mh.forEach(o),Qa.forEach(o),Na=d(t),R=r(t,"DIV",{class:!0});var _o=a(R);v(Eo.$$.fragment,_o),Xs=d(_o),be=r(_o,"P",{});var Pn=a(be);Qs=c(Pn,"This is the configuration class to store the configuration of a "),Kt=r(Pn,"A",{href:!0});var Eh=a(Kt);Ks=c(Eh,"SpeechT5Model"),Eh.forEach(o),ec=c(Pn,`. 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
`),qo=r(Pn,"A",{href:!0,rel:!0});var qh=a(qo);oc=c(qh,"microsoft/speecht5_asr"),qh.forEach(o),tc=c(Pn," architecture."),Pn.forEach(o),nc=d(_o),ye=r(_o,"P",{});var Un=a(ye);rc=c(Un,"Configuration objects inherit from "),en=r(Un,"A",{href:!0});var Nh=a(en);ac=c(Nh,"PretrainedConfig"),Nh.forEach(o),sc=c(Un,` and can be used to control the model outputs. Read the
documentation from `),on=r(Un,"A",{href:!0});var Ch=a(on);cc=c(Ch,"PretrainedConfig"),Ch.forEach(o),ic=c(Un," for more information."),Un.forEach(o),dc=d(_o),v(Ge.$$.fragment,_o),_o.forEach(o),Ca=d(t),ke=r(t,"H2",{class:!0});var Ka=a(ke);Ve=r(Ka,"A",{id:!0,class:!0,href:!0});var Ph=a(Ve);tr=r(Ph,"SPAN",{});var Uh=a(tr);v(No.$$.fragment,Uh),Uh.forEach(o),Ph.forEach(o),lc=d(Ka),nr=r(Ka,"SPAN",{});var jh=a(nr);pc=c(jh,"SpeechT5HifiGanConfig"),jh.forEach(o),Ka.forEach(o),Pa=d(t),H=r(t,"DIV",{class:!0});var To=a(H);v(Co.$$.fragment,To),hc=d(To),we=r(To,"P",{});var jn=a(we);mc=c(jn,"This is the configuration class to store the configuration of a "),rr=r(jn,"CODE",{});var Jh=a(rr);uc=c(Jh,"SpeechT5HifiGanModel"),Jh.forEach(o),fc=c(jn,`. 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
`),Po=r(jn,"A",{href:!0,rel:!0});var Ih=a(Po);gc=c(Ih,"microsoft/speecht5_hifigan"),Ih.forEach(o),_c=c(jn," architecture."),jn.forEach(o),Tc=d(To),Se=r(To,"P",{});var Jn=a(Se);vc=c(Jn,"Configuration objects inherit from "),tn=r(Jn,"A",{href:!0});var Wh=a(tn);bc=c(Wh,"PretrainedConfig"),Wh.forEach(o),yc=c(Jn,` and can be used to control the model outputs. Read the
documentation from `),nn=r(Jn,"A",{href:!0});var Zh=a(nn);kc=c(Zh,"PretrainedConfig"),Zh.forEach(o),wc=c(Jn," for more information."),Jn.forEach(o),Sc=d(To),v(Le.$$.fragment,To),To.forEach(o),Ua=d(t),xe=r(t,"H2",{class:!0});var es=a(xe);Ae=r(es,"A",{id:!0,class:!0,href:!0});var Dh=a(Ae);ar=r(Dh,"SPAN",{});var Gh=a(ar);v(Uo.$$.fragment,Gh),Gh.forEach(o),Dh.forEach(o),xc=d(es),sr=r(es,"SPAN",{});var Vh=a(sr);$c=c(Vh,"SpeechT5Tokenizer"),Vh.forEach(o),es.forEach(o),ja=d(t),E=r(t,"DIV",{class:!0});var B=a(E);v(jo.$$.fragment,B),zc=d(B),Jo=r(B,"P",{});var os=a(Jo);Fc=c(os,"Construct a SpeechT5 tokenizer. Based on "),Io=r(os,"A",{href:!0,rel:!0});var Lh=a(Io);Mc=c(Lh,"SentencePiece"),Lh.forEach(o),Ec=c(os,"."),os.forEach(o),qc=d(B),Wo=r(B,"P",{});var ts=a(Wo);Nc=c(ts,"This tokenizer inherits from "),rn=r(ts,"A",{href:!0});var Ah=a(rn);Cc=c(Ah,"PreTrainedTokenizer"),Ah.forEach(o),Pc=c(ts,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),ts.forEach(o),Uc=d(B),Be=r(B,"DIV",{class:!0});var ns=a(Be);v(Zo.$$.fragment,ns),jc=d(ns),cr=r(ns,"P",{});var Bh=a(cr);Jc=c(Bh,`Main method to tokenize and prepare for the model one or several sequence(s) or one or several pair(s) of
sequences.`),Bh.forEach(o),ns.forEach(o),Ic=d(B),an=r(B,"DIV",{class:!0});var Oh=a(an);v(Do.$$.fragment,Oh),Oh.forEach(o),Wc=d(B),le=r(B,"DIV",{class:!0});var In=a(le);v(Go.$$.fragment,In),Zc=d(In),ir=r(In,"P",{});var Rh=a(ir);Dc=c(Rh,`Converts a sequence of ids in a string, using the tokenizer and vocabulary with options to remove special
tokens and clean up tokenization spaces.`),Rh.forEach(o),Gc=d(In),Vo=r(In,"P",{});var rs=a(Vo);Vc=c(rs,"Similar to doing "),dr=r(rs,"CODE",{});var Hh=a(dr);Lc=c(Hh,"self.convert_tokens_to_string(self.convert_ids_to_tokens(token_ids))"),Hh.forEach(o),Ac=c(rs,"."),rs.forEach(o),In.forEach(o),Bc=d(B),Oe=r(B,"DIV",{class:!0});var as=a(Oe);v(Lo.$$.fragment,as),Oc=d(as),lr=r(as,"P",{});var Yh=a(lr);Rc=c(Yh,"Convert a list of lists of token ids into a list of strings by calling decode."),Yh.forEach(o),as.forEach(o),B.forEach(o),Ja=d(t),$e=r(t,"H2",{class:!0});var ss=a($e);Re=r(ss,"A",{id:!0,class:!0,href:!0});var Xh=a(Re);pr=r(Xh,"SPAN",{});var Qh=a(pr);v(Ao.$$.fragment,Qh),Qh.forEach(o),Xh.forEach(o),Hc=d(ss),hr=r(ss,"SPAN",{});var Kh=a(hr);Yc=c(Kh,"SpeechT5FeatureExtractor"),Kh.forEach(o),ss.forEach(o),Ia=d(t),j=r(t,"DIV",{class:!0});var te=a(j);v(Bo.$$.fragment,te),Xc=d(te),mr=r(te,"P",{});var em=a(mr);Qc=c(em,"Constructs a SpeechT5 feature extractor."),em.forEach(o),Kc=d(te),ur=r(te,"P",{});var om=a(ur);ei=c(om,`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.`),om.forEach(o),oi=d(te),fr=r(te,"P",{});var tm=a(fr);ti=c(tm,`This class can also extract log-mel filter bank features from raw speech, for use by the SpeechT5 speech decoder
prenet.`),tm.forEach(o),ni=d(te),Oo=r(te,"P",{});var cs=a(Oo);ri=c(cs,"This feature extractor inherits from "),sn=r(cs,"A",{href:!0});var nm=a(sn);ai=c(nm,"SequenceFeatureExtractor"),nm.forEach(o),si=c(cs,` which contains
most of the main methods. Users should refer to this superclass for more information regarding those methods.`),cs.forEach(o),ci=d(te),pe=r(te,"DIV",{class:!0});var Wn=a(pe);v(Ro.$$.fragment,Wn),ii=d(Wn),gr=r(Wn,"P",{});var rm=a(gr);di=c(rm,"Main method to featurize and prepare for the model one or several sequence(s)."),rm.forEach(o),li=d(Wn),ze=r(Wn,"P",{});var Zn=a(ze);pi=c(Zn,"Pass in a value for "),_r=r(Zn,"CODE",{});var am=a(_r);hi=c(am,"audio"),am.forEach(o),mi=c(Zn," to extract waveform features. Pass in a value for "),Tr=r(Zn,"CODE",{});var sm=a(Tr);ui=c(sm,"audio_target"),sm.forEach(o),fi=c(Zn,` to extract log-mel
spectrogram features.`),Zn.forEach(o),Wn.forEach(o),te.forEach(o),Wa=d(t),Fe=r(t,"H2",{class:!0});var is=a(Fe);He=r(is,"A",{id:!0,class:!0,href:!0});var cm=a(He);vr=r(cm,"SPAN",{});var im=a(vr);v(Ho.$$.fragment,im),im.forEach(o),cm.forEach(o),gi=d(is),br=r(is,"SPAN",{});var dm=a(br);_i=c(dm,"SpeechT5Processor"),dm.forEach(o),is.forEach(o),Za=d(t),M=r(t,"DIV",{class:!0});var C=a(M);v(Yo.$$.fragment,C),Ti=d(C),yr=r(C,"P",{});var lm=a(yr);vi=c(lm,"Constructs a SpeechT5 processor which wraps a feature extractor and a tokenizer into a single processor."),lm.forEach(o),bi=d(C),L=r(C,"P",{});var ce=a(L);cn=r(ce,"A",{href:!0});var pm=a(cn);yi=c(pm,"SpeechT5Processor"),pm.forEach(o),ki=c(ce," offers all the functionalities of "),dn=r(ce,"A",{href:!0});var hm=a(dn);wi=c(hm,"SpeechT5FeatureExtractor"),hm.forEach(o),Si=c(ce," and "),ln=r(ce,"A",{href:!0});var mm=a(ln);xi=c(mm,"SpeechT5Tokenizer"),mm.forEach(o),$i=c(ce,`. See
the docstring of `),Xo=r(ce,"A",{href:!0});var uh=a(Xo);kr=r(uh,"STRONG",{});var um=a(kr);zi=c(um,"call"),um.forEach(o),Fi=c(uh,"()"),uh.forEach(o),Mi=c(ce," and "),pn=r(ce,"A",{href:!0});var fm=a(pn);Ei=c(fm,"decode()"),fm.forEach(o),qi=c(ce," for more information."),ce.forEach(o),Ni=d(C),N=r(C,"DIV",{class:!0});var O=a(N);v(Qo.$$.fragment,O),Ci=d(O),wr=r(O,"P",{});var gm=a(wr);Pi=c(gm,"Processes audio and text input, as well as audio and text targets."),gm.forEach(o),Ui=d(O),ae=r(O,"P",{});var vo=a(ae);ji=c(vo,"You can process audio by using the argument "),Sr=r(vo,"CODE",{});var _m=a(Sr);Ji=c(_m,"audio"),_m.forEach(o),Ii=c(vo,`, or process audio targets by using the argument
`),xr=r(vo,"CODE",{});var Tm=a(xr);Wi=c(Tm,"audio_target"),Tm.forEach(o),Zi=c(vo,`. This forwards the arguments to SpeechT5FeatureExtractor\u2019s
`),Ko=r(vo,"A",{href:!0});var fh=a(Ko);$r=r(fh,"STRONG",{});var vm=a($r);Di=c(vm,"call"),vm.forEach(o),Gi=c(fh,"()"),fh.forEach(o),Vi=c(vo,"."),vo.forEach(o),Li=d(O),se=r(O,"P",{});var bo=a(se);Ai=c(bo,"You can process text by using the argument "),zr=r(bo,"CODE",{});var bm=a(zr);Bi=c(bm,"text"),bm.forEach(o),Oi=c(bo,", or process text labels by using the argument "),Fr=r(bo,"CODE",{});var ym=a(Fr);Ri=c(ym,"text_target"),ym.forEach(o),Hi=c(bo,`.
This forwards the arguments to SpeechT5Tokenizer\u2019s `),et=r(bo,"A",{href:!0});var gh=a(et);Mr=r(gh,"STRONG",{});var km=a(Mr);Yi=c(km,"call"),km.forEach(o),Xi=c(gh,"()"),gh.forEach(o),Qi=c(bo,"."),bo.forEach(o),Ki=d(O),Er=r(O,"P",{});var wm=a(Er);ed=c(wm,"Valid input combinations are:"),wm.forEach(o),od=d(O),q=r(O,"UL",{});var Z=a(q);hn=r(Z,"LI",{});var _h=a(hn);qr=r(_h,"CODE",{});var Sm=a(qr);td=c(Sm,"text"),Sm.forEach(o),nd=c(_h," only"),_h.forEach(o),rd=d(Z),mn=r(Z,"LI",{});var Th=a(mn);Nr=r(Th,"CODE",{});var xm=a(Nr);ad=c(xm,"audio"),xm.forEach(o),sd=c(Th," only"),Th.forEach(o),cd=d(Z),un=r(Z,"LI",{});var vh=a(un);Cr=r(vh,"CODE",{});var $m=a(Cr);id=c($m,"text_target"),$m.forEach(o),dd=c(vh," only"),vh.forEach(o),ld=d(Z),fn=r(Z,"LI",{});var bh=a(fn);Pr=r(bh,"CODE",{});var zm=a(Pr);pd=c(zm,"audio_target"),zm.forEach(o),hd=c(bh," only"),bh.forEach(o),md=d(Z),ot=r(Z,"LI",{});var ds=a(ot);Ur=r(ds,"CODE",{});var Fm=a(Ur);ud=c(Fm,"text"),Fm.forEach(o),fd=c(ds," and "),jr=r(ds,"CODE",{});var Mm=a(jr);gd=c(Mm,"audio_target"),Mm.forEach(o),ds.forEach(o),_d=d(Z),tt=r(Z,"LI",{});var ls=a(tt);Jr=r(ls,"CODE",{});var Em=a(Jr);Td=c(Em,"audio"),Em.forEach(o),vd=c(ls," and "),Ir=r(ls,"CODE",{});var qm=a(Ir);bd=c(qm,"audio_target"),qm.forEach(o),ls.forEach(o),yd=d(Z),nt=r(Z,"LI",{});var ps=a(nt);Wr=r(ps,"CODE",{});var Nm=a(Wr);kd=c(Nm,"text"),Nm.forEach(o),wd=c(ps," and "),Zr=r(ps,"CODE",{});var Cm=a(Zr);Sd=c(Cm,"text_target"),Cm.forEach(o),ps.forEach(o),xd=d(Z),rt=r(Z,"LI",{});var hs=a(rt);Dr=r(hs,"CODE",{});var Pm=a(Dr);$d=c(Pm,"audio"),Pm.forEach(o),zd=c(hs," and "),Gr=r(hs,"CODE",{});var Um=a(Gr);Fd=c(Um,"text_target"),Um.forEach(o),hs.forEach(o),Z.forEach(o),Md=d(O),Vr=r(O,"P",{});var jm=a(Vr);Ed=c(jm,"Please refer to the docstring of the above two methods for more information."),jm.forEach(o),O.forEach(o),qd=d(C),W=r(C,"DIV",{class:!0});var ne=a(W);v(at.$$.fragment,ne),Nd=d(ne),Lr=r(ne,"P",{});var Jm=a(Lr);Cd=c(Jm,"Collates the audio and text inputs, as well as their targets, into a padded batch."),Jm.forEach(o),Pd=d(ne),Me=r(ne,"P",{});var Dn=a(Me);Ud=c(Dn,"Audio inputs are padded by SpeechT5FeatureExtractor\u2019s "),gn=r(Dn,"A",{href:!0});var Im=a(gn);jd=c(Im,"pad()"),Im.forEach(o),Jd=c(Dn,`. Text inputs are padded
by SpeechT5Tokenizer\u2019s `),_n=r(Dn,"A",{href:!0});var Wm=a(_n);Id=c(Wm,"pad()"),Wm.forEach(o),Wd=c(Dn,"."),Dn.forEach(o),Zd=d(ne),Ar=r(ne,"P",{});var Zm=a(Ar);Dd=c(Zm,"Valid input combinations are:"),Zm.forEach(o),Gd=d(ne),Y=r(ne,"UL",{});var fe=a(Y);Tn=r(fe,"LI",{});var yh=a(Tn);Br=r(yh,"CODE",{});var Dm=a(Br);Vd=c(Dm,"input_ids"),Dm.forEach(o),Ld=c(yh," only"),yh.forEach(o),Ad=d(fe),vn=r(fe,"LI",{});var kh=a(vn);Or=r(kh,"CODE",{});var Gm=a(Or);Bd=c(Gm,"input_values"),Gm.forEach(o),Od=c(kh," only"),kh.forEach(o),Rd=d(fe),bn=r(fe,"LI",{});var wh=a(bn);Rr=r(wh,"CODE",{});var Vm=a(Rr);Hd=c(Vm,"labels"),Vm.forEach(o),Yd=c(wh," only, either log-mel spectrograms or text tokens"),wh.forEach(o),Xd=d(fe),st=r(fe,"LI",{});var ms=a(st);Hr=r(ms,"CODE",{});var Lm=a(Hr);Qd=c(Lm,"input_ids"),Lm.forEach(o),Kd=c(ms," and log-mel spectrogram "),Yr=r(ms,"CODE",{});var Am=a(Yr);el=c(Am,"labels"),Am.forEach(o),ms.forEach(o),ol=d(fe),ct=r(fe,"LI",{});var us=a(ct);Xr=r(us,"CODE",{});var Bm=a(Xr);tl=c(Bm,"input_values"),Bm.forEach(o),nl=c(us," and text "),Qr=r(us,"CODE",{});var Om=a(Qr);rl=c(Om,"labels"),Om.forEach(o),us.forEach(o),fe.forEach(o),al=d(ne),Kr=r(ne,"P",{});var Rm=a(Kr);sl=c(Rm,"Please refer to the docstring of the above two methods for more information."),Rm.forEach(o),ne.forEach(o),cl=d(C),he=r(C,"DIV",{class:!0});var Gn=a(he);v(it.$$.fragment,Gn),il=d(Gn),ea=r(Gn,"P",{});var Hm=a(ea);dl=c(Hm,"Instantiate a processor associated with a pretrained model."),Hm.forEach(o),ll=d(Gn),v(Ye.$$.fragment,Gn),Gn.forEach(o),pl=d(C),me=r(C,"DIV",{class:!0});var Vn=a(me);v(dt.$$.fragment,Vn),hl=d(Vn),lt=r(Vn,"P",{});var fs=a(lt);ml=c(fs,`Saves the attributes of this processor (feature extractor, tokenizer\u2026) in the specified directory so that it
can be reloaded using the `),yn=r(fs,"A",{href:!0});var Ym=a(yn);ul=c(Ym,"from_pretrained()"),Ym.forEach(o),fl=c(fs," method."),fs.forEach(o),gl=d(Vn),v(Xe.$$.fragment,Vn),Vn.forEach(o),_l=d(C),Qe=r(C,"DIV",{class:!0});var gs=a(Qe);v(pt.$$.fragment,gs),Tl=d(gs),ht=r(gs,"P",{});var _s=a(ht);vl=c(_s,"This method forwards all its arguments to SpeechT5Tokenizer\u2019s "),kn=r(_s,"A",{href:!0});var Xm=a(kn);bl=c(Xm,"batch_decode()"),Xm.forEach(o),yl=c(_s,`. Please refer
to the docstring of this method for more information.`),_s.forEach(o),gs.forEach(o),kl=d(C),Ke=r(C,"DIV",{class:!0});var Ts=a(Ke);v(mt.$$.fragment,Ts),wl=d(Ts),ut=r(Ts,"P",{});var vs=a(ut);Sl=c(vs,"This method forwards all its arguments to SpeechT5Tokenizer\u2019s "),wn=r(vs,"A",{href:!0});var Qm=a(wn);xl=c(Qm,"decode()"),Qm.forEach(o),$l=c(vs,`. Please refer to
the docstring of this method for more information.`),vs.forEach(o),Ts.forEach(o),C.forEach(o),Da=d(t),Ee=r(t,"H2",{class:!0});var bs=a(Ee);eo=r(bs,"A",{id:!0,class:!0,href:!0});var Km=a(eo);oa=r(Km,"SPAN",{});var eu=a(oa);v(ft.$$.fragment,eu),eu.forEach(o),Km.forEach(o),zl=d(bs),ta=r(bs,"SPAN",{});var ou=a(ta);Fl=c(ou,"SpeechT5Model"),ou.forEach(o),bs.forEach(o),Ga=d(t),X=r(t,"DIV",{class:!0});var yo=a(X);v(gt.$$.fragment,yo),Ml=d(yo),_t=r(yo,"P",{});var ys=a(_t);El=c(ys,`The bare SpeechT5 Encoder-Decoder Model outputting raw hidden-states without any specific pre- or post-nets.
This model inherits from `),Sn=r(ys,"A",{href:!0});var tu=a(Sn);ql=c(tu,"PreTrainedModel"),tu.forEach(o),Nl=c(ys,`. 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.forEach(o),Cl=d(yo),Tt=r(yo,"P",{});var ks=a(Tt);Pl=c(ks,"This model is also a PyTorch "),vt=r(ks,"A",{href:!0,rel:!0});var nu=a(vt);Ul=c(nu,"torch.nn.Module"),nu.forEach(o),jl=c(ks,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ks.forEach(o),Jl=d(yo),ue=r(yo,"DIV",{class:!0});var Ln=a(ue);v(bt.$$.fragment,Ln),Il=d(Ln),qe=r(Ln,"P",{});var An=a(qe);Wl=c(An,"The "),xn=r(An,"A",{href:!0});var ru=a(xn);Zl=c(ru,"SpeechT5Model"),ru.forEach(o),Dl=c(An," forward method, overrides the "),na=r(An,"CODE",{});var au=a(na);Gl=c(au,"__call__"),au.forEach(o),Vl=c(An," special method."),An.forEach(o),Ll=d(Ln),v(oo.$$.fragment,Ln),Ln.forEach(o),yo.forEach(o),Va=d(t),Ne=r(t,"H2",{class:!0});var ws=a(Ne);to=r(ws,"A",{id:!0,class:!0,href:!0});var su=a(to);ra=r(su,"SPAN",{});var cu=a(ra);v(yt.$$.fragment,cu),cu.forEach(o),su.forEach(o),Al=d(ws),aa=r(ws,"SPAN",{});var iu=a(aa);Bl=c(iu,"SpeechT5ForSpeechToText"),iu.forEach(o),ws.forEach(o),La=d(t),Q=r(t,"DIV",{class:!0});var ko=a(Q);v(kt.$$.fragment,ko),Ol=d(ko),wt=r(ko,"P",{});var Ss=a(wt);Rl=c(Ss,`SpeechT5 Model with a speech encoder and a text decoder.
This model inherits from `),$n=r(Ss,"A",{href:!0});var du=a($n);Hl=c(du,"PreTrainedModel"),du.forEach(o),Yl=c(Ss,`. 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.)`),Ss.forEach(o),Xl=d(ko),St=r(ko,"P",{});var xs=a(St);Ql=c(xs,"This model is also a PyTorch "),xt=r(xs,"A",{href:!0,rel:!0});var lu=a(xt);Kl=c(lu,"torch.nn.Module"),lu.forEach(o),ep=c(xs,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),xs.forEach(o),op=d(ko),A=r(ko,"DIV",{class:!0});var ge=a(A);v($t.$$.fragment,ge),tp=d(ge),Ce=r(ge,"P",{});var Bn=a(Ce);np=c(Bn,"The "),zn=r(Bn,"A",{href:!0});var pu=a(zn);rp=c(pu,"SpeechT5ForSpeechToText"),pu.forEach(o),ap=c(Bn," forward method, overrides the "),sa=r(Bn,"CODE",{});var hu=a(sa);sp=c(hu,"__call__"),hu.forEach(o),cp=c(Bn," special method."),Bn.forEach(o),ip=d(ge),v(no.$$.fragment,ge),dp=d(ge),v(ro.$$.fragment,ge),lp=d(ge),v(ao.$$.fragment,ge),ge.forEach(o),ko.forEach(o),Aa=d(t),Pe=r(t,"H2",{class:!0});var $s=a(Pe);so=r($s,"A",{id:!0,class:!0,href:!0});var mu=a(so);ca=r(mu,"SPAN",{});var uu=a(ca);v(zt.$$.fragment,uu),uu.forEach(o),mu.forEach(o),pp=d($s),ia=r($s,"SPAN",{});var fu=a(ia);hp=c(fu,"SpeechT5ForTextToSpeech"),fu.forEach(o),$s.forEach(o),Ba=d(t),G=r(t,"DIV",{class:!0});var _e=a(G);v(Ft.$$.fragment,_e),mp=d(_e),Mt=r(_e,"P",{});var zs=a(Mt);up=c(zs,`SpeechT5 Model with a text encoder and a speech decoder.
This model inherits from `),Fn=r(zs,"A",{href:!0});var gu=a(Fn);fp=c(gu,"PreTrainedModel"),gu.forEach(o),gp=c(zs,`. 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.)`),zs.forEach(o),_p=d(_e),Et=r(_e,"P",{});var Fs=a(Et);Tp=c(Fs,"This model is also a PyTorch "),qt=r(Fs,"A",{href:!0,rel:!0});var _u=a(qt);vp=c(_u,"torch.nn.Module"),_u.forEach(o),bp=c(Fs,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Fs.forEach(o),yp=d(_e),ee=r(_e,"DIV",{class:!0});var wo=a(ee);v(Nt.$$.fragment,wo),kp=d(wo),Ue=r(wo,"P",{});var On=a(Ue);wp=c(On,"The "),Mn=r(On,"A",{href:!0});var Tu=a(Mn);Sp=c(Tu,"SpeechT5ForTextToSpeech"),Tu.forEach(o),xp=c(On," forward method, overrides the "),da=r(On,"CODE",{});var vu=a(da);$p=c(vu,"__call__"),vu.forEach(o),zp=c(On," special method."),On.forEach(o),Fp=d(wo),v(co.$$.fragment,wo),Mp=d(wo),v(io.$$.fragment,wo),wo.forEach(o),Ep=d(_e),lo=r(_e,"DIV",{class:!0});var Ms=a(lo);v(Ct.$$.fragment,Ms),qp=d(Ms),la=r(Ms,"P",{});var bu=a(la);Np=c(bu,`Converts a sequence of input tokens into a sequence of mel spectrograms, which are subsequently turned into a
speech waveform using a vocoder.`),bu.forEach(o),Ms.forEach(o),_e.forEach(o),Oa=d(t),je=r(t,"H2",{class:!0});var Es=a(je);po=r(Es,"A",{id:!0,class:!0,href:!0});var yu=a(po);pa=r(yu,"SPAN",{});var ku=a(pa);v(Pt.$$.fragment,ku),ku.forEach(o),yu.forEach(o),Cp=d(Es),ha=r(Es,"SPAN",{});var wu=a(ha);Pp=c(wu,"SpeechT5ForSpeechToSpeech"),wu.forEach(o),Es.forEach(o),Ra=d(t),V=r(t,"DIV",{class:!0});var Te=a(V);v(Ut.$$.fragment,Te),Up=d(Te),jt=r(Te,"P",{});var qs=a(jt);jp=c(qs,`SpeechT5 Model with a speech encoder and a speech decoder.
This model inherits from `),En=r(qs,"A",{href:!0});var Su=a(En);Jp=c(Su,"PreTrainedModel"),Su.forEach(o),Ip=c(qs,`. 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.)`),qs.forEach(o),Wp=d(Te),Jt=r(Te,"P",{});var Ns=a(Jt);Zp=c(Ns,"This model is also a PyTorch "),It=r(Ns,"A",{href:!0,rel:!0});var xu=a(It);Dp=c(xu,"torch.nn.Module"),xu.forEach(o),Gp=c(Ns,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ns.forEach(o),Vp=d(Te),oe=r(Te,"DIV",{class:!0});var So=a(oe);v(Wt.$$.fragment,So),Lp=d(So),Je=r(So,"P",{});var Rn=a(Je);Ap=c(Rn,"The "),qn=r(Rn,"A",{href:!0});var $u=a(qn);Bp=c($u,"SpeechT5ForSpeechToSpeech"),$u.forEach(o),Op=c(Rn," forward method, overrides the "),ma=r(Rn,"CODE",{});var zu=a(ma);Rp=c(zu,"__call__"),zu.forEach(o),Hp=c(Rn," special method."),Rn.forEach(o),Yp=d(So),v(ho.$$.fragment,So),Xp=d(So),v(mo.$$.fragment,So),So.forEach(o),Qp=d(Te),uo=r(Te,"DIV",{class:!0});var Cs=a(uo);v(Zt.$$.fragment,Cs),Kp=d(Cs),ua=r(Cs,"P",{});var Fu=a(ua);eh=c(Fu,`Converts a raw speech waveform into a sequence of mel spectrograms, which are subsequently turned back into a
speech waveform using a vocoder.`),Fu.forEach(o),Cs.forEach(o),Te.forEach(o),Ha=d(t),Ie=r(t,"H2",{class:!0});var Ps=a(Ie);fo=r(Ps,"A",{id:!0,class:!0,href:!0});var Mu=a(fo);fa=r(Mu,"SPAN",{});var Eu=a(fa);v(Dt.$$.fragment,Eu),Eu.forEach(o),Mu.forEach(o),oh=d(Ps),ga=r(Ps,"SPAN",{});var qu=a(ga);th=c(qu,"SpeechT5HifiGan"),qu.forEach(o),Ps.forEach(o),Ya=d(t),K=r(t,"DIV",{class:!0});var xo=a(K);v(Gt.$$.fragment,xo),nh=d(xo),Vt=r(xo,"P",{});var Us=a(Vt);rh=c(Us,`HiFi-GAN vocoder.
This model inherits from `),Nn=r(Us,"A",{href:!0});var Nu=a(Nn);ah=c(Nu,"PreTrainedModel"),Nu.forEach(o),sh=c(Us,`. 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.)`),Us.forEach(o),ch=d(xo),Lt=r(xo,"P",{});var js=a(Lt);ih=c(js,"This model is also a PyTorch "),At=r(js,"A",{href:!0,rel:!0});var Cu=a(At);dh=c(Cu,"torch.nn.Module"),Cu.forEach(o),lh=c(js,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),js.forEach(o),ph=d(xo),go=r(xo,"DIV",{class:!0});var Js=a(go);v(Bt.$$.fragment,Js),hh=d(Js),_a=r(Js,"P",{});var Pu=a(_a);mh=c(Pu,`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.`),Pu.forEach(o),Js.forEach(o),xo.forEach(o),this.h()},h(){l(h,"name","hf:doc:metadata"),l(h,"content",JSON.stringify(Ku)),l(f,"id","speecht5"),l(f,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(f,"href","#speecht5"),l(m,"class","relative group"),l(U,"id","overview"),l(U,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(U,"href","#overview"),l(J,"class","relative group"),l($o,"href","https://arxiv.org/abs/2110.07205"),l($o,"rel","nofollow"),l(zo,"href","https://huggingface.co/Matthijs"),l(zo,"rel","nofollow"),l(Fo,"href","https://github.com/microsoft/SpeechT5"),l(Fo,"rel","nofollow"),l(De,"id","transformers.SpeechT5Config"),l(De,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(De,"href","#transformers.SpeechT5Config"),l(ve,"class","relative group"),l(Kt,"href","/docs/transformers/v4.32.0/en/model_doc/speecht5#transformers.SpeechT5Model"),l(qo,"href","https://huggingface.co/microsoft/speecht5_asr"),l(qo,"rel","nofollow"),l(en,"href","/docs/transformers/v4.32.0/en/main_classes/configuration#transformers.PretrainedConfig"),l(on,"href","/docs/transformers/v4.32.0/en/main_classes/configuration#transformers.PretrainedConfig"),l(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Ve,"id","transformers.SpeechT5HifiGanConfig"),l(Ve,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(Ve,"href","#transformers.SpeechT5HifiGanConfig"),l(ke,"class","relative group"),l(Po,"href","https://huggingface.co/microsoft/speecht5_hifigan"),l(Po,"rel","nofollow"),l(tn,"href","/docs/transformers/v4.32.0/en/main_classes/configuration#transformers.PretrainedConfig"),l(nn,"href","/docs/transformers/v4.32.0/en/main_classes/configuration#transformers.PretrainedConfig"),l(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Ae,"id","transformers.SpeechT5Tokenizer"),l(Ae,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(Ae,"href","#transformers.SpeechT5Tokenizer"),l(xe,"class","relative group"),l(Io,"href","https://github.com/google/sentencepiece"),l(Io,"rel","nofollow"),l(rn,"href","/docs/transformers/v4.32.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),l(Be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(an,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Re,"id","transformers.SpeechT5FeatureExtractor"),l(Re,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(Re,"href","#transformers.SpeechT5FeatureExtractor"),l($e,"class","relative group"),l(sn,"href","/docs/transformers/v4.32.0/en/main_classes/feature_extractor#transformers.SequenceFeatureExtractor"),l(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(He,"id","transformers.SpeechT5Processor"),l(He,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(He,"href","#transformers.SpeechT5Processor"),l(Fe,"class","relative group"),l(cn,"href","/docs/transformers/v4.32.0/en/model_doc/speecht5#transformers.SpeechT5Processor"),l(dn,"href","/docs/transformers/v4.32.0/en/model_doc/speecht5#transformers.SpeechT5FeatureExtractor"),l(ln,"href","/docs/transformers/v4.32.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer"),l(Xo,"href","/docs/transformers/v4.32.0/en/model_doc/speecht5#transformers.SpeechT5Processor.__call__"),l(pn,"href","/docs/transformers/v4.32.0/en/model_doc/speecht5#transformers.SpeechT5Processor.decode"),l(Ko,"href","/docs/transformers/v4.32.0/en/model_doc/speecht5#transformers.SpeechT5FeatureExtractor.__call__"),l(et,"href","/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__"),l(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(gn,"href","/docs/transformers/v4.32.0/en/main_classes/feature_extractor#transformers.SequenceFeatureExtractor.pad"),l(_n,"href","/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.pad"),l(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(yn,"href","/docs/transformers/v4.32.0/en/model_doc/donut#transformers.DonutProcessor.from_pretrained"),l(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(kn,"href","/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.batch_decode"),l(Qe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(wn,"href","/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.decode"),l(Ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(eo,"id","transformers.SpeechT5Model"),l(eo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(eo,"href","#transformers.SpeechT5Model"),l(Ee,"class","relative group"),l(Sn,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),l(vt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(vt,"rel","nofollow"),l(xn,"href","/docs/transformers/v4.32.0/en/model_doc/speecht5#transformers.SpeechT5Model"),l(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(to,"id","transformers.SpeechT5ForSpeechToText"),l(to,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(to,"href","#transformers.SpeechT5ForSpeechToText"),l(Ne,"class","relative group"),l($n,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),l(xt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(xt,"rel","nofollow"),l(zn,"href","/docs/transformers/v4.32.0/en/model_doc/speecht5#transformers.SpeechT5ForSpeechToText"),l(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(so,"id","transformers.SpeechT5ForTextToSpeech"),l(so,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(so,"href","#transformers.SpeechT5ForTextToSpeech"),l(Pe,"class","relative group"),l(Fn,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),l(qt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(qt,"rel","nofollow"),l(Mn,"href","/docs/transformers/v4.32.0/en/model_doc/speecht5#transformers.SpeechT5ForTextToSpeech"),l(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(lo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(po,"id","transformers.SpeechT5ForSpeechToSpeech"),l(po,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(po,"href","#transformers.SpeechT5ForSpeechToSpeech"),l(je,"class","relative group"),l(En,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),l(It,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(It,"rel","nofollow"),l(qn,"href","/docs/transformers/v4.32.0/en/model_doc/speecht5#transformers.SpeechT5ForSpeechToSpeech"),l(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(uo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(fo,"id","transformers.SpeechT5HifiGan"),l(fo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(fo,"href","#transformers.SpeechT5HifiGan"),l(Ie,"class","relative group"),l(Nn,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),l(At,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(At,"rel","nofollow"),l(go,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,u){e(document.head,h),_(t,x,u),_(t,m,u),e(m,f),e(f,S),b(p,S,null),e(m,g),e(m,F),e(F,D),_(t,P,u),_(t,J,u),e(J,U),e(U,I),b(ie,I,null),e(J,Yt),e(J,We),e(We,Is),_(t,za,u),_(t,Ze,u),e(Ze,Ws),e(Ze,$o),e($o,Zs),e(Ze,Ds),_(t,Fa,u),_(t,Xt,u),e(Xt,Gs),_(t,Ma,u),_(t,Qt,u),e(Qt,Kn),e(Kn,Vs),_(t,Ea,u),_(t,de,u),e(de,Ls),e(de,zo),e(zo,As),e(de,Bs),e(de,Fo),e(Fo,Os),e(de,Rs),_(t,qa,u),_(t,ve,u),e(ve,De),e(De,er),b(Mo,er,null),e(ve,Hs),e(ve,or),e(or,Ys),_(t,Na,u),_(t,R,u),b(Eo,R,null),e(R,Xs),e(R,be),e(be,Qs),e(be,Kt),e(Kt,Ks),e(be,ec),e(be,qo),e(qo,oc),e(be,tc),e(R,nc),e(R,ye),e(ye,rc),e(ye,en),e(en,ac),e(ye,sc),e(ye,on),e(on,cc),e(ye,ic),e(R,dc),b(Ge,R,null),_(t,Ca,u),_(t,ke,u),e(ke,Ve),e(Ve,tr),b(No,tr,null),e(ke,lc),e(ke,nr),e(nr,pc),_(t,Pa,u),_(t,H,u),b(Co,H,null),e(H,hc),e(H,we),e(we,mc),e(we,rr),e(rr,uc),e(we,fc),e(we,Po),e(Po,gc),e(we,_c),e(H,Tc),e(H,Se),e(Se,vc),e(Se,tn),e(tn,bc),e(Se,yc),e(Se,nn),e(nn,kc),e(Se,wc),e(H,Sc),b(Le,H,null),_(t,Ua,u),_(t,xe,u),e(xe,Ae),e(Ae,ar),b(Uo,ar,null),e(xe,xc),e(xe,sr),e(sr,$c),_(t,ja,u),_(t,E,u),b(jo,E,null),e(E,zc),e(E,Jo),e(Jo,Fc),e(Jo,Io),e(Io,Mc),e(Jo,Ec),e(E,qc),e(E,Wo),e(Wo,Nc),e(Wo,rn),e(rn,Cc),e(Wo,Pc),e(E,Uc),e(E,Be),b(Zo,Be,null),e(Be,jc),e(Be,cr),e(cr,Jc),e(E,Ic),e(E,an),b(Do,an,null),e(E,Wc),e(E,le),b(Go,le,null),e(le,Zc),e(le,ir),e(ir,Dc),e(le,Gc),e(le,Vo),e(Vo,Vc),e(Vo,dr),e(dr,Lc),e(Vo,Ac),e(E,Bc),e(E,Oe),b(Lo,Oe,null),e(Oe,Oc),e(Oe,lr),e(lr,Rc),_(t,Ja,u),_(t,$e,u),e($e,Re),e(Re,pr),b(Ao,pr,null),e($e,Hc),e($e,hr),e(hr,Yc),_(t,Ia,u),_(t,j,u),b(Bo,j,null),e(j,Xc),e(j,mr),e(mr,Qc),e(j,Kc),e(j,ur),e(ur,ei),e(j,oi),e(j,fr),e(fr,ti),e(j,ni),e(j,Oo),e(Oo,ri),e(Oo,sn),e(sn,ai),e(Oo,si),e(j,ci),e(j,pe),b(Ro,pe,null),e(pe,ii),e(pe,gr),e(gr,di),e(pe,li),e(pe,ze),e(ze,pi),e(ze,_r),e(_r,hi),e(ze,mi),e(ze,Tr),e(Tr,ui),e(ze,fi),_(t,Wa,u),_(t,Fe,u),e(Fe,He),e(He,vr),b(Ho,vr,null),e(Fe,gi),e(Fe,br),e(br,_i),_(t,Za,u),_(t,M,u),b(Yo,M,null),e(M,Ti),e(M,yr),e(yr,vi),e(M,bi),e(M,L),e(L,cn),e(cn,yi),e(L,ki),e(L,dn),e(dn,wi),e(L,Si),e(L,ln),e(ln,xi),e(L,$i),e(L,Xo),e(Xo,kr),e(kr,zi),e(Xo,Fi),e(L,Mi),e(L,pn),e(pn,Ei),e(L,qi),e(M,Ni),e(M,N),b(Qo,N,null),e(N,Ci),e(N,wr),e(wr,Pi),e(N,Ui),e(N,ae),e(ae,ji),e(ae,Sr),e(Sr,Ji),e(ae,Ii),e(ae,xr),e(xr,Wi),e(ae,Zi),e(ae,Ko),e(Ko,$r),e($r,Di),e(Ko,Gi),e(ae,Vi),e(N,Li),e(N,se),e(se,Ai),e(se,zr),e(zr,Bi),e(se,Oi),e(se,Fr),e(Fr,Ri),e(se,Hi),e(se,et),e(et,Mr),e(Mr,Yi),e(et,Xi),e(se,Qi),e(N,Ki),e(N,Er),e(Er,ed),e(N,od),e(N,q),e(q,hn),e(hn,qr),e(qr,td),e(hn,nd),e(q,rd),e(q,mn),e(mn,Nr),e(Nr,ad),e(mn,sd),e(q,cd),e(q,un),e(un,Cr),e(Cr,id),e(un,dd),e(q,ld),e(q,fn),e(fn,Pr),e(Pr,pd),e(fn,hd),e(q,md),e(q,ot),e(ot,Ur),e(Ur,ud),e(ot,fd),e(ot,jr),e(jr,gd),e(q,_d),e(q,tt),e(tt,Jr),e(Jr,Td),e(tt,vd),e(tt,Ir),e(Ir,bd),e(q,yd),e(q,nt),e(nt,Wr),e(Wr,kd),e(nt,wd),e(nt,Zr),e(Zr,Sd),e(q,xd),e(q,rt),e(rt,Dr),e(Dr,$d),e(rt,zd),e(rt,Gr),e(Gr,Fd),e(N,Md),e(N,Vr),e(Vr,Ed),e(M,qd),e(M,W),b(at,W,null),e(W,Nd),e(W,Lr),e(Lr,Cd),e(W,Pd),e(W,Me),e(Me,Ud),e(Me,gn),e(gn,jd),e(Me,Jd),e(Me,_n),e(_n,Id),e(Me,Wd),e(W,Zd),e(W,Ar),e(Ar,Dd),e(W,Gd),e(W,Y),e(Y,Tn),e(Tn,Br),e(Br,Vd),e(Tn,Ld),e(Y,Ad),e(Y,vn),e(vn,Or),e(Or,Bd),e(vn,Od),e(Y,Rd),e(Y,bn),e(bn,Rr),e(Rr,Hd),e(bn,Yd),e(Y,Xd),e(Y,st),e(st,Hr),e(Hr,Qd),e(st,Kd),e(st,Yr),e(Yr,el),e(Y,ol),e(Y,ct),e(ct,Xr),e(Xr,tl),e(ct,nl),e(ct,Qr),e(Qr,rl),e(W,al),e(W,Kr),e(Kr,sl),e(M,cl),e(M,he),b(it,he,null),e(he,il),e(he,ea),e(ea,dl),e(he,ll),b(Ye,he,null),e(M,pl),e(M,me),b(dt,me,null),e(me,hl),e(me,lt),e(lt,ml),e(lt,yn),e(yn,ul),e(lt,fl),e(me,gl),b(Xe,me,null),e(M,_l),e(M,Qe),b(pt,Qe,null),e(Qe,Tl),e(Qe,ht),e(ht,vl),e(ht,kn),e(kn,bl),e(ht,yl),e(M,kl),e(M,Ke),b(mt,Ke,null),e(Ke,wl),e(Ke,ut),e(ut,Sl),e(ut,wn),e(wn,xl),e(ut,$l),_(t,Da,u),_(t,Ee,u),e(Ee,eo),e(eo,oa),b(ft,oa,null),e(Ee,zl),e(Ee,ta),e(ta,Fl),_(t,Ga,u),_(t,X,u),b(gt,X,null),e(X,Ml),e(X,_t),e(_t,El),e(_t,Sn),e(Sn,ql),e(_t,Nl),e(X,Cl),e(X,Tt),e(Tt,Pl),e(Tt,vt),e(vt,Ul),e(Tt,jl),e(X,Jl),e(X,ue),b(bt,ue,null),e(ue,Il),e(ue,qe),e(qe,Wl),e(qe,xn),e(xn,Zl),e(qe,Dl),e(qe,na),e(na,Gl),e(qe,Vl),e(ue,Ll),b(oo,ue,null),_(t,Va,u),_(t,Ne,u),e(Ne,to),e(to,ra),b(yt,ra,null),e(Ne,Al),e(Ne,aa),e(aa,Bl),_(t,La,u),_(t,Q,u),b(kt,Q,null),e(Q,Ol),e(Q,wt),e(wt,Rl),e(wt,$n),e($n,Hl),e(wt,Yl),e(Q,Xl),e(Q,St),e(St,Ql),e(St,xt),e(xt,Kl),e(St,ep),e(Q,op),e(Q,A),b($t,A,null),e(A,tp),e(A,Ce),e(Ce,np),e(Ce,zn),e(zn,rp),e(Ce,ap),e(Ce,sa),e(sa,sp),e(Ce,cp),e(A,ip),b(no,A,null),e(A,dp),b(ro,A,null),e(A,lp),b(ao,A,null),_(t,Aa,u),_(t,Pe,u),e(Pe,so),e(so,ca),b(zt,ca,null),e(Pe,pp),e(Pe,ia),e(ia,hp),_(t,Ba,u),_(t,G,u),b(Ft,G,null),e(G,mp),e(G,Mt),e(Mt,up),e(Mt,Fn),e(Fn,fp),e(Mt,gp),e(G,_p),e(G,Et),e(Et,Tp),e(Et,qt),e(qt,vp),e(Et,bp),e(G,yp),e(G,ee),b(Nt,ee,null),e(ee,kp),e(ee,Ue),e(Ue,wp),e(Ue,Mn),e(Mn,Sp),e(Ue,xp),e(Ue,da),e(da,$p),e(Ue,zp),e(ee,Fp),b(co,ee,null),e(ee,Mp),b(io,ee,null),e(G,Ep),e(G,lo),b(Ct,lo,null),e(lo,qp),e(lo,la),e(la,Np),_(t,Oa,u),_(t,je,u),e(je,po),e(po,pa),b(Pt,pa,null),e(je,Cp),e(je,ha),e(ha,Pp),_(t,Ra,u),_(t,V,u),b(Ut,V,null),e(V,Up),e(V,jt),e(jt,jp),e(jt,En),e(En,Jp),e(jt,Ip),e(V,Wp),e(V,Jt),e(Jt,Zp),e(Jt,It),e(It,Dp),e(Jt,Gp),e(V,Vp),e(V,oe),b(Wt,oe,null),e(oe,Lp),e(oe,Je),e(Je,Ap),e(Je,qn),e(qn,Bp),e(Je,Op),e(Je,ma),e(ma,Rp),e(Je,Hp),e(oe,Yp),b(ho,oe,null),e(oe,Xp),b(mo,oe,null),e(V,Qp),e(V,uo),b(Zt,uo,null),e(uo,Kp),e(uo,ua),e(ua,eh),_(t,Ha,u),_(t,Ie,u),e(Ie,fo),e(fo,fa),b(Dt,fa,null),e(Ie,oh),e(Ie,ga),e(ga,th),_(t,Ya,u),_(t,K,u),b(Gt,K,null),e(K,nh),e(K,Vt),e(Vt,rh),e(Vt,Nn),e(Nn,ah),e(Vt,sh),e(K,ch),e(K,Lt),e(Lt,ih),e(Lt,At),e(At,dh),e(Lt,lh),e(K,ph),e(K,go),b(Bt,go,null),e(go,hh),e(go,_a),e(_a,mh),Xa=!0},p(t,[u]){const Ot={};u&2&&(Ot.$$scope={dirty:u,ctx:t}),Ge.$set(Ot);const Ta={};u&2&&(Ta.$$scope={dirty:u,ctx:t}),Le.$set(Ta);const va={};u&2&&(va.$$scope={dirty:u,ctx:t}),Ye.$set(va);const ba={};u&2&&(ba.$$scope={dirty:u,ctx:t}),Xe.$set(ba);const Rt={};u&2&&(Rt.$$scope={dirty:u,ctx:t}),oo.$set(Rt);const ya={};u&2&&(ya.$$scope={dirty:u,ctx:t}),no.$set(ya);const ka={};u&2&&(ka.$$scope={dirty:u,ctx:t}),ro.$set(ka);const wa={};u&2&&(wa.$$scope={dirty:u,ctx:t}),ao.$set(wa);const Ht={};u&2&&(Ht.$$scope={dirty:u,ctx:t}),co.$set(Ht);const Sa={};u&2&&(Sa.$$scope={dirty:u,ctx:t}),io.$set(Sa);const xa={};u&2&&(xa.$$scope={dirty:u,ctx:t}),ho.$set(xa);const $a={};u&2&&($a.$$scope={dirty:u,ctx:t}),mo.$set($a)},i(t){Xa||(y(p.$$.fragment,t),y(ie.$$.fragment,t),y(Mo.$$.fragment,t),y(Eo.$$.fragment,t),y(Ge.$$.fragment,t),y(No.$$.fragment,t),y(Co.$$.fragment,t),y(Le.$$.fragment,t),y(Uo.$$.fragment,t),y(jo.$$.fragment,t),y(Zo.$$.fragment,t),y(Do.$$.fragment,t),y(Go.$$.fragment,t),y(Lo.$$.fragment,t),y(Ao.$$.fragment,t),y(Bo.$$.fragment,t),y(Ro.$$.fragment,t),y(Ho.$$.fragment,t),y(Yo.$$.fragment,t),y(Qo.$$.fragment,t),y(at.$$.fragment,t),y(it.$$.fragment,t),y(Ye.$$.fragment,t),y(dt.$$.fragment,t),y(Xe.$$.fragment,t),y(pt.$$.fragment,t),y(mt.$$.fragment,t),y(ft.$$.fragment,t),y(gt.$$.fragment,t),y(bt.$$.fragment,t),y(oo.$$.fragment,t),y(yt.$$.fragment,t),y(kt.$$.fragment,t),y($t.$$.fragment,t),y(no.$$.fragment,t),y(ro.$$.fragment,t),y(ao.$$.fragment,t),y(zt.$$.fragment,t),y(Ft.$$.fragment,t),y(Nt.$$.fragment,t),y(co.$$.fragment,t),y(io.$$.fragment,t),y(Ct.$$.fragment,t),y(Pt.$$.fragment,t),y(Ut.$$.fragment,t),y(Wt.$$.fragment,t),y(ho.$$.fragment,t),y(mo.$$.fragment,t),y(Zt.$$.fragment,t),y(Dt.$$.fragment,t),y(Gt.$$.fragment,t),y(Bt.$$.fragment,t),Xa=!0)},o(t){k(p.$$.fragment,t),k(ie.$$.fragment,t),k(Mo.$$.fragment,t),k(Eo.$$.fragment,t),k(Ge.$$.fragment,t),k(No.$$.fragment,t),k(Co.$$.fragment,t),k(Le.$$.fragment,t),k(Uo.$$.fragment,t),k(jo.$$.fragment,t),k(Zo.$$.fragment,t),k(Do.$$.fragment,t),k(Go.$$.fragment,t),k(Lo.$$.fragment,t),k(Ao.$$.fragment,t),k(Bo.$$.fragment,t),k(Ro.$$.fragment,t),k(Ho.$$.fragment,t),k(Yo.$$.fragment,t),k(Qo.$$.fragment,t),k(at.$$.fragment,t),k(it.$$.fragment,t),k(Ye.$$.fragment,t),k(dt.$$.fragment,t),k(Xe.$$.fragment,t),k(pt.$$.fragment,t),k(mt.$$.fragment,t),k(ft.$$.fragment,t),k(gt.$$.fragment,t),k(bt.$$.fragment,t),k(oo.$$.fragment,t),k(yt.$$.fragment,t),k(kt.$$.fragment,t),k($t.$$.fragment,t),k(no.$$.fragment,t),k(ro.$$.fragment,t),k(ao.$$.fragment,t),k(zt.$$.fragment,t),k(Ft.$$.fragment,t),k(Nt.$$.fragment,t),k(co.$$.fragment,t),k(io.$$.fragment,t),k(Ct.$$.fragment,t),k(Pt.$$.fragment,t),k(Ut.$$.fragment,t),k(Wt.$$.fragment,t),k(ho.$$.fragment,t),k(mo.$$.fragment,t),k(Zt.$$.fragment,t),k(Dt.$$.fragment,t),k(Gt.$$.fragment,t),k(Bt.$$.fragment,t),Xa=!1},d(t){o(h),t&&o(x),t&&o(m),w(p),t&&o(P),t&&o(J),w(ie),t&&o(za),t&&o(Ze),t&&o(Fa),t&&o(Xt),t&&o(Ma),t&&o(Qt),t&&o(Ea),t&&o(de),t&&o(qa),t&&o(ve),w(Mo),t&&o(Na),t&&o(R),w(Eo),w(Ge),t&&o(Ca),t&&o(ke),w(No),t&&o(Pa),t&&o(H),w(Co),w(Le),t&&o(Ua),t&&o(xe),w(Uo),t&&o(ja),t&&o(E),w(jo),w(Zo),w(Do),w(Go),w(Lo),t&&o(Ja),t&&o($e),w(Ao),t&&o(Ia),t&&o(j),w(Bo),w(Ro),t&&o(Wa),t&&o(Fe),w(Ho),t&&o(Za),t&&o(M),w(Yo),w(Qo),w(at),w(it),w(Ye),w(dt),w(Xe),w(pt),w(mt),t&&o(Da),t&&o(Ee),w(ft),t&&o(Ga),t&&o(X),w(gt),w(bt),w(oo),t&&o(Va),t&&o(Ne),w(yt),t&&o(La),t&&o(Q),w(kt),w($t),w(no),w(ro),w(ao),t&&o(Aa),t&&o(Pe),w(zt),t&&o(Ba),t&&o(G),w(Ft),w(Nt),w(co),w(io),w(Ct),t&&o(Oa),t&&o(je),w(Pt),t&&o(Ra),t&&o(V),w(Ut),w(Wt),w(ho),w(mo),w(Zt),t&&o(Ha),t&&o(Ie),w(Dt),t&&o(Ya),t&&o(K),w(Gt),w(Bt)}}}const Ku={local:"speecht5",sections:[{local:"overview",title:"Overview"},{local:"transformers.SpeechT5Config",title:"SpeechT5Config"},{local:"transformers.SpeechT5HifiGanConfig",title:"SpeechT5HifiGanConfig"},{local:"transformers.SpeechT5Tokenizer",title:"SpeechT5Tokenizer"},{local:"transformers.SpeechT5FeatureExtractor",title:"SpeechT5FeatureExtractor"},{local:"transformers.SpeechT5Processor",title:"SpeechT5Processor"},{local:"transformers.SpeechT5Model",title:"SpeechT5Model"},{local:"transformers.SpeechT5ForSpeechToText",title:"SpeechT5ForSpeechToText"},{local:"transformers.SpeechT5ForTextToSpeech",title:"SpeechT5ForTextToSpeech"},{local:"transformers.SpeechT5ForSpeechToSpeech",title:"SpeechT5ForSpeechToSpeech"},{local:"transformers.SpeechT5HifiGan",title:"SpeechT5HifiGan"}],title:"SpeechT5"};function ef(z){return Wu(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class cf extends Uu{constructor(h){super();ju(this,h,ef,Qu,Ju,{})}}export{cf as default,Ku as metadata};
