import{S as fc,i as mc,s as uc,e as a,k as l,w as _,t as r,M as gc,c as n,d as o,m as d,a as i,x as v,h as s,b as c,G as e,g as h,y as T,q as x,o as k,B as b,v as _c,L as hc}from"../../chunks/vendor-hf-doc-builder.js";import{T as dc}from"../../chunks/Tip-hf-doc-builder.js";import{D as N}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Dr}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as qe}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as pc}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function vc(J){let m,y,u,g,S;return g=new Dr({props:{code:`from transformers import Speech2Text2Config, Speech2Text2ForCausalLM

# Initializing a Speech2Text2 s2t_transformer_s style configuration
configuration = Speech2Text2Config()

# Initializing a model (with random weights) from the s2t_transformer_s style configuration
model = Speech2Text2ForCausalLM(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> 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`}}),{c(){m=a("p"),y=r("Example:"),u=l(),_(g.$$.fragment)},l(f){m=n(f,"P",{});var w=i(m);y=s(w,"Example:"),w.forEach(o),u=d(f),v(g.$$.fragment,f)},m(f,w){h(f,m,w),e(m,y),h(f,u,w),T(g,f,w),S=!0},p:hc,i(f){S||(x(g.$$.fragment,f),S=!0)},o(f){k(g.$$.fragment,f),S=!1},d(f){f&&o(m),f&&o(u),b(g,f)}}}function Tc(J){let m,y,u,g,S,f,w,I,F,z,C;return{c(){m=a("p"),y=r(`This class method is simply calling the feature extractor
`),u=a("a"),g=r("from_pretrained()"),S=r(`, image processor
`),f=a("a"),w=r("ImageProcessingMixin"),I=r(` and the tokenizer
`),F=a("code"),z=r("~tokenization_utils_base.PreTrainedTokenizer.from_pretrained"),C=r(` methods. Please refer to the docstrings of the
methods above for more information.`),this.h()},l(P){m=n(P,"P",{});var q=i(m);y=s(q,`This class method is simply calling the feature extractor
`),u=n(q,"A",{href:!0});var G=i(u);g=s(G,"from_pretrained()"),G.forEach(o),S=s(q,`, image processor
`),f=n(q,"A",{href:!0});var kt=i(f);w=s(kt,"ImageProcessingMixin"),kt.forEach(o),I=s(q,` and the tokenizer
`),F=n(q,"CODE",{});var le=i(F);z=s(le,"~tokenization_utils_base.PreTrainedTokenizer.from_pretrained"),le.forEach(o),C=s(q,` methods. Please refer to the docstrings of the
methods above for more information.`),q.forEach(o),this.h()},h(){c(u,"href","/docs/transformers/v4.27.1/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.from_pretrained"),c(f,"href","/docs/transformers/v4.27.1/en/internal/image_processing_utils#transformers.ImageProcessingMixin")},m(P,q){h(P,m,q),e(m,y),e(m,u),e(u,g),e(m,S),e(m,f),e(f,w),e(m,I),e(m,F),e(F,z),e(m,C)},d(P){P&&o(m)}}}function xc(J){let m,y,u,g,S,f,w,I;return{c(){m=a("p"),y=r("This class method is simply calling "),u=a("a"),g=r("save_pretrained()"),S=r(` and
`),f=a("a"),w=r("save_pretrained()"),I=r(`. Please refer to the docstrings of the
methods above for more information.`),this.h()},l(F){m=n(F,"P",{});var z=i(m);y=s(z,"This class method is simply calling "),u=n(z,"A",{href:!0});var C=i(u);g=s(C,"save_pretrained()"),C.forEach(o),S=s(z,` and
`),f=n(z,"A",{href:!0});var P=i(f);w=s(P,"save_pretrained()"),P.forEach(o),I=s(z,`. Please refer to the docstrings of the
methods above for more information.`),z.forEach(o),this.h()},h(){c(u,"href","/docs/transformers/v4.27.1/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.save_pretrained"),c(f,"href","/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.save_pretrained")},m(F,z){h(F,m,z),e(m,y),e(m,u),e(u,g),e(m,S),e(m,f),e(f,w),e(m,I)},d(F){F&&o(m)}}}function kc(J){let m,y,u,g,S;return g=new Dr({props:{code:`from transformers import (
    SpeechEncoderDecoderModel,
    Speech2Text2ForCausalLM,
    Wav2Vec2Model,
    Speech2Text2Config,
    Wav2Vec2Config,
    Wav2Vec2FeatureExtractor,
    Speech2Text2Tokenizer,
)
from datasets import load_dataset

feature_extractor = Wav2Vec2FeatureExtractor()
tokenizer = Speech2Text2Tokenizer.from_pretrained("facebook/s2t-wav2vec2-large-en-de")

encoder = Wav2Vec2Model(Wav2Vec2Config())
decoder = Speech2Text2ForCausalLM(Speech2Text2Config())
# init random speech2text model

model = SpeechEncoderDecoderModel(encoder=encoder, decoder=decoder)
model.config.pad_token_id = tokenizer.pad_token_id
model.config.decoder_start_token_id = tokenizer.bos_token_id
# pre-process inputs and labels

ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
inputs = feature_extractor(
    ds[0]["audio"]["array"], sampling_rate=ds[0]["audio"]["sampling_rate"], return_tensors="pt"
)
input_values = inputs.input_values
decoder_input_ids = tokenizer(ds[0]["text"], return_tensors="pt").input_ids
# compute loss

loss = model(inputs=input_values, labels=decoder_input_ids).loss
# backprop loss

loss.backward()`,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()`}}),{c(){m=a("p"),y=r("Example:"),u=l(),_(g.$$.fragment)},l(f){m=n(f,"P",{});var w=i(m);y=s(w,"Example:"),w.forEach(o),u=d(f),v(g.$$.fragment,f)},m(f,w){h(f,m,w),e(m,y),h(f,u,w),T(g,f,w),S=!0},p:hc,i(f){S||(x(g.$$.fragment,f),S=!0)},o(f){k(g.$$.fragment,f),S=!1},d(f){f&&o(m),f&&o(u),b(g,f)}}}function bc(J){let m,y,u,g,S,f,w,I,F,z,C,P,q,G,kt,le,Ir,No,Y,Wr,bt,Vr,Nr,Me,Or,Br,Oo,E,Ur,io,Rr,Hr,co,Jr,Gr,wt,Yr,Kr,St,Qr,Xr,$t,Zr,es,lo,ts,os,Bo,de,rs,Ae,ss,as,Uo,pe,ns,Fe,is,cs,Ro,yt,ls,Ho,K,Le,ds,De,ps,hs,fs,Ie,ms,Et,us,gs,_s,We,vs,Ve,Ts,xs,Jo,te,he,po,Ne,ks,ho,bs,Go,Q,ws,zt,Ss,$s,Pt,ys,Es,Yo,M,zs,jt,Ps,js,Ct,Cs,qs,qt,Ms,As,Mt,Fs,Ls,At,Ds,Is,Ko,Ft,fo,Ws,Qo,Oe,Xo,Lt,Be,mo,Vs,Ns,uo,Os,Zo,Ue,er,fe,Bs,Re,Us,Rs,tr,oe,me,go,He,Hs,_o,Js,or,Dt,vo,It,Gs,rr,re,ue,To,Je,Ys,xo,Ks,sr,W,Ge,Qs,se,Xs,Wt,Zs,ea,Ye,ta,oa,ra,ae,sa,Vt,aa,na,Nt,ia,ca,la,ge,ar,ne,_e,ko,Ke,da,bo,pa,nr,j,Qe,ha,wo,fa,ma,Xe,ua,Ot,ga,_a,va,ve,Ze,Ta,So,xa,ka,X,et,ba,$o,wa,Sa,tt,$a,yo,ya,Ea,za,Bt,ot,ir,ie,Te,Eo,rt,Pa,zo,ja,cr,$,st,Ca,Po,qa,Ma,L,Ut,Aa,Fa,Rt,La,Da,Ht,Ia,Wa,at,jo,Va,Na,Oa,Jt,Ba,Ua,Ra,xe,nt,Ha,U,Ja,Co,Ga,Ya,qo,Ka,Qa,it,Mo,Xa,Za,en,tn,Z,ct,on,Ao,rn,sn,ke,an,ee,lt,nn,dt,cn,Gt,ln,dn,pn,be,hn,we,pt,fn,ht,mn,Yt,un,gn,_n,Se,ft,vn,mt,Tn,Kt,xn,kn,lr,ce,$e,Fo,ut,bn,Lo,wn,dr,V,gt,Sn,R,$n,Qt,yn,En,Do,zn,Pn,Xt,jn,Cn,qn,_t,Mn,vt,An,Fn,Ln,ye,Tt,Dn,Ee,pr;return f=new qe({}),G=new qe({}),Ne=new qe({}),Oe=new Dr({props:{code:`import torch
from transformers import Speech2Text2Processor, SpeechEncoderDecoderModel
from datasets import load_dataset
import soundfile as sf

model = SpeechEncoderDecoderModel.from_pretrained("facebook/s2t-wav2vec2-large-en-de")
processor = Speech2Text2Processor.from_pretrained("facebook/s2t-wav2vec2-large-en-de")


def map_to_array(batch):
    speech, _ = sf.read(batch["file"])
    batch["speech"] = speech
    return batch


ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
ds = ds.map(map_to_array)

inputs = processor(ds["speech"][0], sampling_rate=16_000, return_tensors="pt")
generated_ids = model.generate(inputs=inputs["input_values"], attention_mask=inputs["attention_mask"])

transcription = processor.batch_decode(generated_ids)`,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)`}}),Ue=new Dr({props:{code:`from datasets import load_dataset
from transformers import pipeline

librispeech_en = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
asr = pipeline(
    "automatic-speech-recognition",
    model="facebook/s2t-wav2vec2-large-en-de",
    feature_extractor="facebook/s2t-wav2vec2-large-en-de",
)

translation_de = asr(librispeech_en[0]["file"])`,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>])`}}),He=new qe({}),Je=new qe({}),Ge=new N({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.27.1/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.27.1/src/transformers/models/speech_to_text_2/configuration_speech_to_text_2.py#L31"}}),ge=new pc({props:{anchor:"transformers.Speech2Text2Config.example",$$slots:{default:[vc]},$$scope:{ctx:J}}}),Ke=new qe({}),Qe=new N({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.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>`,name:"pad_token"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/speech_to_text_2/tokenization_speech_to_text_2.py#L73"}}),Ze=new N({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 = True"},{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>, defaults to <code>True</code>) &#x2014;
Whether or not to clean up the tokenization spaces.`,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.27.1/src/transformers/tokenization_utils_base.py#L3414",returnDescription:`
<p>The list of decoded sentences.</p>
`,returnType:`
<p><code>List[str]</code></p>
`}}),et=new N({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 = True"},{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>, defaults to <code>True</code>) &#x2014;
Whether or not to clean up the tokenization spaces.`,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.27.1/src/transformers/tokenization_utils_base.py#L3447",returnDescription:`
<p>The decoded sentence.</p>
`,returnType:`
<p><code>str</code></p>
`}}),ot=new N({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.27.1/src/transformers/models/speech_to_text_2/tokenization_speech_to_text_2.py#L241"}}),rt=new qe({}),st=new N({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.27.1/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.27.1/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.27.1/src/transformers/models/speech_to_text_2/processing_speech_to_text_2.py#L24"}}),nt=new N({props:{name:"__call__",anchor:"transformers.Speech2Text2Processor.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/speech_to_text_2/processing_speech_to_text_2.py#L46"}}),ct=new N({props:{name:"from_pretrained",anchor:"transformers.Speech2Text2Processor.from_pretrained",parameters:[{name:"pretrained_model_name_or_path",val:""},{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.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"}}),ke=new dc({props:{$$slots:{default:[Tc]},$$scope:{ctx:J}}}),lt=new N({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).
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"}}),be=new dc({props:{$$slots:{default:[xc]},$$scope:{ctx:J}}}),pt=new N({props:{name:"batch_decode",anchor:"transformers.Speech2Text2Processor.batch_decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/speech_to_text_2/processing_speech_to_text_2.py#L85"}}),ft=new N({props:{name:"decode",anchor:"transformers.Speech2Text2Processor.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/speech_to_text_2/processing_speech_to_text_2.py#L92"}}),ut=new qe({}),gt=new N({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.27.1/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.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/speech_to_text_2/modeling_speech_to_text_2.py#L753"}}),Tt=new N({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.27.1/en/model_doc/speech_to_text_2#transformers.Speech2Text2Tokenizer">Speech2Text2Tokenizer</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#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.27.1/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.27.1/src/transformers/models/speech_to_text_2/modeling_speech_to_text_2.py#L786",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/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) \u2014 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>) \u2014 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>) \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 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>) \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 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>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>) \u2014 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.27.1/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ee=new pc({props:{anchor:"transformers.Speech2Text2ForCausalLM.forward.example",$$slots:{default:[kc]},$$scope:{ctx:J}}}),{c(){m=a("meta"),y=l(),u=a("h1"),g=a("a"),S=a("span"),_(f.$$.fragment),w=l(),I=a("span"),F=r("Speech2Text2"),z=l(),C=a("h2"),P=a("a"),q=a("span"),_(G.$$.fragment),kt=l(),le=a("span"),Ir=r("Overview"),No=l(),Y=a("p"),Wr=r("The Speech2Text2 model is used together with "),bt=a("a"),Vr=r("Wav2Vec2"),Nr=r(` for Speech Translation models proposed in
`),Me=a("a"),Or=r("Large-Scale Self- and Semi-Supervised Learning for Speech Translation"),Br=r(` by
Changhan Wang, Anne Wu, Juan Pino, Alexei Baevski, Michael Auli, Alexis Conneau.`),Oo=l(),E=a("p"),Ur=r("Speech2Text2 is a "),io=a("em"),Rr=r("decoder-only"),Hr=r(" transformer model that can be used with any speech "),co=a("em"),Jr=r("encoder-only"),Gr=r(`, such as
`),wt=a("a"),Yr=r("Wav2Vec2"),Kr=r(" or "),St=a("a"),Qr=r("HuBERT"),Xr=r(` for Speech-to-Text tasks. Please refer to the
`),$t=a("a"),Zr=r("SpeechEncoderDecoder"),es=r(" class on how to combine Speech2Text2 with any speech "),lo=a("em"),ts=r("encoder-only"),os=r(`
model.`),Bo=l(),de=a("p"),rs=r("This model was contributed by "),Ae=a("a"),ss=r("Patrick von Platen"),as=r("."),Uo=l(),pe=a("p"),ns=r("The original code can be found "),Fe=a("a"),is=r("here"),cs=r("."),Ro=l(),yt=a("p"),ls=r("Tips:"),Ho=l(),K=a("ul"),Le=a("li"),ds=r(`Speech2Text2 achieves state-of-the-art results on the CoVoST Speech Translation dataset. For more information, see
the `),De=a("a"),ps=r("official models"),hs=r(" ."),fs=l(),Ie=a("li"),ms=r("Speech2Text2 is always used within the "),Et=a("a"),us=r("SpeechEncoderDecoder"),gs=r(" framework."),_s=l(),We=a("li"),vs=r("Speech2Text2\u2019s tokenizer is based on "),Ve=a("a"),Ts=r("fastBPE"),xs=r("."),Jo=l(),te=a("h2"),he=a("a"),po=a("span"),_(Ne.$$.fragment),ks=l(),ho=a("span"),bs=r("Inference"),Go=l(),Q=a("p"),ws=r("Speech2Text2\u2019s "),zt=a("a"),Ss=r("SpeechEncoderDecoderModel"),$s=r(` model accepts raw waveform input values from speech and
makes use of `),Pt=a("a"),ys=r("generate()"),Es=r(` to translate the input speech
autoregressively to the target language.`),Yo=l(),M=a("p"),zs=r("The "),jt=a("a"),Ps=r("Wav2Vec2FeatureExtractor"),js=r(` class is responsible for preprocessing the input speech and
`),Ct=a("a"),Cs=r("Speech2Text2Tokenizer"),qs=r(` decodes the generated target tokens to the target string. The
`),qt=a("a"),Ms=r("Speech2Text2Processor"),As=r(" wraps "),Mt=a("a"),Fs=r("Wav2Vec2FeatureExtractor"),Ls=r(` and
`),At=a("a"),Ds=r("Speech2Text2Tokenizer"),Is=r(` into a single instance to both extract the input features and decode the
predicted token ids.`),Ko=l(),Ft=a("ul"),fo=a("li"),Ws=r("Step-by-step Speech Translation"),Qo=l(),_(Oe.$$.fragment),Xo=l(),Lt=a("ul"),Be=a("li"),mo=a("p"),Vs=r("Speech Translation via Pipelines"),Ns=l(),uo=a("p"),Os=r("The automatic speech recognition pipeline can also be used to translate speech in just a couple lines of code"),Zo=l(),_(Ue.$$.fragment),er=l(),fe=a("p"),Bs=r("See "),Re=a("a"),Us=r("model hub"),Rs=r(" to look for Speech2Text2 checkpoints."),tr=l(),oe=a("h2"),me=a("a"),go=a("span"),_(He.$$.fragment),Hs=l(),_o=a("span"),Js=r("Documentation resources"),or=l(),Dt=a("ul"),vo=a("li"),It=a("a"),Gs=r("Causal language modeling task guide"),rr=l(),re=a("h2"),ue=a("a"),To=a("span"),_(Je.$$.fragment),Ys=l(),xo=a("span"),Ks=r("Speech2Text2Config"),sr=l(),W=a("div"),_(Ge.$$.fragment),Qs=l(),se=a("p"),Xs=r("This is the configuration class to store the configuration of a "),Wt=a("a"),Zs=r("Speech2Text2ForCausalLM"),ea=r(`. 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
`),Ye=a("a"),ta=r("facebook/s2t-wav2vec2-large-en-de"),oa=r(" architecture."),ra=l(),ae=a("p"),sa=r("Configuration objects inherit from "),Vt=a("a"),aa=r("PretrainedConfig"),na=r(` and can be used to control the model outputs. Read the
documentation from `),Nt=a("a"),ia=r("PretrainedConfig"),ca=r(" for more information."),la=l(),_(ge.$$.fragment),ar=l(),ne=a("h2"),_e=a("a"),ko=a("span"),_(Ke.$$.fragment),da=l(),bo=a("span"),pa=r("Speech2TextTokenizer"),nr=l(),j=a("div"),_(Qe.$$.fragment),ha=l(),wo=a("p"),fa=r("Constructs a Speech2Text2Tokenizer."),ma=l(),Xe=a("p"),ua=r("This tokenizer inherits from "),Ot=a("a"),ga=r("PreTrainedTokenizer"),_a=r(` which contains some of the main methods. Users should refer to
the superclass for more information regarding such methods.`),va=l(),ve=a("div"),_(Ze.$$.fragment),Ta=l(),So=a("p"),xa=r("Convert a list of lists of token ids into a list of strings by calling decode."),ka=l(),X=a("div"),_(et.$$.fragment),ba=l(),$o=a("p"),wa=r(`Converts a sequence of ids in a string, using the tokenizer and vocabulary with options to remove special
tokens and clean up tokenization spaces.`),Sa=l(),tt=a("p"),$a=r("Similar to doing "),yo=a("code"),ya=r("self.convert_tokens_to_string(self.convert_ids_to_tokens(token_ids))"),Ea=r("."),za=l(),Bt=a("div"),_(ot.$$.fragment),ir=l(),ie=a("h2"),Te=a("a"),Eo=a("span"),_(rt.$$.fragment),Pa=l(),zo=a("span"),ja=r("Speech2Text2Processor"),cr=l(),$=a("div"),_(st.$$.fragment),Ca=l(),Po=a("p"),qa=r(`Constructs a Speech2Text2 processor which wraps a Speech2Text2 feature extractor and a Speech2Text2 tokenizer into
a single processor.`),Ma=l(),L=a("p"),Ut=a("a"),Aa=r("Speech2Text2Processor"),Fa=r(" offers all the functionalities of "),Rt=a("a"),La=r("AutoFeatureExtractor"),Da=r(" and "),Ht=a("a"),Ia=r("Speech2Text2Tokenizer"),Wa=r(`.
See the `),at=a("a"),jo=a("strong"),Va=r("call"),Na=r("()"),Oa=r(" and "),Jt=a("a"),Ba=r("decode()"),Ua=r(" for more information."),Ra=l(),xe=a("div"),_(nt.$$.fragment),Ha=l(),U=a("p"),Ja=r(`When used in normal mode, this method forwards all its arguments to AutoFeatureExtractor\u2019s
`),Co=a("code"),Ga=r("__call__()"),Ya=r(` and returns its output. If used in the context
`),qo=a("code"),Ka=r("as_target_processor()"),Qa=r(` this method forwards all its arguments to
Speech2Text2Tokenizer\u2019s `),it=a("a"),Mo=a("strong"),Xa=r("call"),Za=r("()"),en=r(`. Please refer to the doctsring of the above two
methods for more information.`),tn=l(),Z=a("div"),_(ct.$$.fragment),on=l(),Ao=a("p"),rn=r("Instantiate a processor associated with a pretrained model."),sn=l(),_(ke.$$.fragment),an=l(),ee=a("div"),_(lt.$$.fragment),nn=l(),dt=a("p"),cn=r(`Saves the attributes of this processor (feature extractor, tokenizer\u2026) in the specified directory so that it
can be reloaded using the `),Gt=a("a"),ln=r("from_pretrained()"),dn=r(" method."),pn=l(),_(be.$$.fragment),hn=l(),we=a("div"),_(pt.$$.fragment),fn=l(),ht=a("p"),mn=r("This method forwards all its arguments to Speech2Text2Tokenizer\u2019s "),Yt=a("a"),un=r("batch_decode()"),gn=r(`. Please
refer to the docstring of this method for more information.`),_n=l(),Se=a("div"),_(ft.$$.fragment),vn=l(),mt=a("p"),Tn=r("This method forwards all its arguments to Speech2Text2Tokenizer\u2019s "),Kt=a("a"),xn=r("decode()"),kn=r(`. Please refer
to the docstring of this method for more information.`),lr=l(),ce=a("h2"),$e=a("a"),Fo=a("span"),_(ut.$$.fragment),bn=l(),Lo=a("span"),wn=r("Speech2Text2ForCausalLM"),dr=l(),V=a("div"),_(gt.$$.fragment),Sn=l(),R=a("p"),$n=r("The Speech2Text2 Decoder with a language modeling head. Can be used as the decoder part of "),Qt=a("a"),yn=r("EncoderDecoderModel"),En=r(" and "),Do=a("code"),zn=r("SpeechEncoderDecoder"),Pn=r(`.
This model inherits from `),Xt=a("a"),jn=r("PreTrainedModel"),Cn=r(`. 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.)`),qn=l(),_t=a("p"),Mn=r("This model is also a PyTorch "),vt=a("a"),An=r("torch.nn.Module"),Fn=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ln=l(),ye=a("div"),_(Tt.$$.fragment),Dn=l(),_(Ee.$$.fragment),this.h()},l(t){const p=gc('[data-svelte="svelte-1phssyn"]',document.head);m=n(p,"META",{name:!0,content:!0}),p.forEach(o),y=d(t),u=n(t,"H1",{class:!0});var xt=i(u);g=n(xt,"A",{id:!0,class:!0,href:!0});var Io=i(g);S=n(Io,"SPAN",{});var Wo=i(S);v(f.$$.fragment,Wo),Wo.forEach(o),Io.forEach(o),w=d(xt),I=n(xt,"SPAN",{});var Vo=i(I);F=s(Vo,"Speech2Text2"),Vo.forEach(o),xt.forEach(o),z=d(t),C=n(t,"H2",{class:!0});var hr=i(C);P=n(hr,"A",{id:!0,class:!0,href:!0});var Vn=i(P);q=n(Vn,"SPAN",{});var Nn=i(q);v(G.$$.fragment,Nn),Nn.forEach(o),Vn.forEach(o),kt=d(hr),le=n(hr,"SPAN",{});var On=i(le);Ir=s(On,"Overview"),On.forEach(o),hr.forEach(o),No=d(t),Y=n(t,"P",{});var Zt=i(Y);Wr=s(Zt,"The Speech2Text2 model is used together with "),bt=n(Zt,"A",{href:!0});var Bn=i(bt);Vr=s(Bn,"Wav2Vec2"),Bn.forEach(o),Nr=s(Zt,` for Speech Translation models proposed in
`),Me=n(Zt,"A",{href:!0,rel:!0});var Un=i(Me);Or=s(Un,"Large-Scale Self- and Semi-Supervised Learning for Speech Translation"),Un.forEach(o),Br=s(Zt,` by
Changhan Wang, Anne Wu, Juan Pino, Alexei Baevski, Michael Auli, Alexis Conneau.`),Zt.forEach(o),Oo=d(t),E=n(t,"P",{});var D=i(E);Ur=s(D,"Speech2Text2 is a "),io=n(D,"EM",{});var Rn=i(io);Rr=s(Rn,"decoder-only"),Rn.forEach(o),Hr=s(D," transformer model that can be used with any speech "),co=n(D,"EM",{});var Hn=i(co);Jr=s(Hn,"encoder-only"),Hn.forEach(o),Gr=s(D,`, such as
`),wt=n(D,"A",{href:!0});var Jn=i(wt);Yr=s(Jn,"Wav2Vec2"),Jn.forEach(o),Kr=s(D," or "),St=n(D,"A",{href:!0});var Gn=i(St);Qr=s(Gn,"HuBERT"),Gn.forEach(o),Xr=s(D,` for Speech-to-Text tasks. Please refer to the
`),$t=n(D,"A",{href:!0});var Yn=i($t);Zr=s(Yn,"SpeechEncoderDecoder"),Yn.forEach(o),es=s(D," class on how to combine Speech2Text2 with any speech "),lo=n(D,"EM",{});var Kn=i(lo);ts=s(Kn,"encoder-only"),Kn.forEach(o),os=s(D,`
model.`),D.forEach(o),Bo=d(t),de=n(t,"P",{});var fr=i(de);rs=s(fr,"This model was contributed by "),Ae=n(fr,"A",{href:!0,rel:!0});var Qn=i(Ae);ss=s(Qn,"Patrick von Platen"),Qn.forEach(o),as=s(fr,"."),fr.forEach(o),Uo=d(t),pe=n(t,"P",{});var mr=i(pe);ns=s(mr,"The original code can be found "),Fe=n(mr,"A",{href:!0,rel:!0});var Xn=i(Fe);is=s(Xn,"here"),Xn.forEach(o),cs=s(mr,"."),mr.forEach(o),Ro=d(t),yt=n(t,"P",{});var Zn=i(yt);ls=s(Zn,"Tips:"),Zn.forEach(o),Ho=d(t),K=n(t,"UL",{});var eo=i(K);Le=n(eo,"LI",{});var ur=i(Le);ds=s(ur,`Speech2Text2 achieves state-of-the-art results on the CoVoST Speech Translation dataset. For more information, see
the `),De=n(ur,"A",{href:!0,rel:!0});var ei=i(De);ps=s(ei,"official models"),ei.forEach(o),hs=s(ur," ."),ur.forEach(o),fs=d(eo),Ie=n(eo,"LI",{});var gr=i(Ie);ms=s(gr,"Speech2Text2 is always used within the "),Et=n(gr,"A",{href:!0});var ti=i(Et);us=s(ti,"SpeechEncoderDecoder"),ti.forEach(o),gs=s(gr," framework."),gr.forEach(o),_s=d(eo),We=n(eo,"LI",{});var _r=i(We);vs=s(_r,"Speech2Text2\u2019s tokenizer is based on "),Ve=n(_r,"A",{href:!0,rel:!0});var oi=i(Ve);Ts=s(oi,"fastBPE"),oi.forEach(o),xs=s(_r,"."),_r.forEach(o),eo.forEach(o),Jo=d(t),te=n(t,"H2",{class:!0});var vr=i(te);he=n(vr,"A",{id:!0,class:!0,href:!0});var ri=i(he);po=n(ri,"SPAN",{});var si=i(po);v(Ne.$$.fragment,si),si.forEach(o),ri.forEach(o),ks=d(vr),ho=n(vr,"SPAN",{});var ai=i(ho);bs=s(ai,"Inference"),ai.forEach(o),vr.forEach(o),Go=d(t),Q=n(t,"P",{});var to=i(Q);ws=s(to,"Speech2Text2\u2019s "),zt=n(to,"A",{href:!0});var ni=i(zt);Ss=s(ni,"SpeechEncoderDecoderModel"),ni.forEach(o),$s=s(to,` model accepts raw waveform input values from speech and
makes use of `),Pt=n(to,"A",{href:!0});var ii=i(Pt);ys=s(ii,"generate()"),ii.forEach(o),Es=s(to,` to translate the input speech
autoregressively to the target language.`),to.forEach(o),Yo=d(t),M=n(t,"P",{});var O=i(M);zs=s(O,"The "),jt=n(O,"A",{href:!0});var ci=i(jt);Ps=s(ci,"Wav2Vec2FeatureExtractor"),ci.forEach(o),js=s(O,` class is responsible for preprocessing the input speech and
`),Ct=n(O,"A",{href:!0});var li=i(Ct);Cs=s(li,"Speech2Text2Tokenizer"),li.forEach(o),qs=s(O,` decodes the generated target tokens to the target string. The
`),qt=n(O,"A",{href:!0});var di=i(qt);Ms=s(di,"Speech2Text2Processor"),di.forEach(o),As=s(O," wraps "),Mt=n(O,"A",{href:!0});var pi=i(Mt);Fs=s(pi,"Wav2Vec2FeatureExtractor"),pi.forEach(o),Ls=s(O,` and
`),At=n(O,"A",{href:!0});var hi=i(At);Ds=s(hi,"Speech2Text2Tokenizer"),hi.forEach(o),Is=s(O,` into a single instance to both extract the input features and decode the
predicted token ids.`),O.forEach(o),Ko=d(t),Ft=n(t,"UL",{});var fi=i(Ft);fo=n(fi,"LI",{});var mi=i(fo);Ws=s(mi,"Step-by-step Speech Translation"),mi.forEach(o),fi.forEach(o),Qo=d(t),v(Oe.$$.fragment,t),Xo=d(t),Lt=n(t,"UL",{});var ui=i(Lt);Be=n(ui,"LI",{});var Tr=i(Be);mo=n(Tr,"P",{});var gi=i(mo);Vs=s(gi,"Speech Translation via Pipelines"),gi.forEach(o),Ns=d(Tr),uo=n(Tr,"P",{});var _i=i(uo);Os=s(_i,"The automatic speech recognition pipeline can also be used to translate speech in just a couple lines of code"),_i.forEach(o),Tr.forEach(o),ui.forEach(o),Zo=d(t),v(Ue.$$.fragment,t),er=d(t),fe=n(t,"P",{});var xr=i(fe);Bs=s(xr,"See "),Re=n(xr,"A",{href:!0,rel:!0});var vi=i(Re);Us=s(vi,"model hub"),vi.forEach(o),Rs=s(xr," to look for Speech2Text2 checkpoints."),xr.forEach(o),tr=d(t),oe=n(t,"H2",{class:!0});var kr=i(oe);me=n(kr,"A",{id:!0,class:!0,href:!0});var Ti=i(me);go=n(Ti,"SPAN",{});var xi=i(go);v(He.$$.fragment,xi),xi.forEach(o),Ti.forEach(o),Hs=d(kr),_o=n(kr,"SPAN",{});var ki=i(_o);Js=s(ki,"Documentation resources"),ki.forEach(o),kr.forEach(o),or=d(t),Dt=n(t,"UL",{});var bi=i(Dt);vo=n(bi,"LI",{});var wi=i(vo);It=n(wi,"A",{href:!0});var Si=i(It);Gs=s(Si,"Causal language modeling task guide"),Si.forEach(o),wi.forEach(o),bi.forEach(o),rr=d(t),re=n(t,"H2",{class:!0});var br=i(re);ue=n(br,"A",{id:!0,class:!0,href:!0});var $i=i(ue);To=n($i,"SPAN",{});var yi=i(To);v(Je.$$.fragment,yi),yi.forEach(o),$i.forEach(o),Ys=d(br),xo=n(br,"SPAN",{});var Ei=i(xo);Ks=s(Ei,"Speech2Text2Config"),Ei.forEach(o),br.forEach(o),sr=d(t),W=n(t,"DIV",{class:!0});var ze=i(W);v(Ge.$$.fragment,ze),Qs=d(ze),se=n(ze,"P",{});var oo=i(se);Xs=s(oo,"This is the configuration class to store the configuration of a "),Wt=n(oo,"A",{href:!0});var zi=i(Wt);Zs=s(zi,"Speech2Text2ForCausalLM"),zi.forEach(o),ea=s(oo,`. 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
`),Ye=n(oo,"A",{href:!0,rel:!0});var Pi=i(Ye);ta=s(Pi,"facebook/s2t-wav2vec2-large-en-de"),Pi.forEach(o),oa=s(oo," architecture."),oo.forEach(o),ra=d(ze),ae=n(ze,"P",{});var ro=i(ae);sa=s(ro,"Configuration objects inherit from "),Vt=n(ro,"A",{href:!0});var ji=i(Vt);aa=s(ji,"PretrainedConfig"),ji.forEach(o),na=s(ro,` and can be used to control the model outputs. Read the
documentation from `),Nt=n(ro,"A",{href:!0});var Ci=i(Nt);ia=s(Ci,"PretrainedConfig"),Ci.forEach(o),ca=s(ro," for more information."),ro.forEach(o),la=d(ze),v(ge.$$.fragment,ze),ze.forEach(o),ar=d(t),ne=n(t,"H2",{class:!0});var wr=i(ne);_e=n(wr,"A",{id:!0,class:!0,href:!0});var qi=i(_e);ko=n(qi,"SPAN",{});var Mi=i(ko);v(Ke.$$.fragment,Mi),Mi.forEach(o),qi.forEach(o),da=d(wr),bo=n(wr,"SPAN",{});var Ai=i(bo);pa=s(Ai,"Speech2TextTokenizer"),Ai.forEach(o),wr.forEach(o),nr=d(t),j=n(t,"DIV",{class:!0});var B=i(j);v(Qe.$$.fragment,B),ha=d(B),wo=n(B,"P",{});var Fi=i(wo);fa=s(Fi,"Constructs a Speech2Text2Tokenizer."),Fi.forEach(o),ma=d(B),Xe=n(B,"P",{});var Sr=i(Xe);ua=s(Sr,"This tokenizer inherits from "),Ot=n(Sr,"A",{href:!0});var Li=i(Ot);ga=s(Li,"PreTrainedTokenizer"),Li.forEach(o),_a=s(Sr,` which contains some of the main methods. Users should refer to
the superclass for more information regarding such methods.`),Sr.forEach(o),va=d(B),ve=n(B,"DIV",{class:!0});var $r=i(ve);v(Ze.$$.fragment,$r),Ta=d($r),So=n($r,"P",{});var Di=i(So);xa=s(Di,"Convert a list of lists of token ids into a list of strings by calling decode."),Di.forEach(o),$r.forEach(o),ka=d(B),X=n(B,"DIV",{class:!0});var so=i(X);v(et.$$.fragment,so),ba=d(so),$o=n(so,"P",{});var Ii=i($o);wa=s(Ii,`Converts a sequence of ids in a string, using the tokenizer and vocabulary with options to remove special
tokens and clean up tokenization spaces.`),Ii.forEach(o),Sa=d(so),tt=n(so,"P",{});var yr=i(tt);$a=s(yr,"Similar to doing "),yo=n(yr,"CODE",{});var Wi=i(yo);ya=s(Wi,"self.convert_tokens_to_string(self.convert_ids_to_tokens(token_ids))"),Wi.forEach(o),Ea=s(yr,"."),yr.forEach(o),so.forEach(o),za=d(B),Bt=n(B,"DIV",{class:!0});var Vi=i(Bt);v(ot.$$.fragment,Vi),Vi.forEach(o),B.forEach(o),ir=d(t),ie=n(t,"H2",{class:!0});var Er=i(ie);Te=n(Er,"A",{id:!0,class:!0,href:!0});var Ni=i(Te);Eo=n(Ni,"SPAN",{});var Oi=i(Eo);v(rt.$$.fragment,Oi),Oi.forEach(o),Ni.forEach(o),Pa=d(Er),zo=n(Er,"SPAN",{});var Bi=i(zo);ja=s(Bi,"Speech2Text2Processor"),Bi.forEach(o),Er.forEach(o),cr=d(t),$=n(t,"DIV",{class:!0});var A=i($);v(st.$$.fragment,A),Ca=d(A),Po=n(A,"P",{});var Ui=i(Po);qa=s(Ui,`Constructs a Speech2Text2 processor which wraps a Speech2Text2 feature extractor and a Speech2Text2 tokenizer into
a single processor.`),Ui.forEach(o),Ma=d(A),L=n(A,"P",{});var H=i(L);Ut=n(H,"A",{href:!0});var Ri=i(Ut);Aa=s(Ri,"Speech2Text2Processor"),Ri.forEach(o),Fa=s(H," offers all the functionalities of "),Rt=n(H,"A",{href:!0});var Hi=i(Rt);La=s(Hi,"AutoFeatureExtractor"),Hi.forEach(o),Da=s(H," and "),Ht=n(H,"A",{href:!0});var Ji=i(Ht);Ia=s(Ji,"Speech2Text2Tokenizer"),Ji.forEach(o),Wa=s(H,`.
See the `),at=n(H,"A",{href:!0});var In=i(at);jo=n(In,"STRONG",{});var Gi=i(jo);Va=s(Gi,"call"),Gi.forEach(o),Na=s(In,"()"),In.forEach(o),Oa=s(H," and "),Jt=n(H,"A",{href:!0});var Yi=i(Jt);Ba=s(Yi,"decode()"),Yi.forEach(o),Ua=s(H," for more information."),H.forEach(o),Ra=d(A),xe=n(A,"DIV",{class:!0});var zr=i(xe);v(nt.$$.fragment,zr),Ha=d(zr),U=n(zr,"P",{});var Pe=i(U);Ja=s(Pe,`When used in normal mode, this method forwards all its arguments to AutoFeatureExtractor\u2019s
`),Co=n(Pe,"CODE",{});var Ki=i(Co);Ga=s(Ki,"__call__()"),Ki.forEach(o),Ya=s(Pe,` and returns its output. If used in the context
`),qo=n(Pe,"CODE",{});var Qi=i(qo);Ka=s(Qi,"as_target_processor()"),Qi.forEach(o),Qa=s(Pe,` this method forwards all its arguments to
Speech2Text2Tokenizer\u2019s `),it=n(Pe,"A",{href:!0});var Wn=i(it);Mo=n(Wn,"STRONG",{});var Xi=i(Mo);Xa=s(Xi,"call"),Xi.forEach(o),Za=s(Wn,"()"),Wn.forEach(o),en=s(Pe,`. Please refer to the doctsring of the above two
methods for more information.`),Pe.forEach(o),zr.forEach(o),tn=d(A),Z=n(A,"DIV",{class:!0});var ao=i(Z);v(ct.$$.fragment,ao),on=d(ao),Ao=n(ao,"P",{});var Zi=i(Ao);rn=s(Zi,"Instantiate a processor associated with a pretrained model."),Zi.forEach(o),sn=d(ao),v(ke.$$.fragment,ao),ao.forEach(o),an=d(A),ee=n(A,"DIV",{class:!0});var no=i(ee);v(lt.$$.fragment,no),nn=d(no),dt=n(no,"P",{});var Pr=i(dt);cn=s(Pr,`Saves the attributes of this processor (feature extractor, tokenizer\u2026) in the specified directory so that it
can be reloaded using the `),Gt=n(Pr,"A",{href:!0});var ec=i(Gt);ln=s(ec,"from_pretrained()"),ec.forEach(o),dn=s(Pr," method."),Pr.forEach(o),pn=d(no),v(be.$$.fragment,no),no.forEach(o),hn=d(A),we=n(A,"DIV",{class:!0});var jr=i(we);v(pt.$$.fragment,jr),fn=d(jr),ht=n(jr,"P",{});var Cr=i(ht);mn=s(Cr,"This method forwards all its arguments to Speech2Text2Tokenizer\u2019s "),Yt=n(Cr,"A",{href:!0});var tc=i(Yt);un=s(tc,"batch_decode()"),tc.forEach(o),gn=s(Cr,`. Please
refer to the docstring of this method for more information.`),Cr.forEach(o),jr.forEach(o),_n=d(A),Se=n(A,"DIV",{class:!0});var qr=i(Se);v(ft.$$.fragment,qr),vn=d(qr),mt=n(qr,"P",{});var Mr=i(mt);Tn=s(Mr,"This method forwards all its arguments to Speech2Text2Tokenizer\u2019s "),Kt=n(Mr,"A",{href:!0});var oc=i(Kt);xn=s(oc,"decode()"),oc.forEach(o),kn=s(Mr,`. Please refer
to the docstring of this method for more information.`),Mr.forEach(o),qr.forEach(o),A.forEach(o),lr=d(t),ce=n(t,"H2",{class:!0});var Ar=i(ce);$e=n(Ar,"A",{id:!0,class:!0,href:!0});var rc=i($e);Fo=n(rc,"SPAN",{});var sc=i(Fo);v(ut.$$.fragment,sc),sc.forEach(o),rc.forEach(o),bn=d(Ar),Lo=n(Ar,"SPAN",{});var ac=i(Lo);wn=s(ac,"Speech2Text2ForCausalLM"),ac.forEach(o),Ar.forEach(o),dr=d(t),V=n(t,"DIV",{class:!0});var je=i(V);v(gt.$$.fragment,je),Sn=d(je),R=n(je,"P",{});var Ce=i(R);$n=s(Ce,"The Speech2Text2 Decoder with a language modeling head. Can be used as the decoder part of "),Qt=n(Ce,"A",{href:!0});var nc=i(Qt);yn=s(nc,"EncoderDecoderModel"),nc.forEach(o),En=s(Ce," and "),Do=n(Ce,"CODE",{});var ic=i(Do);zn=s(ic,"SpeechEncoderDecoder"),ic.forEach(o),Pn=s(Ce,`.
This model inherits from `),Xt=n(Ce,"A",{href:!0});var cc=i(Xt);jn=s(cc,"PreTrainedModel"),cc.forEach(o),Cn=s(Ce,`. 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.)`),Ce.forEach(o),qn=d(je),_t=n(je,"P",{});var Fr=i(_t);Mn=s(Fr,"This model is also a PyTorch "),vt=n(Fr,"A",{href:!0,rel:!0});var lc=i(vt);An=s(lc,"torch.nn.Module"),lc.forEach(o),Fn=s(Fr,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Fr.forEach(o),Ln=d(je),ye=n(je,"DIV",{class:!0});var Lr=i(ye);v(Tt.$$.fragment,Lr),Dn=d(Lr),v(Ee.$$.fragment,Lr),Lr.forEach(o),je.forEach(o),this.h()},h(){c(m,"name","hf:doc:metadata"),c(m,"content",JSON.stringify(wc)),c(g,"id","speech2text2"),c(g,"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"),c(g,"href","#speech2text2"),c(u,"class","relative group"),c(P,"id","overview"),c(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"),c(P,"href","#overview"),c(C,"class","relative group"),c(bt,"href","wav2vec2"),c(Me,"href","https://arxiv.org/abs/2104.06678"),c(Me,"rel","nofollow"),c(wt,"href","wav2vec2"),c(St,"href","hubert"),c($t,"href","speech-encoder-decoder"),c(Ae,"href","https://huggingface.co/patrickvonplaten"),c(Ae,"rel","nofollow"),c(Fe,"href","https://github.com/pytorch/fairseq/blob/1f7ef9ed1e1061f8c7f88f8b94c7186834398690/fairseq/models/wav2vec/wav2vec2_asr.py#L266"),c(Fe,"rel","nofollow"),c(De,"href","https://huggingface.co/models?other=speech2text2"),c(De,"rel","nofollow"),c(Et,"href","speech-encoder-decoder"),c(Ve,"href","https://github.com/glample/fastBPE"),c(Ve,"rel","nofollow"),c(he,"id","inference"),c(he,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(he,"href","#inference"),c(te,"class","relative group"),c(zt,"href","/docs/transformers/v4.27.1/en/model_doc/speech-encoder-decoder#transformers.SpeechEncoderDecoderModel"),c(Pt,"href","/docs/transformers/v4.27.1/en/main_classes/text_generation#transformers.GenerationMixin.generate"),c(jt,"href","/docs/transformers/v4.27.1/en/model_doc/wav2vec2#transformers.Wav2Vec2FeatureExtractor"),c(Ct,"href","/docs/transformers/v4.27.1/en/model_doc/speech_to_text_2#transformers.Speech2Text2Tokenizer"),c(qt,"href","/docs/transformers/v4.27.1/en/model_doc/speech_to_text_2#transformers.Speech2Text2Processor"),c(Mt,"href","/docs/transformers/v4.27.1/en/model_doc/wav2vec2#transformers.Wav2Vec2FeatureExtractor"),c(At,"href","/docs/transformers/v4.27.1/en/model_doc/speech_to_text_2#transformers.Speech2Text2Tokenizer"),c(Re,"href","https://huggingface.co/models?filter=speech2text2"),c(Re,"rel","nofollow"),c(me,"id","documentation-resources"),c(me,"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"),c(me,"href","#documentation-resources"),c(oe,"class","relative group"),c(It,"href","./tasks/language_modeling"),c(ue,"id","transformers.Speech2Text2Config"),c(ue,"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"),c(ue,"href","#transformers.Speech2Text2Config"),c(re,"class","relative group"),c(Wt,"href","/docs/transformers/v4.27.1/en/model_doc/speech_to_text_2#transformers.Speech2Text2ForCausalLM"),c(Ye,"href","https://huggingface.co/facebook/s2t-wav2vec2-large-en-de"),c(Ye,"rel","nofollow"),c(Vt,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),c(Nt,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),c(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(_e,"id","transformers.Speech2Text2Tokenizer"),c(_e,"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"),c(_e,"href","#transformers.Speech2Text2Tokenizer"),c(ne,"class","relative group"),c(Ot,"href","/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),c(ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Te,"id","transformers.Speech2Text2Processor"),c(Te,"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"),c(Te,"href","#transformers.Speech2Text2Processor"),c(ie,"class","relative group"),c(Ut,"href","/docs/transformers/v4.27.1/en/model_doc/speech_to_text_2#transformers.Speech2Text2Processor"),c(Rt,"href","/docs/transformers/v4.27.1/en/model_doc/auto#transformers.AutoFeatureExtractor"),c(Ht,"href","/docs/transformers/v4.27.1/en/model_doc/speech_to_text_2#transformers.Speech2Text2Tokenizer"),c(at,"href","/docs/transformers/v4.27.1/en/model_doc/speech_to_text_2#transformers.Speech2Text2Processor.__call__"),c(Jt,"href","/docs/transformers/v4.27.1/en/model_doc/speech_to_text_2#transformers.Speech2Text2Processor.decode"),c(it,"href","/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__"),c(xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Gt,"href","/docs/transformers/v4.27.1/en/main_classes/processors#transformers.ProcessorMixin.from_pretrained"),c(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Yt,"href","/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.batch_decode"),c(we,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Kt,"href","/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.decode"),c(Se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c($e,"id","transformers.Speech2Text2ForCausalLM"),c($e,"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"),c($e,"href","#transformers.Speech2Text2ForCausalLM"),c(ce,"class","relative group"),c(Qt,"href","/docs/transformers/v4.27.1/en/model_doc/encoder-decoder#transformers.EncoderDecoderModel"),c(Xt,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),c(vt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(vt,"rel","nofollow"),c(ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(V,"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,p){e(document.head,m),h(t,y,p),h(t,u,p),e(u,g),e(g,S),T(f,S,null),e(u,w),e(u,I),e(I,F),h(t,z,p),h(t,C,p),e(C,P),e(P,q),T(G,q,null),e(C,kt),e(C,le),e(le,Ir),h(t,No,p),h(t,Y,p),e(Y,Wr),e(Y,bt),e(bt,Vr),e(Y,Nr),e(Y,Me),e(Me,Or),e(Y,Br),h(t,Oo,p),h(t,E,p),e(E,Ur),e(E,io),e(io,Rr),e(E,Hr),e(E,co),e(co,Jr),e(E,Gr),e(E,wt),e(wt,Yr),e(E,Kr),e(E,St),e(St,Qr),e(E,Xr),e(E,$t),e($t,Zr),e(E,es),e(E,lo),e(lo,ts),e(E,os),h(t,Bo,p),h(t,de,p),e(de,rs),e(de,Ae),e(Ae,ss),e(de,as),h(t,Uo,p),h(t,pe,p),e(pe,ns),e(pe,Fe),e(Fe,is),e(pe,cs),h(t,Ro,p),h(t,yt,p),e(yt,ls),h(t,Ho,p),h(t,K,p),e(K,Le),e(Le,ds),e(Le,De),e(De,ps),e(Le,hs),e(K,fs),e(K,Ie),e(Ie,ms),e(Ie,Et),e(Et,us),e(Ie,gs),e(K,_s),e(K,We),e(We,vs),e(We,Ve),e(Ve,Ts),e(We,xs),h(t,Jo,p),h(t,te,p),e(te,he),e(he,po),T(Ne,po,null),e(te,ks),e(te,ho),e(ho,bs),h(t,Go,p),h(t,Q,p),e(Q,ws),e(Q,zt),e(zt,Ss),e(Q,$s),e(Q,Pt),e(Pt,ys),e(Q,Es),h(t,Yo,p),h(t,M,p),e(M,zs),e(M,jt),e(jt,Ps),e(M,js),e(M,Ct),e(Ct,Cs),e(M,qs),e(M,qt),e(qt,Ms),e(M,As),e(M,Mt),e(Mt,Fs),e(M,Ls),e(M,At),e(At,Ds),e(M,Is),h(t,Ko,p),h(t,Ft,p),e(Ft,fo),e(fo,Ws),h(t,Qo,p),T(Oe,t,p),h(t,Xo,p),h(t,Lt,p),e(Lt,Be),e(Be,mo),e(mo,Vs),e(Be,Ns),e(Be,uo),e(uo,Os),h(t,Zo,p),T(Ue,t,p),h(t,er,p),h(t,fe,p),e(fe,Bs),e(fe,Re),e(Re,Us),e(fe,Rs),h(t,tr,p),h(t,oe,p),e(oe,me),e(me,go),T(He,go,null),e(oe,Hs),e(oe,_o),e(_o,Js),h(t,or,p),h(t,Dt,p),e(Dt,vo),e(vo,It),e(It,Gs),h(t,rr,p),h(t,re,p),e(re,ue),e(ue,To),T(Je,To,null),e(re,Ys),e(re,xo),e(xo,Ks),h(t,sr,p),h(t,W,p),T(Ge,W,null),e(W,Qs),e(W,se),e(se,Xs),e(se,Wt),e(Wt,Zs),e(se,ea),e(se,Ye),e(Ye,ta),e(se,oa),e(W,ra),e(W,ae),e(ae,sa),e(ae,Vt),e(Vt,aa),e(ae,na),e(ae,Nt),e(Nt,ia),e(ae,ca),e(W,la),T(ge,W,null),h(t,ar,p),h(t,ne,p),e(ne,_e),e(_e,ko),T(Ke,ko,null),e(ne,da),e(ne,bo),e(bo,pa),h(t,nr,p),h(t,j,p),T(Qe,j,null),e(j,ha),e(j,wo),e(wo,fa),e(j,ma),e(j,Xe),e(Xe,ua),e(Xe,Ot),e(Ot,ga),e(Xe,_a),e(j,va),e(j,ve),T(Ze,ve,null),e(ve,Ta),e(ve,So),e(So,xa),e(j,ka),e(j,X),T(et,X,null),e(X,ba),e(X,$o),e($o,wa),e(X,Sa),e(X,tt),e(tt,$a),e(tt,yo),e(yo,ya),e(tt,Ea),e(j,za),e(j,Bt),T(ot,Bt,null),h(t,ir,p),h(t,ie,p),e(ie,Te),e(Te,Eo),T(rt,Eo,null),e(ie,Pa),e(ie,zo),e(zo,ja),h(t,cr,p),h(t,$,p),T(st,$,null),e($,Ca),e($,Po),e(Po,qa),e($,Ma),e($,L),e(L,Ut),e(Ut,Aa),e(L,Fa),e(L,Rt),e(Rt,La),e(L,Da),e(L,Ht),e(Ht,Ia),e(L,Wa),e(L,at),e(at,jo),e(jo,Va),e(at,Na),e(L,Oa),e(L,Jt),e(Jt,Ba),e(L,Ua),e($,Ra),e($,xe),T(nt,xe,null),e(xe,Ha),e(xe,U),e(U,Ja),e(U,Co),e(Co,Ga),e(U,Ya),e(U,qo),e(qo,Ka),e(U,Qa),e(U,it),e(it,Mo),e(Mo,Xa),e(it,Za),e(U,en),e($,tn),e($,Z),T(ct,Z,null),e(Z,on),e(Z,Ao),e(Ao,rn),e(Z,sn),T(ke,Z,null),e($,an),e($,ee),T(lt,ee,null),e(ee,nn),e(ee,dt),e(dt,cn),e(dt,Gt),e(Gt,ln),e(dt,dn),e(ee,pn),T(be,ee,null),e($,hn),e($,we),T(pt,we,null),e(we,fn),e(we,ht),e(ht,mn),e(ht,Yt),e(Yt,un),e(ht,gn),e($,_n),e($,Se),T(ft,Se,null),e(Se,vn),e(Se,mt),e(mt,Tn),e(mt,Kt),e(Kt,xn),e(mt,kn),h(t,lr,p),h(t,ce,p),e(ce,$e),e($e,Fo),T(ut,Fo,null),e(ce,bn),e(ce,Lo),e(Lo,wn),h(t,dr,p),h(t,V,p),T(gt,V,null),e(V,Sn),e(V,R),e(R,$n),e(R,Qt),e(Qt,yn),e(R,En),e(R,Do),e(Do,zn),e(R,Pn),e(R,Xt),e(Xt,jn),e(R,Cn),e(V,qn),e(V,_t),e(_t,Mn),e(_t,vt),e(vt,An),e(_t,Fn),e(V,Ln),e(V,ye),T(Tt,ye,null),e(ye,Dn),T(Ee,ye,null),pr=!0},p(t,[p]){const xt={};p&2&&(xt.$$scope={dirty:p,ctx:t}),ge.$set(xt);const Io={};p&2&&(Io.$$scope={dirty:p,ctx:t}),ke.$set(Io);const Wo={};p&2&&(Wo.$$scope={dirty:p,ctx:t}),be.$set(Wo);const Vo={};p&2&&(Vo.$$scope={dirty:p,ctx:t}),Ee.$set(Vo)},i(t){pr||(x(f.$$.fragment,t),x(G.$$.fragment,t),x(Ne.$$.fragment,t),x(Oe.$$.fragment,t),x(Ue.$$.fragment,t),x(He.$$.fragment,t),x(Je.$$.fragment,t),x(Ge.$$.fragment,t),x(ge.$$.fragment,t),x(Ke.$$.fragment,t),x(Qe.$$.fragment,t),x(Ze.$$.fragment,t),x(et.$$.fragment,t),x(ot.$$.fragment,t),x(rt.$$.fragment,t),x(st.$$.fragment,t),x(nt.$$.fragment,t),x(ct.$$.fragment,t),x(ke.$$.fragment,t),x(lt.$$.fragment,t),x(be.$$.fragment,t),x(pt.$$.fragment,t),x(ft.$$.fragment,t),x(ut.$$.fragment,t),x(gt.$$.fragment,t),x(Tt.$$.fragment,t),x(Ee.$$.fragment,t),pr=!0)},o(t){k(f.$$.fragment,t),k(G.$$.fragment,t),k(Ne.$$.fragment,t),k(Oe.$$.fragment,t),k(Ue.$$.fragment,t),k(He.$$.fragment,t),k(Je.$$.fragment,t),k(Ge.$$.fragment,t),k(ge.$$.fragment,t),k(Ke.$$.fragment,t),k(Qe.$$.fragment,t),k(Ze.$$.fragment,t),k(et.$$.fragment,t),k(ot.$$.fragment,t),k(rt.$$.fragment,t),k(st.$$.fragment,t),k(nt.$$.fragment,t),k(ct.$$.fragment,t),k(ke.$$.fragment,t),k(lt.$$.fragment,t),k(be.$$.fragment,t),k(pt.$$.fragment,t),k(ft.$$.fragment,t),k(ut.$$.fragment,t),k(gt.$$.fragment,t),k(Tt.$$.fragment,t),k(Ee.$$.fragment,t),pr=!1},d(t){o(m),t&&o(y),t&&o(u),b(f),t&&o(z),t&&o(C),b(G),t&&o(No),t&&o(Y),t&&o(Oo),t&&o(E),t&&o(Bo),t&&o(de),t&&o(Uo),t&&o(pe),t&&o(Ro),t&&o(yt),t&&o(Ho),t&&o(K),t&&o(Jo),t&&o(te),b(Ne),t&&o(Go),t&&o(Q),t&&o(Yo),t&&o(M),t&&o(Ko),t&&o(Ft),t&&o(Qo),b(Oe,t),t&&o(Xo),t&&o(Lt),t&&o(Zo),b(Ue,t),t&&o(er),t&&o(fe),t&&o(tr),t&&o(oe),b(He),t&&o(or),t&&o(Dt),t&&o(rr),t&&o(re),b(Je),t&&o(sr),t&&o(W),b(Ge),b(ge),t&&o(ar),t&&o(ne),b(Ke),t&&o(nr),t&&o(j),b(Qe),b(Ze),b(et),b(ot),t&&o(ir),t&&o(ie),b(rt),t&&o(cr),t&&o($),b(st),b(nt),b(ct),b(ke),b(lt),b(be),b(pt),b(ft),t&&o(lr),t&&o(ce),b(ut),t&&o(dr),t&&o(V),b(gt),b(Tt),b(Ee)}}}const wc={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 Sc(J){return _c(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Cc extends fc{constructor(m){super();mc(this,m,Sc,bc,uc,{})}}export{Cc as default,wc as metadata};
