import{s as Os,o as Ks,n as uo}from"../chunks/scheduler.9bc65507.js";import{S as en,i as tn,g as s,s as r,u as f,A as on,h as n,f as t,c as l,j as h,v as u,y as p,k as i,o,a as c,w as g,d as _,t as v,x as T}from"../chunks/index.78c82d43.js";import{T as Qs}from"../chunks/Tip.87d55b76.js";import{D as S}from"../chunks/Docstring.4e7352e2.js";import{C as fo}from"../chunks/CodeBlock.73e038be.js";import{I as le}from"../chunks/IconCopyLink.bedaa44d.js";import{E as Ds}from"../chunks/ExampleCodeBlock.872b014d.js";function sn(U){let d,w="Example:",y,b,k;return b=new fo({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFNwZWVjaDJUZXh0MkNvbmZpZyUyQyUyMFNwZWVjaDJUZXh0MkZvckNhdXNhbExNJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMFNwZWVjaDJUZXh0MiUyMHMydF90cmFuc2Zvcm1lcl9zJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMFNwZWVjaDJUZXh0MkNvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwKHdpdGglMjByYW5kb20lMjB3ZWlnaHRzKSUyMGZyb20lMjB0aGUlMjBzMnRfdHJhbnNmb3JtZXJfcyUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwU3BlZWNoMlRleHQyRm9yQ2F1c2FsTE0oY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Speech2Text2Config, Speech2Text2ForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a Speech2Text2 s2t_transformer_s style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = Speech2Text2Config()

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`,wrap:!1}}),{c(){d=s("p"),d.textContent=w,y=r(),f(b.$$.fragment)},l(m){d=n(m,"P",{"data-svelte-h":!0}),p(d)!=="svelte-11lpom8"&&(d.textContent=w),y=l(m),u(b.$$.fragment,m)},m(m,j){c(m,d,j),c(m,y,j),g(b,m,j),k=!0},p:uo,i(m){k||(_(b.$$.fragment,m),k=!0)},o(m){v(b.$$.fragment,m),k=!1},d(m){m&&(t(d),t(y)),T(b,m)}}}function nn(U){let d,w=`This class method is simply calling the feature extractor
<a href="/docs/transformers/v4.34.0/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.from_pretrained">from_pretrained()</a>, image processor
<a href="/docs/transformers/v4.34.0/en/main_classes/image_processor#transformers.ImageProcessingMixin">ImageProcessingMixin</a> and the tokenizer
<code>~tokenization_utils_base.PreTrainedTokenizer.from_pretrained</code> methods. Please refer to the docstrings of the
methods above for more information.`;return{c(){d=s("p"),d.innerHTML=w},l(y){d=n(y,"P",{"data-svelte-h":!0}),p(d)!=="svelte-gbwq5r"&&(d.innerHTML=w)},m(y,b){c(y,d,b)},p:uo,d(y){y&&t(d)}}}function an(U){let d,w=`This class method is simply calling <a href="/docs/transformers/v4.34.0/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.save_pretrained">save_pretrained()</a> and
<a href="/docs/transformers/v4.34.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.save_pretrained">save_pretrained()</a>. Please refer to the docstrings of the
methods above for more information.`;return{c(){d=s("p"),d.innerHTML=w},l(y){d=n(y,"P",{"data-svelte-h":!0}),p(d)!=="svelte-1rzuu8q"&&(d.innerHTML=w)},m(y,b){c(y,d,b)},p:uo,d(y){y&&t(d)}}}function rn(U){let d,w="Example:",y,b,k;return b=new fo({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMCglMEElMjAlMjAlMjAlMjBTcGVlY2hFbmNvZGVyRGVjb2Rlck1vZGVsJTJDJTBBJTIwJTIwJTIwJTIwU3BlZWNoMlRleHQyRm9yQ2F1c2FsTE0lMkMlMEElMjAlMjAlMjAlMjBXYXYyVmVjMk1vZGVsJTJDJTBBJTIwJTIwJTIwJTIwU3BlZWNoMlRleHQyQ29uZmlnJTJDJTBBJTIwJTIwJTIwJTIwV2F2MlZlYzJDb25maWclMkMlMEElMjAlMjAlMjAlMjBXYXYyVmVjMkZlYXR1cmVFeHRyYWN0b3IlMkMlMEElMjAlMjAlMjAlMjBTcGVlY2gyVGV4dDJUb2tlbml6ZXIlMkMlMEEpJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBZmVhdHVyZV9leHRyYWN0b3IlMjAlM0QlMjBXYXYyVmVjMkZlYXR1cmVFeHRyYWN0b3IoKSUwQXRva2VuaXplciUyMCUzRCUyMFNwZWVjaDJUZXh0MlRva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZzMnQtd2F2MnZlYzItbGFyZ2UtZW4tZGUlMjIpJTBBJTBBZW5jb2RlciUyMCUzRCUyMFdhdjJWZWMyTW9kZWwoV2F2MlZlYzJDb25maWcoKSklMEFkZWNvZGVyJTIwJTNEJTIwU3BlZWNoMlRleHQyRm9yQ2F1c2FsTE0oU3BlZWNoMlRleHQyQ29uZmlnKCkpJTBBJTIzJTIwaW5pdCUyMHJhbmRvbSUyMHNwZWVjaDJ0ZXh0JTIwbW9kZWwlMEElMEFtb2RlbCUyMCUzRCUyMFNwZWVjaEVuY29kZXJEZWNvZGVyTW9kZWwoZW5jb2RlciUzRGVuY29kZXIlMkMlMjBkZWNvZGVyJTNEZGVjb2RlciklMEFtb2RlbC5jb25maWcucGFkX3Rva2VuX2lkJTIwJTNEJTIwdG9rZW5pemVyLnBhZF90b2tlbl9pZCUwQW1vZGVsLmNvbmZpZy5kZWNvZGVyX3N0YXJ0X3Rva2VuX2lkJTIwJTNEJTIwdG9rZW5pemVyLmJvc190b2tlbl9pZCUwQSUyMyUyMHByZS1wcm9jZXNzJTIwaW5wdXRzJTIwYW5kJTIwbGFiZWxzJTBBJTBBZHMlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaGYtaW50ZXJuYWwtdGVzdGluZyUyRmxpYnJpc3BlZWNoX2Fzcl9kdW1teSUyMiUyQyUyMCUyMmNsZWFuJTIyJTJDJTIwc3BsaXQlM0QlMjJ2YWxpZGF0aW9uJTIyKSUwQWlucHV0cyUyMCUzRCUyMGZlYXR1cmVfZXh0cmFjdG9yKCUwQSUyMCUyMCUyMCUyMGRzJTVCMCU1RCU1QiUyMmF1ZGlvJTIyJTVEJTVCJTIyYXJyYXklMjIlNUQlMkMlMjBzYW1wbGluZ19yYXRlJTNEZHMlNUIwJTVEJTVCJTIyYXVkaW8lMjIlNUQlNUIlMjJzYW1wbGluZ19yYXRlJTIyJTVEJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiUwQSklMEFpbnB1dF92YWx1ZXMlMjAlM0QlMjBpbnB1dHMuaW5wdXRfdmFsdWVzJTBBZGVjb2Rlcl9pbnB1dF9pZHMlMjAlM0QlMjB0b2tlbml6ZXIoZHMlNUIwJTVEJTVCJTIydGV4dCUyMiU1RCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpLmlucHV0X2lkcyUwQSUyMyUyMGNvbXB1dGUlMjBsb3NzJTBBJTBBbG9zcyUyMCUzRCUyMG1vZGVsKGlucHV0cyUzRGlucHV0X3ZhbHVlcyUyQyUyMGxhYmVscyUzRGRlY29kZXJfaW5wdXRfaWRzKS5sb3NzJTBBJTIzJTIwYmFja3Byb3AlMjBsb3NzJTBBJTBBbG9zcy5iYWNrd2FyZCgp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> (
<span class="hljs-meta">... </span>    SpeechEncoderDecoderModel,
<span class="hljs-meta">... </span>    Speech2Text2ForCausalLM,
<span class="hljs-meta">... </span>    Wav2Vec2Model,
<span class="hljs-meta">... </span>    Speech2Text2Config,
<span class="hljs-meta">... </span>    Wav2Vec2Config,
<span class="hljs-meta">... </span>    Wav2Vec2FeatureExtractor,
<span class="hljs-meta">... </span>    Speech2Text2Tokenizer,
<span class="hljs-meta">... </span>)
<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>feature_extractor = Wav2Vec2FeatureExtractor()
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = Speech2Text2Tokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/s2t-wav2vec2-large-en-de&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>encoder = Wav2Vec2Model(Wav2Vec2Config())
<span class="hljs-meta">&gt;&gt;&gt; </span>decoder = Speech2Text2ForCausalLM(Speech2Text2Config())
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># init random speech2text model</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>model = SpeechEncoderDecoderModel(encoder=encoder, decoder=decoder)
<span class="hljs-meta">&gt;&gt;&gt; </span>model.config.pad_token_id = tokenizer.pad_token_id
<span class="hljs-meta">&gt;&gt;&gt; </span>model.config.decoder_start_token_id = tokenizer.bos_token_id
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># pre-process inputs and labels</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;hf-internal-testing/librispeech_asr_dummy&quot;</span>, <span class="hljs-string">&quot;clean&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = feature_extractor(
<span class="hljs-meta">... </span>    ds[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>], sampling_rate=ds[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;sampling_rate&quot;</span>], return_tensors=<span class="hljs-string">&quot;pt&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>input_values = inputs.input_values
<span class="hljs-meta">&gt;&gt;&gt; </span>decoder_input_ids = tokenizer(ds[<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=input_values, labels=decoder_input_ids).loss
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># backprop loss</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>loss.backward()`,wrap:!1}}),{c(){d=s("p"),d.textContent=w,y=r(),f(b.$$.fragment)},l(m){d=n(m,"P",{"data-svelte-h":!0}),p(d)!=="svelte-11lpom8"&&(d.textContent=w),y=l(m),u(b.$$.fragment,m)},m(m,j){c(m,d,j),c(m,y,j),g(b,m,j),k=!0},p:uo,i(m){k||(_(b.$$.fragment,m),k=!0)},o(m){v(b.$$.fragment,m),k=!1},d(m){m&&(t(d),t(y)),T(b,m)}}}function ln(U){let d,w,y,b,k,m,j,ce,go,He,Ko="Speech2Text2",Jt,V,q,Tt,ie,_o,Re,es="Overview",St,de,ts=`The Speech2Text2 model is used together with <a href="wav2vec2">Wav2Vec2</a> for Speech Translation models proposed in
<a href="https://arxiv.org/abs/2104.06678" rel="nofollow">Large-Scale Self- and Semi-Supervised Learning for Speech Translation</a> by
Changhan Wang, Anne Wu, Juan Pino, Alexei Baevski, Michael Auli, Alexis Conneau.`,zt,pe,os=`Speech2Text2 is a <em>decoder-only</em> transformer model that can be used with any speech <em>encoder-only</em>, such as
<a href="wav2vec2">Wav2Vec2</a> or <a href="hubert">HuBERT</a> for Speech-to-Text tasks. Please refer to the
<a href="speech-encoder-decoder">SpeechEncoderDecoder</a> class on how to combine Speech2Text2 with any speech <em>encoder-only</em>
model.`,Ut,he,ss='This model was contributed by <a href="https://huggingface.co/patrickvonplaten" rel="nofollow">Patrick von Platen</a>.',Zt,me,ns='The original code can be found <a href="https://github.com/pytorch/fairseq/blob/1f7ef9ed1e1061f8c7f88f8b94c7186834398690/fairseq/models/wav2vec/wav2vec2_asr.py#L266" rel="nofollow">here</a>.',Wt,fe,as="Tips:",Ft,ue,rs=`<li>Speech2Text2 achieves state-of-the-art results on the CoVoST Speech Translation dataset. For more information, see
the <a href="https://huggingface.co/models?other=speech2text2" rel="nofollow">official models</a> .</li> <li>Speech2Text2 is always used within the <a href="speech-encoder-decoder">SpeechEncoderDecoder</a> framework.</li> <li>Speech2Text2’s tokenizer is based on <a href="https://github.com/glample/fastBPE" rel="nofollow">fastBPE</a>.</li>`,Vt,I,P,yt,ge,vo,Xe,ls="Inference",It,_e,cs=`Speech2Text2’s <a href="/docs/transformers/v4.34.0/en/model_doc/speech-encoder-decoder#transformers.SpeechEncoderDecoderModel">SpeechEncoderDecoderModel</a> model accepts raw waveform input values from speech and
makes use of <a href="/docs/transformers/v4.34.0/en/main_classes/text_generation#transformers.GenerationMixin.generate">generate()</a> to translate the input speech
autoregressively to the target language.`,Nt,ve,is=`The <a href="/docs/transformers/v4.34.0/en/model_doc/wav2vec2#transformers.Wav2Vec2FeatureExtractor">Wav2Vec2FeatureExtractor</a> class is responsible for preprocessing the input speech and
<a href="/docs/transformers/v4.34.0/en/model_doc/speech_to_text_2#transformers.Speech2Text2Tokenizer">Speech2Text2Tokenizer</a> decodes the generated target tokens to the target string. The
<a href="/docs/transformers/v4.34.0/en/model_doc/speech_to_text_2#transformers.Speech2Text2Processor">Speech2Text2Processor</a> wraps <a href="/docs/transformers/v4.34.0/en/model_doc/wav2vec2#transformers.Wav2Vec2FeatureExtractor">Wav2Vec2FeatureExtractor</a> and
<a href="/docs/transformers/v4.34.0/en/model_doc/speech_to_text_2#transformers.Speech2Text2Tokenizer">Speech2Text2Tokenizer</a> into a single instance to both extract the input features and decode the
predicted token ids.`,Lt,Te,ds="<li>Step-by-step Speech Translation</li>",Et,ye,Bt,be,ps="<li><p>Speech Translation via Pipelines</p> <p>The automatic speech recognition pipeline can also be used to translate speech in just a couple lines of code</p></li>",Gt,xe,qt,ke,hs='See <a href="https://huggingface.co/models?filter=speech2text2" rel="nofollow">model hub</a> to look for Speech2Text2 checkpoints.',Pt,N,H,bt,Me,To,Ye,ms="Documentation resources",Ht,we,fs='<li><a href="../tasks/language_modeling">Causal language modeling task guide</a></li>',Rt,L,R,xt,$e,yo,Ae,us="Speech2Text2Config",Xt,C,je,bo,Qe,gs=`This is the configuration class to store the configuration of a <a href="/docs/transformers/v4.34.0/en/model_doc/speech_to_text_2#transformers.Speech2Text2ForCausalLM">Speech2Text2ForCausalLM</a>. It is used to
instantiate an Speech2Text2 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 Speech2Text2
<a href="https://huggingface.co/facebook/s2t-wav2vec2-large-en-de" rel="nofollow">facebook/s2t-wav2vec2-large-en-de</a> architecture.`,xo,De,_s=`Configuration objects inherit from <a href="/docs/transformers/v4.34.0/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/v4.34.0/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,ko,X,Yt,E,Y,kt,Ce,Mo,Oe,vs="Speech2TextTokenizer",At,M,Je,wo,Ke,Ts="Constructs a Speech2Text2Tokenizer.",$o,et,ys=`This tokenizer inherits from <a href="/docs/transformers/v4.34.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a> which contains some of the main methods. Users should refer to
the superclass for more information regarding such methods.`,jo,A,Se,Co,tt,bs="Convert a list of lists of token ids into a list of strings by calling decode.",Jo,Z,ze,So,ot,xs=`Converts a sequence of ids in a string, using the tokenizer and vocabulary with options to remove special
tokens and clean up tokenization spaces.`,zo,st,ks="Similar to doing <code>self.convert_tokens_to_string(self.convert_ids_to_tokens(token_ids))</code>.",Uo,nt,Ue,Qt,B,Q,Mt,Ze,Zo,at,Ms="Speech2Text2Processor",Dt,x,We,Wo,rt,ws=`Constructs a Speech2Text2 processor which wraps a Speech2Text2 feature extractor and a Speech2Text2 tokenizer into
a single processor.`,Fo,lt,$s=`<a href="/docs/transformers/v4.34.0/en/model_doc/speech_to_text_2#transformers.Speech2Text2Processor">Speech2Text2Processor</a> offers all the functionalities of <a href="/docs/transformers/v4.34.0/en/model_doc/auto#transformers.AutoFeatureExtractor">AutoFeatureExtractor</a> and <a href="/docs/transformers/v4.34.0/en/model_doc/speech_to_text_2#transformers.Speech2Text2Tokenizer">Speech2Text2Tokenizer</a>.
See the <a href="/docs/transformers/v4.34.0/en/model_doc/speech_to_text_2#transformers.Speech2Text2Processor.__call__"><strong>call</strong>()</a> and <a href="/docs/transformers/v4.34.0/en/model_doc/speech_to_text_2#transformers.Speech2Text2Processor.decode">decode()</a> for more information.`,Vo,D,Fe,Io,ct,js=`When used in normal mode, this method forwards all its arguments to AutoFeatureExtractor’s
<code>__call__()</code> and returns its output. If used in the context
<code>as_target_processor()</code> this method forwards all its arguments to
Speech2Text2Tokenizer’s <a href="/docs/transformers/v4.34.0/en/model_doc/vits#transformers.VitsTokenizer.__call__"><strong>call</strong>()</a>. Please refer to the doctsring of the above two
methods for more information.`,No,W,Ve,Lo,it,Cs="Instantiate a processor associated with a pretrained model.",Eo,O,Bo,F,Ie,Go,dt,Js=`Saves the attributes of this processor (feature extractor, tokenizer…) in the specified directory so that it
can be reloaded using the <a href="/docs/transformers/v4.34.0/en/model_doc/nougat#transformers.NougatProcessor.from_pretrained">from_pretrained()</a> method.`,qo,K,Po,ee,Ne,Ho,pt,Ss=`This method forwards all its arguments to Speech2Text2Tokenizer’s <a href="/docs/transformers/v4.34.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.batch_decode">batch_decode()</a>. Please
refer to the docstring of this method for more information.`,Ro,te,Le,Xo,ht,zs=`This method forwards all its arguments to Speech2Text2Tokenizer’s <a href="/docs/transformers/v4.34.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.decode">decode()</a>. Please refer
to the docstring of this method for more information.`,Ot,G,oe,wt,Ee,Yo,mt,Us="Speech2Text2ForCausalLM",Kt,J,Be,Ao,ft,Zs=`The Speech2Text2 Decoder with a language modeling head. Can be used as the decoder part of <a href="/docs/transformers/v4.34.0/en/model_doc/encoder-decoder#transformers.EncoderDecoderModel">EncoderDecoderModel</a> and <code>SpeechEncoderDecoder</code>.
This model inherits from <a href="/docs/transformers/v4.34.0/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,Qo,ut,Ws=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,Do,se,Ge,Oo,ne,eo,$t,to;return ce=new le({}),ie=new le({}),ge=new le({}),ye=new fo({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwU3BlZWNoMlRleHQyUHJvY2Vzc29yJTJDJTIwU3BlZWNoRW5jb2RlckRlY29kZXJNb2RlbCUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQWltcG9ydCUyMHNvdW5kZmlsZSUyMGFzJTIwc2YlMEElMEFtb2RlbCUyMCUzRCUyMFNwZWVjaEVuY29kZXJEZWNvZGVyTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGczJ0LXdhdjJ2ZWMyLWxhcmdlLWVuLWRlJTIyKSUwQXByb2Nlc3NvciUyMCUzRCUyMFNwZWVjaDJUZXh0MlByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZzMnQtd2F2MnZlYzItbGFyZ2UtZW4tZGUlMjIpJTBBJTBBJTBBZGVmJTIwbWFwX3RvX2FycmF5KGJhdGNoKSUzQSUwQSUyMCUyMCUyMCUyMHNwZWVjaCUyQyUyMF8lMjAlM0QlMjBzZi5yZWFkKGJhdGNoJTVCJTIyZmlsZSUyMiU1RCklMEElMjAlMjAlMjAlMjBiYXRjaCU1QiUyMnNwZWVjaCUyMiU1RCUyMCUzRCUyMHNwZWVjaCUwQSUyMCUyMCUyMCUyMHJldHVybiUyMGJhdGNoJTBBJTBBJTBBZHMlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaGYtaW50ZXJuYWwtdGVzdGluZyUyRmxpYnJpc3BlZWNoX2Fzcl9kdW1teSUyMiUyQyUyMCUyMmNsZWFuJTIyJTJDJTIwc3BsaXQlM0QlMjJ2YWxpZGF0aW9uJTIyKSUwQWRzJTIwJTNEJTIwZHMubWFwKG1hcF90b19hcnJheSklMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoZHMlNUIlMjJzcGVlY2glMjIlNUQlNUIwJTVEJTJDJTIwc2FtcGxpbmdfcmF0ZSUzRDE2XzAwMCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBZ2VuZXJhdGVkX2lkcyUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKGlucHV0cyUzRGlucHV0cyU1QiUyMmlucHV0X3ZhbHVlcyUyMiU1RCUyQyUyMGF0dGVudGlvbl9tYXNrJTNEaW5wdXRzJTVCJTIyYXR0ZW50aW9uX21hc2slMjIlNUQpJTBBJTBBdHJhbnNjcmlwdGlvbiUyMCUzRCUyMHByb2Nlc3Nvci5iYXRjaF9kZWNvZGUoZ2VuZXJhdGVkX2lkcyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Speech2Text2Processor, SpeechEncoderDecoderModel
<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> soundfile <span class="hljs-keyword">as</span> sf

<span class="hljs-meta">&gt;&gt;&gt; </span>model = SpeechEncoderDecoderModel.from_pretrained(<span class="hljs-string">&quot;facebook/s2t-wav2vec2-large-en-de&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = Speech2Text2Processor.from_pretrained(<span class="hljs-string">&quot;facebook/s2t-wav2vec2-large-en-de&quot;</span>)


<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">map_to_array</span>(<span class="hljs-params">batch</span>):
<span class="hljs-meta">... </span>    speech, _ = sf.read(batch[<span class="hljs-string">&quot;file&quot;</span>])
<span class="hljs-meta">... </span>    batch[<span class="hljs-string">&quot;speech&quot;</span>] = speech
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> batch


<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;hf-internal-testing/librispeech_asr_dummy&quot;</span>, <span class="hljs-string">&quot;clean&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = ds.<span class="hljs-built_in">map</span>(map_to_array)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(ds[<span class="hljs-string">&quot;speech&quot;</span>][<span class="hljs-number">0</span>], sampling_rate=<span class="hljs-number">16_000</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>generated_ids = model.generate(inputs=inputs[<span class="hljs-string">&quot;input_values&quot;</span>], attention_mask=inputs[<span class="hljs-string">&quot;attention_mask&quot;</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>transcription = processor.batch_decode(generated_ids)`,wrap:!1}}),xe=new fo({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBbGlicmlzcGVlY2hfZW4lMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaGYtaW50ZXJuYWwtdGVzdGluZyUyRmxpYnJpc3BlZWNoX2Fzcl9kdW1teSUyMiUyQyUyMCUyMmNsZWFuJTIyJTJDJTIwc3BsaXQlM0QlMjJ2YWxpZGF0aW9uJTIyKSUwQWFzciUyMCUzRCUyMHBpcGVsaW5lKCUwQSUyMCUyMCUyMCUyMCUyMmF1dG9tYXRpYy1zcGVlY2gtcmVjb2duaXRpb24lMjIlMkMlMEElMjAlMjAlMjAlMjBtb2RlbCUzRCUyMmZhY2Vib29rJTJGczJ0LXdhdjJ2ZWMyLWxhcmdlLWVuLWRlJTIyJTJDJTBBJTIwJTIwJTIwJTIwZmVhdHVyZV9leHRyYWN0b3IlM0QlMjJmYWNlYm9vayUyRnMydC13YXYydmVjMi1sYXJnZS1lbi1kZSUyMiUyQyUwQSklMEElMEF0cmFuc2xhdGlvbl9kZSUyMCUzRCUyMGFzcihsaWJyaXNwZWVjaF9lbiU1QjAlNUQlNUIlMjJmaWxlJTIyJTVEKQ==",highlighted:`<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">from</span> transformers <span class="hljs-keyword">import</span> pipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>librispeech_en = load_dataset(<span class="hljs-string">&quot;hf-internal-testing/librispeech_asr_dummy&quot;</span>, <span class="hljs-string">&quot;clean&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>asr = pipeline(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;automatic-speech-recognition&quot;</span>,
<span class="hljs-meta">... </span>    model=<span class="hljs-string">&quot;facebook/s2t-wav2vec2-large-en-de&quot;</span>,
<span class="hljs-meta">... </span>    feature_extractor=<span class="hljs-string">&quot;facebook/s2t-wav2vec2-large-en-de&quot;</span>,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>translation_de = asr(librispeech_en[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;file&quot;</span>])`,wrap:!1}}),Me=new le({}),$e=new le({}),je=new S({props:{name:"class transformers.Speech2Text2Config",anchor:"transformers.Speech2Text2Config",parameters:[{name:"vocab_size",val:" = 10000"},{name:"decoder_layers",val:" = 6"},{name:"decoder_ffn_dim",val:" = 2048"},{name:"decoder_attention_heads",val:" = 4"},{name:"decoder_layerdrop",val:" = 0.0"},{name:"use_cache",val:" = True"},{name:"activation_function",val:" = 'relu'"},{name:"d_model",val:" = 256"},{name:"dropout",val:" = 0.1"},{name:"attention_dropout",val:" = 0.0"},{name:"activation_dropout",val:" = 0.0"},{name:"init_std",val:" = 0.02"},{name:"decoder_start_token_id",val:" = 2"},{name:"scale_embedding",val:" = True"},{name:"pad_token_id",val:" = 1"},{name:"bos_token_id",val:" = 0"},{name:"eos_token_id",val:" = 2"},{name:"max_target_positions",val:" = 1024"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Speech2Text2Config.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 50265) &#x2014;
Vocabulary size of the Speech2Text model. Defines the number of different tokens that can be represented by
the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.34.0/en/model_doc/speech_to_text#transformers.Speech2TextModel">Speech2TextModel</a>`,name:"vocab_size"},{anchor:"transformers.Speech2Text2Config.d_model",description:`<strong>d_model</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
Dimensionality of the layers and the pooler layer.`,name:"d_model"},{anchor:"transformers.Speech2Text2Config.decoder_layers",description:`<strong>decoder_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of decoder layers.`,name:"decoder_layers"},{anchor:"transformers.Speech2Text2Config.decoder_attention_heads",description:`<strong>decoder_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Number of attention heads for each attention layer in the Transformer decoder.`,name:"decoder_attention_heads"},{anchor:"transformers.Speech2Text2Config.decoder_ffn_dim",description:`<strong>decoder_ffn_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 4096) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in decoder.`,name:"decoder_ffn_dim"},{anchor:"transformers.Speech2Text2Config.activation_function",description:`<strong>activation_function</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 pooler. If string, <code>&quot;gelu&quot;</code>, <code>&quot;relu&quot;</code>,
<code>&quot;silu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"activation_function"},{anchor:"transformers.Speech2Text2Config.dropout",description:`<strong>dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, and pooler.`,name:"dropout"},{anchor:"transformers.Speech2Text2Config.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.Speech2Text2Config.activation_dropout",description:`<strong>activation_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for activations inside the fully connected layer.`,name:"activation_dropout"},{anchor:"transformers.Speech2Text2Config.init_std",description:`<strong>init_std</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.
<a href="https://arxiv.org/abs/1909.11556%3E%60" rel="nofollow">https://arxiv.org/abs/1909.11556&gt;\`</a>__ for more details.`,name:"init_std"},{anchor:"transformers.Speech2Text2Config.decoder_layerdrop",description:`<strong>decoder_layerdrop</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#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.Speech2Text2Config.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"},{anchor:"transformers.Speech2Text2Config.max_target_positions",description:`<strong>max_target_positions</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"max_target_positions"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/speech_to_text_2/configuration_speech_to_text_2.py#L31"}}),X=new Ds({props:{anchor:"transformers.Speech2Text2Config.example",$$slots:{default:[sn]},$$scope:{ctx:U}}}),Ce=new le({}),Je=new S({props:{name:"class transformers.Speech2Text2Tokenizer",anchor:"transformers.Speech2Text2Tokenizer",parameters:[{name:"vocab_file",val:""},{name:"bos_token",val:" = '<s>'"},{name:"pad_token",val:" = '<pad>'"},{name:"eos_token",val:" = '</s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"do_lower_case",val:" = False"},{name:"merges_file",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Speech2Text2Tokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
File containing the vocabulary.`,name:"vocab_file"},{anchor:"transformers.Speech2Text2Tokenizer.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The beginning of sentence token.`,name:"bos_token"},{anchor:"transformers.Speech2Text2Tokenizer.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 sentence token.`,name:"eos_token"},{anchor:"transformers.Speech2Text2Tokenizer.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.Speech2Text2Tokenizer.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.</p>
<p>**kwargs &#x2014;
Additional keyword arguments passed along to <a href="/docs/transformers/v4.34.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>`,name:"pad_token"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/speech_to_text_2/tokenization_speech_to_text_2.py#L73"}}),Se=new S({props:{name:"batch_decode",anchor:"transformers.Speech2Text2Tokenizer.batch_decode",parameters:[{name:"sequences",val:": typing.Union[typing.List[int], typing.List[typing.List[int]], ForwardRef('np.ndarray'), ForwardRef('torch.Tensor'), ForwardRef('tf.Tensor')]"},{name:"skip_special_tokens",val:": bool = False"},{name:"clean_up_tokenization_spaces",val:": bool = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Speech2Text2Tokenizer.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.Speech2Text2Tokenizer.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.Speech2Text2Tokenizer.batch_decode.clean_up_tokenization_spaces",description:`<strong>clean_up_tokenization_spaces</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to clean up the tokenization spaces. If <code>None</code>, will default to
<code>self.clean_up_tokenization_spaces</code>.`,name:"clean_up_tokenization_spaces"},{anchor:"transformers.Speech2Text2Tokenizer.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.34.0/src/transformers/tokenization_utils_base.py#L3690",returnDescription:`
<p>The list of decoded sentences.</p>
`,returnType:`
<p><code>List[str]</code></p>
`}}),ze=new S({props:{name:"decode",anchor:"transformers.Speech2Text2Tokenizer.decode",parameters:[{name:"token_ids",val:": typing.Union[int, typing.List[int], ForwardRef('np.ndarray'), ForwardRef('torch.Tensor'), ForwardRef('tf.Tensor')]"},{name:"skip_special_tokens",val:": bool = False"},{name:"clean_up_tokenization_spaces",val:": bool = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Speech2Text2Tokenizer.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.Speech2Text2Tokenizer.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.Speech2Text2Tokenizer.decode.clean_up_tokenization_spaces",description:`<strong>clean_up_tokenization_spaces</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to clean up the tokenization spaces. If <code>None</code>, will default to
<code>self.clean_up_tokenization_spaces</code>.`,name:"clean_up_tokenization_spaces"},{anchor:"transformers.Speech2Text2Tokenizer.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.34.0/src/transformers/tokenization_utils_base.py#L3724",returnDescription:`
<p>The decoded sentence.</p>
`,returnType:`
<p><code>str</code></p>
`}}),Ue=new S({props:{name:"save_vocabulary",anchor:"transformers.Speech2Text2Tokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/speech_to_text_2/tokenization_speech_to_text_2.py#L240"}}),Ze=new le({}),We=new S({props:{name:"class transformers.Speech2Text2Processor",anchor:"transformers.Speech2Text2Processor",parameters:[{name:"feature_extractor",val:""},{name:"tokenizer",val:""}],parametersDescription:[{anchor:"transformers.Speech2Text2Processor.feature_extractor",description:`<strong>feature_extractor</strong> (<code>AutoFeatureExtractor</code>) &#x2014;
An instance of <a href="/docs/transformers/v4.34.0/en/model_doc/auto#transformers.AutoFeatureExtractor">AutoFeatureExtractor</a>. The feature extractor is a required input.`,name:"feature_extractor"},{anchor:"transformers.Speech2Text2Processor.tokenizer",description:`<strong>tokenizer</strong> (<code>Speech2Text2Tokenizer</code>) &#x2014;
An instance of <a href="/docs/transformers/v4.34.0/en/model_doc/speech_to_text_2#transformers.Speech2Text2Tokenizer">Speech2Text2Tokenizer</a>. The tokenizer is a required input.`,name:"tokenizer"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/speech_to_text_2/processing_speech_to_text_2.py#L24"}}),Fe=new S({props:{name:"__call__",anchor:"transformers.Speech2Text2Processor.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/speech_to_text_2/processing_speech_to_text_2.py#L46"}}),Ve=new S({props:{name:"from_pretrained",anchor:"transformers.Speech2Text2Processor.from_pretrained",parameters:[{name:"pretrained_model_name_or_path",val:": typing.Union[str, os.PathLike]"},{name:"cache_dir",val:": typing.Union[str, os.PathLike, NoneType] = None"},{name:"force_download",val:": bool = False"},{name:"local_files_only",val:": bool = False"},{name:"token",val:": typing.Union[bool, str, NoneType] = None"},{name:"revision",val:": str = 'main'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Speech2Text2Processor.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.34.0/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.save_pretrained">save_pretrained()</a> method, e.g., <code>./my_model_directory/</code>.</li>
<li>a path or url to a saved feature extractor JSON <em>file</em>, e.g.,
<code>./my_model_directory/preprocessor_config.json</code>.
**kwargs &#x2014;
Additional keyword arguments passed along to both
<a href="/docs/transformers/v4.34.0/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.from_pretrained">from_pretrained()</a> and
<code>~tokenization_utils_base.PreTrainedTokenizer.from_pretrained</code>.</li>
</ul>`,name:"pretrained_model_name_or_path"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/processing_utils.py#L167"}}),O=new Qs({props:{$$slots:{default:[nn]},$$scope:{ctx:U}}}),Ie=new S({props:{name:"save_pretrained",anchor:"transformers.Speech2Text2Processor.save_pretrained",parameters:[{name:"save_directory",val:""},{name:"push_to_hub",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Speech2Text2Processor.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.Speech2Text2Processor.save_pretrained.push_to_hub",description:`<strong>push_to_hub</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to push your model to the Hugging Face model hub after saving it. You can specify the
repository you want to push to with <code>repo_id</code> (will default to the name of <code>save_directory</code> in your
namespace).`,name:"push_to_hub"},{anchor:"transformers.Speech2Text2Processor.save_pretrained.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Additional key word arguments passed along to the <a href="/docs/transformers/v4.34.0/en/main_classes/processors#transformers.ProcessorMixin.push_to_hub">push_to_hub()</a> method.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/processing_utils.py#L93"}}),K=new Qs({props:{$$slots:{default:[an]},$$scope:{ctx:U}}}),Ne=new S({props:{name:"batch_decode",anchor:"transformers.Speech2Text2Processor.batch_decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/speech_to_text_2/processing_speech_to_text_2.py#L85"}}),Le=new S({props:{name:"decode",anchor:"transformers.Speech2Text2Processor.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/speech_to_text_2/processing_speech_to_text_2.py#L92"}}),Ee=new le({}),Be=new S({props:{name:"class transformers.Speech2Text2ForCausalLM",anchor:"transformers.Speech2Text2ForCausalLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.Speech2Text2ForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.34.0/en/model_doc/speech_to_text_2#transformers.Speech2Text2Config">Speech2Text2Config</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.34.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/speech_to_text_2/modeling_speech_to_text_2.py#L758"}}),Ge=new S({props:{name:"forward",anchor:"transformers.Speech2Text2ForCausalLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = 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"}],parametersDescription:[{anchor:"transformers.Speech2Text2ForCausalLM.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. Padding will be ignored by default should you
provide it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.34.0/en/model_doc/speech_to_text_2#transformers.Speech2Text2Tokenizer">Speech2Text2Tokenizer</a>. See <a href="/docs/transformers/v4.34.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.34.0/en/model_doc/vits#transformers.VitsTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.Speech2Text2ForCausalLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.Speech2Text2ForCausalLM.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention
if the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.Speech2Text2ForCausalLM.forward.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used
in the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:`,name:"encoder_attention_mask"},{anchor:"transformers.Speech2Text2ForCausalLM.forward.head_mask",description:`<strong>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. 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.Speech2Text2ForCausalLM.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.Speech2Text2ForCausalLM.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>. The two additional
tensors are only required when the model is used as a decoder in a Sequence to Sequence model.</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_ids</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_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.Speech2Text2ForCausalLM.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 masked 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>.`,name:"labels"},{anchor:"transformers.Speech2Text2ForCausalLM.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>).</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"use_cache"},{anchor:"transformers.Speech2Text2ForCausalLM.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.Speech2Text2ForCausalLM.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.Speech2Text2ForCausalLM.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.34.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/speech_to_text_2/modeling_speech_to_text_2.py#L791",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</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.34.0/en/model_doc/speech_to_text_2#transformers.Speech2Text2Config"
>Speech2Text2Config</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) — Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) — Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Cross attentions weights after the attention softmax, used to compute the weighted average in the
cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) — Tuple of <code>torch.FloatTensor</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key,
value states of the self-attention and the cross-attention layers if model is used in encoder-decoder
setting. Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ne=new Ds({props:{anchor:"transformers.Speech2Text2ForCausalLM.forward.example",$$slots:{default:[rn]},$$scope:{ctx:U}}}),{c(){d=s("meta"),w=r(),y=s("p"),b=r(),k=s("h1"),m=s("a"),j=s("span"),f(ce.$$.fragment),go=r(),He=s("span"),He.textContent=Ko,Jt=r(),V=s("h2"),q=s("a"),Tt=s("span"),f(ie.$$.fragment),_o=r(),Re=s("span"),Re.textContent=es,St=r(),de=s("p"),de.innerHTML=ts,zt=r(),pe=s("p"),pe.innerHTML=os,Ut=r(),he=s("p"),he.innerHTML=ss,Zt=r(),me=s("p"),me.innerHTML=ns,Wt=r(),fe=s("p"),fe.textContent=as,Ft=r(),ue=s("ul"),ue.innerHTML=rs,Vt=r(),I=s("h2"),P=s("a"),yt=s("span"),f(ge.$$.fragment),vo=r(),Xe=s("span"),Xe.textContent=ls,It=r(),_e=s("p"),_e.innerHTML=cs,Nt=r(),ve=s("p"),ve.innerHTML=is,Lt=r(),Te=s("ul"),Te.innerHTML=ds,Et=r(),f(ye.$$.fragment),Bt=r(),be=s("ul"),be.innerHTML=ps,Gt=r(),f(xe.$$.fragment),qt=r(),ke=s("p"),ke.innerHTML=hs,Pt=r(),N=s("h2"),H=s("a"),bt=s("span"),f(Me.$$.fragment),To=r(),Ye=s("span"),Ye.textContent=ms,Ht=r(),we=s("ul"),we.innerHTML=fs,Rt=r(),L=s("h2"),R=s("a"),xt=s("span"),f($e.$$.fragment),yo=r(),Ae=s("span"),Ae.textContent=us,Xt=r(),C=s("div"),f(je.$$.fragment),bo=r(),Qe=s("p"),Qe.innerHTML=gs,xo=r(),De=s("p"),De.innerHTML=_s,ko=r(),f(X.$$.fragment),Yt=r(),E=s("h2"),Y=s("a"),kt=s("span"),f(Ce.$$.fragment),Mo=r(),Oe=s("span"),Oe.textContent=vs,At=r(),M=s("div"),f(Je.$$.fragment),wo=r(),Ke=s("p"),Ke.textContent=Ts,$o=r(),et=s("p"),et.innerHTML=ys,jo=r(),A=s("div"),f(Se.$$.fragment),Co=r(),tt=s("p"),tt.textContent=bs,Jo=r(),Z=s("div"),f(ze.$$.fragment),So=r(),ot=s("p"),ot.textContent=xs,zo=r(),st=s("p"),st.innerHTML=ks,Uo=r(),nt=s("div"),f(Ue.$$.fragment),Qt=r(),B=s("h2"),Q=s("a"),Mt=s("span"),f(Ze.$$.fragment),Zo=r(),at=s("span"),at.textContent=Ms,Dt=r(),x=s("div"),f(We.$$.fragment),Wo=r(),rt=s("p"),rt.textContent=ws,Fo=r(),lt=s("p"),lt.innerHTML=$s,Vo=r(),D=s("div"),f(Fe.$$.fragment),Io=r(),ct=s("p"),ct.innerHTML=js,No=r(),W=s("div"),f(Ve.$$.fragment),Lo=r(),it=s("p"),it.textContent=Cs,Eo=r(),f(O.$$.fragment),Bo=r(),F=s("div"),f(Ie.$$.fragment),Go=r(),dt=s("p"),dt.innerHTML=Js,qo=r(),f(K.$$.fragment),Po=r(),ee=s("div"),f(Ne.$$.fragment),Ho=r(),pt=s("p"),pt.innerHTML=Ss,Ro=r(),te=s("div"),f(Le.$$.fragment),Xo=r(),ht=s("p"),ht.innerHTML=zs,Ot=r(),G=s("h2"),oe=s("a"),wt=s("span"),f(Ee.$$.fragment),Yo=r(),mt=s("span"),mt.textContent=Us,Kt=r(),J=s("div"),f(Be.$$.fragment),Ao=r(),ft=s("p"),ft.innerHTML=Zs,Qo=r(),ut=s("p"),ut.innerHTML=Ws,Do=r(),se=s("div"),f(Ge.$$.fragment),Oo=r(),f(ne.$$.fragment),eo=r(),$t=s("p"),this.h()},l(e){const a=on("svelte-1phssyn",document.head);d=n(a,"META",{name:!0,content:!0}),a.forEach(t),w=l(e),y=n(e,"P",{}),h(y).forEach(t),b=l(e),k=n(e,"H1",{class:!0});var qe=h(k);m=n(qe,"A",{id:!0,class:!0,href:!0});var jt=h(m);j=n(jt,"SPAN",{});var Ct=h(j);u(ce.$$.fragment,Ct),Ct.forEach(t),jt.forEach(t),go=l(qe),He=n(qe,"SPAN",{"data-svelte-h":!0}),p(He)!=="svelte-1wp9kv8"&&(He.textContent=Ko),qe.forEach(t),Jt=l(e),V=n(e,"H2",{class:!0});var Pe=h(V);q=n(Pe,"A",{id:!0,class:!0,href:!0});var Fs=h(q);Tt=n(Fs,"SPAN",{});var Vs=h(Tt);u(ie.$$.fragment,Vs),Vs.forEach(t),Fs.forEach(t),_o=l(Pe),Re=n(Pe,"SPAN",{"data-svelte-h":!0}),p(Re)!=="svelte-1jsw1pg"&&(Re.textContent=es),Pe.forEach(t),St=l(e),de=n(e,"P",{"data-svelte-h":!0}),p(de)!=="svelte-1q6drml"&&(de.innerHTML=ts),zt=l(e),pe=n(e,"P",{"data-svelte-h":!0}),p(pe)!=="svelte-iqjgnk"&&(pe.innerHTML=os),Ut=l(e),he=n(e,"P",{"data-svelte-h":!0}),p(he)!=="svelte-pps277"&&(he.innerHTML=ss),Zt=l(e),me=n(e,"P",{"data-svelte-h":!0}),p(me)!=="svelte-1u4lnwc"&&(me.innerHTML=ns),Wt=l(e),fe=n(e,"P",{"data-svelte-h":!0}),p(fe)!=="svelte-axv494"&&(fe.textContent=as),Ft=l(e),ue=n(e,"UL",{"data-svelte-h":!0}),p(ue)!=="svelte-1gpn7jr"&&(ue.innerHTML=rs),Vt=l(e),I=n(e,"H2",{class:!0});var oo=h(I);P=n(oo,"A",{id:!0,class:!0,href:!0});var Is=h(P);yt=n(Is,"SPAN",{});var Ns=h(yt);u(ge.$$.fragment,Ns),Ns.forEach(t),Is.forEach(t),vo=l(oo),Xe=n(oo,"SPAN",{"data-svelte-h":!0}),p(Xe)!=="svelte-199uz7g"&&(Xe.textContent=ls),oo.forEach(t),It=l(e),_e=n(e,"P",{"data-svelte-h":!0}),p(_e)!=="svelte-1kje3f4"&&(_e.innerHTML=cs),Nt=l(e),ve=n(e,"P",{"data-svelte-h":!0}),p(ve)!=="svelte-ndf6cx"&&(ve.innerHTML=is),Lt=l(e),Te=n(e,"UL",{"data-svelte-h":!0}),p(Te)!=="svelte-acy5fb"&&(Te.innerHTML=ds),Et=l(e),u(ye.$$.fragment,e),Bt=l(e),be=n(e,"UL",{"data-svelte-h":!0}),p(be)!=="svelte-eepefx"&&(be.innerHTML=ps),Gt=l(e),u(xe.$$.fragment,e),qt=l(e),ke=n(e,"P",{"data-svelte-h":!0}),p(ke)!=="svelte-1lbi5m8"&&(ke.innerHTML=hs),Pt=l(e),N=n(e,"H2",{class:!0});var so=h(N);H=n(so,"A",{id:!0,class:!0,href:!0});var Ls=h(H);bt=n(Ls,"SPAN",{});var Es=h(bt);u(Me.$$.fragment,Es),Es.forEach(t),Ls.forEach(t),To=l(so),Ye=n(so,"SPAN",{"data-svelte-h":!0}),p(Ye)!=="svelte-n3f0j0"&&(Ye.textContent=ms),so.forEach(t),Ht=l(e),we=n(e,"UL",{"data-svelte-h":!0}),p(we)!=="svelte-162aebv"&&(we.innerHTML=fs),Rt=l(e),L=n(e,"H2",{class:!0});var no=h(L);R=n(no,"A",{id:!0,class:!0,href:!0});var Bs=h(R);xt=n(Bs,"SPAN",{});var Gs=h(xt);u($e.$$.fragment,Gs),Gs.forEach(t),Bs.forEach(t),yo=l(no),Ae=n(no,"SPAN",{"data-svelte-h":!0}),p(Ae)!=="svelte-1240no2"&&(Ae.textContent=us),no.forEach(t),Xt=l(e),C=n(e,"DIV",{class:!0});var ae=h(C);u(je.$$.fragment,ae),bo=l(ae),Qe=n(ae,"P",{"data-svelte-h":!0}),p(Qe)!=="svelte-11jih44"&&(Qe.innerHTML=gs),xo=l(ae),De=n(ae,"P",{"data-svelte-h":!0}),p(De)!=="svelte-10kqkkl"&&(De.innerHTML=_s),ko=l(ae),u(X.$$.fragment,ae),ae.forEach(t),Yt=l(e),E=n(e,"H2",{class:!0});var ao=h(E);Y=n(ao,"A",{id:!0,class:!0,href:!0});var qs=h(Y);kt=n(qs,"SPAN",{});var Ps=h(kt);u(Ce.$$.fragment,Ps),Ps.forEach(t),qs.forEach(t),Mo=l(ao),Oe=n(ao,"SPAN",{"data-svelte-h":!0}),p(Oe)!=="svelte-crqb8h"&&(Oe.textContent=vs),ao.forEach(t),At=l(e),M=n(e,"DIV",{class:!0});var z=h(M);u(Je.$$.fragment,z),wo=l(z),Ke=n(z,"P",{"data-svelte-h":!0}),p(Ke)!=="svelte-16s7215"&&(Ke.textContent=Ts),$o=l(z),et=n(z,"P",{"data-svelte-h":!0}),p(et)!=="svelte-1ery4iu"&&(et.innerHTML=ys),jo=l(z),A=n(z,"DIV",{class:!0});var ro=h(A);u(Se.$$.fragment,ro),Co=l(ro),tt=n(ro,"P",{"data-svelte-h":!0}),p(tt)!=="svelte-1deng2j"&&(tt.textContent=bs),ro.forEach(t),Jo=l(z),Z=n(z,"DIV",{class:!0});var gt=h(Z);u(ze.$$.fragment,gt),So=l(gt),ot=n(gt,"P",{"data-svelte-h":!0}),p(ot)!=="svelte-vbfkpu"&&(ot.textContent=xs),zo=l(gt),st=n(gt,"P",{"data-svelte-h":!0}),p(st)!=="svelte-125uxon"&&(st.innerHTML=ks),gt.forEach(t),Uo=l(z),nt=n(z,"DIV",{class:!0});var Hs=h(nt);u(Ue.$$.fragment,Hs),Hs.forEach(t),z.forEach(t),Qt=l(e),B=n(e,"H2",{class:!0});var lo=h(B);Q=n(lo,"A",{id:!0,class:!0,href:!0});var Rs=h(Q);Mt=n(Rs,"SPAN",{});var Xs=h(Mt);u(Ze.$$.fragment,Xs),Xs.forEach(t),Rs.forEach(t),Zo=l(lo),at=n(lo,"SPAN",{"data-svelte-h":!0}),p(at)!=="svelte-11ps61a"&&(at.textContent=Ms),lo.forEach(t),Dt=l(e),x=n(e,"DIV",{class:!0});var $=h(x);u(We.$$.fragment,$),Wo=l($),rt=n($,"P",{"data-svelte-h":!0}),p(rt)!=="svelte-cccwan"&&(rt.textContent=ws),Fo=l($),lt=n($,"P",{"data-svelte-h":!0}),p(lt)!=="svelte-brazk6"&&(lt.innerHTML=$s),Vo=l($),D=n($,"DIV",{class:!0});var co=h(D);u(Fe.$$.fragment,co),Io=l(co),ct=n(co,"P",{"data-svelte-h":!0}),p(ct)!=="svelte-i6z6je"&&(ct.innerHTML=js),co.forEach(t),No=l($),W=n($,"DIV",{class:!0});var _t=h(W);u(Ve.$$.fragment,_t),Lo=l(_t),it=n(_t,"P",{"data-svelte-h":!0}),p(it)!=="svelte-1cj8dcb"&&(it.textContent=Cs),Eo=l(_t),u(O.$$.fragment,_t),_t.forEach(t),Bo=l($),F=n($,"DIV",{class:!0});var vt=h(F);u(Ie.$$.fragment,vt),Go=l(vt),dt=n(vt,"P",{"data-svelte-h":!0}),p(dt)!=="svelte-7negql"&&(dt.innerHTML=Js),qo=l(vt),u(K.$$.fragment,vt),vt.forEach(t),Po=l($),ee=n($,"DIV",{class:!0});var io=h(ee);u(Ne.$$.fragment,io),Ho=l(io),pt=n(io,"P",{"data-svelte-h":!0}),p(pt)!=="svelte-1k6qxg1"&&(pt.innerHTML=Ss),io.forEach(t),Ro=l($),te=n($,"DIV",{class:!0});var po=h(te);u(Le.$$.fragment,po),Xo=l(po),ht=n(po,"P",{"data-svelte-h":!0}),p(ht)!=="svelte-kwqncv"&&(ht.innerHTML=zs),po.forEach(t),$.forEach(t),Ot=l(e),G=n(e,"H2",{class:!0});var ho=h(G);oe=n(ho,"A",{id:!0,class:!0,href:!0});var Ys=h(oe);wt=n(Ys,"SPAN",{});var As=h(wt);u(Ee.$$.fragment,As),As.forEach(t),Ys.forEach(t),Yo=l(ho),mt=n(ho,"SPAN",{"data-svelte-h":!0}),p(mt)!=="svelte-13lj0lb"&&(mt.textContent=Us),ho.forEach(t),Kt=l(e),J=n(e,"DIV",{class:!0});var re=h(J);u(Be.$$.fragment,re),Ao=l(re),ft=n(re,"P",{"data-svelte-h":!0}),p(ft)!=="svelte-1bdiznf"&&(ft.innerHTML=Zs),Qo=l(re),ut=n(re,"P",{"data-svelte-h":!0}),p(ut)!=="svelte-hswkmf"&&(ut.innerHTML=Ws),Do=l(re),se=n(re,"DIV",{class:!0});var mo=h(se);u(Ge.$$.fragment,mo),Oo=l(mo),u(ne.$$.fragment,mo),mo.forEach(t),re.forEach(t),eo=l(e),$t=n(e,"P",{}),h($t).forEach(t),this.h()},h(){i(d,"name","hf:doc:metadata"),i(d,"content",JSON.stringify(cn)),i(m,"id","speech2text2"),i(m,"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(m,"href","#speech2text2"),i(k,"class","relative group"),i(q,"id","overview"),i(q,"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(q,"href","#overview"),i(V,"class","relative group"),i(P,"id","inference"),i(P,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),i(P,"href","#inference"),i(I,"class","relative group"),i(H,"id","documentation-resources"),i(H,"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(H,"href","#documentation-resources"),i(N,"class","relative group"),i(R,"id","transformers.Speech2Text2Config"),i(R,"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(R,"href","#transformers.Speech2Text2Config"),i(L,"class","relative group"),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(Y,"id","transformers.Speech2Text2Tokenizer"),i(Y,"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(Y,"href","#transformers.Speech2Text2Tokenizer"),i(E,"class","relative group"),i(A,"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(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(M,"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,"id","transformers.Speech2Text2Processor"),i(Q,"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(Q,"href","#transformers.Speech2Text2Processor"),i(B,"class","relative group"),i(D,"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(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),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(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),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(oe,"id","transformers.Speech2Text2ForCausalLM"),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.Speech2Text2ForCausalLM"),i(G,"class","relative group"),i(se,"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")},m(e,a){o(document.head,d),c(e,w,a),c(e,y,a),c(e,b,a),c(e,k,a),o(k,m),o(m,j),g(ce,j,null),o(k,go),o(k,He),c(e,Jt,a),c(e,V,a),o(V,q),o(q,Tt),g(ie,Tt,null),o(V,_o),o(V,Re),c(e,St,a),c(e,de,a),c(e,zt,a),c(e,pe,a),c(e,Ut,a),c(e,he,a),c(e,Zt,a),c(e,me,a),c(e,Wt,a),c(e,fe,a),c(e,Ft,a),c(e,ue,a),c(e,Vt,a),c(e,I,a),o(I,P),o(P,yt),g(ge,yt,null),o(I,vo),o(I,Xe),c(e,It,a),c(e,_e,a),c(e,Nt,a),c(e,ve,a),c(e,Lt,a),c(e,Te,a),c(e,Et,a),g(ye,e,a),c(e,Bt,a),c(e,be,a),c(e,Gt,a),g(xe,e,a),c(e,qt,a),c(e,ke,a),c(e,Pt,a),c(e,N,a),o(N,H),o(H,bt),g(Me,bt,null),o(N,To),o(N,Ye),c(e,Ht,a),c(e,we,a),c(e,Rt,a),c(e,L,a),o(L,R),o(R,xt),g($e,xt,null),o(L,yo),o(L,Ae),c(e,Xt,a),c(e,C,a),g(je,C,null),o(C,bo),o(C,Qe),o(C,xo),o(C,De),o(C,ko),g(X,C,null),c(e,Yt,a),c(e,E,a),o(E,Y),o(Y,kt),g(Ce,kt,null),o(E,Mo),o(E,Oe),c(e,At,a),c(e,M,a),g(Je,M,null),o(M,wo),o(M,Ke),o(M,$o),o(M,et),o(M,jo),o(M,A),g(Se,A,null),o(A,Co),o(A,tt),o(M,Jo),o(M,Z),g(ze,Z,null),o(Z,So),o(Z,ot),o(Z,zo),o(Z,st),o(M,Uo),o(M,nt),g(Ue,nt,null),c(e,Qt,a),c(e,B,a),o(B,Q),o(Q,Mt),g(Ze,Mt,null),o(B,Zo),o(B,at),c(e,Dt,a),c(e,x,a),g(We,x,null),o(x,Wo),o(x,rt),o(x,Fo),o(x,lt),o(x,Vo),o(x,D),g(Fe,D,null),o(D,Io),o(D,ct),o(x,No),o(x,W),g(Ve,W,null),o(W,Lo),o(W,it),o(W,Eo),g(O,W,null),o(x,Bo),o(x,F),g(Ie,F,null),o(F,Go),o(F,dt),o(F,qo),g(K,F,null),o(x,Po),o(x,ee),g(Ne,ee,null),o(ee,Ho),o(ee,pt),o(x,Ro),o(x,te),g(Le,te,null),o(te,Xo),o(te,ht),c(e,Ot,a),c(e,G,a),o(G,oe),o(oe,wt),g(Ee,wt,null),o(G,Yo),o(G,mt),c(e,Kt,a),c(e,J,a),g(Be,J,null),o(J,Ao),o(J,ft),o(J,Qo),o(J,ut),o(J,Do),o(J,se),g(Ge,se,null),o(se,Oo),g(ne,se,null),c(e,eo,a),c(e,$t,a),to=!0},p(e,[a]){const qe={};a&2&&(qe.$$scope={dirty:a,ctx:e}),X.$set(qe);const jt={};a&2&&(jt.$$scope={dirty:a,ctx:e}),O.$set(jt);const Ct={};a&2&&(Ct.$$scope={dirty:a,ctx:e}),K.$set(Ct);const Pe={};a&2&&(Pe.$$scope={dirty:a,ctx:e}),ne.$set(Pe)},i(e){to||(_(ce.$$.fragment,e),_(ie.$$.fragment,e),_(ge.$$.fragment,e),_(ye.$$.fragment,e),_(xe.$$.fragment,e),_(Me.$$.fragment,e),_($e.$$.fragment,e),_(je.$$.fragment,e),_(X.$$.fragment,e),_(Ce.$$.fragment,e),_(Je.$$.fragment,e),_(Se.$$.fragment,e),_(ze.$$.fragment,e),_(Ue.$$.fragment,e),_(Ze.$$.fragment,e),_(We.$$.fragment,e),_(Fe.$$.fragment,e),_(Ve.$$.fragment,e),_(O.$$.fragment,e),_(Ie.$$.fragment,e),_(K.$$.fragment,e),_(Ne.$$.fragment,e),_(Le.$$.fragment,e),_(Ee.$$.fragment,e),_(Be.$$.fragment,e),_(Ge.$$.fragment,e),_(ne.$$.fragment,e),to=!0)},o(e){v(ce.$$.fragment,e),v(ie.$$.fragment,e),v(ge.$$.fragment,e),v(ye.$$.fragment,e),v(xe.$$.fragment,e),v(Me.$$.fragment,e),v($e.$$.fragment,e),v(je.$$.fragment,e),v(X.$$.fragment,e),v(Ce.$$.fragment,e),v(Je.$$.fragment,e),v(Se.$$.fragment,e),v(ze.$$.fragment,e),v(Ue.$$.fragment,e),v(Ze.$$.fragment,e),v(We.$$.fragment,e),v(Fe.$$.fragment,e),v(Ve.$$.fragment,e),v(O.$$.fragment,e),v(Ie.$$.fragment,e),v(K.$$.fragment,e),v(Ne.$$.fragment,e),v(Le.$$.fragment,e),v(Ee.$$.fragment,e),v(Be.$$.fragment,e),v(Ge.$$.fragment,e),v(ne.$$.fragment,e),to=!1},d(e){e&&(t(w),t(y),t(b),t(k),t(Jt),t(V),t(St),t(de),t(zt),t(pe),t(Ut),t(he),t(Zt),t(me),t(Wt),t(fe),t(Ft),t(ue),t(Vt),t(I),t(It),t(_e),t(Nt),t(ve),t(Lt),t(Te),t(Et),t(Bt),t(be),t(Gt),t(qt),t(ke),t(Pt),t(N),t(Ht),t(we),t(Rt),t(L),t(Xt),t(C),t(Yt),t(E),t(At),t(M),t(Qt),t(B),t(Dt),t(x),t(Ot),t(G),t(Kt),t(J),t(eo),t($t)),t(d),T(ce),T(ie),T(ge),T(ye,e),T(xe,e),T(Me),T($e),T(je),T(X),T(Ce),T(Je),T(Se),T(ze),T(Ue),T(Ze),T(We),T(Fe),T(Ve),T(O),T(Ie),T(K),T(Ne),T(Le),T(Ee),T(Be),T(Ge),T(ne)}}}const cn={local:"speech2text2",sections:[{local:"overview",title:"Overview"},{local:"inference",title:"Inference"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.Speech2Text2Config",title:"Speech2Text2Config"},{local:"transformers.Speech2Text2Tokenizer",title:"Speech2TextTokenizer"},{local:"transformers.Speech2Text2Processor",title:"Speech2Text2Processor"},{local:"transformers.Speech2Text2ForCausalLM",title:"Speech2Text2ForCausalLM"}],title:"Speech2Text2"};function dn(U){return Ks(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class vn extends en{constructor(d){super(),tn(this,d,dn,ln,Os,{})}}export{vn as component};
