import{S as Wh,i as Rh,s as Vh,e as a,k as h,w as v,t as n,M as Ph,c as r,d as t,m as p,a as i,x as k,h as s,b as l,G as e,g as u,y as w,q as x,o as M,B as S,v as Xh,L as la}from"../../chunks/vendor-hf-doc-builder.js";import{T as yo}from"../../chunks/Tip-hf-doc-builder.js";import{D as V}from"../../chunks/Docstring-hf-doc-builder.js";import{C as $n}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as st}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as da}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Ah(j){let c,y,_,g,b;return g=new $n({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFNwZWVjaDJUZXh0Q29uZmlnJTJDJTIwU3BlZWNoMlRleHRNb2RlbCUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBTcGVlY2gyVGV4dCUyMHMydF90cmFuc2Zvcm1lcl9zJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMFNwZWVjaDJUZXh0Q29uZmlnKCklMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwbW9kZWwlMjAod2l0aCUyMHJhbmRvbSUyMHdlaWdodHMpJTIwZnJvbSUyMHRoZSUyMHMydF90cmFuc2Zvcm1lcl9zJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBTcGVlY2gyVGV4dE1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Speech2TextConfig, Speech2TextModel

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

<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 = Speech2TextModel(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(){c=a("p"),y=n("Example:"),_=h(),v(g.$$.fragment)},l(d){c=r(d,"P",{});var m=i(c);y=s(m,"Example:"),m.forEach(t),_=p(d),k(g.$$.fragment,d)},m(d,m){u(d,c,m),e(c,y),u(d,_,m),w(g,d,m),b=!0},p:la,i(d){b||(x(g.$$.fragment,d),b=!0)},o(d){M(g.$$.fragment,d),b=!1},d(d){d&&t(c),d&&t(_),S(g,d)}}}function Bh(j){let c,y,_,g,b,d,m,E,Z,N,I;return{c(){c=a("p"),y=n(`This class method is simply calling the feature extractor
`),_=a("a"),g=n("from_pretrained()"),b=n(`, image processor
`),d=a("a"),m=n("ImageProcessingMixin"),E=n(` and the tokenizer
`),Z=a("code"),N=n("~tokenization_utils_base.PreTrainedTokenizer.from_pretrained"),I=n(` methods. Please refer to the docstrings of the
methods above for more information.`),this.h()},l(U){c=r(U,"P",{});var C=i(c);y=s(C,`This class method is simply calling the feature extractor
`),_=r(C,"A",{href:!0});var $=i(_);g=s($,"from_pretrained()"),$.forEach(t),b=s(C,`, image processor
`),d=r(C,"A",{href:!0});var we=i(d);m=s(we,"ImageProcessingMixin"),we.forEach(t),E=s(C,` and the tokenizer
`),Z=r(C,"CODE",{});var Y=i(Z);N=s(Y,"~tokenization_utils_base.PreTrainedTokenizer.from_pretrained"),Y.forEach(t),I=s(C,` methods. Please refer to the docstrings of the
methods above for more information.`),C.forEach(t),this.h()},h(){l(_,"href","/docs/transformers/main/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.from_pretrained"),l(d,"href","/docs/transformers/main/en/internal/image_processing_utils#transformers.ImageProcessingMixin")},m(U,C){u(U,c,C),e(c,y),e(c,_),e(_,g),e(c,b),e(c,d),e(d,m),e(c,E),e(c,Z),e(Z,N),e(c,I)},d(U){U&&t(c)}}}function Yh(j){let c,y,_,g,b,d,m,E;return{c(){c=a("p"),y=n("This class method is simply calling "),_=a("a"),g=n("save_pretrained()"),b=n(` and
`),d=a("a"),m=n("save_pretrained()"),E=n(`. Please refer to the docstrings of the
methods above for more information.`),this.h()},l(Z){c=r(Z,"P",{});var N=i(c);y=s(N,"This class method is simply calling "),_=r(N,"A",{href:!0});var I=i(_);g=s(I,"save_pretrained()"),I.forEach(t),b=s(N,` and
`),d=r(N,"A",{href:!0});var U=i(d);m=s(U,"save_pretrained()"),U.forEach(t),E=s(N,`. Please refer to the docstrings of the
methods above for more information.`),N.forEach(t),this.h()},h(){l(_,"href","/docs/transformers/main/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.save_pretrained"),l(d,"href","/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.save_pretrained")},m(Z,N){u(Z,c,N),e(c,y),e(c,_),e(_,g),e(c,b),e(c,d),e(d,m),e(c,E)},d(Z){Z&&t(c)}}}function Dh(j){let c,y,_,g,b;return{c(){c=a("p"),y=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=a("code"),g=n("Module"),b=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(d){c=r(d,"P",{});var m=i(c);y=s(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=r(m,"CODE",{});var E=i(_);g=s(E,"Module"),E.forEach(t),b=s(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(d,m){u(d,c,m),e(c,y),e(c,_),e(_,g),e(c,b)},d(d){d&&t(c)}}}function Lh(j){let c,y,_,g,b;return g=new $n({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwU3BlZWNoMlRleHRNb2RlbCUyQyUyMEF1dG9GZWF0dXJlRXh0cmFjdG9yJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBbW9kZWwlMjAlM0QlMjBTcGVlY2gyVGV4dE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRnMydC1zbWFsbC1saWJyaXNwZWVjaC1hc3IlMjIpJTBBZmVhdHVyZV9leHRyYWN0b3IlMjAlM0QlMjBBdXRvRmVhdHVyZUV4dHJhY3Rvci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZzMnQtc21hbGwtbGlicmlzcGVlY2gtYXNyJTIyKSUwQWRzJTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmhmLWludGVybmFsLXRlc3RpbmclMkZsaWJyaXNwZWVjaF9hc3JfZHVtbXklMjIlMkMlMjAlMjJjbGVhbiUyMiUyQyUyMHNwbGl0JTNEJTIydmFsaWRhdGlvbiUyMiklMEFpbnB1dHMlMjAlM0QlMjBmZWF0dXJlX2V4dHJhY3RvciglMEElMjAlMjAlMjAlMjBkcyU1QjAlNUQlNUIlMjJhdWRpbyUyMiU1RCU1QiUyMmFycmF5JTIyJTVEJTJDJTIwc2FtcGxpbmdfcmF0ZSUzRGRzJTVCMCU1RCU1QiUyMmF1ZGlvJTIyJTVEJTVCJTIyc2FtcGxpbmdfcmF0ZSUyMiU1RCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIlMEEpJTBBaW5wdXRfZmVhdHVyZXMlMjAlM0QlMjBpbnB1dHMuaW5wdXRfZmVhdHVyZXMlMEFkZWNvZGVyX2lucHV0X2lkcyUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIlNUIxJTJDJTIwMSU1RCU1RCklMjAqJTIwbW9kZWwuY29uZmlnLmRlY29kZXJfc3RhcnRfdG9rZW5faWQlMEFsYXN0X2hpZGRlbl9zdGF0ZSUyMCUzRCUyMG1vZGVsKGlucHV0X2ZlYXR1cmVzJTJDJTIwZGVjb2Rlcl9pbnB1dF9pZHMlM0RkZWNvZGVyX2lucHV0X2lkcykubGFzdF9oaWRkZW5fc3RhdGUlMEFsaXN0KGxhc3RfaGlkZGVuX3N0YXRlLnNoYXBlKQ==",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> Speech2TextModel, AutoFeatureExtractor
<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>model = Speech2TextModel.from_pretrained(<span class="hljs-string">&quot;facebook/s2t-small-librispeech-asr&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;facebook/s2t-small-librispeech-asr&quot;</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_features = inputs.input_features
<span class="hljs-meta">&gt;&gt;&gt; </span>decoder_input_ids = torch.tensor([[<span class="hljs-number">1</span>, <span class="hljs-number">1</span>]]) * model.config.decoder_start_token_id
<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_state = model(input_features, decoder_input_ids=decoder_input_ids).last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(last_hidden_state.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">256</span>]`}}),{c(){c=a("p"),y=n("Example:"),_=h(),v(g.$$.fragment)},l(d){c=r(d,"P",{});var m=i(c);y=s(m,"Example:"),m.forEach(t),_=p(d),k(g.$$.fragment,d)},m(d,m){u(d,c,m),e(c,y),u(d,_,m),w(g,d,m),b=!0},p:la,i(d){b||(x(g.$$.fragment,d),b=!0)},o(d){M(g.$$.fragment,d),b=!1},d(d){d&&t(c),d&&t(_),S(g,d)}}}function Oh(j){let c,y,_,g,b;return{c(){c=a("p"),y=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=a("code"),g=n("Module"),b=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(d){c=r(d,"P",{});var m=i(c);y=s(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=r(m,"CODE",{});var E=i(_);g=s(E,"Module"),E.forEach(t),b=s(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(d,m){u(d,c,m),e(c,y),e(c,_),e(_,g),e(c,b)},d(d){d&&t(c)}}}function Hh(j){let c,y,_,g,b;return g=new $n({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwU3BlZWNoMlRleHRQcm9jZXNzb3IlMkMlMjBTcGVlY2gyVGV4dEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbiUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQW1vZGVsJTIwJTNEJTIwU3BlZWNoMlRleHRGb3JDb25kaXRpb25hbEdlbmVyYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGczJ0LXNtYWxsLWxpYnJpc3BlZWNoLWFzciUyMiklMEFwcm9jZXNzb3IlMjAlM0QlMjBTcGVlY2gyVGV4dFByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZzMnQtc21hbGwtbGlicmlzcGVlY2gtYXNyJTIyKSUwQSUwQSUwQWRzJTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmhmLWludGVybmFsLXRlc3RpbmclMkZsaWJyaXNwZWVjaF9hc3JfZHVtbXklMjIlMkMlMjAlMjJjbGVhbiUyMiUyQyUyMHNwbGl0JTNEJTIydmFsaWRhdGlvbiUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoJTBBJTIwJTIwJTIwJTIwZHMlNUIwJTVEJTVCJTIyYXVkaW8lMjIlNUQlNUIlMjJhcnJheSUyMiU1RCUyQyUyMHNhbXBsaW5nX3JhdGUlM0RkcyU1QjAlNUQlNUIlMjJhdWRpbyUyMiU1RCU1QiUyMnNhbXBsaW5nX3JhdGUlMjIlNUQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyJTBBKSUwQWlucHV0X2ZlYXR1cmVzJTIwJTNEJTIwaW5wdXRzLmlucHV0X2ZlYXR1cmVzJTBBJTBBZ2VuZXJhdGVkX2lkcyUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKGlucHV0cyUzRGlucHV0X2ZlYXR1cmVzKSUwQSUwQXRyYW5zY3JpcHRpb24lMjAlM0QlMjBwcm9jZXNzb3IuYmF0Y2hfZGVjb2RlKGdlbmVyYXRlZF9pZHMlMkMlMjBza2lwX3NwZWNpYWxfdG9rZW5zJTNEVHJ1ZSklNUIwJTVEJTBBdHJhbnNjcmlwdGlvbg==",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> Speech2TextProcessor, Speech2TextForConditionalGeneration
<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>model = Speech2TextForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/s2t-small-librispeech-asr&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = Speech2TextProcessor.from_pretrained(<span class="hljs-string">&quot;facebook/s2t-small-librispeech-asr&quot;</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 = processor(
<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_features = inputs.input_features

<span class="hljs-meta">&gt;&gt;&gt; </span>generated_ids = model.generate(inputs=input_features)

<span class="hljs-meta">&gt;&gt;&gt; </span>transcription = processor.batch_decode(generated_ids, skip_special_tokens=<span class="hljs-literal">True</span>)[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>transcription
<span class="hljs-string">&#x27;mister quilter is the apostle of the middle classes and we are glad to welcome his gospel&#x27;</span>`}}),{c(){c=a("p"),y=n("Example:"),_=h(),v(g.$$.fragment)},l(d){c=r(d,"P",{});var m=i(c);y=s(m,"Example:"),m.forEach(t),_=p(d),k(g.$$.fragment,d)},m(d,m){u(d,c,m),e(c,y),u(d,_,m),w(g,d,m),b=!0},p:la,i(d){b||(x(g.$$.fragment,d),b=!0)},o(d){M(g.$$.fragment,d),b=!1},d(d){d&&t(c),d&&t(_),S(g,d)}}}function Qh(j){let c,y,_,g,b,d,m,E,Z,N,I,U,C,$,we,Y,Ve,Ie,q,Pe,se,ae,Xe,re,ie,Ae,de,le,Be,ce,Se,G,W,Q,he,pe,Ye,me,ue,De,P,Ce,X,te,$e,O,Le,Ee,ee,qe,D,Oe,fe,A,He,L,R,Qe;return{c(){c=a("p"),y=n("TensorFlow models and layers in "),_=a("code"),g=n("transformers"),b=n(" accept two formats as input:"),d=h(),m=a("ul"),E=a("li"),Z=n("having all inputs as keyword arguments (like PyTorch models), or"),N=h(),I=a("li"),U=n("having all inputs as a list, tuple or dict in the first positional argument."),C=h(),$=a("p"),we=n(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),Y=a("code"),Ve=n("model.fit()"),Ie=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),q=a("code"),Pe=n("model.fit()"),se=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),ae=a("code"),Xe=n("fit()"),re=n(" and "),ie=a("code"),Ae=n("predict()"),de=n(`, such as when creating your own layers or models with
the Keras `),le=a("code"),Be=n("Functional"),ce=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),Se=h(),G=a("ul"),W=a("li"),Q=n("a single Tensor with "),he=a("code"),pe=n("input_ids"),Ye=n(" only and nothing else: "),me=a("code"),ue=n("model(input_ids)"),De=h(),P=a("li"),Ce=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),X=a("code"),te=n("model([input_ids, attention_mask])"),$e=n(" or "),O=a("code"),Le=n("model([input_ids, attention_mask, token_type_ids])"),Ee=h(),ee=a("li"),qe=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),D=a("code"),Oe=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),fe=h(),A=a("p"),He=n(`Note that when creating models and layers with
`),L=a("a"),R=n("subclassing"),Qe=n(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(T){c=r(T,"P",{});var F=i(c);y=s(F,"TensorFlow models and layers in "),_=r(F,"CODE",{});var pt=i(_);g=s(pt,"transformers"),pt.forEach(t),b=s(F," accept two formats as input:"),F.forEach(t),d=p(T),m=r(T,"UL",{});var oe=i(m);E=r(oe,"LI",{});var mt=i(E);Z=s(mt,"having all inputs as keyword arguments (like PyTorch models), or"),mt.forEach(t),N=p(oe),I=r(oe,"LI",{});var ut=i(I);U=s(ut,"having all inputs as a list, tuple or dict in the first positional argument."),ut.forEach(t),oe.forEach(t),C=p(T),$=r(T,"P",{});var z=i($);we=s(z,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),Y=r(z,"CODE",{});var ft=i(Y);Ve=s(ft,"model.fit()"),ft.forEach(t),Ie=s(z,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),q=r(z,"CODE",{});var _t=i(q);Pe=s(_t,"model.fit()"),_t.forEach(t),se=s(z,` supports! If, however, you want to use the second
format outside of Keras methods like `),ae=r(z,"CODE",{});var Ne=i(ae);Xe=s(Ne,"fit()"),Ne.forEach(t),re=s(z," and "),ie=r(z,"CODE",{});var gt=i(ie);Ae=s(gt,"predict()"),gt.forEach(t),de=s(z,`, such as when creating your own layers or models with
the Keras `),le=r(z,"CODE",{});var Tt=i(le);Be=s(Tt,"Functional"),Tt.forEach(t),ce=s(z,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),z.forEach(t),Se=p(T),G=r(T,"UL",{});var K=i(G);W=r(K,"LI",{});var J=i(W);Q=s(J,"a single Tensor with "),he=r(J,"CODE",{});var bt=i(he);pe=s(bt,"input_ids"),bt.forEach(t),Ye=s(J," only and nothing else: "),me=r(J,"CODE",{});var Ke=i(me);ue=s(Ke,"model(input_ids)"),Ke.forEach(t),J.forEach(t),De=p(K),P=r(K,"LI",{});var _e=i(P);Ce=s(_e,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),X=r(_e,"CODE",{});var yt=i(X);te=s(yt,"model([input_ids, attention_mask])"),yt.forEach(t),$e=s(_e," or "),O=r(_e,"CODE",{});var et=i(O);Le=s(et,"model([input_ids, attention_mask, token_type_ids])"),et.forEach(t),_e.forEach(t),Ee=p(K),ee=r(K,"LI",{});var tt=i(ee);qe=s(tt,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),D=r(tt,"CODE",{});var vt=i(D);Oe=s(vt,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),vt.forEach(t),tt.forEach(t),K.forEach(t),fe=p(T),A=r(T,"P",{});var ge=i(A);He=s(ge,`Note that when creating models and layers with
`),L=r(ge,"A",{href:!0,rel:!0});var kt=i(L);R=s(kt,"subclassing"),kt.forEach(t),Qe=s(ge,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),ge.forEach(t),this.h()},h(){l(L,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),l(L,"rel","nofollow")},m(T,F){u(T,c,F),e(c,y),e(c,_),e(_,g),e(c,b),u(T,d,F),u(T,m,F),e(m,E),e(E,Z),e(m,N),e(m,I),e(I,U),u(T,C,F),u(T,$,F),e($,we),e($,Y),e(Y,Ve),e($,Ie),e($,q),e(q,Pe),e($,se),e($,ae),e(ae,Xe),e($,re),e($,ie),e(ie,Ae),e($,de),e($,le),e(le,Be),e($,ce),u(T,Se,F),u(T,G,F),e(G,W),e(W,Q),e(W,he),e(he,pe),e(W,Ye),e(W,me),e(me,ue),e(G,De),e(G,P),e(P,Ce),e(P,X),e(X,te),e(P,$e),e(P,O),e(O,Le),e(G,Ee),e(G,ee),e(ee,qe),e(ee,D),e(D,Oe),u(T,fe,F),u(T,A,F),e(A,He),e(A,L),e(L,R),e(A,Qe)},d(T){T&&t(c),T&&t(d),T&&t(m),T&&t(C),T&&t($),T&&t(Se),T&&t(G),T&&t(fe),T&&t(A)}}}function Kh(j){let c,y,_,g,b;return{c(){c=a("p"),y=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=a("code"),g=n("Module"),b=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(d){c=r(d,"P",{});var m=i(c);y=s(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=r(m,"CODE",{});var E=i(_);g=s(E,"Module"),E.forEach(t),b=s(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(d,m){u(d,c,m),e(c,y),e(c,_),e(_,g),e(c,b)},d(d){d&&t(c)}}}function ep(j){let c,y,_,g,b;return g=new $n({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURlNwZWVjaDJUZXh0TW9kZWwlMEFpbXBvcnQlMjB0ZW5zb3JmbG93JTIwYXMlMjB0ZiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGczJ0LXNtYWxsLWxpYnJpc3BlZWNoLWFzciUyMiklMEFtb2RlbCUyMCUzRCUyMFRGU3BlZWNoMlRleHRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZzMnQtc21hbGwtbGlicmlzcGVlY2gtYXNyJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFSpeech2TextModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/s2t-small-librispeech-asr&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFSpeech2TextModel.from_pretrained(<span class="hljs-string">&quot;facebook/s2t-small-librispeech-asr&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){c=a("p"),y=n("Example:"),_=h(),v(g.$$.fragment)},l(d){c=r(d,"P",{});var m=i(c);y=s(m,"Example:"),m.forEach(t),_=p(d),k(g.$$.fragment,d)},m(d,m){u(d,c,m),e(c,y),u(d,_,m),w(g,d,m),b=!0},p:la,i(d){b||(x(g.$$.fragment,d),b=!0)},o(d){M(g.$$.fragment,d),b=!1},d(d){d&&t(c),d&&t(_),S(g,d)}}}function tp(j){let c,y,_,g,b,d,m,E,Z,N,I,U,C,$,we,Y,Ve,Ie,q,Pe,se,ae,Xe,re,ie,Ae,de,le,Be,ce,Se,G,W,Q,he,pe,Ye,me,ue,De,P,Ce,X,te,$e,O,Le,Ee,ee,qe,D,Oe,fe,A,He,L,R,Qe;return{c(){c=a("p"),y=n("TensorFlow models and layers in "),_=a("code"),g=n("transformers"),b=n(" accept two formats as input:"),d=h(),m=a("ul"),E=a("li"),Z=n("having all inputs as keyword arguments (like PyTorch models), or"),N=h(),I=a("li"),U=n("having all inputs as a list, tuple or dict in the first positional argument."),C=h(),$=a("p"),we=n(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),Y=a("code"),Ve=n("model.fit()"),Ie=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),q=a("code"),Pe=n("model.fit()"),se=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),ae=a("code"),Xe=n("fit()"),re=n(" and "),ie=a("code"),Ae=n("predict()"),de=n(`, such as when creating your own layers or models with
the Keras `),le=a("code"),Be=n("Functional"),ce=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),Se=h(),G=a("ul"),W=a("li"),Q=n("a single Tensor with "),he=a("code"),pe=n("input_ids"),Ye=n(" only and nothing else: "),me=a("code"),ue=n("model(input_ids)"),De=h(),P=a("li"),Ce=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),X=a("code"),te=n("model([input_ids, attention_mask])"),$e=n(" or "),O=a("code"),Le=n("model([input_ids, attention_mask, token_type_ids])"),Ee=h(),ee=a("li"),qe=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),D=a("code"),Oe=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),fe=h(),A=a("p"),He=n(`Note that when creating models and layers with
`),L=a("a"),R=n("subclassing"),Qe=n(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(T){c=r(T,"P",{});var F=i(c);y=s(F,"TensorFlow models and layers in "),_=r(F,"CODE",{});var pt=i(_);g=s(pt,"transformers"),pt.forEach(t),b=s(F," accept two formats as input:"),F.forEach(t),d=p(T),m=r(T,"UL",{});var oe=i(m);E=r(oe,"LI",{});var mt=i(E);Z=s(mt,"having all inputs as keyword arguments (like PyTorch models), or"),mt.forEach(t),N=p(oe),I=r(oe,"LI",{});var ut=i(I);U=s(ut,"having all inputs as a list, tuple or dict in the first positional argument."),ut.forEach(t),oe.forEach(t),C=p(T),$=r(T,"P",{});var z=i($);we=s(z,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),Y=r(z,"CODE",{});var ft=i(Y);Ve=s(ft,"model.fit()"),ft.forEach(t),Ie=s(z,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),q=r(z,"CODE",{});var _t=i(q);Pe=s(_t,"model.fit()"),_t.forEach(t),se=s(z,` supports! If, however, you want to use the second
format outside of Keras methods like `),ae=r(z,"CODE",{});var Ne=i(ae);Xe=s(Ne,"fit()"),Ne.forEach(t),re=s(z," and "),ie=r(z,"CODE",{});var gt=i(ie);Ae=s(gt,"predict()"),gt.forEach(t),de=s(z,`, such as when creating your own layers or models with
the Keras `),le=r(z,"CODE",{});var Tt=i(le);Be=s(Tt,"Functional"),Tt.forEach(t),ce=s(z,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),z.forEach(t),Se=p(T),G=r(T,"UL",{});var K=i(G);W=r(K,"LI",{});var J=i(W);Q=s(J,"a single Tensor with "),he=r(J,"CODE",{});var bt=i(he);pe=s(bt,"input_ids"),bt.forEach(t),Ye=s(J," only and nothing else: "),me=r(J,"CODE",{});var Ke=i(me);ue=s(Ke,"model(input_ids)"),Ke.forEach(t),J.forEach(t),De=p(K),P=r(K,"LI",{});var _e=i(P);Ce=s(_e,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),X=r(_e,"CODE",{});var yt=i(X);te=s(yt,"model([input_ids, attention_mask])"),yt.forEach(t),$e=s(_e," or "),O=r(_e,"CODE",{});var et=i(O);Le=s(et,"model([input_ids, attention_mask, token_type_ids])"),et.forEach(t),_e.forEach(t),Ee=p(K),ee=r(K,"LI",{});var tt=i(ee);qe=s(tt,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),D=r(tt,"CODE",{});var vt=i(D);Oe=s(vt,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),vt.forEach(t),tt.forEach(t),K.forEach(t),fe=p(T),A=r(T,"P",{});var ge=i(A);He=s(ge,`Note that when creating models and layers with
`),L=r(ge,"A",{href:!0,rel:!0});var kt=i(L);R=s(kt,"subclassing"),kt.forEach(t),Qe=s(ge,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),ge.forEach(t),this.h()},h(){l(L,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),l(L,"rel","nofollow")},m(T,F){u(T,c,F),e(c,y),e(c,_),e(_,g),e(c,b),u(T,d,F),u(T,m,F),e(m,E),e(E,Z),e(m,N),e(m,I),e(I,U),u(T,C,F),u(T,$,F),e($,we),e($,Y),e(Y,Ve),e($,Ie),e($,q),e(q,Pe),e($,se),e($,ae),e(ae,Xe),e($,re),e($,ie),e(ie,Ae),e($,de),e($,le),e(le,Be),e($,ce),u(T,Se,F),u(T,G,F),e(G,W),e(W,Q),e(W,he),e(he,pe),e(W,Ye),e(W,me),e(me,ue),e(G,De),e(G,P),e(P,Ce),e(P,X),e(X,te),e(P,$e),e(P,O),e(O,Le),e(G,Ee),e(G,ee),e(ee,qe),e(ee,D),e(D,Oe),u(T,fe,F),u(T,A,F),e(A,He),e(A,L),e(L,R),e(A,Qe)},d(T){T&&t(c),T&&t(d),T&&t(m),T&&t(C),T&&t($),T&&t(Se),T&&t(G),T&&t(fe),T&&t(A)}}}function op(j){let c,y,_,g,b;return{c(){c=a("p"),y=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=a("code"),g=n("Module"),b=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(d){c=r(d,"P",{});var m=i(c);y=s(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=r(m,"CODE",{});var E=i(_);g=s(E,"Module"),E.forEach(t),b=s(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(d,m){u(d,c,m),e(c,y),e(c,_),e(_,g),e(c,b)},d(d){d&&t(c)}}}function np(j){let c,y,_,g,b;return g=new $n({props:{code:"aW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwU3BlZWNoMlRleHRQcm9jZXNzb3IlMkMlMjBURlNwZWVjaDJUZXh0Rm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBaW1wb3J0JTIwc291bmRmaWxlJTIwYXMlMjBzZiUwQSUwQW1vZGVsJTIwJTNEJTIwVEZTcGVlY2gyVGV4dEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyZmFjZWJvb2slMkZzMnQtc21hbGwtbGlicmlzcGVlY2gtYXNyJTIyJTJDJTIwZnJvbV9wdCUzRFRydWUlMEEpJTBBcHJvY2Vzc29yJTIwJTNEJTIwU3BlZWNoMlRleHRQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGczJ0LXNtYWxsLWxpYnJpc3BlZWNoLWFzciUyMiklMEElMEElMEFkZWYlMjBtYXBfdG9fYXJyYXkoYmF0Y2gpJTNBJTBBJTIwJTIwJTIwJTIwc3BlZWNoJTJDJTIwXyUyMCUzRCUyMHNmLnJlYWQoYmF0Y2glNUIlMjJmaWxlJTIyJTVEKSUwQSUyMCUyMCUyMCUyMGJhdGNoJTVCJTIyc3BlZWNoJTIyJTVEJTIwJTNEJTIwc3BlZWNoJTBBJTIwJTIwJTIwJTIwcmV0dXJuJTIwYmF0Y2glMEElMEElMEFkcyUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJoZi1pbnRlcm5hbC10ZXN0aW5nJTJGbGlicmlzcGVlY2hfYXNyX2R1bW15JTIyJTJDJTIwJTIyY2xlYW4lMjIlMkMlMjBzcGxpdCUzRCUyMnZhbGlkYXRpb24lMjIpJTBBZHMlMjAlM0QlMjBkcy5tYXAobWFwX3RvX2FycmF5KSUwQWRzLnNldF9mb3JtYXQodHlwZSUzRCUyMnRmJTIyKSUwQSUwQWlucHV0X2ZlYXR1cmVzJTIwJTNEJTIwcHJvY2Vzc29yKCUwQSUyMCUyMCUyMCUyMGRzJTVCJTIyc3BlZWNoJTIyJTVEJTVCMCU1RCUyQyUyMHNhbXBsaW5nX3JhdGUlM0QxNjAwMCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIlMEEpLmlucHV0X2ZlYXR1cmVzJTIwJTIwJTIzJTIwQmF0Y2glMjBzaXplJTIwMSUwQWdlbmVyYXRlZF9pZHMlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZShpbnB1dF9mZWF0dXJlcyklMEElMEF0cmFuc2NyaXB0aW9uJTIwJTNEJTIwcHJvY2Vzc29yLmJhdGNoX2RlY29kZShnZW5lcmF0ZWRfaWRzKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Speech2TextProcessor, TFSpeech2TextForConditionalGeneration
<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 = TFSpeech2TextForConditionalGeneration.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;facebook/s2t-small-librispeech-asr&quot;</span>, from_pt=<span class="hljs-literal">True</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = Speech2TextProcessor.from_pretrained(<span class="hljs-string">&quot;facebook/s2t-small-librispeech-asr&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>ds.set_format(<span class="hljs-built_in">type</span>=<span class="hljs-string">&quot;tf&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>input_features = processor(
<span class="hljs-meta">... </span>    ds[<span class="hljs-string">&quot;speech&quot;</span>][<span class="hljs-number">0</span>], sampling_rate=<span class="hljs-number">16000</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>
<span class="hljs-meta">... </span>).input_features  <span class="hljs-comment"># Batch size 1</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>generated_ids = model.generate(input_features)

<span class="hljs-meta">&gt;&gt;&gt; </span>transcription = processor.batch_decode(generated_ids)`}}),{c(){c=a("p"),y=n("Example:"),_=h(),v(g.$$.fragment)},l(d){c=r(d,"P",{});var m=i(c);y=s(m,"Example:"),m.forEach(t),_=p(d),k(g.$$.fragment,d)},m(d,m){u(d,c,m),e(c,y),u(d,_,m),w(g,d,m),b=!0},p:la,i(d){b||(x(g.$$.fragment,d),b=!0)},o(d){M(g.$$.fragment,d),b=!1},d(d){d&&t(c),d&&t(_),S(g,d)}}}function sp(j){let c,y,_,g,b,d,m,E,Z,N,I,U,C,$,we,Y,Ve,Ie,q,Pe,se,ae,Xe,re,ie,Ae,de,le,Be,ce,Se,G,W,Q,he,pe,Ye,me,ue,De,P,Ce,X,te,$e,O,Le,Ee,ee,qe,D,Oe,fe,A,He,L,R,Qe,T,F,pt,oe,mt,ut,z,ft,_t,Ne,gt,Tt,K,J,bt,Ke,_e,yt,et,tt,vt,ge,kt,cr,ls,hr,pr,cs,mr,ur,vo,fr,_r,hs,gr,ca,En,ps,Tr,ha,ko,pa,Fn,wo,ms,br,yr,Te,vr,us,kr,wr,fs,xr,Mr,_s,Sr,$r,gs,Er,Fr,Ts,zr,Jr,ma,xo,ua,Ut,jr,Mo,Ir,Cr,fa,wt,Gt,bs,So,qr,ys,Nr,_a,Fe,$o,Ur,xt,Gr,zn,Zr,Wr,Eo,Rr,Vr,Pr,Mt,Xr,Jn,Ar,Br,jn,Yr,Dr,Lr,Zt,ga,St,Wt,vs,Fo,Or,ks,Hr,Ta,H,zo,Qr,ws,Kr,ei,Jo,ti,In,oi,ni,si,Rt,jo,ai,xs,ri,ii,Vt,Io,di,Co,li,Ms,ci,hi,pi,at,qo,mi,Cn,ui,qn,fi,_i,Ss,gi,Ti,Nn,No,ba,$t,Pt,$s,Uo,bi,Es,yi,ya,be,Go,vi,Fs,ki,wi,Zo,xi,Un,Mi,Si,$i,zs,Ei,Fi,Xt,Wo,zi,Js,Ji,va,Et,At,js,Ro,ji,Is,Ii,ka,B,Vo,Ci,Cs,qi,Ni,xe,Gn,Ui,Gi,Zn,Zi,Wi,Wn,Ri,Vi,Po,qs,Pi,Xi,Ai,Rn,Bi,Yi,Di,Bt,Xo,Li,ot,Oi,Ao,Ns,Hi,Qi,Ki,Us,ed,td,Bo,Gs,od,nd,sd,ad,rt,Yo,rd,Zs,id,dd,Yt,ld,it,Do,cd,Lo,hd,Vn,pd,md,ud,Dt,fd,Lt,Oo,_d,Ho,gd,Pn,Td,bd,yd,Ot,Qo,vd,Ko,kd,Xn,wd,xd,wa,Ft,Ht,Ws,en,Md,Rs,Sd,xa,ze,tn,$d,on,Ed,An,Fd,zd,Jd,nn,jd,sn,Id,Cd,qd,Ue,an,Nd,zt,Ud,Bn,Gd,Zd,Vs,Wd,Rd,Vd,Qt,Pd,Kt,Ma,Jt,eo,Ps,rn,Xd,Xs,Ad,Sa,Je,dn,Bd,ln,Yd,Yn,Dd,Ld,Od,cn,Hd,hn,Qd,Kd,el,Ge,pn,tl,jt,ol,Dn,nl,sl,As,al,rl,il,to,dl,oo,$a,It,no,Bs,mn,ll,Ys,cl,Ea,ye,un,hl,fn,pl,Ln,ml,ul,fl,_n,_l,gn,gl,Tl,bl,so,yl,Ze,Tn,vl,Ct,kl,On,wl,xl,Ds,Ml,Sl,$l,ao,El,ro,Fa,qt,io,Ls,bn,Fl,Os,zl,za,ve,yn,Jl,vn,jl,Hn,Il,Cl,ql,kn,Nl,wn,Ul,Gl,Zl,lo,Wl,We,xn,Rl,Nt,Vl,Qn,Pl,Xl,Hs,Al,Bl,Yl,co,Dl,ho,Ja;return d=new st({}),$=new st({}),O=new st({}),ko=new $n({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwU3BlZWNoMlRleHRQcm9jZXNzb3IlMkMlMjBTcGVlY2gyVGV4dEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbiUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQW1vZGVsJTIwJTNEJTIwU3BlZWNoMlRleHRGb3JDb25kaXRpb25hbEdlbmVyYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGczJ0LXNtYWxsLWxpYnJpc3BlZWNoLWFzciUyMiklMEFwcm9jZXNzb3IlMjAlM0QlMjBTcGVlY2gyVGV4dFByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZzMnQtc21hbGwtbGlicmlzcGVlY2gtYXNyJTIyKSUwQSUwQSUwQWRzJTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmhmLWludGVybmFsLXRlc3RpbmclMkZsaWJyaXNwZWVjaF9hc3JfZGVtbyUyMiUyQyUyMCUyMmNsZWFuJTIyJTJDJTIwc3BsaXQlM0QlMjJ2YWxpZGF0aW9uJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3NvcihkcyU1QjAlNUQlNUIlMjJhdWRpbyUyMiU1RCU1QiUyMmFycmF5JTIyJTVEJTJDJTIwc2FtcGxpbmdfcmF0ZSUzRGRzJTVCMCU1RCU1QiUyMmF1ZGlvJTIyJTVEJTVCJTIyc2FtcGxpbmdfcmF0ZSUyMiU1RCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBZ2VuZXJhdGVkX2lkcyUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKGlucHV0cyU1QiUyMmlucHV0X2ZlYXR1cmVzJTIyJTVEJTJDJTIwYXR0ZW50aW9uX21hc2slM0RpbnB1dHMlNUIlMjJhdHRlbnRpb25fbWFzayUyMiU1RCklMEElMEF0cmFuc2NyaXB0aW9uJTIwJTNEJTIwcHJvY2Vzc29yLmJhdGNoX2RlY29kZShnZW5lcmF0ZWRfaWRzJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUpJTBBdHJhbnNjcmlwdGlvbg==",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> Speech2TextProcessor, Speech2TextForConditionalGeneration
<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>model = Speech2TextForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/s2t-small-librispeech-asr&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = Speech2TextProcessor.from_pretrained(<span class="hljs-string">&quot;facebook/s2t-small-librispeech-asr&quot;</span>)


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

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(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">&gt;&gt;&gt; </span>generated_ids = model.generate(inputs[<span class="hljs-string">&quot;input_features&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, skip_special_tokens=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>transcription
[<span class="hljs-string">&#x27;mister quilter is the apostle of the middle classes and we are glad to welcome his gospel&#x27;</span>]`}}),xo=new $n({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwU3BlZWNoMlRleHRQcm9jZXNzb3IlMkMlMjBTcGVlY2gyVGV4dEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbiUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQW1vZGVsJTIwJTNEJTIwU3BlZWNoMlRleHRGb3JDb25kaXRpb25hbEdlbmVyYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGczJ0LW1lZGl1bS1tdXN0Yy1tdWx0aWxpbmd1YWwtc3QlMjIpJTBBcHJvY2Vzc29yJTIwJTNEJTIwU3BlZWNoMlRleHRQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGczJ0LW1lZGl1bS1tdXN0Yy1tdWx0aWxpbmd1YWwtc3QlMjIpJTBBJTBBZHMlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaGYtaW50ZXJuYWwtdGVzdGluZyUyRmxpYnJpc3BlZWNoX2Fzcl9kZW1vJTIyJTJDJTIwJTIyY2xlYW4lMjIlMkMlMjBzcGxpdCUzRCUyMnZhbGlkYXRpb24lMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGRzJTVCMCU1RCU1QiUyMmF1ZGlvJTIyJTVEJTVCJTIyYXJyYXklMjIlNUQlMkMlMjBzYW1wbGluZ19yYXRlJTNEZHMlNUIwJTVEJTVCJTIyYXVkaW8lMjIlNUQlNUIlMjJzYW1wbGluZ19yYXRlJTIyJTVEJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFnZW5lcmF0ZWRfaWRzJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoJTBBJTIwJTIwJTIwJTIwaW5wdXRzJTVCJTIyaW5wdXRfZmVhdHVyZXMlMjIlNUQlMkMlMEElMjAlMjAlMjAlMjBhdHRlbnRpb25fbWFzayUzRGlucHV0cyU1QiUyMmF0dGVudGlvbl9tYXNrJTIyJTVEJTJDJTBBJTIwJTIwJTIwJTIwZm9yY2VkX2Jvc190b2tlbl9pZCUzRHByb2Nlc3Nvci50b2tlbml6ZXIubGFuZ19jb2RlX3RvX2lkJTVCJTIyZnIlMjIlNUQlMkMlMEEpJTBBJTBBdHJhbnNsYXRpb24lMjAlM0QlMjBwcm9jZXNzb3IuYmF0Y2hfZGVjb2RlKGdlbmVyYXRlZF9pZHMlMkMlMjBza2lwX3NwZWNpYWxfdG9rZW5zJTNEVHJ1ZSklMEF0cmFuc2xhdGlvbg==",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> Speech2TextProcessor, Speech2TextForConditionalGeneration
<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>model = Speech2TextForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/s2t-medium-mustc-multilingual-st&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = Speech2TextProcessor.from_pretrained(<span class="hljs-string">&quot;facebook/s2t-medium-mustc-multilingual-st&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(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">&gt;&gt;&gt; </span>generated_ids = model.generate(
<span class="hljs-meta">... </span>    inputs[<span class="hljs-string">&quot;input_features&quot;</span>],
<span class="hljs-meta">... </span>    attention_mask=inputs[<span class="hljs-string">&quot;attention_mask&quot;</span>],
<span class="hljs-meta">... </span>    forced_bos_token_id=processor.tokenizer.lang_code_to_id[<span class="hljs-string">&quot;fr&quot;</span>],
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>translation = processor.batch_decode(generated_ids, skip_special_tokens=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>translation
[<span class="hljs-string">&quot;(Vid\xE9o) Si M. Kilder est l&#x27;apossible des classes moyennes, et nous sommes heureux d&#x27;\xEAtre accueillis dans son \xE9vangile.&quot;</span>]`}}),So=new st({}),$o=new V({props:{name:"class transformers.Speech2TextConfig",anchor:"transformers.Speech2TextConfig",parameters:[{name:"vocab_size",val:" = 10000"},{name:"encoder_layers",val:" = 12"},{name:"encoder_ffn_dim",val:" = 2048"},{name:"encoder_attention_heads",val:" = 4"},{name:"decoder_layers",val:" = 6"},{name:"decoder_ffn_dim",val:" = 2048"},{name:"decoder_attention_heads",val:" = 4"},{name:"encoder_layerdrop",val:" = 0.0"},{name:"decoder_layerdrop",val:" = 0.0"},{name:"use_cache",val:" = True"},{name:"is_encoder_decoder",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_source_positions",val:" = 6000"},{name:"max_target_positions",val:" = 1024"},{name:"num_conv_layers",val:" = 2"},{name:"conv_kernel_sizes",val:" = (5, 5)"},{name:"conv_channels",val:" = 1024"},{name:"input_feat_per_channel",val:" = 80"},{name:"input_channels",val:" = 1"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Speech2TextConfig.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/main/en/model_doc/speech_to_text#transformers.Speech2TextModel">Speech2TextModel</a>`,name:"vocab_size"},{anchor:"transformers.Speech2TextConfig.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.Speech2TextConfig.encoder_layers",description:`<strong>encoder_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of encoder layers.`,name:"encoder_layers"},{anchor:"transformers.Speech2TextConfig.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.Speech2TextConfig.encoder_attention_heads",description:`<strong>encoder_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"encoder_attention_heads"},{anchor:"transformers.Speech2TextConfig.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.Speech2TextConfig.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.Speech2TextConfig.encoder_ffn_dim",description:`<strong>encoder_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:"encoder_ffn_dim"},{anchor:"transformers.Speech2TextConfig.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 encoder and 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.Speech2TextConfig.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, encoder, and pooler.`,name:"dropout"},{anchor:"transformers.Speech2TextConfig.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.Speech2TextConfig.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.Speech2TextConfig.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.`,name:"init_std"},{anchor:"transformers.Speech2TextConfig.encoder_layerdrop",description:`<strong>encoder_layerdrop</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The LayerDrop probability for the encoder. See the [LayerDrop paper](see <a href="https://arxiv.org/abs/1909.11556" rel="nofollow">https://arxiv.org/abs/1909.11556</a>)
for more details.`,name:"encoder_layerdrop"},{anchor:"transformers.Speech2TextConfig.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.Speech2TextConfig.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.Speech2TextConfig.max_source_positions",description:`<strong>max_source_positions</strong> (<code>int</code>, <em>optional</em>, defaults to 6000) &#x2014;
The maximum sequence length of log-mel filter-bank features that this model might ever be used with.`,name:"max_source_positions"},{anchor:"transformers.Speech2TextConfig.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"},{anchor:"transformers.Speech2TextConfig.num_conv_layers",description:`<strong>num_conv_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
Number of 1D convolutional layers in the conv module.`,name:"num_conv_layers"},{anchor:"transformers.Speech2TextConfig.conv_kernel_sizes",description:`<strong>conv_kernel_sizes</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to <code>(5, 5)</code>) &#x2014;
A tuple of integers defining the kernel size of each 1D convolutional layer in the conv module. The length
of <code>conv_kernel_sizes</code> has to match <code>num_conv_layers</code>.`,name:"conv_kernel_sizes"},{anchor:"transformers.Speech2TextConfig.conv_channels",description:`<strong>conv_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
An integer defining the number of output channels of each convolution layers except the final one in the
conv module.`,name:"conv_channels"},{anchor:"transformers.Speech2TextConfig.input_feat_per_channel",description:`<strong>input_feat_per_channel</strong> (<code>int</code>, <em>optional</em>, defaults to 80) &#x2014;
An integer specifying the size of feature vector. This is also the dimensions of log-mel filter-bank
features.`,name:"input_feat_per_channel"},{anchor:"transformers.Speech2TextConfig.input_channels",description:`<strong>input_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
An integer specifying number of input channels of the input feature vector.`,name:"input_channels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/speech_to_text/configuration_speech_to_text.py#L31"}}),Zt=new da({props:{anchor:"transformers.Speech2TextConfig.example",$$slots:{default:[Ah]},$$scope:{ctx:j}}}),Fo=new st({}),zo=new V({props:{name:"class transformers.Speech2TextTokenizer",anchor:"transformers.Speech2TextTokenizer",parameters:[{name:"vocab_file",val:""},{name:"spm_file",val:""},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"pad_token",val:" = '<pad>'"},{name:"unk_token",val:" = '<unk>'"},{name:"do_upper_case",val:" = False"},{name:"do_lower_case",val:" = False"},{name:"tgt_lang",val:" = None"},{name:"lang_codes",val:" = None"},{name:"sp_model_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Speech2TextTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
File containing the vocabulary.`,name:"vocab_file"},{anchor:"transformers.Speech2TextTokenizer.spm_file",description:`<strong>spm_file</strong> (<code>str</code>) &#x2014;
Path to the <a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a> model file`,name:"spm_file"},{anchor:"transformers.Speech2TextTokenizer.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.Speech2TextTokenizer.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.Speech2TextTokenizer.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.Speech2TextTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.Speech2TextTokenizer.do_upper_case",description:`<strong>do_upper_case</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to uppercase the output when decoding.`,name:"do_upper_case"},{anchor:"transformers.Speech2TextTokenizer.do_lower_case",description:`<strong>do_lower_case</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to lowercase the input when tokenizing.`,name:"do_lower_case"},{anchor:"transformers.Speech2TextTokenizer.tgt_lang",description:`<strong>tgt_lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
A string representing the target language.`,name:"tgt_lang"},{anchor:"transformers.Speech2TextTokenizer.sp_model_kwargs",description:`<strong>sp_model_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Will be passed to the <code>SentencePieceProcessor.__init__()</code> method. The <a href="https://github.com/google/sentencepiece/tree/master/python" rel="nofollow">Python wrapper for
SentencePiece</a> can be used, among other things,
to set:</p>
<ul>
<li>
<p><code>enable_sampling</code>: Enable subword regularization.</p>
</li>
<li>
<p><code>nbest_size</code>: Sampling parameters for unigram. Invalid for BPE-Dropout.</p>
<ul>
<li><code>nbest_size = {0,1}</code>: No sampling is performed.</li>
<li><code>nbest_size &gt; 1</code>: samples from the nbest_size results.</li>
<li><code>nbest_size &lt; 0</code>: assuming that nbest_size is infinite and samples from the all hypothesis (lattice)
using forward-filtering-and-backward-sampling algorithm.</li>
</ul>
</li>
<li>
<p><code>alpha</code>: Smoothing parameter for unigram sampling, and dropout probability of merge operations for
BPE-dropout.</p>
</li>
</ul>
<p>**kwargs &#x2014;
Additional keyword arguments passed along to <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>`,name:"sp_model_kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/speech_to_text/tokenization_speech_to_text.py#L59"}}),jo=new V({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.Speech2TextTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:""},{name:"token_ids_1",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/speech_to_text/tokenization_speech_to_text.py#L207"}}),Io=new V({props:{name:"get_special_tokens_mask",anchor:"transformers.Speech2TextTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.Speech2TextTokenizer.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.Speech2TextTokenizer.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"},{anchor:"transformers.Speech2TextTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/speech_to_text/tokenization_speech_to_text.py#L214",returnDescription:`
<p>A list of integers in the range [0, 1]: 1 for a special token, 0 for a sequence token.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),qo=new V({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.Speech2TextTokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.Speech2TextTokenizer.create_token_type_ids_from_sequences.token_ids_0",description:"<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014; The first tokenized sequence.",name:"token_ids_0"},{anchor:"transformers.Speech2TextTokenizer.create_token_type_ids_from_sequences.token_ids_1",description:"<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014; The second tokenized sequence.",name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils_base.py#L3101",returnDescription:`
<p>The token type ids.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),No=new V({props:{name:"save_vocabulary",anchor:"transformers.Speech2TextTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/speech_to_text/tokenization_speech_to_text.py#L263"}}),Uo=new st({}),Go=new V({props:{name:"class transformers.Speech2TextFeatureExtractor",anchor:"transformers.Speech2TextFeatureExtractor",parameters:[{name:"feature_size",val:" = 80"},{name:"sampling_rate",val:" = 16000"},{name:"num_mel_bins",val:" = 80"},{name:"padding_value",val:" = 0.0"},{name:"do_ceptral_normalize",val:" = True"},{name:"normalize_means",val:" = True"},{name:"normalize_vars",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Speech2TextFeatureExtractor.feature_size",description:`<strong>feature_size</strong> (<code>int</code>, defaults to 80) &#x2014;
The feature dimension of the extracted features.`,name:"feature_size"},{anchor:"transformers.Speech2TextFeatureExtractor.sampling_rate",description:`<strong>sampling_rate</strong> (<code>int</code>, defaults to 16000) &#x2014;
The sampling rate at which the audio files should be digitalized expressed in hertz (Hz).`,name:"sampling_rate"},{anchor:"transformers.Speech2TextFeatureExtractor.num_mel_bins",description:`<strong>num_mel_bins</strong> (<code>int</code>, defaults to 80) &#x2014;
Number of Mel-frequency bins.`,name:"num_mel_bins"},{anchor:"transformers.Speech2TextFeatureExtractor.padding_value",description:`<strong>padding_value</strong> (<code>float</code>, defaults to 0.0) &#x2014;
The value that is used to fill the padding vectors.`,name:"padding_value"},{anchor:"transformers.Speech2TextFeatureExtractor.do_ceptral_normalize",description:`<strong>do_ceptral_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to apply utterance-level cepstral mean and variance normalization to extracted features.`,name:"do_ceptral_normalize"},{anchor:"transformers.Speech2TextFeatureExtractor.normalize_means",description:`<strong>normalize_means</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to zero-mean normalize the extracted features.`,name:"normalize_means"},{anchor:"transformers.Speech2TextFeatureExtractor.normalize_vars",description:`<strong>normalize_vars</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to unit-variance normalize the extracted features.`,name:"normalize_vars"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/speech_to_text/feature_extraction_speech_to_text.py#L33"}}),Wo=new V({props:{name:"__call__",anchor:"transformers.Speech2TextFeatureExtractor.__call__",parameters:[{name:"raw_speech",val:": typing.Union[numpy.ndarray, typing.List[float], typing.List[numpy.ndarray], typing.List[typing.List[float]]]"},{name:"padding",val:": typing.Union[bool, str, transformers.utils.generic.PaddingStrategy] = False"},{name:"max_length",val:": typing.Optional[int] = None"},{name:"truncation",val:": bool = False"},{name:"pad_to_multiple_of",val:": typing.Optional[int] = None"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"sampling_rate",val:": typing.Optional[int] = None"},{name:"return_attention_mask",val:": typing.Optional[bool] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Speech2TextFeatureExtractor.__call__.raw_speech",description:`<strong>raw_speech</strong> (<code>np.ndarray</code>, <code>List[float]</code>, <code>List[np.ndarray]</code>, <code>List[List[float]]</code>) &#x2014;
The sequence or batch of sequences to be padded. Each sequence can be a numpy array, a list of float
values, a list of numpy arrays or a list of list of float values. Must be mono channel audio, not
stereo, i.e. single float per timestep.`,name:"raw_speech"},{anchor:"transformers.Speech2TextFeatureExtractor.__call__.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/main/en/internal/file_utils#transformers.utils.PaddingStrategy">PaddingStrategy</a>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Select a strategy to pad the returned sequences (according to the model&#x2019;s padding side and padding
index) among:</p>
<ul>
<li><code>True</code> or <code>&apos;longest&apos;</code>: Pad to the longest sequence in the batch (or no padding if only a single
sequence if provided).</li>
<li><code>&apos;max_length&apos;</code>: Pad to a maximum length specified with the argument <code>max_length</code> or to the maximum
acceptable input length for the model if that argument is not provided.</li>
<li><code>False</code> or <code>&apos;do_not_pad&apos;</code> (default): No padding (i.e., can output a batch with sequences of different
lengths).</li>
</ul>`,name:"padding"},{anchor:"transformers.Speech2TextFeatureExtractor.__call__.max_length",description:`<strong>max_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Maximum length of the returned list and optionally padding length (see above).`,name:"max_length"},{anchor:"transformers.Speech2TextFeatureExtractor.__call__.truncation",description:`<strong>truncation</strong> (<code>bool</code>) &#x2014;
Activates truncation to cut input sequences longer than <em>max_length</em> to <em>max_length</em>.`,name:"truncation"},{anchor:"transformers.Speech2TextFeatureExtractor.__call__.pad_to_multiple_of",description:`<strong>pad_to_multiple_of</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If set will pad the sequence to a multiple of the provided value.</p>
<p>This is especially useful to enable the use of Tensor Cores on NVIDIA hardware with compute capability
<code>&gt;= 7.5</code> (Volta), or on TPUs which benefit from having sequence lengths be a multiple of 128.`,name:"pad_to_multiple_of"},{anchor:"transformers.Speech2TextFeatureExtractor.__call__.return_attention_mask",description:`<strong>return_attention_mask</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to return the attention mask. If left to the default, will return the attention mask according
to the specific feature_extractor&#x2019;s default.</p>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>For Speech2TextTransformer models, <code>attention_mask</code> should always be passed for batched inference, to
avoid subtle bugs.</p>

					</div>`,name:"return_attention_mask"},{anchor:"transformers.Speech2TextFeatureExtractor.__call__.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <a href="/docs/transformers/main/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>) &#x2014;
If set, will return tensors instead of list of python integers. Acceptable values are:</p>
<ul>
<li><code>&apos;tf&apos;</code>: Return TensorFlow <code>tf.constant</code> objects.</li>
<li><code>&apos;pt&apos;</code>: Return PyTorch <code>torch.Tensor</code> objects.</li>
<li><code>&apos;np&apos;</code>: Return Numpy <code>np.ndarray</code> objects.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.Speech2TextFeatureExtractor.__call__.sampling_rate",description:`<strong>sampling_rate</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The sampling rate at which the <code>raw_speech</code> input was sampled. It is strongly recommended to pass
<code>sampling_rate</code> at the forward call to prevent silent errors.`,name:"sampling_rate"},{anchor:"transformers.Speech2TextFeatureExtractor.__call__.padding_value",description:`<strong>padding_value</strong> (<code>float</code>, defaults to 0.0) &#x2014;
The value that is used to fill the padding values / vectors.`,name:"padding_value"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/speech_to_text/feature_extraction_speech_to_text.py#L126"}}),Ro=new st({}),Vo=new V({props:{name:"class transformers.Speech2TextProcessor",anchor:"transformers.Speech2TextProcessor",parameters:[{name:"feature_extractor",val:""},{name:"tokenizer",val:""}],parametersDescription:[{anchor:"transformers.Speech2TextProcessor.feature_extractor",description:`<strong>feature_extractor</strong> (<code>Speech2TextFeatureExtractor</code>) &#x2014;
An instance of <a href="/docs/transformers/main/en/model_doc/speech_to_text#transformers.Speech2TextFeatureExtractor">Speech2TextFeatureExtractor</a>. The feature extractor is a required input.`,name:"feature_extractor"},{anchor:"transformers.Speech2TextProcessor.tokenizer",description:`<strong>tokenizer</strong> (<code>Speech2TextTokenizer</code>) &#x2014;
An instance of <a href="/docs/transformers/main/en/model_doc/speech_to_text#transformers.Speech2TextTokenizer">Speech2TextTokenizer</a>. The tokenizer is a required input.`,name:"tokenizer"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/speech_to_text/processing_speech_to_text.py#L24"}}),Xo=new V({props:{name:"__call__",anchor:"transformers.Speech2TextProcessor.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/speech_to_text/processing_speech_to_text.py#L47"}}),Yo=new V({props:{name:"from_pretrained",anchor:"transformers.Speech2TextProcessor.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.Speech2TextProcessor.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/main/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/main/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/main/src/transformers/processing_utils.py#L167"}}),Yt=new yo({props:{$$slots:{default:[Bh]},$$scope:{ctx:j}}}),Do=new V({props:{name:"save_pretrained",anchor:"transformers.Speech2TextProcessor.save_pretrained",parameters:[{name:"save_directory",val:""},{name:"push_to_hub",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Speech2TextProcessor.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.Speech2TextProcessor.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.Speech2TextProcessor.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/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.push_to_hub">push_to_hub()</a> method.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/processing_utils.py#L93"}}),Dt=new yo({props:{$$slots:{default:[Yh]},$$scope:{ctx:j}}}),Oo=new V({props:{name:"batch_decode",anchor:"transformers.Speech2TextProcessor.batch_decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/speech_to_text/processing_speech_to_text.py#L86"}}),Qo=new V({props:{name:"decode",anchor:"transformers.Speech2TextProcessor.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/speech_to_text/processing_speech_to_text.py#L93"}}),en=new st({}),tn=new V({props:{name:"class transformers.Speech2TextModel",anchor:"transformers.Speech2TextModel",parameters:[{name:"config",val:": Speech2TextConfig"}],parametersDescription:[{anchor:"transformers.Speech2TextModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/speech_to_text#transformers.Speech2TextConfig">Speech2TextConfig</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/main/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/main/src/transformers/models/speech_to_text/modeling_speech_to_text.py#L1136"}}),an=new V({props:{name:"forward",anchor:"transformers.Speech2TextModel.forward",parameters:[{name:"input_features",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_outputs",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"decoder_inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.Speech2TextModel.forward.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, feature_size)</code>) &#x2014;
Float values of fbank features extracted from the raw speech waveform. Raw speech waveform can be obtained
by loading a <code>.flac</code> or <code>.wav</code> audio file into an array of type <code>List[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em>
via the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_features</code>, the
<a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoFeatureExtractor">AutoFeatureExtractor</a> should be used for extracting the fbank features, padding and conversion into a
tensor of type <code>torch.FloatTensor</code>. See <a href="/docs/transformers/main/en/model_doc/speech_to_text#transformers.Speech2TextFeatureExtractor.__call__"><strong>call</strong>()</a>`,name:"input_features"},{anchor:"transformers.Speech2TextModel.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 convolution and attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.Speech2TextModel.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <code>SpeechToTextTokenizer</code>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>SpeechToText uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).`,name:"decoder_input_ids"},{anchor:"transformers.Speech2TextModel.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.</p>
<p>If you want to change padding behavior, you should read
<code>modeling_speech_to_text._prepare_decoder_attention_mask</code> and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the
paper</a> for more information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.Speech2TextModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.Speech2TextModel.forward.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.Speech2TextModel.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.Speech2TextModel.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.Speech2TextModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_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.Speech2TextModel.forward.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.`,name:"decoder_inputs_embeds"},{anchor:"transformers.Speech2TextModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.Speech2TextModel.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.Speech2TextModel.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.Speech2TextModel.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/speech_to_text/modeling_speech_to_text.py#L1158",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/speech_to_text#transformers.Speech2TextConfig"
>Speech2TextConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Language modeling loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Qt=new yo({props:{$$slots:{default:[Dh]},$$scope:{ctx:j}}}),Kt=new da({props:{anchor:"transformers.Speech2TextModel.forward.example",$$slots:{default:[Lh]},$$scope:{ctx:j}}}),rn=new st({}),dn=new V({props:{name:"class transformers.Speech2TextForConditionalGeneration",anchor:"transformers.Speech2TextForConditionalGeneration",parameters:[{name:"config",val:": Speech2TextConfig"}],parametersDescription:[{anchor:"transformers.Speech2TextForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/speech_to_text#transformers.Speech2TextConfig">Speech2TextConfig</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/main/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/main/src/transformers/models/speech_to_text/modeling_speech_to_text.py#L1267"}}),pn=new V({props:{name:"forward",anchor:"transformers.Speech2TextForConditionalGeneration.forward",parameters:[{name:"input_features",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_outputs",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"decoder_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.Speech2TextForConditionalGeneration.forward.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, feature_size)</code>) &#x2014;
Float values of fbank features extracted from the raw speech waveform. Raw speech waveform can be obtained
by loading a <code>.flac</code> or <code>.wav</code> audio file into an array of type <code>List[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em>
via the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_features</code>, the
<a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoFeatureExtractor">AutoFeatureExtractor</a> should be used for extracting the fbank features, padding and conversion into a
tensor of type <code>torch.FloatTensor</code>. See <a href="/docs/transformers/main/en/model_doc/speech_to_text#transformers.Speech2TextFeatureExtractor.__call__"><strong>call</strong>()</a>`,name:"input_features"},{anchor:"transformers.Speech2TextForConditionalGeneration.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 convolution and attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.Speech2TextForConditionalGeneration.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <code>SpeechToTextTokenizer</code>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>SpeechToText uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).`,name:"decoder_input_ids"},{anchor:"transformers.Speech2TextForConditionalGeneration.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.</p>
<p>If you want to change padding behavior, you should read
<code>modeling_speech_to_text._prepare_decoder_attention_mask</code> and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the
paper</a> for more information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.Speech2TextForConditionalGeneration.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.Speech2TextForConditionalGeneration.forward.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.Speech2TextForConditionalGeneration.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.Speech2TextForConditionalGeneration.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.Speech2TextForConditionalGeneration.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_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.Speech2TextForConditionalGeneration.forward.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.`,name:"decoder_inputs_embeds"},{anchor:"transformers.Speech2TextForConditionalGeneration.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.Speech2TextForConditionalGeneration.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.Speech2TextForConditionalGeneration.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.Speech2TextForConditionalGeneration.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.Speech2TextForConditionalGeneration.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the language modeling loss. Indices should either be in <code>[0, ..., config.vocab_size]</code>
or -100 (see <code>input_ids</code> docstring). Tokens with indices set to <code>-100</code> are ignored (masked), the loss is
only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/speech_to_text/modeling_speech_to_text.py#L1291",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/speech_to_text#transformers.Speech2TextConfig"
>Speech2TextConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Language modeling loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),to=new yo({props:{$$slots:{default:[Oh]},$$scope:{ctx:j}}}),oo=new da({props:{anchor:"transformers.Speech2TextForConditionalGeneration.forward.example",$$slots:{default:[Hh]},$$scope:{ctx:j}}}),mn=new st({}),un=new V({props:{name:"class transformers.TFSpeech2TextModel",anchor:"transformers.TFSpeech2TextModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFSpeech2TextModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/speech_to_text#transformers.Speech2TextConfig">Speech2TextConfig</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/main/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/speech_to_text/modeling_tf_speech_to_text.py#L1205"}}),so=new yo({props:{$$slots:{default:[Qh]},$$scope:{ctx:j}}}),Tn=new V({props:{name:"call",anchor:"transformers.TFSpeech2TextModel.call",parameters:[{name:"input_features",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"decoder_input_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"decoder_attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"decoder_head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"cross_attn_head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"encoder_outputs",val:": np.ndarray | tf.Tensor | None = None"},{name:"past_key_values",val:": Optional[Tuple[Tuple[Union[np.ndarray, tf.Tensor]]]] = None"},{name:"decoder_inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"use_cache",val:": Optional[bool] = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFSpeech2TextModel.call.input_features",description:`<strong>input_features</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, feature_size)</code>) &#x2014;
Float values of fbank features extracted from the raw speech waveform. Raw speech waveform can be obtained
by loading a <code>.flac</code> or <code>.wav</code> audio file into an array of type <code>List[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em>
via the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_features</code>, the
<a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoFeatureExtractor">AutoFeatureExtractor</a> should be used for extracting the fbank features, padding and conversion into a
tensor of floats. See <a href="/docs/transformers/main/en/model_doc/speech_to_text#transformers.Speech2TextFeatureExtractor.__call__"><strong>call</strong>()</a>`,name:"input_features"},{anchor:"transformers.TFSpeech2TextModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>tf.Tensor</code> of shape <code>({0})</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.TFSpeech2TextModel.call.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/speech_to_text#transformers.Speech2TextTokenizer">Speech2TextTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>SpeechToText uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.TFSpeech2TextModel.call.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
will be made by default and ignore pad tokens. It is not recommended to set this for most use cases.`,name:"decoder_attention_mask"},{anchor:"transformers.TFSpeech2TextModel.call.head_mask",description:`<strong>head_mask</strong> (<code>tf.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFSpeech2TextModel.call.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>tf.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.TFSpeech2TextModel.call.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>tf.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.TFSpeech2TextModel.call.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tf.FloatTensor</code>, <em>optional</em>) &#x2014;
hidden states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.
of shape <code>(batch_size, sequence_length, hidden_size)</code> is a sequence of`,name:"encoder_outputs"},{anchor:"transformers.TFSpeech2TextModel.call.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[tf.Tensor]]</code> of length <code>config.n_layers</code>) &#x2014;
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
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.TFSpeech2TextModel.call.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>tf.FloatTensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.`,name:"decoder_inputs_embeds"},{anchor:"transformers.TFSpeech2TextModel.call.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.TFSpeech2TextModel.call.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. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFSpeech2TextModel.call.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFSpeech2TextModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFSpeech2TextModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/speech_to_text/modeling_tf_speech_to_text.py#L1217",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqModelOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqModelOutput</a> or a tuple of <code>tf.Tensor</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/main/en/model_doc/speech_to_text#transformers.Speech2TextConfig"
>Speech2TextConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the decoder of the model.</p>
<p>If <code>past_key_values</code> is used only the last hidden-state of the sequences of shape <code>(batch_size, 1, hidden_size)</code> is output.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</code>).</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) of the decoder that can be
used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqModelOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ao=new yo({props:{$$slots:{default:[Kh]},$$scope:{ctx:j}}}),ro=new da({props:{anchor:"transformers.TFSpeech2TextModel.call.example",$$slots:{default:[ep]},$$scope:{ctx:j}}}),bn=new st({}),yn=new V({props:{name:"class transformers.TFSpeech2TextForConditionalGeneration",anchor:"transformers.TFSpeech2TextForConditionalGeneration",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFSpeech2TextForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/speech_to_text#transformers.Speech2TextConfig">Speech2TextConfig</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/main/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/speech_to_text/modeling_tf_speech_to_text.py#L1287"}}),lo=new yo({props:{$$slots:{default:[tp]},$$scope:{ctx:j}}}),xn=new V({props:{name:"call",anchor:"transformers.TFSpeech2TextForConditionalGeneration.call",parameters:[{name:"input_features",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"decoder_input_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"decoder_attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"decoder_head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"cross_attn_head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"encoder_outputs",val:": np.ndarray | tf.Tensor | None = None"},{name:"past_key_values",val:": Optional[Tuple[Tuple[Union[np.ndarray, tf.Tensor]]]] = None"},{name:"decoder_inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = None"},{name:"use_cache",val:": Optional[bool] = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": Optional[bool] = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFSpeech2TextForConditionalGeneration.call.input_features",description:`<strong>input_features</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, feature_size)</code>) &#x2014;
Float values of fbank features extracted from the raw speech waveform. Raw speech waveform can be obtained
by loading a <code>.flac</code> or <code>.wav</code> audio file into an array of type <code>List[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em>
via the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_features</code>, the
<a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoFeatureExtractor">AutoFeatureExtractor</a> should be used for extracting the fbank features, padding and conversion into a
tensor of floats. See <a href="/docs/transformers/main/en/model_doc/speech_to_text#transformers.Speech2TextFeatureExtractor.__call__"><strong>call</strong>()</a>`,name:"input_features"},{anchor:"transformers.TFSpeech2TextForConditionalGeneration.call.attention_mask",description:`<strong>attention_mask</strong> (<code>tf.Tensor</code> of shape <code>({0})</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.TFSpeech2TextForConditionalGeneration.call.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/speech_to_text#transformers.Speech2TextTokenizer">Speech2TextTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>SpeechToText uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.TFSpeech2TextForConditionalGeneration.call.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
will be made by default and ignore pad tokens. It is not recommended to set this for most use cases.`,name:"decoder_attention_mask"},{anchor:"transformers.TFSpeech2TextForConditionalGeneration.call.head_mask",description:`<strong>head_mask</strong> (<code>tf.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFSpeech2TextForConditionalGeneration.call.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>tf.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.TFSpeech2TextForConditionalGeneration.call.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>tf.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.TFSpeech2TextForConditionalGeneration.call.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tf.FloatTensor</code>, <em>optional</em>) &#x2014;
hidden states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.
of shape <code>(batch_size, sequence_length, hidden_size)</code> is a sequence of`,name:"encoder_outputs"},{anchor:"transformers.TFSpeech2TextForConditionalGeneration.call.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[tf.Tensor]]</code> of length <code>config.n_layers</code>) &#x2014;
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
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.TFSpeech2TextForConditionalGeneration.call.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>tf.FloatTensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.`,name:"decoder_inputs_embeds"},{anchor:"transformers.TFSpeech2TextForConditionalGeneration.call.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.TFSpeech2TextForConditionalGeneration.call.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. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFSpeech2TextForConditionalGeneration.call.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFSpeech2TextForConditionalGeneration.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFSpeech2TextForConditionalGeneration.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFSpeech2TextForConditionalGeneration.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/speech_to_text/modeling_tf_speech_to_text.py#L1311",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqLMOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqLMOutput</a> or a tuple of <code>tf.Tensor</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/main/en/model_doc/speech_to_text#transformers.Speech2TextConfig"
>Speech2TextConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of non-masked labels, returned when <code>labels</code> is provided) \u2014 Language modeling loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</code>).</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) of the decoder that can be
used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqLMOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),co=new yo({props:{$$slots:{default:[op]},$$scope:{ctx:j}}}),ho=new da({props:{anchor:"transformers.TFSpeech2TextForConditionalGeneration.call.example",$$slots:{default:[np]},$$scope:{ctx:j}}}),{c(){c=a("meta"),y=h(),_=a("h1"),g=a("a"),b=a("span"),v(d.$$.fragment),m=h(),E=a("span"),Z=n("Speech2Text"),N=h(),I=a("h2"),U=a("a"),C=a("span"),v($.$$.fragment),we=h(),Y=a("span"),Ve=n("Overview"),Ie=h(),q=a("p"),Pe=n("The Speech2Text model was proposed in "),se=a("a"),ae=n("fairseq S2T: Fast Speech-to-Text Modeling with fairseq"),Xe=n(` by Changhan Wang, Yun Tang, Xutai Ma, Anne Wu, Dmytro Okhonko, Juan Pino. It\u2019s a
transformer-based seq2seq (encoder-decoder) model designed for end-to-end Automatic Speech Recognition (ASR) and Speech
Translation (ST). It uses a convolutional downsampler to reduce the length of speech inputs by 3/4th before they are
fed into the encoder. The model is trained with standard autoregressive cross-entropy loss and generates the
transcripts/translations autoregressively. Speech2Text has been fine-tuned on several datasets for ASR and ST:
`),re=a("a"),ie=n("LibriSpeech"),Ae=n(", "),de=a("a"),le=n("CoVoST 2"),Be=n(", "),ce=a("a"),Se=n("MuST-C"),G=n("."),W=h(),Q=a("p"),he=n("This model was contributed by "),pe=a("a"),Ye=n("valhalla"),me=n(". The original code can be found "),ue=a("a"),De=n("here"),P=n("."),Ce=h(),X=a("h2"),te=a("a"),$e=a("span"),v(O.$$.fragment),Le=h(),Ee=a("span"),ee=n("Inference"),qe=h(),D=a("p"),Oe=n(`Speech2Text is a speech model that accepts a float tensor of log-mel filter-bank features extracted from the speech
signal. It\u2019s a transformer-based seq2seq model, so the transcripts/translations are generated autoregressively. The
`),fe=a("code"),A=n("generate()"),He=n(" method can be used for inference."),L=h(),R=a("p"),Qe=n("The "),T=a("a"),F=n("Speech2TextFeatureExtractor"),pt=n(` class is responsible for extracting the log-mel filter-bank
features. The `),oe=a("a"),mt=n("Speech2TextProcessor"),ut=n(" wraps "),z=a("a"),ft=n("Speech2TextFeatureExtractor"),_t=n(` and
`),Ne=a("a"),gt=n("Speech2TextTokenizer"),Tt=n(` into a single instance to both extract the input features and decode the
predicted token ids.`),K=h(),J=a("p"),bt=n("The feature extractor depends on "),Ke=a("code"),_e=n("torchaudio"),yt=n(" and the tokenizer depends on "),et=a("code"),tt=n("sentencepiece"),vt=n(` so be sure to
install those packages before running the examples. You could either install those as extra speech dependencies with
`),ge=a("code"),kt=n('pip install transformers"[speech, sentencepiece]"'),cr=n(" or install the packages separately with "),ls=a("code"),hr=n("pip install torchaudio sentencepiece"),pr=n(". Also "),cs=a("code"),mr=n("torchaudio"),ur=n(" requires the development version of the "),vo=a("a"),fr=n("libsndfile"),_r=n(` package which can be installed via a system package manager. On Ubuntu it can
be installed as follows: `),hs=a("code"),gr=n("apt install libsndfile1-dev"),ca=h(),En=a("ul"),ps=a("li"),Tr=n("ASR and Speech Translation"),ha=h(),v(ko.$$.fragment),pa=h(),Fn=a("ul"),wo=a("li"),ms=a("p"),br=n("Multilingual speech translation"),yr=h(),Te=a("p"),vr=n("For multilingual speech translation models, "),us=a("code"),kr=n("eos_token_id"),wr=n(" is used as the "),fs=a("code"),xr=n("decoder_start_token_id"),Mr=n(` and
the target language id is forced as the first generated token. To force the target language id as the first
generated token, pass the `),_s=a("code"),Sr=n("forced_bos_token_id"),$r=n(" parameter to the "),gs=a("code"),Er=n("generate()"),Fr=n(` method. The following
example shows how to transate English speech to French text using the `),Ts=a("em"),zr=n("facebook/s2t-medium-mustc-multilingual-st"),Jr=n(`
checkpoint.`),ma=h(),v(xo.$$.fragment),ua=h(),Ut=a("p"),jr=n("See the "),Mo=a("a"),Ir=n("model hub"),Cr=n(" to look for Speech2Text checkpoints."),fa=h(),wt=a("h2"),Gt=a("a"),bs=a("span"),v(So.$$.fragment),qr=h(),ys=a("span"),Nr=n("Speech2TextConfig"),_a=h(),Fe=a("div"),v($o.$$.fragment),Ur=h(),xt=a("p"),Gr=n("This is the configuration class to store the configuration of a "),zn=a("a"),Zr=n("Speech2TextModel"),Wr=n(`. It is used to instantiate an
Speech2Text 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 Speech2Text
`),Eo=a("a"),Rr=n("facebook/s2t-small-librispeech-asr"),Vr=n(" architecture."),Pr=h(),Mt=a("p"),Xr=n("Configuration objects inherit from "),Jn=a("a"),Ar=n("PretrainedConfig"),Br=n(` and can be used to control the model outputs. Read the
documentation from `),jn=a("a"),Yr=n("PretrainedConfig"),Dr=n(" for more information."),Lr=h(),v(Zt.$$.fragment),ga=h(),St=a("h2"),Wt=a("a"),vs=a("span"),v(Fo.$$.fragment),Or=h(),ks=a("span"),Hr=n("Speech2TextTokenizer"),Ta=h(),H=a("div"),v(zo.$$.fragment),Qr=h(),ws=a("p"),Kr=n("Construct an Speech2Text tokenizer."),ei=h(),Jo=a("p"),ti=n("This tokenizer inherits from "),In=a("a"),oi=n("PreTrainedTokenizer"),ni=n(` which contains some of the main methods. Users should refer to
the superclass for more information regarding such methods.`),si=h(),Rt=a("div"),v(jo.$$.fragment),ai=h(),xs=a("p"),ri=n("Build model inputs from a sequence by appending eos_token_id."),ii=h(),Vt=a("div"),v(Io.$$.fragment),di=h(),Co=a("p"),li=n(`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Ms=a("code"),ci=n("prepare_for_model"),hi=n(" method."),pi=h(),at=a("div"),v(qo.$$.fragment),mi=h(),Cn=a("p"),ui=n("Create the token type IDs corresponding to the sequences passed. "),qn=a("a"),fi=n(`What are token type
IDs?`),_i=h(),Ss=a("p"),gi=n("Should be overridden in a subclass if the model has a special way of building those."),Ti=h(),Nn=a("div"),v(No.$$.fragment),ba=h(),$t=a("h2"),Pt=a("a"),$s=a("span"),v(Uo.$$.fragment),bi=h(),Es=a("span"),yi=n("Speech2TextFeatureExtractor"),ya=h(),be=a("div"),v(Go.$$.fragment),vi=h(),Fs=a("p"),ki=n("Constructs a Speech2Text feature extractor."),wi=h(),Zo=a("p"),xi=n("This feature extractor inherits from "),Un=a("a"),Mi=n("Speech2TextFeatureExtractor"),Si=n(` which contains most of the main methods. Users
should refer to this superclass for more information regarding those methods.`),$i=h(),zs=a("p"),Ei=n(`This class extracts mel-filter bank features from raw speech using TorchAudio and applies utterance-level cepstral
mean and variance normalization to the extracted features.`),Fi=h(),Xt=a("div"),v(Wo.$$.fragment),zi=h(),Js=a("p"),Ji=n("Main method to featurize and prepare for the model one or several sequence(s)."),va=h(),Et=a("h2"),At=a("a"),js=a("span"),v(Ro.$$.fragment),ji=h(),Is=a("span"),Ii=n("Speech2TextProcessor"),ka=h(),B=a("div"),v(Vo.$$.fragment),Ci=h(),Cs=a("p"),qi=n(`Constructs a Speech2Text processor which wraps a Speech2Text feature extractor and a Speech2Text tokenizer into a
single processor.`),Ni=h(),xe=a("p"),Gn=a("a"),Ui=n("Speech2TextProcessor"),Gi=n(" offers all the functionalities of "),Zn=a("a"),Zi=n("Speech2TextFeatureExtractor"),Wi=n(` and
`),Wn=a("a"),Ri=n("Speech2TextTokenizer"),Vi=n(". See the "),Po=a("a"),qs=a("strong"),Pi=n("call"),Xi=n("()"),Ai=n(" and "),Rn=a("a"),Bi=n("decode()"),Yi=n(` for more
information.`),Di=h(),Bt=a("div"),v(Xo.$$.fragment),Li=h(),ot=a("p"),Oi=n(`When used in normal mode, this method forwards all its arguments to Speech2TextFeatureExtractor\u2019s
`),Ao=a("a"),Ns=a("strong"),Hi=n("call"),Qi=n("()"),Ki=n(` and returns its output. If used in the context
`),Us=a("code"),ed=n("as_target_processor()"),td=n(` this method forwards all its arguments to Speech2TextTokenizer\u2019s
`),Bo=a("a"),Gs=a("strong"),od=n("call"),nd=n("()"),sd=n(`. Please refer to the doctsring of the above two methods for more
information.`),ad=h(),rt=a("div"),v(Yo.$$.fragment),rd=h(),Zs=a("p"),id=n("Instantiate a processor associated with a pretrained model."),dd=h(),v(Yt.$$.fragment),ld=h(),it=a("div"),v(Do.$$.fragment),cd=h(),Lo=a("p"),hd=n(`Saves the attributes of this processor (feature extractor, tokenizer\u2026) in the specified directory so that it
can be reloaded using the `),Vn=a("a"),pd=n("from_pretrained()"),md=n(" method."),ud=h(),v(Dt.$$.fragment),fd=h(),Lt=a("div"),v(Oo.$$.fragment),_d=h(),Ho=a("p"),gd=n("This method forwards all its arguments to Speech2TextTokenizer\u2019s "),Pn=a("a"),Td=n("batch_decode()"),bd=n(`. Please
refer to the docstring of this method for more information.`),yd=h(),Ot=a("div"),v(Qo.$$.fragment),vd=h(),Ko=a("p"),kd=n("This method forwards all its arguments to Speech2TextTokenizer\u2019s "),Xn=a("a"),wd=n("decode()"),xd=n(`. Please refer
to the docstring of this method for more information.`),wa=h(),Ft=a("h2"),Ht=a("a"),Ws=a("span"),v(en.$$.fragment),Md=h(),Rs=a("span"),Sd=n("Speech2TextModel"),xa=h(),ze=a("div"),v(tn.$$.fragment),$d=h(),on=a("p"),Ed=n(`The bare Speech2Text Model outputting raw hidden-states without any specific head on top.
This model inherits from `),An=a("a"),Fd=n("PreTrainedModel"),zd=n(`. 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.)`),Jd=h(),nn=a("p"),jd=n("This model is also a PyTorch "),sn=a("a"),Id=n("torch.nn.Module"),Cd=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),qd=h(),Ue=a("div"),v(an.$$.fragment),Nd=h(),zt=a("p"),Ud=n("The "),Bn=a("a"),Gd=n("Speech2TextModel"),Zd=n(" forward method, overrides the "),Vs=a("code"),Wd=n("__call__"),Rd=n(" special method."),Vd=h(),v(Qt.$$.fragment),Pd=h(),v(Kt.$$.fragment),Ma=h(),Jt=a("h2"),eo=a("a"),Ps=a("span"),v(rn.$$.fragment),Xd=h(),Xs=a("span"),Ad=n("Speech2TextForConditionalGeneration"),Sa=h(),Je=a("div"),v(dn.$$.fragment),Bd=h(),ln=a("p"),Yd=n(`The Speech2Text Model with a language modeling head. Can be used for summarization.
This model inherits from `),Yn=a("a"),Dd=n("PreTrainedModel"),Ld=n(`. 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.)`),Od=h(),cn=a("p"),Hd=n("This model is also a PyTorch "),hn=a("a"),Qd=n("torch.nn.Module"),Kd=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),el=h(),Ge=a("div"),v(pn.$$.fragment),tl=h(),jt=a("p"),ol=n("The "),Dn=a("a"),nl=n("Speech2TextForConditionalGeneration"),sl=n(" forward method, overrides the "),As=a("code"),al=n("__call__"),rl=n(" special method."),il=h(),v(to.$$.fragment),dl=h(),v(oo.$$.fragment),$a=h(),It=a("h2"),no=a("a"),Bs=a("span"),v(mn.$$.fragment),ll=h(),Ys=a("span"),cl=n("TFSpeech2TextModel"),Ea=h(),ye=a("div"),v(un.$$.fragment),hl=h(),fn=a("p"),pl=n(`The bare Speech2Text Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Ln=a("a"),ml=n("TFPreTrainedModel"),ul=n(`. 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.)`),fl=h(),_n=a("p"),_l=n("This model is also a "),gn=a("a"),gl=n("tf.keras.Model"),Tl=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),bl=h(),v(so.$$.fragment),yl=h(),Ze=a("div"),v(Tn.$$.fragment),vl=h(),Ct=a("p"),kl=n("The "),On=a("a"),wl=n("TFSpeech2TextModel"),xl=n(" forward method, overrides the "),Ds=a("code"),Ml=n("__call__"),Sl=n(" special method."),$l=h(),v(ao.$$.fragment),El=h(),v(ro.$$.fragment),Fa=h(),qt=a("h2"),io=a("a"),Ls=a("span"),v(bn.$$.fragment),Fl=h(),Os=a("span"),zl=n("TFSpeech2TextForConditionalGeneration"),za=h(),ve=a("div"),v(yn.$$.fragment),Jl=h(),vn=a("p"),jl=n(`The Speech2Text Model with a language modeling head. Can be used for summarization.
This model inherits from `),Hn=a("a"),Il=n("TFPreTrainedModel"),Cl=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),ql=h(),kn=a("p"),Nl=n("This model is also a "),wn=a("a"),Ul=n("tf.keras.Model"),Gl=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Zl=h(),v(lo.$$.fragment),Wl=h(),We=a("div"),v(xn.$$.fragment),Rl=h(),Nt=a("p"),Vl=n("The "),Qn=a("a"),Pl=n("TFSpeech2TextForConditionalGeneration"),Xl=n(" forward method, overrides the "),Hs=a("code"),Al=n("__call__"),Bl=n(" special method."),Yl=h(),v(co.$$.fragment),Dl=h(),v(ho.$$.fragment),this.h()},l(o){const f=Ph('[data-svelte="svelte-1phssyn"]',document.head);c=r(f,"META",{name:!0,content:!0}),f.forEach(t),y=p(o),_=r(o,"H1",{class:!0});var Mn=i(_);g=r(Mn,"A",{id:!0,class:!0,href:!0});var Qs=i(g);b=r(Qs,"SPAN",{});var Ks=i(b);k(d.$$.fragment,Ks),Ks.forEach(t),Qs.forEach(t),m=p(Mn),E=r(Mn,"SPAN",{});var ea=i(E);Z=s(ea,"Speech2Text"),ea.forEach(t),Mn.forEach(t),N=p(o),I=r(o,"H2",{class:!0});var Sn=i(I);U=r(Sn,"A",{id:!0,class:!0,href:!0});var ta=i(U);C=r(ta,"SPAN",{});var oa=i(C);k($.$$.fragment,oa),oa.forEach(t),ta.forEach(t),we=p(Sn),Y=r(Sn,"SPAN",{});var na=i(Y);Ve=s(na,"Overview"),na.forEach(t),Sn.forEach(t),Ie=p(o),q=r(o,"P",{});var je=i(q);Pe=s(je,"The Speech2Text model was proposed in "),se=r(je,"A",{href:!0,rel:!0});var sa=i(se);ae=s(sa,"fairseq S2T: Fast Speech-to-Text Modeling with fairseq"),sa.forEach(t),Xe=s(je,` by Changhan Wang, Yun Tang, Xutai Ma, Anne Wu, Dmytro Okhonko, Juan Pino. It\u2019s a
transformer-based seq2seq (encoder-decoder) model designed for end-to-end Automatic Speech Recognition (ASR) and Speech
Translation (ST). It uses a convolutional downsampler to reduce the length of speech inputs by 3/4th before they are
fed into the encoder. The model is trained with standard autoregressive cross-entropy loss and generates the
transcripts/translations autoregressively. Speech2Text has been fine-tuned on several datasets for ASR and ST:
`),re=r(je,"A",{href:!0,rel:!0});var aa=i(re);ie=s(aa,"LibriSpeech"),aa.forEach(t),Ae=s(je,", "),de=r(je,"A",{href:!0,rel:!0});var ra=i(de);le=s(ra,"CoVoST 2"),ra.forEach(t),Be=s(je,", "),ce=r(je,"A",{href:!0,rel:!0});var ia=i(ce);Se=s(ia,"MuST-C"),ia.forEach(t),G=s(je,"."),je.forEach(t),W=p(o),Q=r(o,"P",{});var Kn=i(Q);he=s(Kn,"This model was contributed by "),pe=r(Kn,"A",{href:!0,rel:!0});var Kl=i(pe);Ye=s(Kl,"valhalla"),Kl.forEach(t),me=s(Kn,". The original code can be found "),ue=r(Kn,"A",{href:!0,rel:!0});var ec=i(ue);De=s(ec,"here"),ec.forEach(t),P=s(Kn,"."),Kn.forEach(t),Ce=p(o),X=r(o,"H2",{class:!0});var ja=i(X);te=r(ja,"A",{id:!0,class:!0,href:!0});var tc=i(te);$e=r(tc,"SPAN",{});var oc=i($e);k(O.$$.fragment,oc),oc.forEach(t),tc.forEach(t),Le=p(ja),Ee=r(ja,"SPAN",{});var nc=i(Ee);ee=s(nc,"Inference"),nc.forEach(t),ja.forEach(t),qe=p(o),D=r(o,"P",{});var Ia=i(D);Oe=s(Ia,`Speech2Text is a speech model that accepts a float tensor of log-mel filter-bank features extracted from the speech
signal. It\u2019s a transformer-based seq2seq model, so the transcripts/translations are generated autoregressively. The
`),fe=r(Ia,"CODE",{});var sc=i(fe);A=s(sc,"generate()"),sc.forEach(t),He=s(Ia," method can be used for inference."),Ia.forEach(t),L=p(o),R=r(o,"P",{});var dt=i(R);Qe=s(dt,"The "),T=r(dt,"A",{href:!0});var ac=i(T);F=s(ac,"Speech2TextFeatureExtractor"),ac.forEach(t),pt=s(dt,` class is responsible for extracting the log-mel filter-bank
features. The `),oe=r(dt,"A",{href:!0});var rc=i(oe);mt=s(rc,"Speech2TextProcessor"),rc.forEach(t),ut=s(dt," wraps "),z=r(dt,"A",{href:!0});var ic=i(z);ft=s(ic,"Speech2TextFeatureExtractor"),ic.forEach(t),_t=s(dt,` and
`),Ne=r(dt,"A",{href:!0});var dc=i(Ne);gt=s(dc,"Speech2TextTokenizer"),dc.forEach(t),Tt=s(dt,` into a single instance to both extract the input features and decode the
predicted token ids.`),dt.forEach(t),K=p(o),J=r(o,"P",{});var ke=i(J);bt=s(ke,"The feature extractor depends on "),Ke=r(ke,"CODE",{});var lc=i(Ke);_e=s(lc,"torchaudio"),lc.forEach(t),yt=s(ke," and the tokenizer depends on "),et=r(ke,"CODE",{});var cc=i(et);tt=s(cc,"sentencepiece"),cc.forEach(t),vt=s(ke,` so be sure to
install those packages before running the examples. You could either install those as extra speech dependencies with
`),ge=r(ke,"CODE",{});var hc=i(ge);kt=s(hc,'pip install transformers"[speech, sentencepiece]"'),hc.forEach(t),cr=s(ke," or install the packages separately with "),ls=r(ke,"CODE",{});var pc=i(ls);hr=s(pc,"pip install torchaudio sentencepiece"),pc.forEach(t),pr=s(ke,". Also "),cs=r(ke,"CODE",{});var mc=i(cs);mr=s(mc,"torchaudio"),mc.forEach(t),ur=s(ke," requires the development version of the "),vo=r(ke,"A",{href:!0,rel:!0});var uc=i(vo);fr=s(uc,"libsndfile"),uc.forEach(t),_r=s(ke,` package which can be installed via a system package manager. On Ubuntu it can
be installed as follows: `),hs=r(ke,"CODE",{});var fc=i(hs);gr=s(fc,"apt install libsndfile1-dev"),fc.forEach(t),ke.forEach(t),ca=p(o),En=r(o,"UL",{});var _c=i(En);ps=r(_c,"LI",{});var gc=i(ps);Tr=s(gc,"ASR and Speech Translation"),gc.forEach(t),_c.forEach(t),ha=p(o),k(ko.$$.fragment,o),pa=p(o),Fn=r(o,"UL",{});var Tc=i(Fn);wo=r(Tc,"LI",{});var Ca=i(wo);ms=r(Ca,"P",{});var bc=i(ms);br=s(bc,"Multilingual speech translation"),bc.forEach(t),yr=p(Ca),Te=r(Ca,"P",{});var Re=i(Te);vr=s(Re,"For multilingual speech translation models, "),us=r(Re,"CODE",{});var yc=i(us);kr=s(yc,"eos_token_id"),yc.forEach(t),wr=s(Re," is used as the "),fs=r(Re,"CODE",{});var vc=i(fs);xr=s(vc,"decoder_start_token_id"),vc.forEach(t),Mr=s(Re,` and
the target language id is forced as the first generated token. To force the target language id as the first
generated token, pass the `),_s=r(Re,"CODE",{});var kc=i(_s);Sr=s(kc,"forced_bos_token_id"),kc.forEach(t),$r=s(Re," parameter to the "),gs=r(Re,"CODE",{});var wc=i(gs);Er=s(wc,"generate()"),wc.forEach(t),Fr=s(Re,` method. The following
example shows how to transate English speech to French text using the `),Ts=r(Re,"EM",{});var xc=i(Ts);zr=s(xc,"facebook/s2t-medium-mustc-multilingual-st"),xc.forEach(t),Jr=s(Re,`
checkpoint.`),Re.forEach(t),Ca.forEach(t),Tc.forEach(t),ma=p(o),k(xo.$$.fragment,o),ua=p(o),Ut=r(o,"P",{});var qa=i(Ut);jr=s(qa,"See the "),Mo=r(qa,"A",{href:!0,rel:!0});var Mc=i(Mo);Ir=s(Mc,"model hub"),Mc.forEach(t),Cr=s(qa," to look for Speech2Text checkpoints."),qa.forEach(t),fa=p(o),wt=r(o,"H2",{class:!0});var Na=i(wt);Gt=r(Na,"A",{id:!0,class:!0,href:!0});var Sc=i(Gt);bs=r(Sc,"SPAN",{});var $c=i(bs);k(So.$$.fragment,$c),$c.forEach(t),Sc.forEach(t),qr=p(Na),ys=r(Na,"SPAN",{});var Ec=i(ys);Nr=s(Ec,"Speech2TextConfig"),Ec.forEach(t),Na.forEach(t),_a=p(o),Fe=r(o,"DIV",{class:!0});var po=i(Fe);k($o.$$.fragment,po),Ur=p(po),xt=r(po,"P",{});var es=i(xt);Gr=s(es,"This is the configuration class to store the configuration of a "),zn=r(es,"A",{href:!0});var Fc=i(zn);Zr=s(Fc,"Speech2TextModel"),Fc.forEach(t),Wr=s(es,`. It is used to instantiate an
Speech2Text 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 Speech2Text
`),Eo=r(es,"A",{href:!0,rel:!0});var zc=i(Eo);Rr=s(zc,"facebook/s2t-small-librispeech-asr"),zc.forEach(t),Vr=s(es," architecture."),es.forEach(t),Pr=p(po),Mt=r(po,"P",{});var ts=i(Mt);Xr=s(ts,"Configuration objects inherit from "),Jn=r(ts,"A",{href:!0});var Jc=i(Jn);Ar=s(Jc,"PretrainedConfig"),Jc.forEach(t),Br=s(ts,` and can be used to control the model outputs. Read the
documentation from `),jn=r(ts,"A",{href:!0});var jc=i(jn);Yr=s(jc,"PretrainedConfig"),jc.forEach(t),Dr=s(ts," for more information."),ts.forEach(t),Lr=p(po),k(Zt.$$.fragment,po),po.forEach(t),ga=p(o),St=r(o,"H2",{class:!0});var Ua=i(St);Wt=r(Ua,"A",{id:!0,class:!0,href:!0});var Ic=i(Wt);vs=r(Ic,"SPAN",{});var Cc=i(vs);k(Fo.$$.fragment,Cc),Cc.forEach(t),Ic.forEach(t),Or=p(Ua),ks=r(Ua,"SPAN",{});var qc=i(ks);Hr=s(qc,"Speech2TextTokenizer"),qc.forEach(t),Ua.forEach(t),Ta=p(o),H=r(o,"DIV",{class:!0});var Me=i(H);k(zo.$$.fragment,Me),Qr=p(Me),ws=r(Me,"P",{});var Nc=i(ws);Kr=s(Nc,"Construct an Speech2Text tokenizer."),Nc.forEach(t),ei=p(Me),Jo=r(Me,"P",{});var Ga=i(Jo);ti=s(Ga,"This tokenizer inherits from "),In=r(Ga,"A",{href:!0});var Uc=i(In);oi=s(Uc,"PreTrainedTokenizer"),Uc.forEach(t),ni=s(Ga,` which contains some of the main methods. Users should refer to
the superclass for more information regarding such methods.`),Ga.forEach(t),si=p(Me),Rt=r(Me,"DIV",{class:!0});var Za=i(Rt);k(jo.$$.fragment,Za),ai=p(Za),xs=r(Za,"P",{});var Gc=i(xs);ri=s(Gc,"Build model inputs from a sequence by appending eos_token_id."),Gc.forEach(t),Za.forEach(t),ii=p(Me),Vt=r(Me,"DIV",{class:!0});var Wa=i(Vt);k(Io.$$.fragment,Wa),di=p(Wa),Co=r(Wa,"P",{});var Ra=i(Co);li=s(Ra,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Ms=r(Ra,"CODE",{});var Zc=i(Ms);ci=s(Zc,"prepare_for_model"),Zc.forEach(t),hi=s(Ra," method."),Ra.forEach(t),Wa.forEach(t),pi=p(Me),at=r(Me,"DIV",{class:!0});var os=i(at);k(qo.$$.fragment,os),mi=p(os),Cn=r(os,"P",{});var Ll=i(Cn);ui=s(Ll,"Create the token type IDs corresponding to the sequences passed. "),qn=r(Ll,"A",{href:!0});var Wc=i(qn);fi=s(Wc,`What are token type
IDs?`),Wc.forEach(t),Ll.forEach(t),_i=p(os),Ss=r(os,"P",{});var Rc=i(Ss);gi=s(Rc,"Should be overridden in a subclass if the model has a special way of building those."),Rc.forEach(t),os.forEach(t),Ti=p(Me),Nn=r(Me,"DIV",{class:!0});var Vc=i(Nn);k(No.$$.fragment,Vc),Vc.forEach(t),Me.forEach(t),ba=p(o),$t=r(o,"H2",{class:!0});var Va=i($t);Pt=r(Va,"A",{id:!0,class:!0,href:!0});var Pc=i(Pt);$s=r(Pc,"SPAN",{});var Xc=i($s);k(Uo.$$.fragment,Xc),Xc.forEach(t),Pc.forEach(t),bi=p(Va),Es=r(Va,"SPAN",{});var Ac=i(Es);yi=s(Ac,"Speech2TextFeatureExtractor"),Ac.forEach(t),Va.forEach(t),ya=p(o),be=r(o,"DIV",{class:!0});var lt=i(be);k(Go.$$.fragment,lt),vi=p(lt),Fs=r(lt,"P",{});var Bc=i(Fs);ki=s(Bc,"Constructs a Speech2Text feature extractor."),Bc.forEach(t),wi=p(lt),Zo=r(lt,"P",{});var Pa=i(Zo);xi=s(Pa,"This feature extractor inherits from "),Un=r(Pa,"A",{href:!0});var Yc=i(Un);Mi=s(Yc,"Speech2TextFeatureExtractor"),Yc.forEach(t),Si=s(Pa,` which contains most of the main methods. Users
should refer to this superclass for more information regarding those methods.`),Pa.forEach(t),$i=p(lt),zs=r(lt,"P",{});var Dc=i(zs);Ei=s(Dc,`This class extracts mel-filter bank features from raw speech using TorchAudio and applies utterance-level cepstral
mean and variance normalization to the extracted features.`),Dc.forEach(t),Fi=p(lt),Xt=r(lt,"DIV",{class:!0});var Xa=i(Xt);k(Wo.$$.fragment,Xa),zi=p(Xa),Js=r(Xa,"P",{});var Lc=i(Js);Ji=s(Lc,"Main method to featurize and prepare for the model one or several sequence(s)."),Lc.forEach(t),Xa.forEach(t),lt.forEach(t),va=p(o),Et=r(o,"H2",{class:!0});var Aa=i(Et);At=r(Aa,"A",{id:!0,class:!0,href:!0});var Oc=i(At);js=r(Oc,"SPAN",{});var Hc=i(js);k(Ro.$$.fragment,Hc),Hc.forEach(t),Oc.forEach(t),ji=p(Aa),Is=r(Aa,"SPAN",{});var Qc=i(Is);Ii=s(Qc,"Speech2TextProcessor"),Qc.forEach(t),Aa.forEach(t),ka=p(o),B=r(o,"DIV",{class:!0});var ne=i(B);k(Vo.$$.fragment,ne),Ci=p(ne),Cs=r(ne,"P",{});var Kc=i(Cs);qi=s(Kc,`Constructs a Speech2Text processor which wraps a Speech2Text feature extractor and a Speech2Text tokenizer into a
single processor.`),Kc.forEach(t),Ni=p(ne),xe=r(ne,"P",{});var nt=i(xe);Gn=r(nt,"A",{href:!0});var eh=i(Gn);Ui=s(eh,"Speech2TextProcessor"),eh.forEach(t),Gi=s(nt," offers all the functionalities of "),Zn=r(nt,"A",{href:!0});var th=i(Zn);Zi=s(th,"Speech2TextFeatureExtractor"),th.forEach(t),Wi=s(nt,` and
`),Wn=r(nt,"A",{href:!0});var oh=i(Wn);Ri=s(oh,"Speech2TextTokenizer"),oh.forEach(t),Vi=s(nt,". See the "),Po=r(nt,"A",{href:!0});var Ol=i(Po);qs=r(Ol,"STRONG",{});var nh=i(qs);Pi=s(nh,"call"),nh.forEach(t),Xi=s(Ol,"()"),Ol.forEach(t),Ai=s(nt," and "),Rn=r(nt,"A",{href:!0});var sh=i(Rn);Bi=s(sh,"decode()"),sh.forEach(t),Yi=s(nt,` for more
information.`),nt.forEach(t),Di=p(ne),Bt=r(ne,"DIV",{class:!0});var Ba=i(Bt);k(Xo.$$.fragment,Ba),Li=p(Ba),ot=r(Ba,"P",{});var mo=i(ot);Oi=s(mo,`When used in normal mode, this method forwards all its arguments to Speech2TextFeatureExtractor\u2019s
`),Ao=r(mo,"A",{href:!0});var Hl=i(Ao);Ns=r(Hl,"STRONG",{});var ah=i(Ns);Hi=s(ah,"call"),ah.forEach(t),Qi=s(Hl,"()"),Hl.forEach(t),Ki=s(mo,` and returns its output. If used in the context
`),Us=r(mo,"CODE",{});var rh=i(Us);ed=s(rh,"as_target_processor()"),rh.forEach(t),td=s(mo,` this method forwards all its arguments to Speech2TextTokenizer\u2019s
`),Bo=r(mo,"A",{href:!0});var Ql=i(Bo);Gs=r(Ql,"STRONG",{});var ih=i(Gs);od=s(ih,"call"),ih.forEach(t),nd=s(Ql,"()"),Ql.forEach(t),sd=s(mo,`. Please refer to the doctsring of the above two methods for more
information.`),mo.forEach(t),Ba.forEach(t),ad=p(ne),rt=r(ne,"DIV",{class:!0});var ns=i(rt);k(Yo.$$.fragment,ns),rd=p(ns),Zs=r(ns,"P",{});var dh=i(Zs);id=s(dh,"Instantiate a processor associated with a pretrained model."),dh.forEach(t),dd=p(ns),k(Yt.$$.fragment,ns),ns.forEach(t),ld=p(ne),it=r(ne,"DIV",{class:!0});var ss=i(it);k(Do.$$.fragment,ss),cd=p(ss),Lo=r(ss,"P",{});var Ya=i(Lo);hd=s(Ya,`Saves the attributes of this processor (feature extractor, tokenizer\u2026) in the specified directory so that it
can be reloaded using the `),Vn=r(Ya,"A",{href:!0});var lh=i(Vn);pd=s(lh,"from_pretrained()"),lh.forEach(t),md=s(Ya," method."),Ya.forEach(t),ud=p(ss),k(Dt.$$.fragment,ss),ss.forEach(t),fd=p(ne),Lt=r(ne,"DIV",{class:!0});var Da=i(Lt);k(Oo.$$.fragment,Da),_d=p(Da),Ho=r(Da,"P",{});var La=i(Ho);gd=s(La,"This method forwards all its arguments to Speech2TextTokenizer\u2019s "),Pn=r(La,"A",{href:!0});var ch=i(Pn);Td=s(ch,"batch_decode()"),ch.forEach(t),bd=s(La,`. Please
refer to the docstring of this method for more information.`),La.forEach(t),Da.forEach(t),yd=p(ne),Ot=r(ne,"DIV",{class:!0});var Oa=i(Ot);k(Qo.$$.fragment,Oa),vd=p(Oa),Ko=r(Oa,"P",{});var Ha=i(Ko);kd=s(Ha,"This method forwards all its arguments to Speech2TextTokenizer\u2019s "),Xn=r(Ha,"A",{href:!0});var hh=i(Xn);wd=s(hh,"decode()"),hh.forEach(t),xd=s(Ha,`. Please refer
to the docstring of this method for more information.`),Ha.forEach(t),Oa.forEach(t),ne.forEach(t),wa=p(o),Ft=r(o,"H2",{class:!0});var Qa=i(Ft);Ht=r(Qa,"A",{id:!0,class:!0,href:!0});var ph=i(Ht);Ws=r(ph,"SPAN",{});var mh=i(Ws);k(en.$$.fragment,mh),mh.forEach(t),ph.forEach(t),Md=p(Qa),Rs=r(Qa,"SPAN",{});var uh=i(Rs);Sd=s(uh,"Speech2TextModel"),uh.forEach(t),Qa.forEach(t),xa=p(o),ze=r(o,"DIV",{class:!0});var uo=i(ze);k(tn.$$.fragment,uo),$d=p(uo),on=r(uo,"P",{});var Ka=i(on);Ed=s(Ka,`The bare Speech2Text Model outputting raw hidden-states without any specific head on top.
This model inherits from `),An=r(Ka,"A",{href:!0});var fh=i(An);Fd=s(fh,"PreTrainedModel"),fh.forEach(t),zd=s(Ka,`. 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.)`),Ka.forEach(t),Jd=p(uo),nn=r(uo,"P",{});var er=i(nn);jd=s(er,"This model is also a PyTorch "),sn=r(er,"A",{href:!0,rel:!0});var _h=i(sn);Id=s(_h,"torch.nn.Module"),_h.forEach(t),Cd=s(er,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),er.forEach(t),qd=p(uo),Ue=r(uo,"DIV",{class:!0});var fo=i(Ue);k(an.$$.fragment,fo),Nd=p(fo),zt=r(fo,"P",{});var as=i(zt);Ud=s(as,"The "),Bn=r(as,"A",{href:!0});var gh=i(Bn);Gd=s(gh,"Speech2TextModel"),gh.forEach(t),Zd=s(as," forward method, overrides the "),Vs=r(as,"CODE",{});var Th=i(Vs);Wd=s(Th,"__call__"),Th.forEach(t),Rd=s(as," special method."),as.forEach(t),Vd=p(fo),k(Qt.$$.fragment,fo),Pd=p(fo),k(Kt.$$.fragment,fo),fo.forEach(t),uo.forEach(t),Ma=p(o),Jt=r(o,"H2",{class:!0});var tr=i(Jt);eo=r(tr,"A",{id:!0,class:!0,href:!0});var bh=i(eo);Ps=r(bh,"SPAN",{});var yh=i(Ps);k(rn.$$.fragment,yh),yh.forEach(t),bh.forEach(t),Xd=p(tr),Xs=r(tr,"SPAN",{});var vh=i(Xs);Ad=s(vh,"Speech2TextForConditionalGeneration"),vh.forEach(t),tr.forEach(t),Sa=p(o),Je=r(o,"DIV",{class:!0});var _o=i(Je);k(dn.$$.fragment,_o),Bd=p(_o),ln=r(_o,"P",{});var or=i(ln);Yd=s(or,`The Speech2Text Model with a language modeling head. Can be used for summarization.
This model inherits from `),Yn=r(or,"A",{href:!0});var kh=i(Yn);Dd=s(kh,"PreTrainedModel"),kh.forEach(t),Ld=s(or,`. 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.)`),or.forEach(t),Od=p(_o),cn=r(_o,"P",{});var nr=i(cn);Hd=s(nr,"This model is also a PyTorch "),hn=r(nr,"A",{href:!0,rel:!0});var wh=i(hn);Qd=s(wh,"torch.nn.Module"),wh.forEach(t),Kd=s(nr,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),nr.forEach(t),el=p(_o),Ge=r(_o,"DIV",{class:!0});var go=i(Ge);k(pn.$$.fragment,go),tl=p(go),jt=r(go,"P",{});var rs=i(jt);ol=s(rs,"The "),Dn=r(rs,"A",{href:!0});var xh=i(Dn);nl=s(xh,"Speech2TextForConditionalGeneration"),xh.forEach(t),sl=s(rs," forward method, overrides the "),As=r(rs,"CODE",{});var Mh=i(As);al=s(Mh,"__call__"),Mh.forEach(t),rl=s(rs," special method."),rs.forEach(t),il=p(go),k(to.$$.fragment,go),dl=p(go),k(oo.$$.fragment,go),go.forEach(t),_o.forEach(t),$a=p(o),It=r(o,"H2",{class:!0});var sr=i(It);no=r(sr,"A",{id:!0,class:!0,href:!0});var Sh=i(no);Bs=r(Sh,"SPAN",{});var $h=i(Bs);k(mn.$$.fragment,$h),$h.forEach(t),Sh.forEach(t),ll=p(sr),Ys=r(sr,"SPAN",{});var Eh=i(Ys);cl=s(Eh,"TFSpeech2TextModel"),Eh.forEach(t),sr.forEach(t),Ea=p(o),ye=r(o,"DIV",{class:!0});var ct=i(ye);k(un.$$.fragment,ct),hl=p(ct),fn=r(ct,"P",{});var ar=i(fn);pl=s(ar,`The bare Speech2Text Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Ln=r(ar,"A",{href:!0});var Fh=i(Ln);ml=s(Fh,"TFPreTrainedModel"),Fh.forEach(t),ul=s(ar,`. 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.)`),ar.forEach(t),fl=p(ct),_n=r(ct,"P",{});var rr=i(_n);_l=s(rr,"This model is also a "),gn=r(rr,"A",{href:!0,rel:!0});var zh=i(gn);gl=s(zh,"tf.keras.Model"),zh.forEach(t),Tl=s(rr,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),rr.forEach(t),bl=p(ct),k(so.$$.fragment,ct),yl=p(ct),Ze=r(ct,"DIV",{class:!0});var To=i(Ze);k(Tn.$$.fragment,To),vl=p(To),Ct=r(To,"P",{});var is=i(Ct);kl=s(is,"The "),On=r(is,"A",{href:!0});var Jh=i(On);wl=s(Jh,"TFSpeech2TextModel"),Jh.forEach(t),xl=s(is," forward method, overrides the "),Ds=r(is,"CODE",{});var jh=i(Ds);Ml=s(jh,"__call__"),jh.forEach(t),Sl=s(is," special method."),is.forEach(t),$l=p(To),k(ao.$$.fragment,To),El=p(To),k(ro.$$.fragment,To),To.forEach(t),ct.forEach(t),Fa=p(o),qt=r(o,"H2",{class:!0});var ir=i(qt);io=r(ir,"A",{id:!0,class:!0,href:!0});var Ih=i(io);Ls=r(Ih,"SPAN",{});var Ch=i(Ls);k(bn.$$.fragment,Ch),Ch.forEach(t),Ih.forEach(t),Fl=p(ir),Os=r(ir,"SPAN",{});var qh=i(Os);zl=s(qh,"TFSpeech2TextForConditionalGeneration"),qh.forEach(t),ir.forEach(t),za=p(o),ve=r(o,"DIV",{class:!0});var ht=i(ve);k(yn.$$.fragment,ht),Jl=p(ht),vn=r(ht,"P",{});var dr=i(vn);jl=s(dr,`The Speech2Text Model with a language modeling head. Can be used for summarization.
This model inherits from `),Hn=r(dr,"A",{href:!0});var Nh=i(Hn);Il=s(Nh,"TFPreTrainedModel"),Nh.forEach(t),Cl=s(dr,`. 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.)`),dr.forEach(t),ql=p(ht),kn=r(ht,"P",{});var lr=i(kn);Nl=s(lr,"This model is also a "),wn=r(lr,"A",{href:!0,rel:!0});var Uh=i(wn);Ul=s(Uh,"tf.keras.Model"),Uh.forEach(t),Gl=s(lr,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),lr.forEach(t),Zl=p(ht),k(lo.$$.fragment,ht),Wl=p(ht),We=r(ht,"DIV",{class:!0});var bo=i(We);k(xn.$$.fragment,bo),Rl=p(bo),Nt=r(bo,"P",{});var ds=i(Nt);Vl=s(ds,"The "),Qn=r(ds,"A",{href:!0});var Gh=i(Qn);Pl=s(Gh,"TFSpeech2TextForConditionalGeneration"),Gh.forEach(t),Xl=s(ds," forward method, overrides the "),Hs=r(ds,"CODE",{});var Zh=i(Hs);Al=s(Zh,"__call__"),Zh.forEach(t),Bl=s(ds," special method."),ds.forEach(t),Yl=p(bo),k(co.$$.fragment,bo),Dl=p(bo),k(ho.$$.fragment,bo),bo.forEach(t),ht.forEach(t),this.h()},h(){l(c,"name","hf:doc:metadata"),l(c,"content",JSON.stringify(ap)),l(g,"id","speech2text"),l(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"),l(g,"href","#speech2text"),l(_,"class","relative group"),l(U,"id","overview"),l(U,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(U,"href","#overview"),l(I,"class","relative group"),l(se,"href","https://arxiv.org/abs/2010.05171"),l(se,"rel","nofollow"),l(re,"href","http://www.openslr.org/12"),l(re,"rel","nofollow"),l(de,"href","https://github.com/facebookresearch/covost"),l(de,"rel","nofollow"),l(ce,"href","https://ict.fbk.eu/must-c/"),l(ce,"rel","nofollow"),l(pe,"href","https://huggingface.co/valhalla"),l(pe,"rel","nofollow"),l(ue,"href","https://github.com/pytorch/fairseq/tree/master/examples/speech_to_text"),l(ue,"rel","nofollow"),l(te,"id","inference"),l(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"),l(te,"href","#inference"),l(X,"class","relative group"),l(T,"href","/docs/transformers/main/en/model_doc/speech_to_text#transformers.Speech2TextFeatureExtractor"),l(oe,"href","/docs/transformers/main/en/model_doc/speech_to_text#transformers.Speech2TextProcessor"),l(z,"href","/docs/transformers/main/en/model_doc/speech_to_text#transformers.Speech2TextFeatureExtractor"),l(Ne,"href","/docs/transformers/main/en/model_doc/speech_to_text#transformers.Speech2TextTokenizer"),l(vo,"href","http://www.mega-nerd.com/libsndfile/"),l(vo,"rel","nofollow"),l(Mo,"href","https://huggingface.co/models?filter=speech_to_text"),l(Mo,"rel","nofollow"),l(Gt,"id","transformers.Speech2TextConfig"),l(Gt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(Gt,"href","#transformers.Speech2TextConfig"),l(wt,"class","relative group"),l(zn,"href","/docs/transformers/main/en/model_doc/speech_to_text#transformers.Speech2TextModel"),l(Eo,"href","https://huggingface.co/facebook/s2t-small-librispeech-asr"),l(Eo,"rel","nofollow"),l(Jn,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),l(jn,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),l(Fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Wt,"id","transformers.Speech2TextTokenizer"),l(Wt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(Wt,"href","#transformers.Speech2TextTokenizer"),l(St,"class","relative group"),l(In,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),l(Rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(qn,"href","../glossary#token-type-ids"),l(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Nn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Pt,"id","transformers.Speech2TextFeatureExtractor"),l(Pt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(Pt,"href","#transformers.Speech2TextFeatureExtractor"),l($t,"class","relative group"),l(Un,"href","/docs/transformers/main/en/model_doc/speech_to_text#transformers.Speech2TextFeatureExtractor"),l(Xt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(At,"id","transformers.Speech2TextProcessor"),l(At,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(At,"href","#transformers.Speech2TextProcessor"),l(Et,"class","relative group"),l(Gn,"href","/docs/transformers/main/en/model_doc/speech_to_text#transformers.Speech2TextProcessor"),l(Zn,"href","/docs/transformers/main/en/model_doc/speech_to_text#transformers.Speech2TextFeatureExtractor"),l(Wn,"href","/docs/transformers/main/en/model_doc/speech_to_text#transformers.Speech2TextTokenizer"),l(Po,"href","/docs/transformers/main/en/model_doc/speech_to_text#transformers.Speech2TextProcessor.__call__"),l(Rn,"href","/docs/transformers/main/en/model_doc/speech_to_text#transformers.Speech2TextProcessor.decode"),l(Ao,"href","/docs/transformers/main/en/model_doc/speech_to_text#transformers.Speech2TextFeatureExtractor.__call__"),l(Bo,"href","/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__"),l(Bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Vn,"href","/docs/transformers/main/en/model_doc/donut#transformers.DonutProcessor.from_pretrained"),l(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Pn,"href","/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.batch_decode"),l(Lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Xn,"href","/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.decode"),l(Ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Ht,"id","transformers.Speech2TextModel"),l(Ht,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(Ht,"href","#transformers.Speech2TextModel"),l(Ft,"class","relative group"),l(An,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),l(sn,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(sn,"rel","nofollow"),l(Bn,"href","/docs/transformers/main/en/model_doc/speech_to_text#transformers.Speech2TextModel"),l(Ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(eo,"id","transformers.Speech2TextForConditionalGeneration"),l(eo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(eo,"href","#transformers.Speech2TextForConditionalGeneration"),l(Jt,"class","relative group"),l(Yn,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),l(hn,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(hn,"rel","nofollow"),l(Dn,"href","/docs/transformers/main/en/model_doc/speech_to_text#transformers.Speech2TextForConditionalGeneration"),l(Ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(no,"id","transformers.TFSpeech2TextModel"),l(no,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(no,"href","#transformers.TFSpeech2TextModel"),l(It,"class","relative group"),l(Ln,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),l(gn,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),l(gn,"rel","nofollow"),l(On,"href","/docs/transformers/main/en/model_doc/speech_to_text#transformers.TFSpeech2TextModel"),l(Ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(io,"id","transformers.TFSpeech2TextForConditionalGeneration"),l(io,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(io,"href","#transformers.TFSpeech2TextForConditionalGeneration"),l(qt,"class","relative group"),l(Hn,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),l(wn,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),l(wn,"rel","nofollow"),l(Qn,"href","/docs/transformers/main/en/model_doc/speech_to_text#transformers.TFSpeech2TextForConditionalGeneration"),l(We,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(o,f){e(document.head,c),u(o,y,f),u(o,_,f),e(_,g),e(g,b),w(d,b,null),e(_,m),e(_,E),e(E,Z),u(o,N,f),u(o,I,f),e(I,U),e(U,C),w($,C,null),e(I,we),e(I,Y),e(Y,Ve),u(o,Ie,f),u(o,q,f),e(q,Pe),e(q,se),e(se,ae),e(q,Xe),e(q,re),e(re,ie),e(q,Ae),e(q,de),e(de,le),e(q,Be),e(q,ce),e(ce,Se),e(q,G),u(o,W,f),u(o,Q,f),e(Q,he),e(Q,pe),e(pe,Ye),e(Q,me),e(Q,ue),e(ue,De),e(Q,P),u(o,Ce,f),u(o,X,f),e(X,te),e(te,$e),w(O,$e,null),e(X,Le),e(X,Ee),e(Ee,ee),u(o,qe,f),u(o,D,f),e(D,Oe),e(D,fe),e(fe,A),e(D,He),u(o,L,f),u(o,R,f),e(R,Qe),e(R,T),e(T,F),e(R,pt),e(R,oe),e(oe,mt),e(R,ut),e(R,z),e(z,ft),e(R,_t),e(R,Ne),e(Ne,gt),e(R,Tt),u(o,K,f),u(o,J,f),e(J,bt),e(J,Ke),e(Ke,_e),e(J,yt),e(J,et),e(et,tt),e(J,vt),e(J,ge),e(ge,kt),e(J,cr),e(J,ls),e(ls,hr),e(J,pr),e(J,cs),e(cs,mr),e(J,ur),e(J,vo),e(vo,fr),e(J,_r),e(J,hs),e(hs,gr),u(o,ca,f),u(o,En,f),e(En,ps),e(ps,Tr),u(o,ha,f),w(ko,o,f),u(o,pa,f),u(o,Fn,f),e(Fn,wo),e(wo,ms),e(ms,br),e(wo,yr),e(wo,Te),e(Te,vr),e(Te,us),e(us,kr),e(Te,wr),e(Te,fs),e(fs,xr),e(Te,Mr),e(Te,_s),e(_s,Sr),e(Te,$r),e(Te,gs),e(gs,Er),e(Te,Fr),e(Te,Ts),e(Ts,zr),e(Te,Jr),u(o,ma,f),w(xo,o,f),u(o,ua,f),u(o,Ut,f),e(Ut,jr),e(Ut,Mo),e(Mo,Ir),e(Ut,Cr),u(o,fa,f),u(o,wt,f),e(wt,Gt),e(Gt,bs),w(So,bs,null),e(wt,qr),e(wt,ys),e(ys,Nr),u(o,_a,f),u(o,Fe,f),w($o,Fe,null),e(Fe,Ur),e(Fe,xt),e(xt,Gr),e(xt,zn),e(zn,Zr),e(xt,Wr),e(xt,Eo),e(Eo,Rr),e(xt,Vr),e(Fe,Pr),e(Fe,Mt),e(Mt,Xr),e(Mt,Jn),e(Jn,Ar),e(Mt,Br),e(Mt,jn),e(jn,Yr),e(Mt,Dr),e(Fe,Lr),w(Zt,Fe,null),u(o,ga,f),u(o,St,f),e(St,Wt),e(Wt,vs),w(Fo,vs,null),e(St,Or),e(St,ks),e(ks,Hr),u(o,Ta,f),u(o,H,f),w(zo,H,null),e(H,Qr),e(H,ws),e(ws,Kr),e(H,ei),e(H,Jo),e(Jo,ti),e(Jo,In),e(In,oi),e(Jo,ni),e(H,si),e(H,Rt),w(jo,Rt,null),e(Rt,ai),e(Rt,xs),e(xs,ri),e(H,ii),e(H,Vt),w(Io,Vt,null),e(Vt,di),e(Vt,Co),e(Co,li),e(Co,Ms),e(Ms,ci),e(Co,hi),e(H,pi),e(H,at),w(qo,at,null),e(at,mi),e(at,Cn),e(Cn,ui),e(Cn,qn),e(qn,fi),e(at,_i),e(at,Ss),e(Ss,gi),e(H,Ti),e(H,Nn),w(No,Nn,null),u(o,ba,f),u(o,$t,f),e($t,Pt),e(Pt,$s),w(Uo,$s,null),e($t,bi),e($t,Es),e(Es,yi),u(o,ya,f),u(o,be,f),w(Go,be,null),e(be,vi),e(be,Fs),e(Fs,ki),e(be,wi),e(be,Zo),e(Zo,xi),e(Zo,Un),e(Un,Mi),e(Zo,Si),e(be,$i),e(be,zs),e(zs,Ei),e(be,Fi),e(be,Xt),w(Wo,Xt,null),e(Xt,zi),e(Xt,Js),e(Js,Ji),u(o,va,f),u(o,Et,f),e(Et,At),e(At,js),w(Ro,js,null),e(Et,ji),e(Et,Is),e(Is,Ii),u(o,ka,f),u(o,B,f),w(Vo,B,null),e(B,Ci),e(B,Cs),e(Cs,qi),e(B,Ni),e(B,xe),e(xe,Gn),e(Gn,Ui),e(xe,Gi),e(xe,Zn),e(Zn,Zi),e(xe,Wi),e(xe,Wn),e(Wn,Ri),e(xe,Vi),e(xe,Po),e(Po,qs),e(qs,Pi),e(Po,Xi),e(xe,Ai),e(xe,Rn),e(Rn,Bi),e(xe,Yi),e(B,Di),e(B,Bt),w(Xo,Bt,null),e(Bt,Li),e(Bt,ot),e(ot,Oi),e(ot,Ao),e(Ao,Ns),e(Ns,Hi),e(Ao,Qi),e(ot,Ki),e(ot,Us),e(Us,ed),e(ot,td),e(ot,Bo),e(Bo,Gs),e(Gs,od),e(Bo,nd),e(ot,sd),e(B,ad),e(B,rt),w(Yo,rt,null),e(rt,rd),e(rt,Zs),e(Zs,id),e(rt,dd),w(Yt,rt,null),e(B,ld),e(B,it),w(Do,it,null),e(it,cd),e(it,Lo),e(Lo,hd),e(Lo,Vn),e(Vn,pd),e(Lo,md),e(it,ud),w(Dt,it,null),e(B,fd),e(B,Lt),w(Oo,Lt,null),e(Lt,_d),e(Lt,Ho),e(Ho,gd),e(Ho,Pn),e(Pn,Td),e(Ho,bd),e(B,yd),e(B,Ot),w(Qo,Ot,null),e(Ot,vd),e(Ot,Ko),e(Ko,kd),e(Ko,Xn),e(Xn,wd),e(Ko,xd),u(o,wa,f),u(o,Ft,f),e(Ft,Ht),e(Ht,Ws),w(en,Ws,null),e(Ft,Md),e(Ft,Rs),e(Rs,Sd),u(o,xa,f),u(o,ze,f),w(tn,ze,null),e(ze,$d),e(ze,on),e(on,Ed),e(on,An),e(An,Fd),e(on,zd),e(ze,Jd),e(ze,nn),e(nn,jd),e(nn,sn),e(sn,Id),e(nn,Cd),e(ze,qd),e(ze,Ue),w(an,Ue,null),e(Ue,Nd),e(Ue,zt),e(zt,Ud),e(zt,Bn),e(Bn,Gd),e(zt,Zd),e(zt,Vs),e(Vs,Wd),e(zt,Rd),e(Ue,Vd),w(Qt,Ue,null),e(Ue,Pd),w(Kt,Ue,null),u(o,Ma,f),u(o,Jt,f),e(Jt,eo),e(eo,Ps),w(rn,Ps,null),e(Jt,Xd),e(Jt,Xs),e(Xs,Ad),u(o,Sa,f),u(o,Je,f),w(dn,Je,null),e(Je,Bd),e(Je,ln),e(ln,Yd),e(ln,Yn),e(Yn,Dd),e(ln,Ld),e(Je,Od),e(Je,cn),e(cn,Hd),e(cn,hn),e(hn,Qd),e(cn,Kd),e(Je,el),e(Je,Ge),w(pn,Ge,null),e(Ge,tl),e(Ge,jt),e(jt,ol),e(jt,Dn),e(Dn,nl),e(jt,sl),e(jt,As),e(As,al),e(jt,rl),e(Ge,il),w(to,Ge,null),e(Ge,dl),w(oo,Ge,null),u(o,$a,f),u(o,It,f),e(It,no),e(no,Bs),w(mn,Bs,null),e(It,ll),e(It,Ys),e(Ys,cl),u(o,Ea,f),u(o,ye,f),w(un,ye,null),e(ye,hl),e(ye,fn),e(fn,pl),e(fn,Ln),e(Ln,ml),e(fn,ul),e(ye,fl),e(ye,_n),e(_n,_l),e(_n,gn),e(gn,gl),e(_n,Tl),e(ye,bl),w(so,ye,null),e(ye,yl),e(ye,Ze),w(Tn,Ze,null),e(Ze,vl),e(Ze,Ct),e(Ct,kl),e(Ct,On),e(On,wl),e(Ct,xl),e(Ct,Ds),e(Ds,Ml),e(Ct,Sl),e(Ze,$l),w(ao,Ze,null),e(Ze,El),w(ro,Ze,null),u(o,Fa,f),u(o,qt,f),e(qt,io),e(io,Ls),w(bn,Ls,null),e(qt,Fl),e(qt,Os),e(Os,zl),u(o,za,f),u(o,ve,f),w(yn,ve,null),e(ve,Jl),e(ve,vn),e(vn,jl),e(vn,Hn),e(Hn,Il),e(vn,Cl),e(ve,ql),e(ve,kn),e(kn,Nl),e(kn,wn),e(wn,Ul),e(kn,Gl),e(ve,Zl),w(lo,ve,null),e(ve,Wl),e(ve,We),w(xn,We,null),e(We,Rl),e(We,Nt),e(Nt,Vl),e(Nt,Qn),e(Qn,Pl),e(Nt,Xl),e(Nt,Hs),e(Hs,Al),e(Nt,Bl),e(We,Yl),w(co,We,null),e(We,Dl),w(ho,We,null),Ja=!0},p(o,[f]){const Mn={};f&2&&(Mn.$$scope={dirty:f,ctx:o}),Zt.$set(Mn);const Qs={};f&2&&(Qs.$$scope={dirty:f,ctx:o}),Yt.$set(Qs);const Ks={};f&2&&(Ks.$$scope={dirty:f,ctx:o}),Dt.$set(Ks);const ea={};f&2&&(ea.$$scope={dirty:f,ctx:o}),Qt.$set(ea);const Sn={};f&2&&(Sn.$$scope={dirty:f,ctx:o}),Kt.$set(Sn);const ta={};f&2&&(ta.$$scope={dirty:f,ctx:o}),to.$set(ta);const oa={};f&2&&(oa.$$scope={dirty:f,ctx:o}),oo.$set(oa);const na={};f&2&&(na.$$scope={dirty:f,ctx:o}),so.$set(na);const je={};f&2&&(je.$$scope={dirty:f,ctx:o}),ao.$set(je);const sa={};f&2&&(sa.$$scope={dirty:f,ctx:o}),ro.$set(sa);const aa={};f&2&&(aa.$$scope={dirty:f,ctx:o}),lo.$set(aa);const ra={};f&2&&(ra.$$scope={dirty:f,ctx:o}),co.$set(ra);const ia={};f&2&&(ia.$$scope={dirty:f,ctx:o}),ho.$set(ia)},i(o){Ja||(x(d.$$.fragment,o),x($.$$.fragment,o),x(O.$$.fragment,o),x(ko.$$.fragment,o),x(xo.$$.fragment,o),x(So.$$.fragment,o),x($o.$$.fragment,o),x(Zt.$$.fragment,o),x(Fo.$$.fragment,o),x(zo.$$.fragment,o),x(jo.$$.fragment,o),x(Io.$$.fragment,o),x(qo.$$.fragment,o),x(No.$$.fragment,o),x(Uo.$$.fragment,o),x(Go.$$.fragment,o),x(Wo.$$.fragment,o),x(Ro.$$.fragment,o),x(Vo.$$.fragment,o),x(Xo.$$.fragment,o),x(Yo.$$.fragment,o),x(Yt.$$.fragment,o),x(Do.$$.fragment,o),x(Dt.$$.fragment,o),x(Oo.$$.fragment,o),x(Qo.$$.fragment,o),x(en.$$.fragment,o),x(tn.$$.fragment,o),x(an.$$.fragment,o),x(Qt.$$.fragment,o),x(Kt.$$.fragment,o),x(rn.$$.fragment,o),x(dn.$$.fragment,o),x(pn.$$.fragment,o),x(to.$$.fragment,o),x(oo.$$.fragment,o),x(mn.$$.fragment,o),x(un.$$.fragment,o),x(so.$$.fragment,o),x(Tn.$$.fragment,o),x(ao.$$.fragment,o),x(ro.$$.fragment,o),x(bn.$$.fragment,o),x(yn.$$.fragment,o),x(lo.$$.fragment,o),x(xn.$$.fragment,o),x(co.$$.fragment,o),x(ho.$$.fragment,o),Ja=!0)},o(o){M(d.$$.fragment,o),M($.$$.fragment,o),M(O.$$.fragment,o),M(ko.$$.fragment,o),M(xo.$$.fragment,o),M(So.$$.fragment,o),M($o.$$.fragment,o),M(Zt.$$.fragment,o),M(Fo.$$.fragment,o),M(zo.$$.fragment,o),M(jo.$$.fragment,o),M(Io.$$.fragment,o),M(qo.$$.fragment,o),M(No.$$.fragment,o),M(Uo.$$.fragment,o),M(Go.$$.fragment,o),M(Wo.$$.fragment,o),M(Ro.$$.fragment,o),M(Vo.$$.fragment,o),M(Xo.$$.fragment,o),M(Yo.$$.fragment,o),M(Yt.$$.fragment,o),M(Do.$$.fragment,o),M(Dt.$$.fragment,o),M(Oo.$$.fragment,o),M(Qo.$$.fragment,o),M(en.$$.fragment,o),M(tn.$$.fragment,o),M(an.$$.fragment,o),M(Qt.$$.fragment,o),M(Kt.$$.fragment,o),M(rn.$$.fragment,o),M(dn.$$.fragment,o),M(pn.$$.fragment,o),M(to.$$.fragment,o),M(oo.$$.fragment,o),M(mn.$$.fragment,o),M(un.$$.fragment,o),M(so.$$.fragment,o),M(Tn.$$.fragment,o),M(ao.$$.fragment,o),M(ro.$$.fragment,o),M(bn.$$.fragment,o),M(yn.$$.fragment,o),M(lo.$$.fragment,o),M(xn.$$.fragment,o),M(co.$$.fragment,o),M(ho.$$.fragment,o),Ja=!1},d(o){t(c),o&&t(y),o&&t(_),S(d),o&&t(N),o&&t(I),S($),o&&t(Ie),o&&t(q),o&&t(W),o&&t(Q),o&&t(Ce),o&&t(X),S(O),o&&t(qe),o&&t(D),o&&t(L),o&&t(R),o&&t(K),o&&t(J),o&&t(ca),o&&t(En),o&&t(ha),S(ko,o),o&&t(pa),o&&t(Fn),o&&t(ma),S(xo,o),o&&t(ua),o&&t(Ut),o&&t(fa),o&&t(wt),S(So),o&&t(_a),o&&t(Fe),S($o),S(Zt),o&&t(ga),o&&t(St),S(Fo),o&&t(Ta),o&&t(H),S(zo),S(jo),S(Io),S(qo),S(No),o&&t(ba),o&&t($t),S(Uo),o&&t(ya),o&&t(be),S(Go),S(Wo),o&&t(va),o&&t(Et),S(Ro),o&&t(ka),o&&t(B),S(Vo),S(Xo),S(Yo),S(Yt),S(Do),S(Dt),S(Oo),S(Qo),o&&t(wa),o&&t(Ft),S(en),o&&t(xa),o&&t(ze),S(tn),S(an),S(Qt),S(Kt),o&&t(Ma),o&&t(Jt),S(rn),o&&t(Sa),o&&t(Je),S(dn),S(pn),S(to),S(oo),o&&t($a),o&&t(It),S(mn),o&&t(Ea),o&&t(ye),S(un),S(so),S(Tn),S(ao),S(ro),o&&t(Fa),o&&t(qt),S(bn),o&&t(za),o&&t(ve),S(yn),S(lo),S(xn),S(co),S(ho)}}}const ap={local:"speech2text",sections:[{local:"overview",title:"Overview"},{local:"inference",title:"Inference"},{local:"transformers.Speech2TextConfig",title:"Speech2TextConfig"},{local:"transformers.Speech2TextTokenizer",title:"Speech2TextTokenizer"},{local:"transformers.Speech2TextFeatureExtractor",title:"Speech2TextFeatureExtractor"},{local:"transformers.Speech2TextProcessor",title:"Speech2TextProcessor"},{local:"transformers.Speech2TextModel",title:"Speech2TextModel"},{local:"transformers.Speech2TextForConditionalGeneration",title:"Speech2TextForConditionalGeneration"},{local:"transformers.TFSpeech2TextModel",title:"TFSpeech2TextModel"},{local:"transformers.TFSpeech2TextForConditionalGeneration",title:"TFSpeech2TextForConditionalGeneration"}],title:"Speech2Text"};function rp(j){return Xh(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class mp extends Wh{constructor(c){super();Rh(this,c,rp,sp,Vh,{})}}export{mp as default,ap as metadata};
