import{S as Pu,i as ju,s as Ju,e as n,k as i,w as T,t as s,M as Wu,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 Iu,L as Qn}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 Xn}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(F){let h,x,m,f,S;return f=new Xn({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:Qn,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(F){let h,x,m,f,S;return f=new Xn({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:Qn,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(F){let h,x,m,f,S,p,g,z,G,U,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"),z=s(` and the tokenizer
`),G=n("code"),U=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(P){h=r(P,"P",{});var W=a(h);x=c(W,`This class method is simply calling the feature extractor
`),m=r(W,"A",{href:!0});var ie=a(m);f=c(ie,"from_pretrained()"),ie.forEach(o),S=c(W,`, image processor
`),p=r(W,"A",{href:!0});var Yt=a(p);g=c(Yt,"ImageProcessingMixin"),Yt.forEach(o),z=c(W,` and the tokenizer
`),G=r(W,"CODE",{});var Ie=a(G);U=c(Ie,"~tokenization_utils_base.PreTrainedTokenizer.from_pretrained"),Ie.forEach(o),J=c(W,` methods. Please refer to the docstrings of the
methods above for more information.`),W.forEach(o),this.h()},h(){l(m,"href","/docs/transformers/v4.31.0/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.from_pretrained"),l(p,"href","/docs/transformers/v4.31.0/en/internal/image_processing_utils#transformers.ImageProcessingMixin")},m(P,W){_(P,h,W),e(h,x),e(h,m),e(m,f),e(h,S),e(h,p),e(p,g),e(h,z),e(h,G),e(G,U),e(h,J)},d(P){P&&o(h)}}}function Vu(F){let h,x,m,f,S,p,g,z;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()"),z=s(`. Please refer to the docstrings of the
methods above for more information.`),this.h()},l(G){h=r(G,"P",{});var U=a(h);x=c(U,"This class method is simply calling "),m=r(U,"A",{href:!0});var J=a(m);f=c(J,"save_pretrained()"),J.forEach(o),S=c(U,` and
`),p=r(U,"A",{href:!0});var P=a(p);g=c(P,"save_pretrained()"),P.forEach(o),z=c(U,`. Please refer to the docstrings of the
methods above for more information.`),U.forEach(o),this.h()},h(){l(m,"href","/docs/transformers/v4.31.0/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.save_pretrained"),l(p,"href","/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.save_pretrained")},m(G,U){_(G,h,U),e(h,x),e(h,m),e(m,f),e(h,S),e(h,p),e(p,g),e(h,z)},d(G){G&&o(h)}}}function Lu(F){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 z=a(m);f=c(z,"Module"),z.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(F){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 z=a(m);f=c(z,"Module"),z.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 Ou(F){let h,x,m,f,S;return f=new Xn({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:Qn,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 Ru(F){let h,x;return h=new Xn({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:Qn,i(m){x||(y(h.$$.fragment,m),x=!0)},o(m){k(h.$$.fragment,m),x=!1},d(m){w(h,m)}}}function Bu(F){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 z=a(m);f=c(z,"Module"),z.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(F){let h,x,m,f,S;return f=new Xn({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFNwZWVjaFQ1UHJvY2Vzc29yJTJDJTIwU3BlZWNoVDVGb3JUZXh0VG9TcGVlY2glMkMlMjBTcGVlY2hUNUhpZmlHYW4lMkMlMjBzZXRfc2VlZCUwQWltcG9ydCUyMHRvcmNoJTBBJTBBcHJvY2Vzc29yJTIwJTNEJTIwU3BlZWNoVDVQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMm1pY3Jvc29mdCUyRnNwZWVjaHQ1X3R0cyUyMiklMEFtb2RlbCUyMCUzRCUyMFNwZWVjaFQ1Rm9yVGV4dFRvU3BlZWNoLmZyb21fcHJldHJhaW5lZCglMjJtaWNyb3NvZnQlMkZzcGVlY2h0NV90dHMlMjIpJTBBdm9jb2RlciUyMCUzRCUyMFNwZWVjaFQ1SGlmaUdhbi5mcm9tX3ByZXRyYWluZWQoJTIybWljcm9zb2Z0JTJGc3BlZWNodDVfaGlmaWdhbiUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IodGV4dCUzRCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQXNwZWFrZXJfZW1iZWRkaW5ncyUyMCUzRCUyMHRvcmNoLnplcm9zKCgxJTJDJTIwNTEyKSklMjAlMjAlMjMlMjBvciUyMGxvYWQlMjB4dmVjdG9ycyUyMGZyb20lMjBhJTIwZmlsZSUwQSUwQXNldF9zZWVkKDU1NSklMjAlMjAlMjMlMjBtYWtlJTIwZGV0ZXJtaW5pc3RpYyUwQSUwQSUyMyUyMGdlbmVyYXRlJTIwc3BlZWNoJTBBc3BlZWNoJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGVfc3BlZWNoKGlucHV0cyU1QiUyMmlucHV0X2lkcyUyMiU1RCUyQyUyMHNwZWFrZXJfZW1iZWRkaW5ncyUyQyUyMHZvY29kZXIlM0R2b2NvZGVyKSUwQXNwZWVjaC5zaGFwZQ==",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_speech(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:Qn,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(F){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 z=a(m);f=c(z,"Module"),z.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 Qu(F){let h,x,m,f,S;return f=new Xn({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:Qn,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 Xu(F){let h,x,m,f,S,p,g,z,G,U,J,P,W,ie,Yt,Ie,Ws,Fa,Ze,Is,$o,Zs,Gs,za,Qt,Ds,Ma,Xt,Kn,Vs,Ea,de,Ls,Fo,As,Os,zo,Rs,Bs,qa,ve,Ge,er,Mo,Hs,or,Ys,Na,B,Eo,Qs,be,Xs,Kt,Ks,ec,qo,oc,tc,nc,ye,rc,en,ac,sc,on,cc,ic,dc,De,Ca,ke,Ve,tr,No,lc,nr,pc,Ua,H,Co,hc,we,mc,rr,uc,fc,Uo,gc,_c,Tc,Se,vc,tn,bc,yc,nn,kc,wc,Sc,Le,Pa,xe,Ae,ar,Po,xc,sr,$c,ja,E,jo,Fc,Jo,zc,Wo,Mc,Ec,qc,Io,Nc,rn,Cc,Uc,Pc,Oe,Zo,jc,cr,Jc,Wc,an,Go,Ic,le,Do,Zc,ir,Gc,Dc,Vo,Vc,dr,Lc,Ac,Oc,Re,Lo,Rc,lr,Bc,Ja,$e,Be,pr,Ao,Hc,hr,Yc,Wa,j,Oo,Qc,mr,Xc,Kc,ur,ei,oi,fr,ti,ni,Ro,ri,sn,ai,si,ci,pe,Bo,ii,gr,di,li,Fe,pi,_r,hi,mi,Tr,ui,fi,Ia,ze,He,vr,Ho,gi,br,_i,Za,M,Yo,Ti,yr,vi,bi,L,cn,yi,ki,dn,wi,Si,ln,xi,$i,Qo,kr,Fi,zi,Mi,pn,Ei,qi,Ni,N,Xo,Ci,wr,Ui,Pi,ae,ji,Sr,Ji,Wi,xr,Ii,Zi,Ko,$r,Gi,Di,Vi,Li,se,Ai,Fr,Oi,Ri,zr,Bi,Hi,et,Mr,Yi,Qi,Xi,Ki,Er,ed,od,q,hn,qr,td,nd,rd,mn,Nr,ad,sd,cd,un,Cr,id,dd,ld,fn,Ur,pd,hd,md,ot,Pr,ud,fd,jr,gd,_d,tt,Jr,Td,vd,Wr,bd,yd,nt,Ir,kd,wd,Zr,Sd,xd,rt,Gr,$d,Fd,Dr,zd,Md,Vr,Ed,qd,I,at,Nd,Lr,Cd,Ud,Me,Pd,gn,jd,Jd,_n,Wd,Id,Zd,Ar,Gd,Dd,Y,Tn,Or,Vd,Ld,Ad,vn,Rr,Od,Rd,Bd,bn,Br,Hd,Yd,Qd,st,Hr,Xd,Kd,Yr,el,ol,ct,Qr,tl,nl,Xr,rl,al,Kr,sl,cl,he,it,il,ea,dl,ll,Ye,pl,me,dt,hl,lt,ml,yn,ul,fl,gl,Qe,_l,Xe,pt,Tl,ht,vl,kn,bl,yl,kl,Ke,mt,wl,ut,Sl,wn,xl,$l,Ga,Ee,eo,oa,ft,Fl,ta,zl,Da,Q,gt,Ml,_t,El,Sn,ql,Nl,Cl,Tt,Ul,vt,Pl,jl,Jl,ue,bt,Wl,qe,Il,xn,Zl,Gl,na,Dl,Vl,Ll,oo,Va,Ne,to,ra,yt,Al,aa,Ol,La,X,kt,Rl,wt,Bl,$n,Hl,Yl,Ql,St,Xl,xt,Kl,ep,op,A,$t,tp,Ce,np,Fn,rp,ap,sa,sp,cp,ip,no,dp,ro,lp,ao,Aa,Ue,so,ca,Ft,pp,ia,hp,Oa,D,zt,mp,Mt,up,zn,fp,gp,_p,Et,Tp,qt,vp,bp,yp,ee,Nt,kp,Pe,wp,Mn,Sp,xp,da,$p,Fp,zp,co,Mp,io,Ep,lo,Ct,qp,la,Np,Ra,je,po,pa,Ut,Cp,ha,Up,Ba,V,Pt,Pp,jt,jp,En,Jp,Wp,Ip,Jt,Zp,Wt,Gp,Dp,Vp,oe,It,Lp,Je,Ap,qn,Op,Rp,ma,Bp,Hp,Yp,ho,Qp,mo,Xp,uo,Zt,Kp,ua,eh,Ha,We,fo,fa,Gt,oh,ga,th,Ya,K,Dt,nh,Vt,rh,Nn,ah,sh,ch,Lt,ih,At,dh,lh,ph,go,Ot,hh,_a,mh,Qa;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.31.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.31.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.31.0/src/transformers/models/speecht5/configuration_speecht5.py#L37"}}),De=new Yn({props:{anchor:"transformers.SpeechT5Config.example",$$slots:{default:[Zu]},$$scope:{ctx:F}}}),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.31.0/src/transformers/models/speecht5/configuration_speecht5.py#L349"}}),Le=new Yn({props:{anchor:"transformers.SpeechT5HifiGanConfig.example",$$slots:{default:[Gu]},$$scope:{ctx:F}}}),Po=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.31.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.31.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.31.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.31.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.31.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.31.0/src/transformers/tokenization_utils_base.py#L2503",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.0/en/main_classes/tokenizer#transformers.BatchEncoding"
>BatchEncoding</a></p>
`}}),Go=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.31.0/src/transformers/models/speecht5/tokenization_speecht5.py#L190"}}),Do=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.31.0/src/transformers/tokenization_utils_base.py#L3495",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.31.0/src/transformers/tokenization_utils_base.py#L3461",returnDescription:`
<p>The list of decoded sentences.</p>
`,returnType:`
<p><code>List[str]</code></p>
`}}),Ao=new re({}),Oo=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.31.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.31.0/src/transformers/models/speecht5/feature_extraction_speecht5.py#L31"}}),Bo=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[str, transformers.utils.generic.TensorType, 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.31.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.31.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.31.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.31.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.31.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.31.0/src/transformers/models/speecht5/processing_speecht5.py#L20"}}),Xo=new $({props:{name:"__call__",anchor:"transformers.SpeechT5Processor.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.31.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.31.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.31.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.31.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.31.0/src/transformers/processing_utils.py#L155"}}),Ye=new Hn({props:{$$slots:{default:[Du]},$$scope:{ctx:F}}}),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.31.0/en/internal/image_processing_utils#transformers.ImageProcessingMixin.push_to_hub">push_to_hub()</a> method.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/processing_utils.py#L93"}}),Qe=new Hn({props:{$$slots:{default:[Vu]},$$scope:{ctx:F}}}),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.31.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.31.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.31.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.31.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.31.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.31.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.31.0/src/transformers/models/speecht5/modeling_speecht5.py#L2220",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.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.31.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:F}}}),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.31.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.31.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/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.31.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.31.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.31.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.31.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer">SpeechT5Tokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.31.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer">SpeechT5Tokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/speecht5/modeling_speecht5.py#L2372",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.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.31.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:F}}}),ro=new Yn({props:{anchor:"transformers.SpeechT5ForSpeechToText.forward.example",$$slots:{default:[Ou]},$$scope:{ctx:F}}}),ao=new Yn({props:{anchor:"transformers.SpeechT5ForSpeechToText.forward.example-2",$$slots:{default:[Ru]},$$scope:{ctx:F}}}),Ft=new re({}),zt=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.31.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.31.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/speecht5/modeling_speecht5.py#L2631"}}),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.31.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.31.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer">SpeechT5Tokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.31.0/en/model_doc/speecht5#transformers.SpeechT5Processor">SpeechT5Processor</a>. See <a href="/docs/transformers/v4.31.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.31.0/src/transformers/models/speecht5/modeling_speecht5.py#L2660",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.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.31.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:[Bu]},$$scope:{ctx:F}}}),io=new Yn({props:{anchor:"transformers.SpeechT5ForTextToSpeech.forward.example",$$slots:{default:[Hu]},$$scope:{ctx:F}}}),Ct=new $({props:{name:"generate_speech",anchor:"transformers.SpeechT5ForTextToSpeech.generate_speech",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"}],parametersDescription:[{anchor:"transformers.SpeechT5ForTextToSpeech.generate_speech.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.31.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer">SpeechT5Tokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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_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.SpeechT5ForTextToSpeech.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.SpeechT5ForTextToSpeech.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.SpeechT5ForTextToSpeech.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.SpeechT5ForTextToSpeech.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.SpeechT5ForTextToSpeech.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.31.0/src/transformers/models/speecht5/modeling_speecht5.py#L2786",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>
`}}),Ut=new re({}),Pt=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.31.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.31.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/speecht5/modeling_speecht5.py#L2849"}}),It=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.31.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.31.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.31.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.31.0/en/model_doc/speecht5#transformers.SpeechT5Processor">SpeechT5Processor</a>. See
<a href="/docs/transformers/v4.31.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.31.0/src/transformers/models/speecht5/modeling_speecht5.py#L2875",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.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.31.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:F}}}),mo=new Yn({props:{anchor:"transformers.SpeechT5ForSpeechToSpeech.forward.example",$$slots:{default:[Qu]},$$scope:{ctx:F}}}),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.31.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.31.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.31.0/src/transformers/models/speecht5/modeling_speecht5.py#L2995",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>
`}}),Gt=new re({}),Dt=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.31.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.31.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/speecht5/modeling_speecht5.py#L3136"}}),Ot=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.31.0/src/transformers/models/speecht5/modeling_speecht5.py#L3201",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(),z=n("span"),G=s("SpeechT5"),U=i(),J=n("h2"),P=n("a"),W=n("span"),T(ie.$$.fragment),Yt=i(),Ie=n("span"),Ws=s("Overview"),Fa=i(),Ze=n("p"),Is=s("The SpeechT5 model was proposed in "),$o=n("a"),Zs=s("SpeechT5: Unified-Modal Encoder-Decoder Pre-Training for Spoken Language Processing"),Gs=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."),za=i(),Qt=n("p"),Ds=s("The abstract from the paper is the following:"),Ma=i(),Xt=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 "),Fo=n("a"),As=s("Matthijs"),Os=s(". The original code can be found "),zo=n("a"),Rs=s("here"),Bs=s("."),qa=i(),ve=n("h2"),Ge=n("a"),er=n("span"),T(Mo.$$.fragment),Hs=i(),or=n("span"),Ys=s("SpeechT5Config"),Na=i(),B=n("div"),T(Eo.$$.fragment),Qs=i(),be=n("p"),Xs=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(De.$$.fragment),Ca=i(),ke=n("h2"),Ve=n("a"),tr=n("span"),T(No.$$.fragment),lc=i(),nr=n("span"),pc=s("SpeechT5HifiGanConfig"),Ua=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
`),Uo=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),Pa=i(),xe=n("h2"),Ae=n("a"),ar=n("span"),T(Po.$$.fragment),xc=i(),sr=n("span"),$c=s("SpeechT5Tokenizer"),ja=i(),E=n("div"),T(jo.$$.fragment),Fc=i(),Jo=n("p"),zc=s("Construct a SpeechT5 tokenizer. Based on "),Wo=n("a"),Mc=s("SentencePiece"),Ec=s("."),qc=i(),Io=n("p"),Nc=s("This tokenizer inherits from "),rn=n("a"),Cc=s("PreTrainedTokenizer"),Uc=s(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Pc=i(),Oe=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.`),Wc=i(),an=n("div"),T(Go.$$.fragment),Ic=i(),le=n("div"),T(Do.$$.fragment),Zc=i(),ir=n("p"),Gc=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.`),Dc=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("."),Oc=i(),Re=n("div"),T(Lo.$$.fragment),Rc=i(),lr=n("p"),Bc=s("Convert a list of lists of token ids into a list of strings by calling decode."),Ja=i(),$e=n("h2"),Be=n("a"),pr=n("span"),T(Ao.$$.fragment),Hc=i(),hr=n("span"),Yc=s("SpeechT5FeatureExtractor"),Wa=i(),j=n("div"),T(Oo.$$.fragment),Qc=i(),mr=n("p"),Xc=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(),Ro=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(Bo.$$.fragment),ii=i(),gr=n("p"),di=s("Main method to featurize and prepare for the model one or several sequence(s)."),li=i(),Fe=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.`),Ia=i(),ze=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 `),Qo=n("a"),kr=n("strong"),Fi=s("call"),zi=s("()"),Mi=s(" and "),pn=n("a"),Ei=s("decode()"),qi=s(" for more information."),Ni=i(),N=n("div"),T(Xo.$$.fragment),Ci=i(),wr=n("p"),Ui=s("Processes audio and text input, as well as audio and text targets."),Pi=i(),ae=n("p"),ji=s("You can process audio by using the argument "),Sr=n("code"),Ji=s("audio"),Wi=s(`, or process audio targets by using the argument
`),xr=n("code"),Ii=s("audio_target"),Zi=s(`. This forwards the arguments to SpeechT5FeatureExtractor\u2019s
`),Ko=n("a"),$r=n("strong"),Gi=s("call"),Di=s("()"),Vi=s("."),Li=i(),se=n("p"),Ai=s("You can process text by using the argument "),Fr=n("code"),Oi=s("text"),Ri=s(", or process text labels by using the argument "),zr=n("code"),Bi=s("text_target"),Hi=s(`.
This forwards the arguments to SpeechT5Tokenizer\u2019s `),et=n("a"),Mr=n("strong"),Yi=s("call"),Qi=s("()"),Xi=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"),Ur=n("code"),pd=s("audio_target"),hd=s(" only"),md=i(),ot=n("li"),Pr=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 "),Wr=n("code"),bd=s("audio_target"),yd=i(),nt=n("li"),Ir=n("code"),kd=s("text"),wd=s(" and "),Zr=n("code"),Sd=s("text_target"),xd=i(),rt=n("li"),Gr=n("code"),$d=s("audio"),Fd=s(" and "),Dr=n("code"),zd=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(),I=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."),Ud=i(),Me=n("p"),Pd=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"),Wd=s("pad()"),Id=s("."),Zd=i(),Ar=n("p"),Gd=s("Valid input combinations are:"),Dd=i(),Y=n("ul"),Tn=n("li"),Or=n("code"),Vd=s("input_ids"),Ld=s(" only"),Ad=i(),vn=n("li"),Rr=n("code"),Od=s("input_values"),Rd=s(" only"),Bd=i(),bn=n("li"),Br=n("code"),Hd=s("labels"),Yd=s(" only, either log-mel spectrograms or text tokens"),Qd=i(),st=n("li"),Hr=n("code"),Xd=s("input_ids"),Kd=s(" and log-mel spectrogram "),Yr=n("code"),el=s("labels"),ol=i(),ct=n("li"),Qr=n("code"),tl=s("input_values"),nl=s(" and text "),Xr=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(Qe.$$.fragment),_l=i(),Xe=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.`),Ga=i(),Ee=n("h2"),eo=n("a"),oa=n("span"),T(ft.$$.fragment),Fl=i(),ta=n("span"),zl=s("SpeechT5Model"),Da=i(),Q=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"),Ul=s("This model is also a PyTorch "),vt=n("a"),Pl=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),Wl=i(),qe=n("p"),Il=s("The "),xn=n("a"),Zl=s("SpeechT5Model"),Gl=s(" forward method, overrides the "),na=n("code"),Dl=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"),Ol=s("SpeechT5ForSpeechToText"),La=i(),X=n("div"),T(kt.$$.fragment),Rl=i(),wt=n("p"),Bl=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.)`),Ql=i(),St=n("p"),Xl=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 "),Fn=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(),Ue=n("h2"),so=n("a"),ca=n("span"),T(Ft.$$.fragment),pp=i(),ia=n("span"),hp=s("SpeechT5ForTextToSpeech"),Oa=i(),D=n("div"),T(zt.$$.fragment),mp=i(),Mt=n("p"),up=s(`SpeechT5 Model with a text encoder and a speech decoder.
This model inherits from `),zn=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(),Pe=n("p"),wp=s("The "),Mn=n("a"),Sp=s("SpeechT5ForTextToSpeech"),xp=s(" forward method, overrides the "),da=n("code"),$p=s("__call__"),Fp=s(" special method."),zp=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.`),Ra=i(),je=n("h2"),po=n("a"),pa=n("span"),T(Ut.$$.fragment),Cp=i(),ha=n("span"),Up=s("SpeechT5ForSpeechToSpeech"),Ba=i(),V=n("div"),T(Pt.$$.fragment),Pp=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"),Wp=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.)`),Ip=i(),Jt=n("p"),Zp=s("This model is also a PyTorch "),Wt=n("a"),Gp=s("torch.nn.Module"),Dp=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(It.$$.fragment),Lp=i(),Je=n("p"),Ap=s("The "),qn=n("a"),Op=s("SpeechT5ForSpeechToSpeech"),Rp=s(" forward method, overrides the "),ma=n("code"),Bp=s("__call__"),Hp=s(" special method."),Yp=i(),T(ho.$$.fragment),Qp=i(),T(mo.$$.fragment),Xp=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(),We=n("h2"),fo=n("a"),fa=n("span"),T(Gt.$$.fragment),oh=i(),ga=n("span"),th=s("SpeechT5HifiGan"),Ya=i(),K=n("div"),T(Dt.$$.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(Ot.$$.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=Wu('[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 Rt=a(m);f=r(Rt,"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(Rt),z=r(Rt,"SPAN",{});var ba=a(z);G=c(ba,"SpeechT5"),ba.forEach(o),Rt.forEach(o),U=d(t),J=r(t,"H2",{class:!0});var Bt=a(J);P=r(Bt,"A",{id:!0,class:!0,href:!0});var ya=a(P);W=r(ya,"SPAN",{});var ka=a(W);v(ie.$$.fragment,ka),ka.forEach(o),ya.forEach(o),Yt=d(Bt),Ie=r(Bt,"SPAN",{});var wa=a(Ie);Ws=c(wa,"Overview"),wa.forEach(o),Bt.forEach(o),Fa=d(t),Ze=r(t,"P",{});var Ht=a(Ze);Is=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),Gs=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),za=d(t),Qt=r(t,"P",{});var xa=a(Qt);Ds=c(xa,"The abstract from the paper is the following:"),xa.forEach(o),Ma=d(t),Xt=r(t,"P",{});var $a=a(Xt);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 "),Fo=r(Cn,"A",{href:!0,rel:!0});var xh=a(Fo);As=c(xh,"Matthijs"),xh.forEach(o),Os=c(Cn,". The original code can be found "),zo=r(Cn,"A",{href:!0,rel:!0});var $h=a(zo);Rs=c($h,"here"),$h.forEach(o),Bs=c(Cn,"."),Cn.forEach(o),qa=d(t),ve=r(t,"H2",{class:!0});var Xa=a(ve);Ge=r(Xa,"A",{id:!0,class:!0,href:!0});var Fh=a(Ge);er=r(Fh,"SPAN",{});var zh=a(er);v(Mo.$$.fragment,zh),zh.forEach(o),Fh.forEach(o),Hs=d(Xa),or=r(Xa,"SPAN",{});var Mh=a(or);Ys=c(Mh,"SpeechT5Config"),Mh.forEach(o),Xa.forEach(o),Na=d(t),B=r(t,"DIV",{class:!0});var _o=a(B);v(Eo.$$.fragment,_o),Qs=d(_o),be=r(_o,"P",{});var Un=a(be);Xs=c(Un,"This is the configuration class to store the configuration of a "),Kt=r(Un,"A",{href:!0});var Eh=a(Kt);Ks=c(Eh,"SpeechT5Model"),Eh.forEach(o),ec=c(Un,`. 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(Un,"A",{href:!0,rel:!0});var qh=a(qo);oc=c(qh,"microsoft/speecht5_asr"),qh.forEach(o),tc=c(Un," architecture."),Un.forEach(o),nc=d(_o),ye=r(_o,"P",{});var Pn=a(ye);rc=c(Pn,"Configuration objects inherit from "),en=r(Pn,"A",{href:!0});var Nh=a(en);ac=c(Nh,"PretrainedConfig"),Nh.forEach(o),sc=c(Pn,` and can be used to control the model outputs. Read the
documentation from `),on=r(Pn,"A",{href:!0});var Ch=a(on);cc=c(Ch,"PretrainedConfig"),Ch.forEach(o),ic=c(Pn," for more information."),Pn.forEach(o),dc=d(_o),v(De.$$.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 Uh=a(Ve);tr=r(Uh,"SPAN",{});var Ph=a(tr);v(No.$$.fragment,Ph),Ph.forEach(o),Uh.forEach(o),lc=d(Ka),nr=r(Ka,"SPAN",{});var jh=a(nr);pc=c(jh,"SpeechT5HifiGanConfig"),jh.forEach(o),Ka.forEach(o),Ua=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
`),Uo=r(jn,"A",{href:!0,rel:!0});var Wh=a(Uo);gc=c(Wh,"microsoft/speecht5_hifigan"),Wh.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 Ih=a(tn);bc=c(Ih,"PretrainedConfig"),Ih.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),Pa=d(t),xe=r(t,"H2",{class:!0});var es=a(xe);Ae=r(es,"A",{id:!0,class:!0,href:!0});var Gh=a(Ae);ar=r(Gh,"SPAN",{});var Dh=a(ar);v(Po.$$.fragment,Dh),Dh.forEach(o),Gh.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 O=a(E);v(jo.$$.fragment,O),Fc=d(O),Jo=r(O,"P",{});var os=a(Jo);zc=c(os,"Construct a SpeechT5 tokenizer. Based on "),Wo=r(os,"A",{href:!0,rel:!0});var Lh=a(Wo);Mc=c(Lh,"SentencePiece"),Lh.forEach(o),Ec=c(os,"."),os.forEach(o),qc=d(O),Io=r(O,"P",{});var ts=a(Io);Nc=c(ts,"This tokenizer inherits from "),rn=r(ts,"A",{href:!0});var Ah=a(rn);Cc=c(Ah,"PreTrainedTokenizer"),Ah.forEach(o),Uc=c(ts,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),ts.forEach(o),Pc=d(O),Oe=r(O,"DIV",{class:!0});var ns=a(Oe);v(Zo.$$.fragment,ns),jc=d(ns),cr=r(ns,"P",{});var Oh=a(cr);Jc=c(Oh,`Main method to tokenize and prepare for the model one or several sequence(s) or one or several pair(s) of
sequences.`),Oh.forEach(o),ns.forEach(o),Wc=d(O),an=r(O,"DIV",{class:!0});var Rh=a(an);v(Go.$$.fragment,Rh),Rh.forEach(o),Ic=d(O),le=r(O,"DIV",{class:!0});var Wn=a(le);v(Do.$$.fragment,Wn),Zc=d(Wn),ir=r(Wn,"P",{});var Bh=a(ir);Gc=c(Bh,`Converts a sequence of ids in a string, using the tokenizer and vocabulary with options to remove special
tokens and clean up tokenization spaces.`),Bh.forEach(o),Dc=d(Wn),Vo=r(Wn,"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),Wn.forEach(o),Oc=d(O),Re=r(O,"DIV",{class:!0});var as=a(Re);v(Lo.$$.fragment,as),Rc=d(as),lr=r(as,"P",{});var Yh=a(lr);Bc=c(Yh,"Convert a list of lists of token ids into a list of strings by calling decode."),Yh.forEach(o),as.forEach(o),O.forEach(o),Ja=d(t),$e=r(t,"H2",{class:!0});var ss=a($e);Be=r(ss,"A",{id:!0,class:!0,href:!0});var Qh=a(Be);pr=r(Qh,"SPAN",{});var Xh=a(pr);v(Ao.$$.fragment,Xh),Xh.forEach(o),Qh.forEach(o),Hc=d(ss),hr=r(ss,"SPAN",{});var Kh=a(hr);Yc=c(Kh,"SpeechT5FeatureExtractor"),Kh.forEach(o),ss.forEach(o),Wa=d(t),j=r(t,"DIV",{class:!0});var te=a(j);v(Oo.$$.fragment,te),Qc=d(te),mr=r(te,"P",{});var em=a(mr);Xc=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),Ro=r(te,"P",{});var cs=a(Ro);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 In=a(pe);v(Bo.$$.fragment,In),ii=d(In),gr=r(In,"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(In),Fe=r(In,"P",{});var Zn=a(Fe);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),In.forEach(o),te.forEach(o),Ia=d(t),ze=r(t,"H2",{class:!0});var is=a(ze);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 `),Qo=r(ce,"A",{href:!0});var uh=a(Qo);kr=r(uh,"STRONG",{});var um=a(kr);Fi=c(um,"call"),um.forEach(o),zi=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 R=a(N);v(Xo.$$.fragment,R),Ci=d(R),wr=r(R,"P",{});var gm=a(wr);Ui=c(gm,"Processes audio and text input, as well as audio and text targets."),gm.forEach(o),Pi=d(R),ae=r(R,"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),Wi=c(vo,`, or process audio targets by using the argument
`),xr=r(vo,"CODE",{});var Tm=a(xr);Ii=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);Gi=c(vm,"call"),vm.forEach(o),Di=c(fh,"()"),fh.forEach(o),Vi=c(vo,"."),vo.forEach(o),Li=d(R),se=r(R,"P",{});var bo=a(se);Ai=c(bo,"You can process text by using the argument "),Fr=r(bo,"CODE",{});var bm=a(Fr);Oi=c(bm,"text"),bm.forEach(o),Ri=c(bo,", or process text labels by using the argument "),zr=r(bo,"CODE",{});var ym=a(zr);Bi=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),Qi=c(gh,"()"),gh.forEach(o),Xi=c(bo,"."),bo.forEach(o),Ki=d(R),Er=r(R,"P",{});var wm=a(Er);ed=c(wm,"Valid input combinations are:"),wm.forEach(o),od=d(R),q=r(R,"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);Ur=r(bh,"CODE",{});var Fm=a(Ur);pd=c(Fm,"audio_target"),Fm.forEach(o),hd=c(bh," only"),bh.forEach(o),md=d(Z),ot=r(Z,"LI",{});var ds=a(ot);Pr=r(ds,"CODE",{});var zm=a(Pr);ud=c(zm,"text"),zm.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 "),Wr=r(ls,"CODE",{});var qm=a(Wr);bd=c(qm,"audio_target"),qm.forEach(o),ls.forEach(o),yd=d(Z),nt=r(Z,"LI",{});var ps=a(nt);Ir=r(ps,"CODE",{});var Nm=a(Ir);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);Gr=r(hs,"CODE",{});var Um=a(Gr);$d=c(Um,"audio"),Um.forEach(o),Fd=c(hs," and "),Dr=r(hs,"CODE",{});var Pm=a(Dr);zd=c(Pm,"text_target"),Pm.forEach(o),hs.forEach(o),Z.forEach(o),Md=d(R),Vr=r(R,"P",{});var jm=a(Vr);Ed=c(jm,"Please refer to the docstring of the above two methods for more information."),jm.forEach(o),R.forEach(o),qd=d(C),I=r(C,"DIV",{class:!0});var ne=a(I);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),Ud=d(ne),Me=r(ne,"P",{});var Gn=a(Me);Pd=c(Gn,"Audio inputs are padded by SpeechT5FeatureExtractor\u2019s "),gn=r(Gn,"A",{href:!0});var Wm=a(gn);jd=c(Wm,"pad()"),Wm.forEach(o),Jd=c(Gn,`. Text inputs are padded
by SpeechT5Tokenizer\u2019s `),_n=r(Gn,"A",{href:!0});var Im=a(_n);Wd=c(Im,"pad()"),Im.forEach(o),Id=c(Gn,"."),Gn.forEach(o),Zd=d(ne),Ar=r(ne,"P",{});var Zm=a(Ar);Gd=c(Zm,"Valid input combinations are:"),Zm.forEach(o),Dd=d(ne),Y=r(ne,"UL",{});var fe=a(Y);Tn=r(fe,"LI",{});var yh=a(Tn);Or=r(yh,"CODE",{});var Gm=a(Or);Vd=c(Gm,"input_ids"),Gm.forEach(o),Ld=c(yh," only"),yh.forEach(o),Ad=d(fe),vn=r(fe,"LI",{});var kh=a(vn);Rr=r(kh,"CODE",{});var Dm=a(Rr);Od=c(Dm,"input_values"),Dm.forEach(o),Rd=c(kh," only"),kh.forEach(o),Bd=d(fe),bn=r(fe,"LI",{});var wh=a(bn);Br=r(wh,"CODE",{});var Vm=a(Br);Hd=c(Vm,"labels"),Vm.forEach(o),Yd=c(wh," only, either log-mel spectrograms or text tokens"),wh.forEach(o),Qd=d(fe),st=r(fe,"LI",{});var ms=a(st);Hr=r(ms,"CODE",{});var Lm=a(Hr);Xd=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);Qr=r(us,"CODE",{});var Om=a(Qr);tl=c(Om,"input_values"),Om.forEach(o),nl=c(us," and text "),Xr=r(us,"CODE",{});var Rm=a(Xr);rl=c(Rm,"labels"),Rm.forEach(o),us.forEach(o),fe.forEach(o),al=d(ne),Kr=r(ne,"P",{});var Bm=a(Kr);sl=c(Bm,"Please refer to the docstring of the above two methods for more information."),Bm.forEach(o),ne.forEach(o),cl=d(C),he=r(C,"DIV",{class:!0});var Dn=a(he);v(it.$$.fragment,Dn),il=d(Dn),ea=r(Dn,"P",{});var Hm=a(ea);dl=c(Hm,"Instantiate a processor associated with a pretrained model."),Hm.forEach(o),ll=d(Dn),v(Ye.$$.fragment,Dn),Dn.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(Qe.$$.fragment,Vn),Vn.forEach(o),_l=d(C),Xe=r(C,"DIV",{class:!0});var gs=a(Xe);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 Qm=a(kn);bl=c(Qm,"batch_decode()"),Qm.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 Xm=a(wn);xl=c(Xm,"decode()"),Xm.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),Ga=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),Fl=d(bs),ta=r(bs,"SPAN",{});var ou=a(ta);zl=c(ou,"SpeechT5Model"),ou.forEach(o),bs.forEach(o),Da=d(t),Q=r(t,"DIV",{class:!0});var yo=a(Q);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);Ul=c(ks,"This model is also a PyTorch "),vt=r(ks,"A",{href:!0,rel:!0});var nu=a(vt);Pl=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),Wl=d(Ln),qe=r(Ln,"P",{});var An=a(qe);Il=c(An,"The "),xn=r(An,"A",{href:!0});var ru=a(xn);Zl=c(ru,"SpeechT5Model"),ru.forEach(o),Gl=c(An," forward method, overrides the "),na=r(An,"CODE",{});var au=a(na);Dl=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);Ol=c(iu,"SpeechT5ForSpeechToText"),iu.forEach(o),ws.forEach(o),La=d(t),X=r(t,"DIV",{class:!0});var ko=a(X);v(kt.$$.fragment,ko),Rl=d(ko),wt=r(ko,"P",{});var Ss=a(wt);Bl=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),Ql=d(ko),St=r(ko,"P",{});var xs=a(St);Xl=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 On=a(Ce);np=c(On,"The "),Fn=r(On,"A",{href:!0});var pu=a(Fn);rp=c(pu,"SpeechT5ForSpeechToText"),pu.forEach(o),ap=c(On," forward method, overrides the "),sa=r(On,"CODE",{});var hu=a(sa);sp=c(hu,"__call__"),hu.forEach(o),cp=c(On," special method."),On.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),Ue=r(t,"H2",{class:!0});var $s=a(Ue);so=r($s,"A",{id:!0,class:!0,href:!0});var mu=a(so);ca=r(mu,"SPAN",{});var uu=a(ca);v(Ft.$$.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),Oa=d(t),D=r(t,"DIV",{class:!0});var _e=a(D);v(zt.$$.fragment,_e),mp=d(_e),Mt=r(_e,"P",{});var Fs=a(Mt);up=c(Fs,`SpeechT5 Model with a text encoder and a speech decoder.
This model inherits from `),zn=r(Fs,"A",{href:!0});var gu=a(zn);fp=c(gu,"PreTrainedModel"),gu.forEach(o),gp=c(Fs,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Fs.forEach(o),_p=d(_e),Et=r(_e,"P",{});var zs=a(Et);Tp=c(zs,"This model is also a PyTorch "),qt=r(zs,"A",{href:!0,rel:!0});var _u=a(qt);vp=c(_u,"torch.nn.Module"),_u.forEach(o),bp=c(zs,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),zs.forEach(o),yp=d(_e),ee=r(_e,"DIV",{class:!0});var wo=a(ee);v(Nt.$$.fragment,wo),kp=d(wo),Pe=r(wo,"P",{});var Rn=a(Pe);wp=c(Rn,"The "),Mn=r(Rn,"A",{href:!0});var Tu=a(Mn);Sp=c(Tu,"SpeechT5ForTextToSpeech"),Tu.forEach(o),xp=c(Rn," forward method, overrides the "),da=r(Rn,"CODE",{});var vu=a(da);$p=c(vu,"__call__"),vu.forEach(o),Fp=c(Rn," special method."),Rn.forEach(o),zp=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),Ra=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(Ut.$$.fragment,ku),ku.forEach(o),yu.forEach(o),Cp=d(Es),ha=r(Es,"SPAN",{});var wu=a(ha);Up=c(wu,"SpeechT5ForSpeechToSpeech"),wu.forEach(o),Es.forEach(o),Ba=d(t),V=r(t,"DIV",{class:!0});var Te=a(V);v(Pt.$$.fragment,Te),Pp=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),Wp=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),Ip=d(Te),Jt=r(Te,"P",{});var Ns=a(Jt);Zp=c(Ns,"This model is also a PyTorch "),Wt=r(Ns,"A",{href:!0,rel:!0});var xu=a(Wt);Gp=c(xu,"torch.nn.Module"),xu.forEach(o),Dp=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(It.$$.fragment,So),Lp=d(So),Je=r(So,"P",{});var Bn=a(Je);Ap=c(Bn,"The "),qn=r(Bn,"A",{href:!0});var $u=a(qn);Op=c($u,"SpeechT5ForSpeechToSpeech"),$u.forEach(o),Rp=c(Bn," forward method, overrides the "),ma=r(Bn,"CODE",{});var Fu=a(ma);Bp=c(Fu,"__call__"),Fu.forEach(o),Hp=c(Bn," special method."),Bn.forEach(o),Yp=d(So),v(ho.$$.fragment,So),Qp=d(So),v(mo.$$.fragment,So),So.forEach(o),Xp=d(Te),uo=r(Te,"DIV",{class:!0});var Cs=a(uo);v(Zt.$$.fragment,Cs),Kp=d(Cs),ua=r(Cs,"P",{});var zu=a(ua);eh=c(zu,`Converts a raw speech waveform into a sequence of mel spectrograms, which are subsequently turned back into a
speech waveform using a vocoder.`),zu.forEach(o),Cs.forEach(o),Te.forEach(o),Ha=d(t),We=r(t,"H2",{class:!0});var Us=a(We);fo=r(Us,"A",{id:!0,class:!0,href:!0});var Mu=a(fo);fa=r(Mu,"SPAN",{});var Eu=a(fa);v(Gt.$$.fragment,Eu),Eu.forEach(o),Mu.forEach(o),oh=d(Us),ga=r(Us,"SPAN",{});var qu=a(ga);th=c(qu,"SpeechT5HifiGan"),qu.forEach(o),Us.forEach(o),Ya=d(t),K=r(t,"DIV",{class:!0});var xo=a(K);v(Dt.$$.fragment,xo),nh=d(xo),Vt=r(xo,"P",{});var Ps=a(Vt);rh=c(Ps,`HiFi-GAN vocoder.
This model inherits from `),Nn=r(Ps,"A",{href:!0});var Nu=a(Nn);ah=c(Nu,"PreTrainedModel"),Nu.forEach(o),sh=c(Ps,`. 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.)`),Ps.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(Ot.$$.fragment,Js),hh=d(Js),_a=r(Js,"P",{});var Uu=a(_a);mh=c(Uu,`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.`),Uu.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(P,"id","overview"),l(P,"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(P,"href","#overview"),l(J,"class","relative group"),l($o,"href","https://arxiv.org/abs/2110.07205"),l($o,"rel","nofollow"),l(Fo,"href","https://huggingface.co/Matthijs"),l(Fo,"rel","nofollow"),l(zo,"href","https://github.com/microsoft/SpeechT5"),l(zo,"rel","nofollow"),l(Ge,"id","transformers.SpeechT5Config"),l(Ge,"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(Ge,"href","#transformers.SpeechT5Config"),l(ve,"class","relative group"),l(Kt,"href","/docs/transformers/v4.31.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.31.0/en/main_classes/configuration#transformers.PretrainedConfig"),l(on,"href","/docs/transformers/v4.31.0/en/main_classes/configuration#transformers.PretrainedConfig"),l(B,"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(Uo,"href","https://huggingface.co/microsoft/speecht5_hifigan"),l(Uo,"rel","nofollow"),l(tn,"href","/docs/transformers/v4.31.0/en/main_classes/configuration#transformers.PretrainedConfig"),l(nn,"href","/docs/transformers/v4.31.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(Wo,"href","https://github.com/google/sentencepiece"),l(Wo,"rel","nofollow"),l(rn,"href","/docs/transformers/v4.31.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),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(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(Re,"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(Be,"id","transformers.SpeechT5FeatureExtractor"),l(Be,"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(Be,"href","#transformers.SpeechT5FeatureExtractor"),l($e,"class","relative group"),l(sn,"href","/docs/transformers/v4.31.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(ze,"class","relative group"),l(cn,"href","/docs/transformers/v4.31.0/en/model_doc/speecht5#transformers.SpeechT5Processor"),l(dn,"href","/docs/transformers/v4.31.0/en/model_doc/speecht5#transformers.SpeechT5FeatureExtractor"),l(ln,"href","/docs/transformers/v4.31.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer"),l(Qo,"href","/docs/transformers/v4.31.0/en/model_doc/speecht5#transformers.SpeechT5Processor.__call__"),l(pn,"href","/docs/transformers/v4.31.0/en/model_doc/speecht5#transformers.SpeechT5Processor.decode"),l(Ko,"href","/docs/transformers/v4.31.0/en/model_doc/speecht5#transformers.SpeechT5FeatureExtractor.__call__"),l(et,"href","/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.31.0/en/main_classes/feature_extractor#transformers.SequenceFeatureExtractor.pad"),l(_n,"href","/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.pad"),l(I,"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.31.0/en/model_doc/trocr#transformers.TrOCRProcessor.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.31.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.batch_decode"),l(Xe,"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.31.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.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.31.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.31.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(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(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.31.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(Fn,"href","/docs/transformers/v4.31.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(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(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(Ue,"class","relative group"),l(zn,"href","/docs/transformers/v4.31.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.31.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(D,"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.31.0/en/main_classes/model#transformers.PreTrainedModel"),l(Wt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(Wt,"rel","nofollow"),l(qn,"href","/docs/transformers/v4.31.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(We,"class","relative group"),l(Nn,"href","/docs/transformers/v4.31.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,z),e(z,G),_(t,U,u),_(t,J,u),e(J,P),e(P,W),b(ie,W,null),e(J,Yt),e(J,Ie),e(Ie,Ws),_(t,Fa,u),_(t,Ze,u),e(Ze,Is),e(Ze,$o),e($o,Zs),e(Ze,Gs),_(t,za,u),_(t,Qt,u),e(Qt,Ds),_(t,Ma,u),_(t,Xt,u),e(Xt,Kn),e(Kn,Vs),_(t,Ea,u),_(t,de,u),e(de,Ls),e(de,Fo),e(Fo,As),e(de,Os),e(de,zo),e(zo,Rs),e(de,Bs),_(t,qa,u),_(t,ve,u),e(ve,Ge),e(Ge,er),b(Mo,er,null),e(ve,Hs),e(ve,or),e(or,Ys),_(t,Na,u),_(t,B,u),b(Eo,B,null),e(B,Qs),e(B,be),e(be,Xs),e(be,Kt),e(Kt,Ks),e(be,ec),e(be,qo),e(qo,oc),e(be,tc),e(B,nc),e(B,ye),e(ye,rc),e(ye,en),e(en,ac),e(ye,sc),e(ye,on),e(on,cc),e(ye,ic),e(B,dc),b(De,B,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,Ua,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,Uo),e(Uo,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,Pa,u),_(t,xe,u),e(xe,Ae),e(Ae,ar),b(Po,ar,null),e(xe,xc),e(xe,sr),e(sr,$c),_(t,ja,u),_(t,E,u),b(jo,E,null),e(E,Fc),e(E,Jo),e(Jo,zc),e(Jo,Wo),e(Wo,Mc),e(Jo,Ec),e(E,qc),e(E,Io),e(Io,Nc),e(Io,rn),e(rn,Cc),e(Io,Uc),e(E,Pc),e(E,Oe),b(Zo,Oe,null),e(Oe,jc),e(Oe,cr),e(cr,Jc),e(E,Wc),e(E,an),b(Go,an,null),e(E,Ic),e(E,le),b(Do,le,null),e(le,Zc),e(le,ir),e(ir,Gc),e(le,Dc),e(le,Vo),e(Vo,Vc),e(Vo,dr),e(dr,Lc),e(Vo,Ac),e(E,Oc),e(E,Re),b(Lo,Re,null),e(Re,Rc),e(Re,lr),e(lr,Bc),_(t,Ja,u),_(t,$e,u),e($e,Be),e(Be,pr),b(Ao,pr,null),e($e,Hc),e($e,hr),e(hr,Yc),_(t,Wa,u),_(t,j,u),b(Oo,j,null),e(j,Qc),e(j,mr),e(mr,Xc),e(j,Kc),e(j,ur),e(ur,ei),e(j,oi),e(j,fr),e(fr,ti),e(j,ni),e(j,Ro),e(Ro,ri),e(Ro,sn),e(sn,ai),e(Ro,si),e(j,ci),e(j,pe),b(Bo,pe,null),e(pe,ii),e(pe,gr),e(gr,di),e(pe,li),e(pe,Fe),e(Fe,pi),e(Fe,_r),e(_r,hi),e(Fe,mi),e(Fe,Tr),e(Tr,ui),e(Fe,fi),_(t,Ia,u),_(t,ze,u),e(ze,He),e(He,vr),b(Ho,vr,null),e(ze,gi),e(ze,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,Qo),e(Qo,kr),e(kr,Fi),e(Qo,zi),e(L,Mi),e(L,pn),e(pn,Ei),e(L,qi),e(M,Ni),e(M,N),b(Xo,N,null),e(N,Ci),e(N,wr),e(wr,Ui),e(N,Pi),e(N,ae),e(ae,ji),e(ae,Sr),e(Sr,Ji),e(ae,Wi),e(ae,xr),e(xr,Ii),e(ae,Zi),e(ae,Ko),e(Ko,$r),e($r,Gi),e(Ko,Di),e(ae,Vi),e(N,Li),e(N,se),e(se,Ai),e(se,Fr),e(Fr,Oi),e(se,Ri),e(se,zr),e(zr,Bi),e(se,Hi),e(se,et),e(et,Mr),e(Mr,Yi),e(et,Qi),e(se,Xi),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,Ur),e(Ur,pd),e(fn,hd),e(q,md),e(q,ot),e(ot,Pr),e(Pr,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,Wr),e(Wr,bd),e(q,yd),e(q,nt),e(nt,Ir),e(Ir,kd),e(nt,wd),e(nt,Zr),e(Zr,Sd),e(q,xd),e(q,rt),e(rt,Gr),e(Gr,$d),e(rt,Fd),e(rt,Dr),e(Dr,zd),e(N,Md),e(N,Vr),e(Vr,Ed),e(M,qd),e(M,I),b(at,I,null),e(I,Nd),e(I,Lr),e(Lr,Cd),e(I,Ud),e(I,Me),e(Me,Pd),e(Me,gn),e(gn,jd),e(Me,Jd),e(Me,_n),e(_n,Wd),e(Me,Id),e(I,Zd),e(I,Ar),e(Ar,Gd),e(I,Dd),e(I,Y),e(Y,Tn),e(Tn,Or),e(Or,Vd),e(Tn,Ld),e(Y,Ad),e(Y,vn),e(vn,Rr),e(Rr,Od),e(vn,Rd),e(Y,Bd),e(Y,bn),e(bn,Br),e(Br,Hd),e(bn,Yd),e(Y,Qd),e(Y,st),e(st,Hr),e(Hr,Xd),e(st,Kd),e(st,Yr),e(Yr,el),e(Y,ol),e(Y,ct),e(ct,Qr),e(Qr,tl),e(ct,nl),e(ct,Xr),e(Xr,rl),e(I,al),e(I,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(Qe,me,null),e(M,_l),e(M,Xe),b(pt,Xe,null),e(Xe,Tl),e(Xe,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,Ga,u),_(t,Ee,u),e(Ee,eo),e(eo,oa),b(ft,oa,null),e(Ee,Fl),e(Ee,ta),e(ta,zl),_(t,Da,u),_(t,Q,u),b(gt,Q,null),e(Q,Ml),e(Q,_t),e(_t,El),e(_t,Sn),e(Sn,ql),e(_t,Nl),e(Q,Cl),e(Q,Tt),e(Tt,Ul),e(Tt,vt),e(vt,Pl),e(Tt,jl),e(Q,Jl),e(Q,ue),b(bt,ue,null),e(ue,Wl),e(ue,qe),e(qe,Il),e(qe,xn),e(xn,Zl),e(qe,Gl),e(qe,na),e(na,Dl),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,Ol),_(t,La,u),_(t,X,u),b(kt,X,null),e(X,Rl),e(X,wt),e(wt,Bl),e(wt,$n),e($n,Hl),e(wt,Yl),e(X,Ql),e(X,St),e(St,Xl),e(St,xt),e(xt,Kl),e(St,ep),e(X,op),e(X,A),b($t,A,null),e(A,tp),e(A,Ce),e(Ce,np),e(Ce,Fn),e(Fn,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,Ue,u),e(Ue,so),e(so,ca),b(Ft,ca,null),e(Ue,pp),e(Ue,ia),e(ia,hp),_(t,Oa,u),_(t,D,u),b(zt,D,null),e(D,mp),e(D,Mt),e(Mt,up),e(Mt,zn),e(zn,fp),e(Mt,gp),e(D,_p),e(D,Et),e(Et,Tp),e(Et,qt),e(qt,vp),e(Et,bp),e(D,yp),e(D,ee),b(Nt,ee,null),e(ee,kp),e(ee,Pe),e(Pe,wp),e(Pe,Mn),e(Mn,Sp),e(Pe,xp),e(Pe,da),e(da,$p),e(Pe,Fp),e(ee,zp),b(co,ee,null),e(ee,Mp),b(io,ee,null),e(D,Ep),e(D,lo),b(Ct,lo,null),e(lo,qp),e(lo,la),e(la,Np),_(t,Ra,u),_(t,je,u),e(je,po),e(po,pa),b(Ut,pa,null),e(je,Cp),e(je,ha),e(ha,Up),_(t,Ba,u),_(t,V,u),b(Pt,V,null),e(V,Pp),e(V,jt),e(jt,jp),e(jt,En),e(En,Jp),e(jt,Wp),e(V,Ip),e(V,Jt),e(Jt,Zp),e(Jt,Wt),e(Wt,Gp),e(Jt,Dp),e(V,Vp),e(V,oe),b(It,oe,null),e(oe,Lp),e(oe,Je),e(Je,Ap),e(Je,qn),e(qn,Op),e(Je,Rp),e(Je,ma),e(ma,Bp),e(Je,Hp),e(oe,Yp),b(ho,oe,null),e(oe,Qp),b(mo,oe,null),e(V,Xp),e(V,uo),b(Zt,uo,null),e(uo,Kp),e(uo,ua),e(ua,eh),_(t,Ha,u),_(t,We,u),e(We,fo),e(fo,fa),b(Gt,fa,null),e(We,oh),e(We,ga),e(ga,th),_(t,Ya,u),_(t,K,u),b(Dt,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(Ot,go,null),e(go,hh),e(go,_a),e(_a,mh),Qa=!0},p(t,[u]){const Rt={};u&2&&(Rt.$$scope={dirty:u,ctx:t}),De.$set(Rt);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}),Qe.$set(ba);const Bt={};u&2&&(Bt.$$scope={dirty:u,ctx:t}),oo.$set(Bt);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){Qa||(y(p.$$.fragment,t),y(ie.$$.fragment,t),y(Mo.$$.fragment,t),y(Eo.$$.fragment,t),y(De.$$.fragment,t),y(No.$$.fragment,t),y(Co.$$.fragment,t),y(Le.$$.fragment,t),y(Po.$$.fragment,t),y(jo.$$.fragment,t),y(Zo.$$.fragment,t),y(Go.$$.fragment,t),y(Do.$$.fragment,t),y(Lo.$$.fragment,t),y(Ao.$$.fragment,t),y(Oo.$$.fragment,t),y(Bo.$$.fragment,t),y(Ho.$$.fragment,t),y(Yo.$$.fragment,t),y(Xo.$$.fragment,t),y(at.$$.fragment,t),y(it.$$.fragment,t),y(Ye.$$.fragment,t),y(dt.$$.fragment,t),y(Qe.$$.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(Ft.$$.fragment,t),y(zt.$$.fragment,t),y(Nt.$$.fragment,t),y(co.$$.fragment,t),y(io.$$.fragment,t),y(Ct.$$.fragment,t),y(Ut.$$.fragment,t),y(Pt.$$.fragment,t),y(It.$$.fragment,t),y(ho.$$.fragment,t),y(mo.$$.fragment,t),y(Zt.$$.fragment,t),y(Gt.$$.fragment,t),y(Dt.$$.fragment,t),y(Ot.$$.fragment,t),Qa=!0)},o(t){k(p.$$.fragment,t),k(ie.$$.fragment,t),k(Mo.$$.fragment,t),k(Eo.$$.fragment,t),k(De.$$.fragment,t),k(No.$$.fragment,t),k(Co.$$.fragment,t),k(Le.$$.fragment,t),k(Po.$$.fragment,t),k(jo.$$.fragment,t),k(Zo.$$.fragment,t),k(Go.$$.fragment,t),k(Do.$$.fragment,t),k(Lo.$$.fragment,t),k(Ao.$$.fragment,t),k(Oo.$$.fragment,t),k(Bo.$$.fragment,t),k(Ho.$$.fragment,t),k(Yo.$$.fragment,t),k(Xo.$$.fragment,t),k(at.$$.fragment,t),k(it.$$.fragment,t),k(Ye.$$.fragment,t),k(dt.$$.fragment,t),k(Qe.$$.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(Ft.$$.fragment,t),k(zt.$$.fragment,t),k(Nt.$$.fragment,t),k(co.$$.fragment,t),k(io.$$.fragment,t),k(Ct.$$.fragment,t),k(Ut.$$.fragment,t),k(Pt.$$.fragment,t),k(It.$$.fragment,t),k(ho.$$.fragment,t),k(mo.$$.fragment,t),k(Zt.$$.fragment,t),k(Gt.$$.fragment,t),k(Dt.$$.fragment,t),k(Ot.$$.fragment,t),Qa=!1},d(t){o(h),t&&o(x),t&&o(m),w(p),t&&o(U),t&&o(J),w(ie),t&&o(Fa),t&&o(Ze),t&&o(za),t&&o(Qt),t&&o(Ma),t&&o(Xt),t&&o(Ea),t&&o(de),t&&o(qa),t&&o(ve),w(Mo),t&&o(Na),t&&o(B),w(Eo),w(De),t&&o(Ca),t&&o(ke),w(No),t&&o(Ua),t&&o(H),w(Co),w(Le),t&&o(Pa),t&&o(xe),w(Po),t&&o(ja),t&&o(E),w(jo),w(Zo),w(Go),w(Do),w(Lo),t&&o(Ja),t&&o($e),w(Ao),t&&o(Wa),t&&o(j),w(Oo),w(Bo),t&&o(Ia),t&&o(ze),w(Ho),t&&o(Za),t&&o(M),w(Yo),w(Xo),w(at),w(it),w(Ye),w(dt),w(Qe),w(pt),w(mt),t&&o(Ga),t&&o(Ee),w(ft),t&&o(Da),t&&o(Q),w(gt),w(bt),w(oo),t&&o(Va),t&&o(Ne),w(yt),t&&o(La),t&&o(X),w(kt),w($t),w(no),w(ro),w(ao),t&&o(Aa),t&&o(Ue),w(Ft),t&&o(Oa),t&&o(D),w(zt),w(Nt),w(co),w(io),w(Ct),t&&o(Ra),t&&o(je),w(Ut),t&&o(Ba),t&&o(V),w(Pt),w(It),w(ho),w(mo),w(Zt),t&&o(Ha),t&&o(We),w(Gt),t&&o(Ya),t&&o(K),w(Dt),w(Ot)}}}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(F){return Iu(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class cf extends Pu{constructor(h){super();ju(this,h,ef,Xu,Ju,{})}}export{cf as default,Ku as metadata};
