import{S as Rm,i as Bm,s as Ym,e as n,k as d,w as T,t as a,M as Jm,c as r,d as o,m as l,a as s,x as v,h as c,b as i,G as e,g as _,y as b,q as k,o as y,B as S,v as Zm,L as Vn}from"../../chunks/vendor-hf-doc-builder.js";import{T as Gn}from"../../chunks/Tip-hf-doc-builder.js";import{D as $}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Rn}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as te}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Un}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Qm(z){let h,x,m,f,w;return f=new Rn({props:{code:`from transformers import SpeechT5Model, SpeechT5Config

# Initializing a "microsoft/speecht5_asr" style configuration
configuration = SpeechT5Config()

# Initializing a model (with random weights) from the "microsoft/speecht5_asr" style configuration
model = SpeechT5Model(configuration)

# Accessing the model configuration
configuration = model.config`,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=a("Example:"),m=d(),T(f.$$.fragment)},l(p){h=r(p,"P",{});var g=s(h);x=c(g,"Example:"),g.forEach(o),m=l(p),v(f.$$.fragment,p)},m(p,g){_(p,h,g),e(h,x),_(p,m,g),b(f,p,g),w=!0},p:Vn,i(p){w||(k(f.$$.fragment,p),w=!0)},o(p){y(f.$$.fragment,p),w=!1},d(p){p&&o(h),p&&o(m),S(f,p)}}}function Km(z){let h,x,m,f,w;return f=new Rn({props:{code:`from transformers import SpeechT5HifiGan, SpeechT5HifiGanConfig

# Initializing a "microsoft/speecht5_hifigan" style configuration
configuration = SpeechT5HifiGanConfig()

# Initializing a model (with random weights) from the "microsoft/speecht5_hifigan" style configuration
model = SpeechT5HifiGan(configuration)

# Accessing the model configuration
configuration = model.config`,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=a("Example:"),m=d(),T(f.$$.fragment)},l(p){h=r(p,"P",{});var g=s(h);x=c(g,"Example:"),g.forEach(o),m=l(p),v(f.$$.fragment,p)},m(p,g){_(p,h,g),e(h,x),_(p,m,g),b(f,p,g),w=!0},p:Vn,i(p){w||(k(f.$$.fragment,p),w=!0)},o(p){y(f.$$.fragment,p),w=!1},d(p){p&&o(h),p&&o(m),S(f,p)}}}function Xm(z){let h,x,m,f,w,p,g,F,I,D,L;return{c(){h=n("p"),x=a(`This class method is simply calling the feature extractor
`),m=n("a"),f=a("from_pretrained()"),w=a(`, image processor
`),p=n("a"),g=a("ImageProcessingMixin"),F=a(` and the tokenizer
`),I=n("code"),D=a("~tokenization_utils_base.PreTrainedTokenizer.from_pretrained"),L=a(` methods. Please refer to the docstrings of the
methods above for more information.`),this.h()},l(N){h=r(N,"P",{});var O=s(h);x=c(O,`This class method is simply calling the feature extractor
`),m=r(O,"A",{href:!0});var ae=s(m);f=c(ae,"from_pretrained()"),ae.forEach(o),w=c(O,`, image processor
`),p=r(O,"A",{href:!0});var Bt=s(p);g=c(Bt,"ImageProcessingMixin"),Bt.forEach(o),F=c(O,` and the tokenizer
`),I=r(O,"CODE",{});var je=s(I);D=c(je,"~tokenization_utils_base.PreTrainedTokenizer.from_pretrained"),je.forEach(o),L=c(O,` methods. Please refer to the docstrings of the
methods above for more information.`),O.forEach(o),this.h()},h(){i(m,"href","/docs/transformers/v4.27.1/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.from_pretrained"),i(p,"href","/docs/transformers/v4.27.1/en/internal/image_processing_utils#transformers.ImageProcessingMixin")},m(N,O){_(N,h,O),e(h,x),e(h,m),e(m,f),e(h,w),e(h,p),e(p,g),e(h,F),e(h,I),e(I,D),e(h,L)},d(N){N&&o(h)}}}function eu(z){let h,x,m,f,w,p,g,F;return{c(){h=n("p"),x=a("This class method is simply calling "),m=n("a"),f=a("save_pretrained()"),w=a(` and
`),p=n("a"),g=a("save_pretrained()"),F=a(`. Please refer to the docstrings of the
methods above for more information.`),this.h()},l(I){h=r(I,"P",{});var D=s(h);x=c(D,"This class method is simply calling "),m=r(D,"A",{href:!0});var L=s(m);f=c(L,"save_pretrained()"),L.forEach(o),w=c(D,` and
`),p=r(D,"A",{href:!0});var N=s(p);g=c(N,"save_pretrained()"),N.forEach(o),F=c(D,`. Please refer to the docstrings of the
methods above for more information.`),D.forEach(o),this.h()},h(){i(m,"href","/docs/transformers/v4.27.1/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.save_pretrained"),i(p,"href","/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.save_pretrained")},m(I,D){_(I,h,D),e(h,x),e(h,m),e(m,f),e(h,w),e(h,p),e(p,g),e(h,F)},d(I){I&&o(h)}}}function ou(z){let h,x,m,f,w;return{c(){h=n("p"),x=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),f=a("Module"),w=a(`
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=s(h);x=c(g,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(g,"CODE",{});var F=s(m);f=c(F,"Module"),F.forEach(o),w=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,w)},d(p){p&&o(h)}}}function tu(z){let h,x,m,f,w;return{c(){h=n("p"),x=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),f=a("Module"),w=a(`
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=s(h);x=c(g,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(g,"CODE",{});var F=s(m);f=c(F,"Module"),F.forEach(o),w=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,w)},d(p){p&&o(h)}}}function nu(z){let h,x,m,f,w;return f=new Rn({props:{code:`from transformers import SpeechT5Processor, SpeechT5ForSpeechToText
from datasets import load_dataset

dataset = load_dataset(
    "hf-internal-testing/librispeech_asr_demo", "clean", split="validation"
)  # doctest: +IGNORE_RESULT
dataset = dataset.sort("id")
sampling_rate = dataset.features["audio"].sampling_rate

processor = SpeechT5Processor.from_pretrained("microsoft/speecht5_asr")
model = SpeechT5ForSpeechToText.from_pretrained("microsoft/speecht5_asr")

# audio file is decoded on the fly
inputs = processor(audio=dataset[0]["audio"]["array"], sampling_rate=sampling_rate, return_tensors="pt")
predicted_ids = model.generate(**inputs, max_length=100)

# transcribe speech
transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True)
transcription[0]`,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=a("Example:"),m=d(),T(f.$$.fragment)},l(p){h=r(p,"P",{});var g=s(h);x=c(g,"Example:"),g.forEach(o),m=l(p),v(f.$$.fragment,p)},m(p,g){_(p,h,g),e(h,x),_(p,m,g),b(f,p,g),w=!0},p:Vn,i(p){w||(k(f.$$.fragment,p),w=!0)},o(p){y(f.$$.fragment,p),w=!1},d(p){p&&o(h),p&&o(m),S(f,p)}}}function ru(z){let h,x;return h=new Rn({props:{code:`inputs["labels"] = processor(text_target=dataset[0]["text"], return_tensors="pt").input_ids

# compute loss
loss = model(**inputs).loss
round(loss.item(), 2)`,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.88</span>`}}),{c(){T(h.$$.fragment)},l(m){v(h.$$.fragment,m)},m(m,f){b(h,m,f),x=!0},p:Vn,i(m){x||(k(h.$$.fragment,m),x=!0)},o(m){y(h.$$.fragment,m),x=!1},d(m){S(h,m)}}}function su(z){let h,x,m,f,w;return{c(){h=n("p"),x=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),f=a("Module"),w=a(`
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=s(h);x=c(g,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(g,"CODE",{});var F=s(m);f=c(F,"Module"),F.forEach(o),w=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,w)},d(p){p&&o(h)}}}function au(z){let h,x,m,f,w;return f=new Rn({props:{code:`from transformers import SpeechT5Processor, SpeechT5ForTextToSpeech, SpeechT5HifiGan, set_seed
import torch

processor = SpeechT5Processor.from_pretrained("microsoft/speecht5_tts")
model = SpeechT5ForTextToSpeech.from_pretrained("microsoft/speecht5_tts")
vocoder = SpeechT5HifiGan.from_pretrained("microsoft/speecht5_hifigan")

inputs = processor(text="Hello, my dog is cute", return_tensors="pt")
speaker_embeddings = torch.zeros((1, 512))  # or load xvectors from a file

set_seed(555)  # make deterministic

# generate speech
speech = model.generate_speech(inputs["input_ids"], speaker_embeddings, vocoder=vocoder)
speech.shape`,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">16384</span>])`}}),{c(){h=n("p"),x=a("Example:"),m=d(),T(f.$$.fragment)},l(p){h=r(p,"P",{});var g=s(h);x=c(g,"Example:"),g.forEach(o),m=l(p),v(f.$$.fragment,p)},m(p,g){_(p,h,g),e(h,x),_(p,m,g),b(f,p,g),w=!0},p:Vn,i(p){w||(k(f.$$.fragment,p),w=!0)},o(p){y(f.$$.fragment,p),w=!1},d(p){p&&o(h),p&&o(m),S(f,p)}}}function cu(z){let h,x,m,f,w;return{c(){h=n("p"),x=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),f=a("Module"),w=a(`
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=s(h);x=c(g,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r(g,"CODE",{});var F=s(m);f=c(F,"Module"),F.forEach(o),w=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,w)},d(p){p&&o(h)}}}function iu(z){let h,x,m,f,w;return f=new Rn({props:{code:`from transformers import SpeechT5Processor, SpeechT5ForSpeechToSpeech, SpeechT5HifiGan, set_seed
from datasets import load_dataset
import torch

dataset = load_dataset(
    "hf-internal-testing/librispeech_asr_demo", "clean", split="validation"
)  # doctest: +IGNORE_RESULT
dataset = dataset.sort("id")
sampling_rate = dataset.features["audio"].sampling_rate

processor = SpeechT5Processor.from_pretrained("microsoft/speecht5_vc")
model = SpeechT5ForSpeechToSpeech.from_pretrained("microsoft/speecht5_vc")
vocoder = SpeechT5HifiGan.from_pretrained("microsoft/speecht5_hifigan")

# audio file is decoded on the fly
inputs = processor(audio=dataset[0]["audio"]["array"], sampling_rate=sampling_rate, return_tensors="pt")

speaker_embeddings = torch.zeros((1, 512))  # or load xvectors from a file

set_seed(555)  # make deterministic

# generate speech
speech = model.generate_speech(inputs["input_values"], speaker_embeddings, vocoder=vocoder)
speech.shape`,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=a("Example:"),m=d(),T(f.$$.fragment)},l(p){h=r(p,"P",{});var g=s(h);x=c(g,"Example:"),g.forEach(o),m=l(p),v(f.$$.fragment,p)},m(p,g){_(p,h,g),e(h,x),_(p,m,g),b(f,p,g),w=!0},p:Vn,i(p){w||(k(f.$$.fragment,p),w=!0)},o(p){y(f.$$.fragment,p),w=!1},d(p){p&&o(h),p&&o(m),S(f,p)}}}function du(z){let h,x,m,f,w,p,g,F,I,D,L,N,O,ae,Bt,je,Sa,ms,Le,wa,wo,xa,$a,us,Yt,za,fs,Jt,Bn,Fa,gs,ce,qa,xo,Ea,Pa,$o,Ca,Ma,_s,ge,Oe,Yn,zo,Da,Jn,Na,Ts,B,Fo,ja,_e,La,Zt,Oa,Aa,qo,Ia,Ha,Wa,Te,Ga,Qt,Ua,Va,Kt,Ra,Ba,Ya,Ae,vs,ve,Ie,Zn,Eo,Ja,Qn,Za,bs,Y,Po,Qa,be,Ka,Kn,Xa,ec,Co,oc,tc,nc,ke,rc,Xt,sc,ac,en,cc,ic,dc,He,ks,ye,We,Xn,Mo,lc,er,pc,ys,E,Do,hc,No,mc,jo,uc,fc,gc,Lo,_c,on,Tc,vc,bc,Ge,Oo,kc,or,yc,Sc,tn,Ao,wc,ie,Io,xc,tr,$c,zc,Ho,Fc,nr,qc,Ec,Pc,Ue,Wo,Cc,rr,Mc,Ss,Se,Ve,sr,Go,Dc,ar,Nc,ws,j,Uo,jc,cr,Lc,Oc,ir,Ac,Ic,dr,Hc,Wc,Vo,Gc,nn,Uc,Vc,Rc,de,Ro,Bc,lr,Yc,Jc,we,Zc,pr,Qc,Kc,hr,Xc,ei,xs,xe,Re,mr,Bo,oi,ur,ti,$s,q,Yo,ni,fr,ri,si,G,rn,ai,ci,sn,ii,di,an,li,pi,Jo,gr,hi,mi,ui,cn,fi,gi,_i,C,Zo,Ti,_r,vi,bi,ne,ki,Tr,yi,Si,vr,wi,xi,Qo,br,$i,zi,Fi,qi,re,Ei,kr,Pi,Ci,yr,Mi,Di,Ko,Sr,Ni,ji,Li,Oi,wr,Ai,Ii,P,dn,xr,Hi,Wi,Gi,ln,$r,Ui,Vi,Ri,pn,zr,Bi,Yi,Ji,hn,Fr,Zi,Qi,Ki,Xo,qr,Xi,ed,Er,od,td,et,Pr,nd,rd,Cr,sd,ad,ot,Mr,cd,id,Dr,dd,ld,tt,Nr,pd,hd,jr,md,ud,Lr,fd,gd,K,nt,_d,rt,Td,mn,vd,bd,kd,$e,yd,Or,Sd,wd,un,xd,$d,zd,Ar,Fd,qd,le,st,Ed,Ir,Pd,Cd,Be,Md,pe,at,Dd,ct,Nd,fn,jd,Ld,Od,Ye,Ad,Je,it,Id,dt,Hd,gn,Wd,Gd,Ud,Ze,lt,Vd,pt,Rd,_n,Bd,Yd,zs,ze,Qe,Hr,ht,Jd,Wr,Zd,Fs,J,mt,Qd,ut,Kd,Tn,Xd,el,ol,ft,tl,gt,nl,rl,sl,he,_t,al,Fe,cl,vn,il,dl,Gr,ll,pl,hl,Ke,qs,qe,Xe,Ur,Tt,ml,Vr,ul,Es,Z,vt,fl,bt,gl,bn,_l,Tl,vl,kt,bl,yt,kl,yl,Sl,U,St,wl,Ee,xl,kn,$l,zl,Rr,Fl,ql,El,eo,Pl,oo,Cl,to,Ps,Pe,no,Br,wt,Ml,Yr,Dl,Cs,H,xt,Nl,$t,jl,yn,Ll,Ol,Al,zt,Il,Ft,Hl,Wl,Gl,X,qt,Ul,Ce,Vl,Sn,Rl,Bl,Jr,Yl,Jl,Zl,ro,Ql,so,Kl,ao,Et,Xl,Zr,ep,Ms,Me,co,Qr,Pt,op,Kr,tp,Ds,W,Ct,np,Mt,rp,wn,sp,ap,cp,Dt,ip,Nt,dp,lp,pp,ee,jt,hp,De,mp,xn,up,fp,Xr,gp,_p,Tp,io,vp,lo,bp,po,Lt,kp,es,yp,Ns,Ne,ho,os,Ot,Sp,ts,wp,js,Q,At,xp,It,$p,$n,zp,Fp,qp,Ht,Ep,Wt,Pp,Cp,Mp,mo,Gt,Dp,ns,Np,Ls;return p=new te({}),ae=new te({}),zo=new te({}),Fo=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_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.27.1/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.27.1/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 post-net.`,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_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.27.1/src/transformers/models/speecht5/configuration_speecht5.py#L37"}}),Ae=new Un({props:{anchor:"transformers.SpeechT5Config.example",$$slots:{default:[Qm]},$$scope:{ctx:z}}}),Eo=new te({}),Po=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.27.1/src/transformers/models/speecht5/configuration_speecht5.py#L330"}}),He=new Un({props:{anchor:"transformers.SpeechT5HifiGanConfig.example",$$slots:{default:[Km]},$$scope:{ctx:z}}}),Mo=new te({}),Do=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.27.1/src/transformers/models/speecht5/tokenization_speecht5.py#L47"}}),Oo=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.27.1/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.27.1/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. 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.27.1/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.27.1/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.27.1/src/transformers/tokenization_utils_base.py#L2456",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/en/main_classes/tokenizer#transformers.BatchEncoding"
>BatchEncoding</a></p>
`}}),Ao=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.27.1/src/transformers/models/speecht5/tokenization_speecht5.py#L170"}}),Io=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 = True"},{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>, defaults to <code>True</code>) &#x2014;
Whether or not to clean up the tokenization spaces.`,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.27.1/src/transformers/tokenization_utils_base.py#L3447",returnDescription:`
<p>The decoded sentence.</p>
`,returnType:`
<p><code>str</code></p>
`}}),Wo=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 = True"},{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>, defaults to <code>True</code>) &#x2014;
Whether or not to clean up the tokenization spaces.`,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.27.1/src/transformers/tokenization_utils_base.py#L3414",returnDescription:`
<p>The list of decoded sentences.</p>
`,returnType:`
<p><code>List[str]</code></p>
`}}),Go=new te({}),Uo=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.`,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.`,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.27.1/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.27.1/src/transformers/models/speecht5/feature_extraction_speecht5.py#L31"}}),Ro=new $({props:{name:"__call__",anchor:"transformers.SpeechT5FeatureExtractor.__call__",parameters:[{name:"audio",val:": typing.Union[numpy.ndarray, typing.List[float], typing.List[numpy.ndarray], typing.List[typing.List[float]], NoneType] = None"},{name:"audio_target",val:": typing.Union[numpy.ndarray, typing.List[float], typing.List[numpy.ndarray], typing.List[typing.List[float]], NoneType] = None"},{name:"padding",val:": typing.Union[bool, str, transformers.utils.generic.PaddingStrategy] = False"},{name:"max_length",val:": typing.Optional[int] = None"},{name:"truncation",val:": bool = False"},{name:"pad_to_multiple_of",val:": typing.Optional[int] = None"},{name:"return_attention_mask",val:": typing.Optional[bool] = None"},{name:"return_tensors",val:": typing.Union[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.`,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.27.1/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.27.1/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.27.1/src/transformers/models/speecht5/feature_extraction_speecht5.py#L234"}}),Bo=new te({}),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.27.1/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.27.1/en/model_doc/speecht5#transformers.SpeechT5Tokenizer">SpeechT5Tokenizer</a>. The tokenizer is a required input.`,name:"tokenizer"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/speecht5/processing_speecht5.py#L20"}}),Zo=new $({props:{name:"__call__",anchor:"transformers.SpeechT5Processor.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/speecht5/processing_speecht5.py#L39"}}),nt=new $({props:{name:"pad",anchor:"transformers.SpeechT5Processor.pad",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/speecht5/processing_speecht5.py#L114"}}),st=new $({props:{name:"from_pretrained",anchor:"transformers.SpeechT5Processor.from_pretrained",parameters:[{name:"pretrained_model_name_or_path",val:""},{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.27.1/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.27.1/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.27.1/src/transformers/processing_utils.py#L153"}}),Be=new Gn({props:{$$slots:{default:[Xm]},$$scope:{ctx:z}}}),at=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).
kwargs &#x2014;
Additional key word arguments passed along to the <a href="/docs/transformers/v4.27.1/en/internal/image_processing_utils#transformers.ImageProcessingMixin.push_to_hub">push_to_hub()</a> method.`,name:"push_to_hub"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/processing_utils.py#L91"}}),Ye=new Gn({props:{$$slots:{default:[eu]},$$scope:{ctx:z}}}),it=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.27.1/src/transformers/models/speecht5/processing_speecht5.py#L144"}}),lt=new $({props:{name:"decode",anchor:"transformers.SpeechT5Processor.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/speecht5/processing_speecht5.py#L151"}}),ht=new te({}),mt=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.27.1/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.27.1/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.27.1/src/transformers/models/speecht5/modeling_speecht5.py#L2041"}}),_t=new $({props:{name:"forward",anchor:"transformers.SpeechT5Model.forward",parameters:[{name:"input_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_input_values",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.BoolTensor] = 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.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.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.Tensor</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.Tensor</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.27.1/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.FloatTensor</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.LongTensor</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.27.1/src/transformers/models/speecht5/modeling_speecht5.py#L2083",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/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.27.1/en/main_classes/output#transformers.modeling_outputs.Seq2SeqModelOutput"
>transformers.modeling_outputs.Seq2SeqModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ke=new Gn({props:{$$slots:{default:[ou]},$$scope:{ctx:z}}}),Tt=new te({}),vt=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.27.1/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.27.1/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.27.1/src/transformers/models/speecht5/modeling_speecht5.py#L2189"}}),St=new $({props:{name:"forward",anchor:"transformers.SpeechT5ForSpeechToText.forward",parameters:[{name:"input_values",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.BoolTensor] = 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.Tensor] = 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.Tensor</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.Tensor</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.27.1/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.27.1/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.27.1/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.27.1/en/model_doc/speecht5#transformers.SpeechT5Tokenizer">SpeechT5Tokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>SpeechT5 uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).`,name:"decoder_input_ids"},{anchor:"transformers.SpeechT5ForSpeechToText.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the language modeling loss. Indices should either be in <code>[0, ..., config.vocab_size]</code>
or -100 (see <code>input_ids</code> docstring). Tokens with indices set to <code>-100</code> are ignored (masked), the loss is
only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.</p>
<p>Label indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/speecht5#transformers.SpeechT5Tokenizer">SpeechT5Tokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/speecht5/modeling_speecht5.py#L2241",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/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.27.1/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),eo=new Gn({props:{$$slots:{default:[tu]},$$scope:{ctx:z}}}),oo=new Un({props:{anchor:"transformers.SpeechT5ForSpeechToText.forward.example",$$slots:{default:[nu]},$$scope:{ctx:z}}}),to=new Un({props:{anchor:"transformers.SpeechT5ForSpeechToText.forward.example-2",$$slots:{default:[ru]},$$scope:{ctx:z}}}),wt=new te({}),xt=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.27.1/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.27.1/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.27.1/src/transformers/models/speecht5/modeling_speecht5.py#L2488"}}),qt=new $({props:{name:"forward",anchor:"transformers.SpeechT5ForTextToSpeech.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_input_values",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.BoolTensor] = 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.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = 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.Tensor</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.Tensor</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.27.1/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.27.1/en/model_doc/speecht5#transformers.SpeechT5Tokenizer">SpeechT5Tokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__"><strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.SpeechT5ForTextToSpeech.forward.decoder_input_values",description:`<strong>decoder_input_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_mel_bins)</code>) &#x2014;
Float values of input mel spectrogram.</p>
<p>SpeechT5 uses an all-zero spectrum as the starting token for <code>decoder_input_values</code> generation. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_values</code> have to be input (see
<code>past_key_values</code>).`,name:"decoder_input_values"},{anchor:"transformers.SpeechT5ForTextToSpeech.forward.speaker_embeddings",description:`<strong>speaker_embeddings</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.speaker_embedding_dim)</code>, <em>optional</em>) &#x2014;
Tensor containing the speaker embeddings.`,name:"speaker_embeddings"},{anchor:"transformers.SpeechT5ForTextToSpeech.forward.labels",description:`<strong>labels</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_mel_bins)</code>, <em>optional</em>) &#x2014;
Float values of target mel spectrogram. Spectrograms can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/speecht5#transformers.SpeechT5Processor">SpeechT5Processor</a>. See
<a href="/docs/transformers/v4.27.1/en/model_doc/speecht5#transformers.SpeechT5Processor.__call__">SpeechT5Processor.<strong>call</strong>()</a> for details.`,name:"labels"},{anchor:"transformers.SpeechT5ForTextToSpeech.forward.stop_labels",description:`<strong>stop_labels</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, unreduced_sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the stop token loss. Values are 0.0 until the end of the sequence, after which they
become 1.0. The sequence length of this tensor is <code>config.reduction_factor</code> times larger than the length of
the target mel spectrogram. Labels can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/speecht5#transformers.SpeechT5Processor">SpeechT5Processor</a>. See
<a href="/docs/transformers/v4.27.1/en/model_doc/speecht5#transformers.SpeechT5Processor.__call__">SpeechT5Processor.<strong>call</strong>()</a> for details.`,name:"stop_labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/speecht5/modeling_speecht5.py#L2520",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/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.27.1/en/main_classes/output#transformers.modeling_outputs.Seq2SeqSpectrogramOutput"
>transformers.modeling_outputs.Seq2SeqSpectrogramOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ro=new Gn({props:{$$slots:{default:[su]},$$scope:{ctx:z}}}),so=new Un({props:{anchor:"transformers.SpeechT5ForTextToSpeech.forward.example",$$slots:{default:[au]},$$scope:{ctx:z}}}),Et=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"}],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.27.1/en/model_doc/speecht5#transformers.SpeechT5Tokenizer">SpeechT5Tokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__"><strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.SpeechT5ForTextToSpeech.generate_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"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/speecht5/modeling_speecht5.py#L2632",returnDescription:`
<p>Tensor of shape <code>(output_sequence_length, config.num_mel_bins)</code> containing the
predicted mel spectrogram, or a tensor with shape <code>(num_frames,)</code> containing the speech waveform.</p>
`,returnType:`
<p><code>torch.FloatTensor</code></p>
`}}),Pt=new te({}),Ct=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.27.1/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.27.1/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.27.1/src/transformers/models/speecht5/modeling_speecht5.py#L2685"}}),jt=new $({props:{name:"forward",anchor:"transformers.SpeechT5ForSpeechToSpeech.forward",parameters:[{name:"input_values",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_input_values",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.BoolTensor] = 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.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = 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.Tensor</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.Tensor</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.27.1/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.27.1/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.27.1/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.27.1/en/model_doc/speecht5#transformers.SpeechT5Processor">SpeechT5Processor</a>. See
<a href="/docs/transformers/v4.27.1/en/model_doc/speecht5#transformers.SpeechT5Processor.__call__">SpeechT5Processor.<strong>call</strong>()</a> for details.`,name:"labels"},{anchor:"transformers.SpeechT5ForSpeechToSpeech.forward.stop_labels",description:`<strong>stop_labels</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, unreduced_sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the stop token loss. Values are 0.0 until the end of the sequence, after which they
become 1.0. The sequence length of this tensor is <code>config.reduction_factor</code> times larger than the length of
the target mel spectrogram. Labels can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/speecht5#transformers.SpeechT5Processor">SpeechT5Processor</a>. See
<a href="/docs/transformers/v4.27.1/en/model_doc/speecht5#transformers.SpeechT5Processor.__call__">SpeechT5Processor.<strong>call</strong>()</a> for details.`,name:"stop_labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/speecht5/modeling_speecht5.py#L2718",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/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.27.1/en/main_classes/output#transformers.modeling_outputs.Seq2SeqSpectrogramOutput"
>transformers.modeling_outputs.Seq2SeqSpectrogramOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),io=new Gn({props:{$$slots:{default:[cu]},$$scope:{ctx:z}}}),lo=new Un({props:{anchor:"transformers.SpeechT5ForSpeechToSpeech.forward.example",$$slots:{default:[iu]},$$scope:{ctx:z}}}),Lt=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"}],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.27.1/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.27.1/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"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/speecht5/modeling_speecht5.py#L2837",returnDescription:`
<p>Tensor of shape <code>(output_sequence_length, config.num_mel_bins)</code> containing the
predicted mel spectrogram, or a tensor with shape <code>(num_frames,)</code> containing the speech waveform.</p>
`,returnType:`
<p><code>torch.FloatTensor</code></p>
`}}),Ot=new te({}),At=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.27.1/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.27.1/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.27.1/src/transformers/models/speecht5/modeling_speecht5.py#L2968"}}),Gt=new $({props:{name:"forward",anchor:"transformers.SpeechT5HifiGan.forward",parameters:[{name:"spectrogram",val:""}],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.27.1/src/transformers/models/speecht5/modeling_speecht5.py#L3033",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=d(),m=n("h1"),f=n("a"),w=n("span"),T(p.$$.fragment),g=d(),F=n("span"),I=a("SpeechT5"),D=d(),L=n("h2"),N=n("a"),O=n("span"),T(ae.$$.fragment),Bt=d(),je=n("span"),Sa=a("Overview"),ms=d(),Le=n("p"),wa=a("The SpeechT5 model was proposed in "),wo=n("a"),xa=a("SpeechT5: Unified-Modal Encoder-Decoder Pre-Training for Spoken Language Processing"),$a=a(" by Junyi Ao, Rui Wang, Long Zhou, Chengyi Wang, Shuo Ren, Yu Wu, Shujie Liu, Tom Ko, Qing Li, Yu Zhang, Zhihua Wei, Yao Qian, Jinyu Li, Furu Wei."),us=d(),Yt=n("p"),za=a("The abstract from the paper is the following:"),fs=d(),Jt=n("p"),Bn=n("em"),Fa=a("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."),gs=d(),ce=n("p"),qa=a("This model was contributed by "),xo=n("a"),Ea=a("Matthijs"),Pa=a(". The original code can be found "),$o=n("a"),Ca=a("here"),Ma=a("."),_s=d(),ge=n("h2"),Oe=n("a"),Yn=n("span"),T(zo.$$.fragment),Da=d(),Jn=n("span"),Na=a("SpeechT5Config"),Ts=d(),B=n("div"),T(Fo.$$.fragment),ja=d(),_e=n("p"),La=a("This is the configuration class to store the configuration of a "),Zt=n("a"),Oa=a("SpeechT5Model"),Aa=a(`. It is used to instantiate a
SpeechT5 model according to the specified arguments, defining the model architecture. Instantiating a configuration
with the defaults will yield a similar configuration to that of the SpeechT5
`),qo=n("a"),Ia=a("microsoft/speecht5_asr"),Ha=a(" architecture."),Wa=d(),Te=n("p"),Ga=a("Configuration objects inherit from "),Qt=n("a"),Ua=a("PretrainedConfig"),Va=a(` and can be used to control the model outputs. Read the
documentation from `),Kt=n("a"),Ra=a("PretrainedConfig"),Ba=a(" for more information."),Ya=d(),T(Ae.$$.fragment),vs=d(),ve=n("h2"),Ie=n("a"),Zn=n("span"),T(Eo.$$.fragment),Ja=d(),Qn=n("span"),Za=a("SpeechT5HifiGanConfig"),bs=d(),Y=n("div"),T(Po.$$.fragment),Qa=d(),be=n("p"),Ka=a("This is the configuration class to store the configuration of a "),Kn=n("code"),Xa=a("SpeechT5HifiGanModel"),ec=a(`. 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
`),Co=n("a"),oc=a("microsoft/speecht5_hifigan"),tc=a(" architecture."),nc=d(),ke=n("p"),rc=a("Configuration objects inherit from "),Xt=n("a"),sc=a("PretrainedConfig"),ac=a(` and can be used to control the model outputs. Read the
documentation from `),en=n("a"),cc=a("PretrainedConfig"),ic=a(" for more information."),dc=d(),T(He.$$.fragment),ks=d(),ye=n("h2"),We=n("a"),Xn=n("span"),T(Mo.$$.fragment),lc=d(),er=n("span"),pc=a("SpeechT5Tokenizer"),ys=d(),E=n("div"),T(Do.$$.fragment),hc=d(),No=n("p"),mc=a("Construct a SpeechT5 tokenizer. Based on "),jo=n("a"),uc=a("SentencePiece"),fc=a("."),gc=d(),Lo=n("p"),_c=a("This tokenizer inherits from "),on=n("a"),Tc=a("PreTrainedTokenizer"),vc=a(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),bc=d(),Ge=n("div"),T(Oo.$$.fragment),kc=d(),or=n("p"),yc=a(`Main method to tokenize and prepare for the model one or several sequence(s) or one or several pair(s) of
sequences.`),Sc=d(),tn=n("div"),T(Ao.$$.fragment),wc=d(),ie=n("div"),T(Io.$$.fragment),xc=d(),tr=n("p"),$c=a(`Converts a sequence of ids in a string, using the tokenizer and vocabulary with options to remove special
tokens and clean up tokenization spaces.`),zc=d(),Ho=n("p"),Fc=a("Similar to doing "),nr=n("code"),qc=a("self.convert_tokens_to_string(self.convert_ids_to_tokens(token_ids))"),Ec=a("."),Pc=d(),Ue=n("div"),T(Wo.$$.fragment),Cc=d(),rr=n("p"),Mc=a("Convert a list of lists of token ids into a list of strings by calling decode."),Ss=d(),Se=n("h2"),Ve=n("a"),sr=n("span"),T(Go.$$.fragment),Dc=d(),ar=n("span"),Nc=a("SpeechT5FeatureExtractor"),ws=d(),j=n("div"),T(Uo.$$.fragment),jc=d(),cr=n("p"),Lc=a("Constructs a SpeechT5 feature extractor."),Oc=d(),ir=n("p"),Ac=a(`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.`),Ic=d(),dr=n("p"),Hc=a(`This class can also extract log-mel filter bank features from raw speech, for use by the SpeechT5 speech decoder
prenet.`),Wc=d(),Vo=n("p"),Gc=a("This feature extractor inherits from "),nn=n("a"),Uc=a("SequenceFeatureExtractor"),Vc=a(` which contains
most of the main methods. Users should refer to this superclass for more information regarding those methods.`),Rc=d(),de=n("div"),T(Ro.$$.fragment),Bc=d(),lr=n("p"),Yc=a("Main method to featurize and prepare for the model one or several sequence(s)."),Jc=d(),we=n("p"),Zc=a("Pass in a value for "),pr=n("code"),Qc=a("audio"),Kc=a(" to extract waveform features. Pass in a value for "),hr=n("code"),Xc=a("audio_target"),ei=a(` to extract log-mel
spectrogram features.`),xs=d(),xe=n("h2"),Re=n("a"),mr=n("span"),T(Bo.$$.fragment),oi=d(),ur=n("span"),ti=a("SpeechT5Processor"),$s=d(),q=n("div"),T(Yo.$$.fragment),ni=d(),fr=n("p"),ri=a("Constructs a SpeechT5 processor which wraps a feature extractor and a tokenizer into a single processor."),si=d(),G=n("p"),rn=n("a"),ai=a("SpeechT5Processor"),ci=a(" offers all the functionalities of "),sn=n("a"),ii=a("SpeechT5FeatureExtractor"),di=a(" and "),an=n("a"),li=a("SpeechT5Tokenizer"),pi=a(`. See
the docstring of `),Jo=n("a"),gr=n("strong"),hi=a("call"),mi=a("()"),ui=a(" and "),cn=n("a"),fi=a("decode()"),gi=a(" for more information."),_i=d(),C=n("div"),T(Zo.$$.fragment),Ti=d(),_r=n("p"),vi=a("Processes audio and text input, as well as audio and text targets."),bi=d(),ne=n("p"),ki=a("You can process audio by using the argument "),Tr=n("code"),yi=a("audio"),Si=a(`, or process audio targets by using the argument
`),vr=n("code"),wi=a("audio_target"),xi=a(`. This forwards the arguments to SpeechT5FeatureExtractor\u2019s
`),Qo=n("a"),br=n("strong"),$i=a("call"),zi=a("()"),Fi=a("."),qi=d(),re=n("p"),Ei=a("You can process text by using the argument "),kr=n("code"),Pi=a("text"),Ci=a(", or process text labels by using the argument "),yr=n("code"),Mi=a("text_target"),Di=a(`.
This forwards the arguments to SpeechT5Tokenizer\u2019s `),Ko=n("a"),Sr=n("strong"),Ni=a("call"),ji=a("()"),Li=a("."),Oi=d(),wr=n("p"),Ai=a("Valid input combinations are:"),Ii=d(),P=n("ul"),dn=n("li"),xr=n("code"),Hi=a("text"),Wi=a(" only"),Gi=d(),ln=n("li"),$r=n("code"),Ui=a("audio"),Vi=a(" only"),Ri=d(),pn=n("li"),zr=n("code"),Bi=a("text_target"),Yi=a(" only"),Ji=d(),hn=n("li"),Fr=n("code"),Zi=a("audio_target"),Qi=a(" only"),Ki=d(),Xo=n("li"),qr=n("code"),Xi=a("text"),ed=a(" and "),Er=n("code"),od=a("audio_target"),td=d(),et=n("li"),Pr=n("code"),nd=a("audio"),rd=a(" and "),Cr=n("code"),sd=a("audio_target"),ad=d(),ot=n("li"),Mr=n("code"),cd=a("text"),id=a(" and "),Dr=n("code"),dd=a("text_target"),ld=d(),tt=n("li"),Nr=n("code"),pd=a("audio"),hd=a(" and "),jr=n("code"),md=a("text_target"),ud=d(),Lr=n("p"),fd=a("Please refer to the docstring of the above two methods for more information."),gd=d(),K=n("div"),T(nt.$$.fragment),_d=d(),rt=n("p"),Td=a("This method forwards all its arguments to SpeechT5FeatureExtractor\u2019s "),mn=n("a"),vd=a("pad()"),bd=a(` and
returns its output.`),kd=d(),$e=n("p"),yd=a("You can process your labels by using the argument "),Or=n("code"),Sd=a("text"),wd=a(` (either in the same call as your audio inputs, or in a
separate call). This forwards its arguments to SpeechT5Tokenizer\u2019s `),un=n("a"),xd=a("pad()"),$d=a("."),zd=d(),Ar=n("p"),Fd=a("Please refer to the docstring of the above two methods for more information."),qd=d(),le=n("div"),T(st.$$.fragment),Ed=d(),Ir=n("p"),Pd=a("Instantiate a processor associated with a pretrained model."),Cd=d(),T(Be.$$.fragment),Md=d(),pe=n("div"),T(at.$$.fragment),Dd=d(),ct=n("p"),Nd=a(`Saves the attributes of this processor (feature extractor, tokenizer\u2026) in the specified directory so that it
can be reloaded using the `),fn=n("a"),jd=a("from_pretrained()"),Ld=a(" method."),Od=d(),T(Ye.$$.fragment),Ad=d(),Je=n("div"),T(it.$$.fragment),Id=d(),dt=n("p"),Hd=a("This method forwards all its arguments to SpeechT5Tokenizer\u2019s "),gn=n("a"),Wd=a("batch_decode()"),Gd=a(`. Please refer
to the docstring of this method for more information.`),Ud=d(),Ze=n("div"),T(lt.$$.fragment),Vd=d(),pt=n("p"),Rd=a("This method forwards all its arguments to SpeechT5Tokenizer\u2019s "),_n=n("a"),Bd=a("decode()"),Yd=a(`. Please refer to
the docstring of this method for more information.`),zs=d(),ze=n("h2"),Qe=n("a"),Hr=n("span"),T(ht.$$.fragment),Jd=d(),Wr=n("span"),Zd=a("SpeechT5Model"),Fs=d(),J=n("div"),T(mt.$$.fragment),Qd=d(),ut=n("p"),Kd=a(`The bare SpeechT5 Encoder-Decoder Model outputting raw hidden-states without any specific pre- or post-nets.
This model inherits from `),Tn=n("a"),Xd=a("PreTrainedModel"),el=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),ol=d(),ft=n("p"),tl=a("This model is also a PyTorch "),gt=n("a"),nl=a("torch.nn.Module"),rl=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),sl=d(),he=n("div"),T(_t.$$.fragment),al=d(),Fe=n("p"),cl=a("The "),vn=n("a"),il=a("SpeechT5Model"),dl=a(" forward method, overrides the "),Gr=n("code"),ll=a("__call__"),pl=a(" special method."),hl=d(),T(Ke.$$.fragment),qs=d(),qe=n("h2"),Xe=n("a"),Ur=n("span"),T(Tt.$$.fragment),ml=d(),Vr=n("span"),ul=a("SpeechT5ForSpeechToText"),Es=d(),Z=n("div"),T(vt.$$.fragment),fl=d(),bt=n("p"),gl=a(`SpeechT5 Model with a speech encoder and a text decoder.
This model inherits from `),bn=n("a"),_l=a("PreTrainedModel"),Tl=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),vl=d(),kt=n("p"),bl=a("This model is also a PyTorch "),yt=n("a"),kl=a("torch.nn.Module"),yl=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Sl=d(),U=n("div"),T(St.$$.fragment),wl=d(),Ee=n("p"),xl=a("The "),kn=n("a"),$l=a("SpeechT5ForSpeechToText"),zl=a(" forward method, overrides the "),Rr=n("code"),Fl=a("__call__"),ql=a(" special method."),El=d(),T(eo.$$.fragment),Pl=d(),T(oo.$$.fragment),Cl=d(),T(to.$$.fragment),Ps=d(),Pe=n("h2"),no=n("a"),Br=n("span"),T(wt.$$.fragment),Ml=d(),Yr=n("span"),Dl=a("SpeechT5ForTextToSpeech"),Cs=d(),H=n("div"),T(xt.$$.fragment),Nl=d(),$t=n("p"),jl=a(`SpeechT5 Model with a text encoder and a speech decoder.
This model inherits from `),yn=n("a"),Ll=a("PreTrainedModel"),Ol=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Al=d(),zt=n("p"),Il=a("This model is also a PyTorch "),Ft=n("a"),Hl=a("torch.nn.Module"),Wl=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Gl=d(),X=n("div"),T(qt.$$.fragment),Ul=d(),Ce=n("p"),Vl=a("The "),Sn=n("a"),Rl=a("SpeechT5ForTextToSpeech"),Bl=a(" forward method, overrides the "),Jr=n("code"),Yl=a("__call__"),Jl=a(" special method."),Zl=d(),T(ro.$$.fragment),Ql=d(),T(so.$$.fragment),Kl=d(),ao=n("div"),T(Et.$$.fragment),Xl=d(),Zr=n("p"),ep=a(`Converts a sequence of input tokens into a sequence of mel spectrograms, which are subsequently turned into a
speech waveform using a vocoder.`),Ms=d(),Me=n("h2"),co=n("a"),Qr=n("span"),T(Pt.$$.fragment),op=d(),Kr=n("span"),tp=a("SpeechT5ForSpeechToSpeech"),Ds=d(),W=n("div"),T(Ct.$$.fragment),np=d(),Mt=n("p"),rp=a(`SpeechT5 Model with a speech encoder and a speech decoder.
This model inherits from `),wn=n("a"),sp=a("PreTrainedModel"),ap=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),cp=d(),Dt=n("p"),ip=a("This model is also a PyTorch "),Nt=n("a"),dp=a("torch.nn.Module"),lp=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),pp=d(),ee=n("div"),T(jt.$$.fragment),hp=d(),De=n("p"),mp=a("The "),xn=n("a"),up=a("SpeechT5ForSpeechToSpeech"),fp=a(" forward method, overrides the "),Xr=n("code"),gp=a("__call__"),_p=a(" special method."),Tp=d(),T(io.$$.fragment),vp=d(),T(lo.$$.fragment),bp=d(),po=n("div"),T(Lt.$$.fragment),kp=d(),es=n("p"),yp=a(`Converts a raw speech waveform into a sequence of mel spectrograms, which are subsequently turned back into a
speech waveform using a vocoder.`),Ns=d(),Ne=n("h2"),ho=n("a"),os=n("span"),T(Ot.$$.fragment),Sp=d(),ts=n("span"),wp=a("SpeechT5HifiGan"),js=d(),Q=n("div"),T(At.$$.fragment),xp=d(),It=n("p"),$p=a(`HiFi-GAN vocoder.
This model inherits from `),$n=n("a"),zp=a("PreTrainedModel"),Fp=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),qp=d(),Ht=n("p"),Ep=a("This model is also a PyTorch "),Wt=n("a"),Pp=a("torch.nn.Module"),Cp=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Mp=d(),mo=n("div"),T(Gt.$$.fragment),Dp=d(),ns=n("p"),Np=a(`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=Jm('[data-svelte="svelte-1phssyn"]',document.head);h=r(u,"META",{name:!0,content:!0}),u.forEach(o),x=l(t),m=r(t,"H1",{class:!0});var Ut=s(m);f=r(Ut,"A",{id:!0,class:!0,href:!0});var rs=s(f);w=r(rs,"SPAN",{});var ss=s(w);v(p.$$.fragment,ss),ss.forEach(o),rs.forEach(o),g=l(Ut),F=r(Ut,"SPAN",{});var as=s(F);I=c(as,"SpeechT5"),as.forEach(o),Ut.forEach(o),D=l(t),L=r(t,"H2",{class:!0});var Vt=s(L);N=r(Vt,"A",{id:!0,class:!0,href:!0});var cs=s(N);O=r(cs,"SPAN",{});var is=s(O);v(ae.$$.fragment,is),is.forEach(o),cs.forEach(o),Bt=l(Vt),je=r(Vt,"SPAN",{});var ds=s(je);Sa=c(ds,"Overview"),ds.forEach(o),Vt.forEach(o),ms=l(t),Le=r(t,"P",{});var Rt=s(Le);wa=c(Rt,"The SpeechT5 model was proposed in "),wo=r(Rt,"A",{href:!0,rel:!0});var ls=s(wo);xa=c(ls,"SpeechT5: Unified-Modal Encoder-Decoder Pre-Training for Spoken Language Processing"),ls.forEach(o),$a=c(Rt," 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."),Rt.forEach(o),us=l(t),Yt=r(t,"P",{});var ps=s(Yt);za=c(ps,"The abstract from the paper is the following:"),ps.forEach(o),fs=l(t),Jt=r(t,"P",{});var hs=s(Jt);Bn=r(hs,"EM",{});var Gp=s(Bn);Fa=c(Gp,"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."),Gp.forEach(o),hs.forEach(o),gs=l(t),ce=r(t,"P",{});var zn=s(ce);qa=c(zn,"This model was contributed by "),xo=r(zn,"A",{href:!0,rel:!0});var Up=s(xo);Ea=c(Up,"Matthijs"),Up.forEach(o),Pa=c(zn,". The original code can be found "),$o=r(zn,"A",{href:!0,rel:!0});var Vp=s($o);Ca=c(Vp,"here"),Vp.forEach(o),Ma=c(zn,"."),zn.forEach(o),_s=l(t),ge=r(t,"H2",{class:!0});var Os=s(ge);Oe=r(Os,"A",{id:!0,class:!0,href:!0});var Rp=s(Oe);Yn=r(Rp,"SPAN",{});var Bp=s(Yn);v(zo.$$.fragment,Bp),Bp.forEach(o),Rp.forEach(o),Da=l(Os),Jn=r(Os,"SPAN",{});var Yp=s(Jn);Na=c(Yp,"SpeechT5Config"),Yp.forEach(o),Os.forEach(o),Ts=l(t),B=r(t,"DIV",{class:!0});var uo=s(B);v(Fo.$$.fragment,uo),ja=l(uo),_e=r(uo,"P",{});var Fn=s(_e);La=c(Fn,"This is the configuration class to store the configuration of a "),Zt=r(Fn,"A",{href:!0});var Jp=s(Zt);Oa=c(Jp,"SpeechT5Model"),Jp.forEach(o),Aa=c(Fn,`. 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(Fn,"A",{href:!0,rel:!0});var Zp=s(qo);Ia=c(Zp,"microsoft/speecht5_asr"),Zp.forEach(o),Ha=c(Fn," architecture."),Fn.forEach(o),Wa=l(uo),Te=r(uo,"P",{});var qn=s(Te);Ga=c(qn,"Configuration objects inherit from "),Qt=r(qn,"A",{href:!0});var Qp=s(Qt);Ua=c(Qp,"PretrainedConfig"),Qp.forEach(o),Va=c(qn,` and can be used to control the model outputs. Read the
documentation from `),Kt=r(qn,"A",{href:!0});var Kp=s(Kt);Ra=c(Kp,"PretrainedConfig"),Kp.forEach(o),Ba=c(qn," for more information."),qn.forEach(o),Ya=l(uo),v(Ae.$$.fragment,uo),uo.forEach(o),vs=l(t),ve=r(t,"H2",{class:!0});var As=s(ve);Ie=r(As,"A",{id:!0,class:!0,href:!0});var Xp=s(Ie);Zn=r(Xp,"SPAN",{});var eh=s(Zn);v(Eo.$$.fragment,eh),eh.forEach(o),Xp.forEach(o),Ja=l(As),Qn=r(As,"SPAN",{});var oh=s(Qn);Za=c(oh,"SpeechT5HifiGanConfig"),oh.forEach(o),As.forEach(o),bs=l(t),Y=r(t,"DIV",{class:!0});var fo=s(Y);v(Po.$$.fragment,fo),Qa=l(fo),be=r(fo,"P",{});var En=s(be);Ka=c(En,"This is the configuration class to store the configuration of a "),Kn=r(En,"CODE",{});var th=s(Kn);Xa=c(th,"SpeechT5HifiGanModel"),th.forEach(o),ec=c(En,`. 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
`),Co=r(En,"A",{href:!0,rel:!0});var nh=s(Co);oc=c(nh,"microsoft/speecht5_hifigan"),nh.forEach(o),tc=c(En," architecture."),En.forEach(o),nc=l(fo),ke=r(fo,"P",{});var Pn=s(ke);rc=c(Pn,"Configuration objects inherit from "),Xt=r(Pn,"A",{href:!0});var rh=s(Xt);sc=c(rh,"PretrainedConfig"),rh.forEach(o),ac=c(Pn,` and can be used to control the model outputs. Read the
documentation from `),en=r(Pn,"A",{href:!0});var sh=s(en);cc=c(sh,"PretrainedConfig"),sh.forEach(o),ic=c(Pn," for more information."),Pn.forEach(o),dc=l(fo),v(He.$$.fragment,fo),fo.forEach(o),ks=l(t),ye=r(t,"H2",{class:!0});var Is=s(ye);We=r(Is,"A",{id:!0,class:!0,href:!0});var ah=s(We);Xn=r(ah,"SPAN",{});var ch=s(Xn);v(Mo.$$.fragment,ch),ch.forEach(o),ah.forEach(o),lc=l(Is),er=r(Is,"SPAN",{});var ih=s(er);pc=c(ih,"SpeechT5Tokenizer"),ih.forEach(o),Is.forEach(o),ys=l(t),E=r(t,"DIV",{class:!0});var V=s(E);v(Do.$$.fragment,V),hc=l(V),No=r(V,"P",{});var Hs=s(No);mc=c(Hs,"Construct a SpeechT5 tokenizer. Based on "),jo=r(Hs,"A",{href:!0,rel:!0});var dh=s(jo);uc=c(dh,"SentencePiece"),dh.forEach(o),fc=c(Hs,"."),Hs.forEach(o),gc=l(V),Lo=r(V,"P",{});var Ws=s(Lo);_c=c(Ws,"This tokenizer inherits from "),on=r(Ws,"A",{href:!0});var lh=s(on);Tc=c(lh,"PreTrainedTokenizer"),lh.forEach(o),vc=c(Ws,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Ws.forEach(o),bc=l(V),Ge=r(V,"DIV",{class:!0});var Gs=s(Ge);v(Oo.$$.fragment,Gs),kc=l(Gs),or=r(Gs,"P",{});var ph=s(or);yc=c(ph,`Main method to tokenize and prepare for the model one or several sequence(s) or one or several pair(s) of
sequences.`),ph.forEach(o),Gs.forEach(o),Sc=l(V),tn=r(V,"DIV",{class:!0});var hh=s(tn);v(Ao.$$.fragment,hh),hh.forEach(o),wc=l(V),ie=r(V,"DIV",{class:!0});var Cn=s(ie);v(Io.$$.fragment,Cn),xc=l(Cn),tr=r(Cn,"P",{});var mh=s(tr);$c=c(mh,`Converts a sequence of ids in a string, using the tokenizer and vocabulary with options to remove special
tokens and clean up tokenization spaces.`),mh.forEach(o),zc=l(Cn),Ho=r(Cn,"P",{});var Us=s(Ho);Fc=c(Us,"Similar to doing "),nr=r(Us,"CODE",{});var uh=s(nr);qc=c(uh,"self.convert_tokens_to_string(self.convert_ids_to_tokens(token_ids))"),uh.forEach(o),Ec=c(Us,"."),Us.forEach(o),Cn.forEach(o),Pc=l(V),Ue=r(V,"DIV",{class:!0});var Vs=s(Ue);v(Wo.$$.fragment,Vs),Cc=l(Vs),rr=r(Vs,"P",{});var fh=s(rr);Mc=c(fh,"Convert a list of lists of token ids into a list of strings by calling decode."),fh.forEach(o),Vs.forEach(o),V.forEach(o),Ss=l(t),Se=r(t,"H2",{class:!0});var Rs=s(Se);Ve=r(Rs,"A",{id:!0,class:!0,href:!0});var gh=s(Ve);sr=r(gh,"SPAN",{});var _h=s(sr);v(Go.$$.fragment,_h),_h.forEach(o),gh.forEach(o),Dc=l(Rs),ar=r(Rs,"SPAN",{});var Th=s(ar);Nc=c(Th,"SpeechT5FeatureExtractor"),Th.forEach(o),Rs.forEach(o),ws=l(t),j=r(t,"DIV",{class:!0});var oe=s(j);v(Uo.$$.fragment,oe),jc=l(oe),cr=r(oe,"P",{});var vh=s(cr);Lc=c(vh,"Constructs a SpeechT5 feature extractor."),vh.forEach(o),Oc=l(oe),ir=r(oe,"P",{});var bh=s(ir);Ac=c(bh,`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.`),bh.forEach(o),Ic=l(oe),dr=r(oe,"P",{});var kh=s(dr);Hc=c(kh,`This class can also extract log-mel filter bank features from raw speech, for use by the SpeechT5 speech decoder
prenet.`),kh.forEach(o),Wc=l(oe),Vo=r(oe,"P",{});var Bs=s(Vo);Gc=c(Bs,"This feature extractor inherits from "),nn=r(Bs,"A",{href:!0});var yh=s(nn);Uc=c(yh,"SequenceFeatureExtractor"),yh.forEach(o),Vc=c(Bs,` which contains
most of the main methods. Users should refer to this superclass for more information regarding those methods.`),Bs.forEach(o),Rc=l(oe),de=r(oe,"DIV",{class:!0});var Mn=s(de);v(Ro.$$.fragment,Mn),Bc=l(Mn),lr=r(Mn,"P",{});var Sh=s(lr);Yc=c(Sh,"Main method to featurize and prepare for the model one or several sequence(s)."),Sh.forEach(o),Jc=l(Mn),we=r(Mn,"P",{});var Dn=s(we);Zc=c(Dn,"Pass in a value for "),pr=r(Dn,"CODE",{});var wh=s(pr);Qc=c(wh,"audio"),wh.forEach(o),Kc=c(Dn," to extract waveform features. Pass in a value for "),hr=r(Dn,"CODE",{});var xh=s(hr);Xc=c(xh,"audio_target"),xh.forEach(o),ei=c(Dn,` to extract log-mel
spectrogram features.`),Dn.forEach(o),Mn.forEach(o),oe.forEach(o),xs=l(t),xe=r(t,"H2",{class:!0});var Ys=s(xe);Re=r(Ys,"A",{id:!0,class:!0,href:!0});var $h=s(Re);mr=r($h,"SPAN",{});var zh=s(mr);v(Bo.$$.fragment,zh),zh.forEach(o),$h.forEach(o),oi=l(Ys),ur=r(Ys,"SPAN",{});var Fh=s(ur);ti=c(Fh,"SpeechT5Processor"),Fh.forEach(o),Ys.forEach(o),$s=l(t),q=r(t,"DIV",{class:!0});var M=s(q);v(Yo.$$.fragment,M),ni=l(M),fr=r(M,"P",{});var qh=s(fr);ri=c(qh,"Constructs a SpeechT5 processor which wraps a feature extractor and a tokenizer into a single processor."),qh.forEach(o),si=l(M),G=r(M,"P",{});var se=s(G);rn=r(se,"A",{href:!0});var Eh=s(rn);ai=c(Eh,"SpeechT5Processor"),Eh.forEach(o),ci=c(se," offers all the functionalities of "),sn=r(se,"A",{href:!0});var Ph=s(sn);ii=c(Ph,"SpeechT5FeatureExtractor"),Ph.forEach(o),di=c(se," and "),an=r(se,"A",{href:!0});var Ch=s(an);li=c(Ch,"SpeechT5Tokenizer"),Ch.forEach(o),pi=c(se,`. See
the docstring of `),Jo=r(se,"A",{href:!0});var jp=s(Jo);gr=r(jp,"STRONG",{});var Mh=s(gr);hi=c(Mh,"call"),Mh.forEach(o),mi=c(jp,"()"),jp.forEach(o),ui=c(se," and "),cn=r(se,"A",{href:!0});var Dh=s(cn);fi=c(Dh,"decode()"),Dh.forEach(o),gi=c(se," for more information."),se.forEach(o),_i=l(M),C=r(M,"DIV",{class:!0});var R=s(C);v(Zo.$$.fragment,R),Ti=l(R),_r=r(R,"P",{});var Nh=s(_r);vi=c(Nh,"Processes audio and text input, as well as audio and text targets."),Nh.forEach(o),bi=l(R),ne=r(R,"P",{});var go=s(ne);ki=c(go,"You can process audio by using the argument "),Tr=r(go,"CODE",{});var jh=s(Tr);yi=c(jh,"audio"),jh.forEach(o),Si=c(go,`, or process audio targets by using the argument
`),vr=r(go,"CODE",{});var Lh=s(vr);wi=c(Lh,"audio_target"),Lh.forEach(o),xi=c(go,`. This forwards the arguments to SpeechT5FeatureExtractor\u2019s
`),Qo=r(go,"A",{href:!0});var Lp=s(Qo);br=r(Lp,"STRONG",{});var Oh=s(br);$i=c(Oh,"call"),Oh.forEach(o),zi=c(Lp,"()"),Lp.forEach(o),Fi=c(go,"."),go.forEach(o),qi=l(R),re=r(R,"P",{});var _o=s(re);Ei=c(_o,"You can process text by using the argument "),kr=r(_o,"CODE",{});var Ah=s(kr);Pi=c(Ah,"text"),Ah.forEach(o),Ci=c(_o,", or process text labels by using the argument "),yr=r(_o,"CODE",{});var Ih=s(yr);Mi=c(Ih,"text_target"),Ih.forEach(o),Di=c(_o,`.
This forwards the arguments to SpeechT5Tokenizer\u2019s `),Ko=r(_o,"A",{href:!0});var Op=s(Ko);Sr=r(Op,"STRONG",{});var Hh=s(Sr);Ni=c(Hh,"call"),Hh.forEach(o),ji=c(Op,"()"),Op.forEach(o),Li=c(_o,"."),_o.forEach(o),Oi=l(R),wr=r(R,"P",{});var Wh=s(wr);Ai=c(Wh,"Valid input combinations are:"),Wh.forEach(o),Ii=l(R),P=r(R,"UL",{});var A=s(P);dn=r(A,"LI",{});var Ap=s(dn);xr=r(Ap,"CODE",{});var Gh=s(xr);Hi=c(Gh,"text"),Gh.forEach(o),Wi=c(Ap," only"),Ap.forEach(o),Gi=l(A),ln=r(A,"LI",{});var Ip=s(ln);$r=r(Ip,"CODE",{});var Uh=s($r);Ui=c(Uh,"audio"),Uh.forEach(o),Vi=c(Ip," only"),Ip.forEach(o),Ri=l(A),pn=r(A,"LI",{});var Hp=s(pn);zr=r(Hp,"CODE",{});var Vh=s(zr);Bi=c(Vh,"text_target"),Vh.forEach(o),Yi=c(Hp," only"),Hp.forEach(o),Ji=l(A),hn=r(A,"LI",{});var Wp=s(hn);Fr=r(Wp,"CODE",{});var Rh=s(Fr);Zi=c(Rh,"audio_target"),Rh.forEach(o),Qi=c(Wp," only"),Wp.forEach(o),Ki=l(A),Xo=r(A,"LI",{});var Js=s(Xo);qr=r(Js,"CODE",{});var Bh=s(qr);Xi=c(Bh,"text"),Bh.forEach(o),ed=c(Js," and "),Er=r(Js,"CODE",{});var Yh=s(Er);od=c(Yh,"audio_target"),Yh.forEach(o),Js.forEach(o),td=l(A),et=r(A,"LI",{});var Zs=s(et);Pr=r(Zs,"CODE",{});var Jh=s(Pr);nd=c(Jh,"audio"),Jh.forEach(o),rd=c(Zs," and "),Cr=r(Zs,"CODE",{});var Zh=s(Cr);sd=c(Zh,"audio_target"),Zh.forEach(o),Zs.forEach(o),ad=l(A),ot=r(A,"LI",{});var Qs=s(ot);Mr=r(Qs,"CODE",{});var Qh=s(Mr);cd=c(Qh,"text"),Qh.forEach(o),id=c(Qs," and "),Dr=r(Qs,"CODE",{});var Kh=s(Dr);dd=c(Kh,"text_target"),Kh.forEach(o),Qs.forEach(o),ld=l(A),tt=r(A,"LI",{});var Ks=s(tt);Nr=r(Ks,"CODE",{});var Xh=s(Nr);pd=c(Xh,"audio"),Xh.forEach(o),hd=c(Ks," and "),jr=r(Ks,"CODE",{});var em=s(jr);md=c(em,"text_target"),em.forEach(o),Ks.forEach(o),A.forEach(o),ud=l(R),Lr=r(R,"P",{});var om=s(Lr);fd=c(om,"Please refer to the docstring of the above two methods for more information."),om.forEach(o),R.forEach(o),gd=l(M),K=r(M,"DIV",{class:!0});var To=s(K);v(nt.$$.fragment,To),_d=l(To),rt=r(To,"P",{});var Xs=s(rt);Td=c(Xs,"This method forwards all its arguments to SpeechT5FeatureExtractor\u2019s "),mn=r(Xs,"A",{href:!0});var tm=s(mn);vd=c(tm,"pad()"),tm.forEach(o),bd=c(Xs,` and
returns its output.`),Xs.forEach(o),kd=l(To),$e=r(To,"P",{});var Nn=s($e);yd=c(Nn,"You can process your labels by using the argument "),Or=r(Nn,"CODE",{});var nm=s(Or);Sd=c(nm,"text"),nm.forEach(o),wd=c(Nn,` (either in the same call as your audio inputs, or in a
separate call). This forwards its arguments to SpeechT5Tokenizer\u2019s `),un=r(Nn,"A",{href:!0});var rm=s(un);xd=c(rm,"pad()"),rm.forEach(o),$d=c(Nn,"."),Nn.forEach(o),zd=l(To),Ar=r(To,"P",{});var sm=s(Ar);Fd=c(sm,"Please refer to the docstring of the above two methods for more information."),sm.forEach(o),To.forEach(o),qd=l(M),le=r(M,"DIV",{class:!0});var jn=s(le);v(st.$$.fragment,jn),Ed=l(jn),Ir=r(jn,"P",{});var am=s(Ir);Pd=c(am,"Instantiate a processor associated with a pretrained model."),am.forEach(o),Cd=l(jn),v(Be.$$.fragment,jn),jn.forEach(o),Md=l(M),pe=r(M,"DIV",{class:!0});var Ln=s(pe);v(at.$$.fragment,Ln),Dd=l(Ln),ct=r(Ln,"P",{});var ea=s(ct);Nd=c(ea,`Saves the attributes of this processor (feature extractor, tokenizer\u2026) in the specified directory so that it
can be reloaded using the `),fn=r(ea,"A",{href:!0});var cm=s(fn);jd=c(cm,"from_pretrained()"),cm.forEach(o),Ld=c(ea," method."),ea.forEach(o),Od=l(Ln),v(Ye.$$.fragment,Ln),Ln.forEach(o),Ad=l(M),Je=r(M,"DIV",{class:!0});var oa=s(Je);v(it.$$.fragment,oa),Id=l(oa),dt=r(oa,"P",{});var ta=s(dt);Hd=c(ta,"This method forwards all its arguments to SpeechT5Tokenizer\u2019s "),gn=r(ta,"A",{href:!0});var im=s(gn);Wd=c(im,"batch_decode()"),im.forEach(o),Gd=c(ta,`. Please refer
to the docstring of this method for more information.`),ta.forEach(o),oa.forEach(o),Ud=l(M),Ze=r(M,"DIV",{class:!0});var na=s(Ze);v(lt.$$.fragment,na),Vd=l(na),pt=r(na,"P",{});var ra=s(pt);Rd=c(ra,"This method forwards all its arguments to SpeechT5Tokenizer\u2019s "),_n=r(ra,"A",{href:!0});var dm=s(_n);Bd=c(dm,"decode()"),dm.forEach(o),Yd=c(ra,`. Please refer to
the docstring of this method for more information.`),ra.forEach(o),na.forEach(o),M.forEach(o),zs=l(t),ze=r(t,"H2",{class:!0});var sa=s(ze);Qe=r(sa,"A",{id:!0,class:!0,href:!0});var lm=s(Qe);Hr=r(lm,"SPAN",{});var pm=s(Hr);v(ht.$$.fragment,pm),pm.forEach(o),lm.forEach(o),Jd=l(sa),Wr=r(sa,"SPAN",{});var hm=s(Wr);Zd=c(hm,"SpeechT5Model"),hm.forEach(o),sa.forEach(o),Fs=l(t),J=r(t,"DIV",{class:!0});var vo=s(J);v(mt.$$.fragment,vo),Qd=l(vo),ut=r(vo,"P",{});var aa=s(ut);Kd=c(aa,`The bare SpeechT5 Encoder-Decoder Model outputting raw hidden-states without any specific pre- or post-nets.
This model inherits from `),Tn=r(aa,"A",{href:!0});var mm=s(Tn);Xd=c(mm,"PreTrainedModel"),mm.forEach(o),el=c(aa,`. 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.)`),aa.forEach(o),ol=l(vo),ft=r(vo,"P",{});var ca=s(ft);tl=c(ca,"This model is also a PyTorch "),gt=r(ca,"A",{href:!0,rel:!0});var um=s(gt);nl=c(um,"torch.nn.Module"),um.forEach(o),rl=c(ca,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ca.forEach(o),sl=l(vo),he=r(vo,"DIV",{class:!0});var On=s(he);v(_t.$$.fragment,On),al=l(On),Fe=r(On,"P",{});var An=s(Fe);cl=c(An,"The "),vn=r(An,"A",{href:!0});var fm=s(vn);il=c(fm,"SpeechT5Model"),fm.forEach(o),dl=c(An," forward method, overrides the "),Gr=r(An,"CODE",{});var gm=s(Gr);ll=c(gm,"__call__"),gm.forEach(o),pl=c(An," special method."),An.forEach(o),hl=l(On),v(Ke.$$.fragment,On),On.forEach(o),vo.forEach(o),qs=l(t),qe=r(t,"H2",{class:!0});var ia=s(qe);Xe=r(ia,"A",{id:!0,class:!0,href:!0});var _m=s(Xe);Ur=r(_m,"SPAN",{});var Tm=s(Ur);v(Tt.$$.fragment,Tm),Tm.forEach(o),_m.forEach(o),ml=l(ia),Vr=r(ia,"SPAN",{});var vm=s(Vr);ul=c(vm,"SpeechT5ForSpeechToText"),vm.forEach(o),ia.forEach(o),Es=l(t),Z=r(t,"DIV",{class:!0});var bo=s(Z);v(vt.$$.fragment,bo),fl=l(bo),bt=r(bo,"P",{});var da=s(bt);gl=c(da,`SpeechT5 Model with a speech encoder and a text decoder.
This model inherits from `),bn=r(da,"A",{href:!0});var bm=s(bn);_l=c(bm,"PreTrainedModel"),bm.forEach(o),Tl=c(da,`. 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.)`),da.forEach(o),vl=l(bo),kt=r(bo,"P",{});var la=s(kt);bl=c(la,"This model is also a PyTorch "),yt=r(la,"A",{href:!0,rel:!0});var km=s(yt);kl=c(km,"torch.nn.Module"),km.forEach(o),yl=c(la,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),la.forEach(o),Sl=l(bo),U=r(bo,"DIV",{class:!0});var me=s(U);v(St.$$.fragment,me),wl=l(me),Ee=r(me,"P",{});var In=s(Ee);xl=c(In,"The "),kn=r(In,"A",{href:!0});var ym=s(kn);$l=c(ym,"SpeechT5ForSpeechToText"),ym.forEach(o),zl=c(In," forward method, overrides the "),Rr=r(In,"CODE",{});var Sm=s(Rr);Fl=c(Sm,"__call__"),Sm.forEach(o),ql=c(In," special method."),In.forEach(o),El=l(me),v(eo.$$.fragment,me),Pl=l(me),v(oo.$$.fragment,me),Cl=l(me),v(to.$$.fragment,me),me.forEach(o),bo.forEach(o),Ps=l(t),Pe=r(t,"H2",{class:!0});var pa=s(Pe);no=r(pa,"A",{id:!0,class:!0,href:!0});var wm=s(no);Br=r(wm,"SPAN",{});var xm=s(Br);v(wt.$$.fragment,xm),xm.forEach(o),wm.forEach(o),Ml=l(pa),Yr=r(pa,"SPAN",{});var $m=s(Yr);Dl=c($m,"SpeechT5ForTextToSpeech"),$m.forEach(o),pa.forEach(o),Cs=l(t),H=r(t,"DIV",{class:!0});var ue=s(H);v(xt.$$.fragment,ue),Nl=l(ue),$t=r(ue,"P",{});var ha=s($t);jl=c(ha,`SpeechT5 Model with a text encoder and a speech decoder.
This model inherits from `),yn=r(ha,"A",{href:!0});var zm=s(yn);Ll=c(zm,"PreTrainedModel"),zm.forEach(o),Ol=c(ha,`. 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.)`),ha.forEach(o),Al=l(ue),zt=r(ue,"P",{});var ma=s(zt);Il=c(ma,"This model is also a PyTorch "),Ft=r(ma,"A",{href:!0,rel:!0});var Fm=s(Ft);Hl=c(Fm,"torch.nn.Module"),Fm.forEach(o),Wl=c(ma,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ma.forEach(o),Gl=l(ue),X=r(ue,"DIV",{class:!0});var ko=s(X);v(qt.$$.fragment,ko),Ul=l(ko),Ce=r(ko,"P",{});var Hn=s(Ce);Vl=c(Hn,"The "),Sn=r(Hn,"A",{href:!0});var qm=s(Sn);Rl=c(qm,"SpeechT5ForTextToSpeech"),qm.forEach(o),Bl=c(Hn," forward method, overrides the "),Jr=r(Hn,"CODE",{});var Em=s(Jr);Yl=c(Em,"__call__"),Em.forEach(o),Jl=c(Hn," special method."),Hn.forEach(o),Zl=l(ko),v(ro.$$.fragment,ko),Ql=l(ko),v(so.$$.fragment,ko),ko.forEach(o),Kl=l(ue),ao=r(ue,"DIV",{class:!0});var ua=s(ao);v(Et.$$.fragment,ua),Xl=l(ua),Zr=r(ua,"P",{});var Pm=s(Zr);ep=c(Pm,`Converts a sequence of input tokens into a sequence of mel spectrograms, which are subsequently turned into a
speech waveform using a vocoder.`),Pm.forEach(o),ua.forEach(o),ue.forEach(o),Ms=l(t),Me=r(t,"H2",{class:!0});var fa=s(Me);co=r(fa,"A",{id:!0,class:!0,href:!0});var Cm=s(co);Qr=r(Cm,"SPAN",{});var Mm=s(Qr);v(Pt.$$.fragment,Mm),Mm.forEach(o),Cm.forEach(o),op=l(fa),Kr=r(fa,"SPAN",{});var Dm=s(Kr);tp=c(Dm,"SpeechT5ForSpeechToSpeech"),Dm.forEach(o),fa.forEach(o),Ds=l(t),W=r(t,"DIV",{class:!0});var fe=s(W);v(Ct.$$.fragment,fe),np=l(fe),Mt=r(fe,"P",{});var ga=s(Mt);rp=c(ga,`SpeechT5 Model with a speech encoder and a speech decoder.
This model inherits from `),wn=r(ga,"A",{href:!0});var Nm=s(wn);sp=c(Nm,"PreTrainedModel"),Nm.forEach(o),ap=c(ga,`. 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.)`),ga.forEach(o),cp=l(fe),Dt=r(fe,"P",{});var _a=s(Dt);ip=c(_a,"This model is also a PyTorch "),Nt=r(_a,"A",{href:!0,rel:!0});var jm=s(Nt);dp=c(jm,"torch.nn.Module"),jm.forEach(o),lp=c(_a,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),_a.forEach(o),pp=l(fe),ee=r(fe,"DIV",{class:!0});var yo=s(ee);v(jt.$$.fragment,yo),hp=l(yo),De=r(yo,"P",{});var Wn=s(De);mp=c(Wn,"The "),xn=r(Wn,"A",{href:!0});var Lm=s(xn);up=c(Lm,"SpeechT5ForSpeechToSpeech"),Lm.forEach(o),fp=c(Wn," forward method, overrides the "),Xr=r(Wn,"CODE",{});var Om=s(Xr);gp=c(Om,"__call__"),Om.forEach(o),_p=c(Wn," special method."),Wn.forEach(o),Tp=l(yo),v(io.$$.fragment,yo),vp=l(yo),v(lo.$$.fragment,yo),yo.forEach(o),bp=l(fe),po=r(fe,"DIV",{class:!0});var Ta=s(po);v(Lt.$$.fragment,Ta),kp=l(Ta),es=r(Ta,"P",{});var Am=s(es);yp=c(Am,`Converts a raw speech waveform into a sequence of mel spectrograms, which are subsequently turned back into a
speech waveform using a vocoder.`),Am.forEach(o),Ta.forEach(o),fe.forEach(o),Ns=l(t),Ne=r(t,"H2",{class:!0});var va=s(Ne);ho=r(va,"A",{id:!0,class:!0,href:!0});var Im=s(ho);os=r(Im,"SPAN",{});var Hm=s(os);v(Ot.$$.fragment,Hm),Hm.forEach(o),Im.forEach(o),Sp=l(va),ts=r(va,"SPAN",{});var Wm=s(ts);wp=c(Wm,"SpeechT5HifiGan"),Wm.forEach(o),va.forEach(o),js=l(t),Q=r(t,"DIV",{class:!0});var So=s(Q);v(At.$$.fragment,So),xp=l(So),It=r(So,"P",{});var ba=s(It);$p=c(ba,`HiFi-GAN vocoder.
This model inherits from `),$n=r(ba,"A",{href:!0});var Gm=s($n);zp=c(Gm,"PreTrainedModel"),Gm.forEach(o),Fp=c(ba,`. 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.)`),ba.forEach(o),qp=l(So),Ht=r(So,"P",{});var ka=s(Ht);Ep=c(ka,"This model is also a PyTorch "),Wt=r(ka,"A",{href:!0,rel:!0});var Um=s(Wt);Pp=c(Um,"torch.nn.Module"),Um.forEach(o),Cp=c(ka,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ka.forEach(o),Mp=l(So),mo=r(So,"DIV",{class:!0});var ya=s(mo);v(Gt.$$.fragment,ya),Dp=l(ya),ns=r(ya,"P",{});var Vm=s(ns);Np=c(Vm,`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.`),Vm.forEach(o),ya.forEach(o),So.forEach(o),this.h()},h(){i(h,"name","hf:doc:metadata"),i(h,"content",JSON.stringify(lu)),i(f,"id","speecht5"),i(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"),i(f,"href","#speecht5"),i(m,"class","relative group"),i(N,"id","overview"),i(N,"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"),i(N,"href","#overview"),i(L,"class","relative group"),i(wo,"href","https://arxiv.org/abs/2110.07205"),i(wo,"rel","nofollow"),i(xo,"href","https://huggingface.co/Matthijs"),i(xo,"rel","nofollow"),i($o,"href","https://github.com/microsoft/SpeechT5"),i($o,"rel","nofollow"),i(Oe,"id","transformers.SpeechT5Config"),i(Oe,"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"),i(Oe,"href","#transformers.SpeechT5Config"),i(ge,"class","relative group"),i(Zt,"href","/docs/transformers/v4.27.1/en/model_doc/speecht5#transformers.SpeechT5Model"),i(qo,"href","https://huggingface.co/microsoft/speecht5_asr"),i(qo,"rel","nofollow"),i(Qt,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),i(Kt,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),i(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(Ie,"id","transformers.SpeechT5HifiGanConfig"),i(Ie,"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"),i(Ie,"href","#transformers.SpeechT5HifiGanConfig"),i(ve,"class","relative group"),i(Co,"href","https://huggingface.co/microsoft/speecht5_hifigan"),i(Co,"rel","nofollow"),i(Xt,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),i(en,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),i(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(We,"id","transformers.SpeechT5Tokenizer"),i(We,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),i(We,"href","#transformers.SpeechT5Tokenizer"),i(ye,"class","relative group"),i(jo,"href","https://github.com/google/sentencepiece"),i(jo,"rel","nofollow"),i(on,"href","/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),i(Ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(tn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(Ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(Ve,"id","transformers.SpeechT5FeatureExtractor"),i(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"),i(Ve,"href","#transformers.SpeechT5FeatureExtractor"),i(Se,"class","relative group"),i(nn,"href","/docs/transformers/v4.27.1/en/main_classes/feature_extractor#transformers.SequenceFeatureExtractor"),i(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(Re,"id","transformers.SpeechT5Processor"),i(Re,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),i(Re,"href","#transformers.SpeechT5Processor"),i(xe,"class","relative group"),i(rn,"href","/docs/transformers/v4.27.1/en/model_doc/speecht5#transformers.SpeechT5Processor"),i(sn,"href","/docs/transformers/v4.27.1/en/model_doc/speecht5#transformers.SpeechT5FeatureExtractor"),i(an,"href","/docs/transformers/v4.27.1/en/model_doc/speecht5#transformers.SpeechT5Tokenizer"),i(Jo,"href","/docs/transformers/v4.27.1/en/model_doc/speecht5#transformers.SpeechT5Processor.__call__"),i(cn,"href","/docs/transformers/v4.27.1/en/model_doc/speecht5#transformers.SpeechT5Processor.decode"),i(Qo,"href","/docs/transformers/v4.27.1/en/model_doc/speecht5#transformers.SpeechT5FeatureExtractor.__call__"),i(Ko,"href","/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__"),i(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(mn,"href","/docs/transformers/v4.27.1/en/main_classes/feature_extractor#transformers.SequenceFeatureExtractor.pad"),i(un,"href","/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.pad"),i(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(fn,"href","/docs/transformers/v4.27.1/en/main_classes/processors#transformers.ProcessorMixin.from_pretrained"),i(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(gn,"href","/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.batch_decode"),i(Je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(_n,"href","/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.decode"),i(Ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(Qe,"id","transformers.SpeechT5Model"),i(Qe,"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"),i(Qe,"href","#transformers.SpeechT5Model"),i(ze,"class","relative group"),i(Tn,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),i(gt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),i(gt,"rel","nofollow"),i(vn,"href","/docs/transformers/v4.27.1/en/model_doc/speecht5#transformers.SpeechT5Model"),i(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(Xe,"id","transformers.SpeechT5ForSpeechToText"),i(Xe,"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"),i(Xe,"href","#transformers.SpeechT5ForSpeechToText"),i(qe,"class","relative group"),i(bn,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),i(yt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),i(yt,"rel","nofollow"),i(kn,"href","/docs/transformers/v4.27.1/en/model_doc/speecht5#transformers.SpeechT5ForSpeechToText"),i(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(no,"id","transformers.SpeechT5ForTextToSpeech"),i(no,"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"),i(no,"href","#transformers.SpeechT5ForTextToSpeech"),i(Pe,"class","relative group"),i(yn,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),i(Ft,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),i(Ft,"rel","nofollow"),i(Sn,"href","/docs/transformers/v4.27.1/en/model_doc/speecht5#transformers.SpeechT5ForTextToSpeech"),i(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(ao,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(co,"id","transformers.SpeechT5ForSpeechToSpeech"),i(co,"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"),i(co,"href","#transformers.SpeechT5ForSpeechToSpeech"),i(Me,"class","relative group"),i(wn,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),i(Nt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),i(Nt,"rel","nofollow"),i(xn,"href","/docs/transformers/v4.27.1/en/model_doc/speecht5#transformers.SpeechT5ForSpeechToSpeech"),i(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(po,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(ho,"id","transformers.SpeechT5HifiGan"),i(ho,"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"),i(ho,"href","#transformers.SpeechT5HifiGan"),i(Ne,"class","relative group"),i($n,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),i(Wt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),i(Wt,"rel","nofollow"),i(mo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(Q,"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,w),b(p,w,null),e(m,g),e(m,F),e(F,I),_(t,D,u),_(t,L,u),e(L,N),e(N,O),b(ae,O,null),e(L,Bt),e(L,je),e(je,Sa),_(t,ms,u),_(t,Le,u),e(Le,wa),e(Le,wo),e(wo,xa),e(Le,$a),_(t,us,u),_(t,Yt,u),e(Yt,za),_(t,fs,u),_(t,Jt,u),e(Jt,Bn),e(Bn,Fa),_(t,gs,u),_(t,ce,u),e(ce,qa),e(ce,xo),e(xo,Ea),e(ce,Pa),e(ce,$o),e($o,Ca),e(ce,Ma),_(t,_s,u),_(t,ge,u),e(ge,Oe),e(Oe,Yn),b(zo,Yn,null),e(ge,Da),e(ge,Jn),e(Jn,Na),_(t,Ts,u),_(t,B,u),b(Fo,B,null),e(B,ja),e(B,_e),e(_e,La),e(_e,Zt),e(Zt,Oa),e(_e,Aa),e(_e,qo),e(qo,Ia),e(_e,Ha),e(B,Wa),e(B,Te),e(Te,Ga),e(Te,Qt),e(Qt,Ua),e(Te,Va),e(Te,Kt),e(Kt,Ra),e(Te,Ba),e(B,Ya),b(Ae,B,null),_(t,vs,u),_(t,ve,u),e(ve,Ie),e(Ie,Zn),b(Eo,Zn,null),e(ve,Ja),e(ve,Qn),e(Qn,Za),_(t,bs,u),_(t,Y,u),b(Po,Y,null),e(Y,Qa),e(Y,be),e(be,Ka),e(be,Kn),e(Kn,Xa),e(be,ec),e(be,Co),e(Co,oc),e(be,tc),e(Y,nc),e(Y,ke),e(ke,rc),e(ke,Xt),e(Xt,sc),e(ke,ac),e(ke,en),e(en,cc),e(ke,ic),e(Y,dc),b(He,Y,null),_(t,ks,u),_(t,ye,u),e(ye,We),e(We,Xn),b(Mo,Xn,null),e(ye,lc),e(ye,er),e(er,pc),_(t,ys,u),_(t,E,u),b(Do,E,null),e(E,hc),e(E,No),e(No,mc),e(No,jo),e(jo,uc),e(No,fc),e(E,gc),e(E,Lo),e(Lo,_c),e(Lo,on),e(on,Tc),e(Lo,vc),e(E,bc),e(E,Ge),b(Oo,Ge,null),e(Ge,kc),e(Ge,or),e(or,yc),e(E,Sc),e(E,tn),b(Ao,tn,null),e(E,wc),e(E,ie),b(Io,ie,null),e(ie,xc),e(ie,tr),e(tr,$c),e(ie,zc),e(ie,Ho),e(Ho,Fc),e(Ho,nr),e(nr,qc),e(Ho,Ec),e(E,Pc),e(E,Ue),b(Wo,Ue,null),e(Ue,Cc),e(Ue,rr),e(rr,Mc),_(t,Ss,u),_(t,Se,u),e(Se,Ve),e(Ve,sr),b(Go,sr,null),e(Se,Dc),e(Se,ar),e(ar,Nc),_(t,ws,u),_(t,j,u),b(Uo,j,null),e(j,jc),e(j,cr),e(cr,Lc),e(j,Oc),e(j,ir),e(ir,Ac),e(j,Ic),e(j,dr),e(dr,Hc),e(j,Wc),e(j,Vo),e(Vo,Gc),e(Vo,nn),e(nn,Uc),e(Vo,Vc),e(j,Rc),e(j,de),b(Ro,de,null),e(de,Bc),e(de,lr),e(lr,Yc),e(de,Jc),e(de,we),e(we,Zc),e(we,pr),e(pr,Qc),e(we,Kc),e(we,hr),e(hr,Xc),e(we,ei),_(t,xs,u),_(t,xe,u),e(xe,Re),e(Re,mr),b(Bo,mr,null),e(xe,oi),e(xe,ur),e(ur,ti),_(t,$s,u),_(t,q,u),b(Yo,q,null),e(q,ni),e(q,fr),e(fr,ri),e(q,si),e(q,G),e(G,rn),e(rn,ai),e(G,ci),e(G,sn),e(sn,ii),e(G,di),e(G,an),e(an,li),e(G,pi),e(G,Jo),e(Jo,gr),e(gr,hi),e(Jo,mi),e(G,ui),e(G,cn),e(cn,fi),e(G,gi),e(q,_i),e(q,C),b(Zo,C,null),e(C,Ti),e(C,_r),e(_r,vi),e(C,bi),e(C,ne),e(ne,ki),e(ne,Tr),e(Tr,yi),e(ne,Si),e(ne,vr),e(vr,wi),e(ne,xi),e(ne,Qo),e(Qo,br),e(br,$i),e(Qo,zi),e(ne,Fi),e(C,qi),e(C,re),e(re,Ei),e(re,kr),e(kr,Pi),e(re,Ci),e(re,yr),e(yr,Mi),e(re,Di),e(re,Ko),e(Ko,Sr),e(Sr,Ni),e(Ko,ji),e(re,Li),e(C,Oi),e(C,wr),e(wr,Ai),e(C,Ii),e(C,P),e(P,dn),e(dn,xr),e(xr,Hi),e(dn,Wi),e(P,Gi),e(P,ln),e(ln,$r),e($r,Ui),e(ln,Vi),e(P,Ri),e(P,pn),e(pn,zr),e(zr,Bi),e(pn,Yi),e(P,Ji),e(P,hn),e(hn,Fr),e(Fr,Zi),e(hn,Qi),e(P,Ki),e(P,Xo),e(Xo,qr),e(qr,Xi),e(Xo,ed),e(Xo,Er),e(Er,od),e(P,td),e(P,et),e(et,Pr),e(Pr,nd),e(et,rd),e(et,Cr),e(Cr,sd),e(P,ad),e(P,ot),e(ot,Mr),e(Mr,cd),e(ot,id),e(ot,Dr),e(Dr,dd),e(P,ld),e(P,tt),e(tt,Nr),e(Nr,pd),e(tt,hd),e(tt,jr),e(jr,md),e(C,ud),e(C,Lr),e(Lr,fd),e(q,gd),e(q,K),b(nt,K,null),e(K,_d),e(K,rt),e(rt,Td),e(rt,mn),e(mn,vd),e(rt,bd),e(K,kd),e(K,$e),e($e,yd),e($e,Or),e(Or,Sd),e($e,wd),e($e,un),e(un,xd),e($e,$d),e(K,zd),e(K,Ar),e(Ar,Fd),e(q,qd),e(q,le),b(st,le,null),e(le,Ed),e(le,Ir),e(Ir,Pd),e(le,Cd),b(Be,le,null),e(q,Md),e(q,pe),b(at,pe,null),e(pe,Dd),e(pe,ct),e(ct,Nd),e(ct,fn),e(fn,jd),e(ct,Ld),e(pe,Od),b(Ye,pe,null),e(q,Ad),e(q,Je),b(it,Je,null),e(Je,Id),e(Je,dt),e(dt,Hd),e(dt,gn),e(gn,Wd),e(dt,Gd),e(q,Ud),e(q,Ze),b(lt,Ze,null),e(Ze,Vd),e(Ze,pt),e(pt,Rd),e(pt,_n),e(_n,Bd),e(pt,Yd),_(t,zs,u),_(t,ze,u),e(ze,Qe),e(Qe,Hr),b(ht,Hr,null),e(ze,Jd),e(ze,Wr),e(Wr,Zd),_(t,Fs,u),_(t,J,u),b(mt,J,null),e(J,Qd),e(J,ut),e(ut,Kd),e(ut,Tn),e(Tn,Xd),e(ut,el),e(J,ol),e(J,ft),e(ft,tl),e(ft,gt),e(gt,nl),e(ft,rl),e(J,sl),e(J,he),b(_t,he,null),e(he,al),e(he,Fe),e(Fe,cl),e(Fe,vn),e(vn,il),e(Fe,dl),e(Fe,Gr),e(Gr,ll),e(Fe,pl),e(he,hl),b(Ke,he,null),_(t,qs,u),_(t,qe,u),e(qe,Xe),e(Xe,Ur),b(Tt,Ur,null),e(qe,ml),e(qe,Vr),e(Vr,ul),_(t,Es,u),_(t,Z,u),b(vt,Z,null),e(Z,fl),e(Z,bt),e(bt,gl),e(bt,bn),e(bn,_l),e(bt,Tl),e(Z,vl),e(Z,kt),e(kt,bl),e(kt,yt),e(yt,kl),e(kt,yl),e(Z,Sl),e(Z,U),b(St,U,null),e(U,wl),e(U,Ee),e(Ee,xl),e(Ee,kn),e(kn,$l),e(Ee,zl),e(Ee,Rr),e(Rr,Fl),e(Ee,ql),e(U,El),b(eo,U,null),e(U,Pl),b(oo,U,null),e(U,Cl),b(to,U,null),_(t,Ps,u),_(t,Pe,u),e(Pe,no),e(no,Br),b(wt,Br,null),e(Pe,Ml),e(Pe,Yr),e(Yr,Dl),_(t,Cs,u),_(t,H,u),b(xt,H,null),e(H,Nl),e(H,$t),e($t,jl),e($t,yn),e(yn,Ll),e($t,Ol),e(H,Al),e(H,zt),e(zt,Il),e(zt,Ft),e(Ft,Hl),e(zt,Wl),e(H,Gl),e(H,X),b(qt,X,null),e(X,Ul),e(X,Ce),e(Ce,Vl),e(Ce,Sn),e(Sn,Rl),e(Ce,Bl),e(Ce,Jr),e(Jr,Yl),e(Ce,Jl),e(X,Zl),b(ro,X,null),e(X,Ql),b(so,X,null),e(H,Kl),e(H,ao),b(Et,ao,null),e(ao,Xl),e(ao,Zr),e(Zr,ep),_(t,Ms,u),_(t,Me,u),e(Me,co),e(co,Qr),b(Pt,Qr,null),e(Me,op),e(Me,Kr),e(Kr,tp),_(t,Ds,u),_(t,W,u),b(Ct,W,null),e(W,np),e(W,Mt),e(Mt,rp),e(Mt,wn),e(wn,sp),e(Mt,ap),e(W,cp),e(W,Dt),e(Dt,ip),e(Dt,Nt),e(Nt,dp),e(Dt,lp),e(W,pp),e(W,ee),b(jt,ee,null),e(ee,hp),e(ee,De),e(De,mp),e(De,xn),e(xn,up),e(De,fp),e(De,Xr),e(Xr,gp),e(De,_p),e(ee,Tp),b(io,ee,null),e(ee,vp),b(lo,ee,null),e(W,bp),e(W,po),b(Lt,po,null),e(po,kp),e(po,es),e(es,yp),_(t,Ns,u),_(t,Ne,u),e(Ne,ho),e(ho,os),b(Ot,os,null),e(Ne,Sp),e(Ne,ts),e(ts,wp),_(t,js,u),_(t,Q,u),b(At,Q,null),e(Q,xp),e(Q,It),e(It,$p),e(It,$n),e($n,zp),e(It,Fp),e(Q,qp),e(Q,Ht),e(Ht,Ep),e(Ht,Wt),e(Wt,Pp),e(Ht,Cp),e(Q,Mp),e(Q,mo),b(Gt,mo,null),e(mo,Dp),e(mo,ns),e(ns,Np),Ls=!0},p(t,[u]){const Ut={};u&2&&(Ut.$$scope={dirty:u,ctx:t}),Ae.$set(Ut);const rs={};u&2&&(rs.$$scope={dirty:u,ctx:t}),He.$set(rs);const ss={};u&2&&(ss.$$scope={dirty:u,ctx:t}),Be.$set(ss);const as={};u&2&&(as.$$scope={dirty:u,ctx:t}),Ye.$set(as);const Vt={};u&2&&(Vt.$$scope={dirty:u,ctx:t}),Ke.$set(Vt);const cs={};u&2&&(cs.$$scope={dirty:u,ctx:t}),eo.$set(cs);const is={};u&2&&(is.$$scope={dirty:u,ctx:t}),oo.$set(is);const ds={};u&2&&(ds.$$scope={dirty:u,ctx:t}),to.$set(ds);const Rt={};u&2&&(Rt.$$scope={dirty:u,ctx:t}),ro.$set(Rt);const ls={};u&2&&(ls.$$scope={dirty:u,ctx:t}),so.$set(ls);const ps={};u&2&&(ps.$$scope={dirty:u,ctx:t}),io.$set(ps);const hs={};u&2&&(hs.$$scope={dirty:u,ctx:t}),lo.$set(hs)},i(t){Ls||(k(p.$$.fragment,t),k(ae.$$.fragment,t),k(zo.$$.fragment,t),k(Fo.$$.fragment,t),k(Ae.$$.fragment,t),k(Eo.$$.fragment,t),k(Po.$$.fragment,t),k(He.$$.fragment,t),k(Mo.$$.fragment,t),k(Do.$$.fragment,t),k(Oo.$$.fragment,t),k(Ao.$$.fragment,t),k(Io.$$.fragment,t),k(Wo.$$.fragment,t),k(Go.$$.fragment,t),k(Uo.$$.fragment,t),k(Ro.$$.fragment,t),k(Bo.$$.fragment,t),k(Yo.$$.fragment,t),k(Zo.$$.fragment,t),k(nt.$$.fragment,t),k(st.$$.fragment,t),k(Be.$$.fragment,t),k(at.$$.fragment,t),k(Ye.$$.fragment,t),k(it.$$.fragment,t),k(lt.$$.fragment,t),k(ht.$$.fragment,t),k(mt.$$.fragment,t),k(_t.$$.fragment,t),k(Ke.$$.fragment,t),k(Tt.$$.fragment,t),k(vt.$$.fragment,t),k(St.$$.fragment,t),k(eo.$$.fragment,t),k(oo.$$.fragment,t),k(to.$$.fragment,t),k(wt.$$.fragment,t),k(xt.$$.fragment,t),k(qt.$$.fragment,t),k(ro.$$.fragment,t),k(so.$$.fragment,t),k(Et.$$.fragment,t),k(Pt.$$.fragment,t),k(Ct.$$.fragment,t),k(jt.$$.fragment,t),k(io.$$.fragment,t),k(lo.$$.fragment,t),k(Lt.$$.fragment,t),k(Ot.$$.fragment,t),k(At.$$.fragment,t),k(Gt.$$.fragment,t),Ls=!0)},o(t){y(p.$$.fragment,t),y(ae.$$.fragment,t),y(zo.$$.fragment,t),y(Fo.$$.fragment,t),y(Ae.$$.fragment,t),y(Eo.$$.fragment,t),y(Po.$$.fragment,t),y(He.$$.fragment,t),y(Mo.$$.fragment,t),y(Do.$$.fragment,t),y(Oo.$$.fragment,t),y(Ao.$$.fragment,t),y(Io.$$.fragment,t),y(Wo.$$.fragment,t),y(Go.$$.fragment,t),y(Uo.$$.fragment,t),y(Ro.$$.fragment,t),y(Bo.$$.fragment,t),y(Yo.$$.fragment,t),y(Zo.$$.fragment,t),y(nt.$$.fragment,t),y(st.$$.fragment,t),y(Be.$$.fragment,t),y(at.$$.fragment,t),y(Ye.$$.fragment,t),y(it.$$.fragment,t),y(lt.$$.fragment,t),y(ht.$$.fragment,t),y(mt.$$.fragment,t),y(_t.$$.fragment,t),y(Ke.$$.fragment,t),y(Tt.$$.fragment,t),y(vt.$$.fragment,t),y(St.$$.fragment,t),y(eo.$$.fragment,t),y(oo.$$.fragment,t),y(to.$$.fragment,t),y(wt.$$.fragment,t),y(xt.$$.fragment,t),y(qt.$$.fragment,t),y(ro.$$.fragment,t),y(so.$$.fragment,t),y(Et.$$.fragment,t),y(Pt.$$.fragment,t),y(Ct.$$.fragment,t),y(jt.$$.fragment,t),y(io.$$.fragment,t),y(lo.$$.fragment,t),y(Lt.$$.fragment,t),y(Ot.$$.fragment,t),y(At.$$.fragment,t),y(Gt.$$.fragment,t),Ls=!1},d(t){o(h),t&&o(x),t&&o(m),S(p),t&&o(D),t&&o(L),S(ae),t&&o(ms),t&&o(Le),t&&o(us),t&&o(Yt),t&&o(fs),t&&o(Jt),t&&o(gs),t&&o(ce),t&&o(_s),t&&o(ge),S(zo),t&&o(Ts),t&&o(B),S(Fo),S(Ae),t&&o(vs),t&&o(ve),S(Eo),t&&o(bs),t&&o(Y),S(Po),S(He),t&&o(ks),t&&o(ye),S(Mo),t&&o(ys),t&&o(E),S(Do),S(Oo),S(Ao),S(Io),S(Wo),t&&o(Ss),t&&o(Se),S(Go),t&&o(ws),t&&o(j),S(Uo),S(Ro),t&&o(xs),t&&o(xe),S(Bo),t&&o($s),t&&o(q),S(Yo),S(Zo),S(nt),S(st),S(Be),S(at),S(Ye),S(it),S(lt),t&&o(zs),t&&o(ze),S(ht),t&&o(Fs),t&&o(J),S(mt),S(_t),S(Ke),t&&o(qs),t&&o(qe),S(Tt),t&&o(Es),t&&o(Z),S(vt),S(St),S(eo),S(oo),S(to),t&&o(Ps),t&&o(Pe),S(wt),t&&o(Cs),t&&o(H),S(xt),S(qt),S(ro),S(so),S(Et),t&&o(Ms),t&&o(Me),S(Pt),t&&o(Ds),t&&o(W),S(Ct),S(jt),S(io),S(lo),S(Lt),t&&o(Ns),t&&o(Ne),S(Ot),t&&o(js),t&&o(Q),S(At),S(Gt)}}}const lu={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 pu(z){return Zm(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Tu extends Rm{constructor(h){super();Bm(this,h,pu,du,Ym,{})}}export{Tu as default,lu as metadata};
