import{S as Wh,i as Rh,s as Vh,e as a,k as h,w as y,t as n,M as Ph,c as r,d as t,m as p,a as d,x as w,h as s,b as i,G as e,g as u,y as k,q as x,o as M,B as S,v as Xh,L as ia}from"../../chunks/vendor-hf-doc-builder.js";import{T as bo}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 la}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Ah(j){let c,b,_,g,v;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"),b=n("Example:"),_=h(),y(g.$$.fragment)},l(l){c=r(l,"P",{});var m=d(c);b=s(m,"Example:"),m.forEach(t),_=p(l),w(g.$$.fragment,l)},m(l,m){u(l,c,m),e(c,b),u(l,_,m),k(g,l,m),v=!0},p:ia,i(l){v||(x(g.$$.fragment,l),v=!0)},o(l){M(g.$$.fragment,l),v=!1},d(l){l&&t(c),l&&t(_),S(g,l)}}}function Bh(j){let c,b,_,g,v,l,m,E,Z,N,I;return{c(){c=a("p"),b=n(`This class method is simply calling the feature extractor
`),_=a("a"),g=n("from_pretrained()"),v=n(`, image processor
`),l=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=d(c);b=s(C,`This class method is simply calling the feature extractor
`),_=r(C,"A",{href:!0});var $=d(_);g=s($,"from_pretrained()"),$.forEach(t),v=s(C,`, image processor
`),l=r(C,"A",{href:!0});var ke=d(l);m=s(ke,"ImageProcessingMixin"),ke.forEach(t),E=s(C,` and the tokenizer
`),Z=r(C,"CODE",{});var Y=d(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(){i(_,"href","/docs/transformers/v4.30.0/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.from_pretrained"),i(l,"href","/docs/transformers/v4.30.0/en/internal/image_processing_utils#transformers.ImageProcessingMixin")},m(U,C){u(U,c,C),e(c,b),e(c,_),e(_,g),e(c,v),e(c,l),e(l,m),e(c,E),e(c,Z),e(Z,N),e(c,I)},d(U){U&&t(c)}}}function Yh(j){let c,b,_,g,v,l,m,E;return{c(){c=a("p"),b=n("This class method is simply calling "),_=a("a"),g=n("save_pretrained()"),v=n(` and
`),l=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=d(c);b=s(N,"This class method is simply calling "),_=r(N,"A",{href:!0});var I=d(_);g=s(I,"save_pretrained()"),I.forEach(t),v=s(N,` and
`),l=r(N,"A",{href:!0});var U=d(l);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(){i(_,"href","/docs/transformers/v4.30.0/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.save_pretrained"),i(l,"href","/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.save_pretrained")},m(Z,N){u(Z,c,N),e(c,b),e(c,_),e(_,g),e(c,v),e(c,l),e(l,m),e(c,E)},d(Z){Z&&t(c)}}}function Dh(j){let c,b,_,g,v;return{c(){c=a("p"),b=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=a("code"),g=n("Module"),v=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(l){c=r(l,"P",{});var m=d(c);b=s(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=r(m,"CODE",{});var E=d(_);g=s(E,"Module"),E.forEach(t),v=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(l,m){u(l,c,m),e(c,b),e(c,_),e(_,g),e(c,v)},d(l){l&&t(c)}}}function Lh(j){let c,b,_,g,v;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"),b=n("Example:"),_=h(),y(g.$$.fragment)},l(l){c=r(l,"P",{});var m=d(c);b=s(m,"Example:"),m.forEach(t),_=p(l),w(g.$$.fragment,l)},m(l,m){u(l,c,m),e(c,b),u(l,_,m),k(g,l,m),v=!0},p:ia,i(l){v||(x(g.$$.fragment,l),v=!0)},o(l){M(g.$$.fragment,l),v=!1},d(l){l&&t(c),l&&t(_),S(g,l)}}}function Oh(j){let c,b,_,g,v;return{c(){c=a("p"),b=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=a("code"),g=n("Module"),v=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(l){c=r(l,"P",{});var m=d(c);b=s(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=r(m,"CODE",{});var E=d(_);g=s(E,"Module"),E.forEach(t),v=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(l,m){u(l,c,m),e(c,b),e(c,_),e(_,g),e(c,v)},d(l){l&&t(c)}}}function Hh(j){let c,b,_,g,v;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"),b=n("Example:"),_=h(),y(g.$$.fragment)},l(l){c=r(l,"P",{});var m=d(c);b=s(m,"Example:"),m.forEach(t),_=p(l),w(g.$$.fragment,l)},m(l,m){u(l,c,m),e(c,b),u(l,_,m),k(g,l,m),v=!0},p:ia,i(l){v||(x(g.$$.fragment,l),v=!0)},o(l){M(g.$$.fragment,l),v=!1},d(l){l&&t(c),l&&t(_),S(g,l)}}}function Qh(j){let c,b,_,g,v,l,m,E,Z,N,I,U,C,$,ke,Y,Ve,Ie,q,Pe,se,ae,Xe,re,de,Ae,le,ie,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"),b=n("TensorFlow models and layers in "),_=a("code"),g=n("transformers"),v=n(" accept two formats as input:"),l=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"),ke=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 "),de=a("code"),Ae=n("predict()"),le=n(`, such as when creating your own layers or models with
the Keras `),ie=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=d(c);b=s(F,"TensorFlow models and layers in "),_=r(F,"CODE",{});var pt=d(_);g=s(pt,"transformers"),pt.forEach(t),v=s(F," accept two formats as input:"),F.forEach(t),l=p(T),m=r(T,"UL",{});var oe=d(m);E=r(oe,"LI",{});var mt=d(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=d(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 J=d($);ke=s(J,`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(J,"CODE",{});var ft=d(Y);Ve=s(ft,"model.fit()"),ft.forEach(t),Ie=s(J,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),q=r(J,"CODE",{});var _t=d(q);Pe=s(_t,"model.fit()"),_t.forEach(t),se=s(J,` supports! If, however, you want to use the second
format outside of Keras methods like `),ae=r(J,"CODE",{});var Ne=d(ae);Xe=s(Ne,"fit()"),Ne.forEach(t),re=s(J," and "),de=r(J,"CODE",{});var gt=d(de);Ae=s(gt,"predict()"),gt.forEach(t),le=s(J,`, such as when creating your own layers or models with
the Keras `),ie=r(J,"CODE",{});var Tt=d(ie);Be=s(Tt,"Functional"),Tt.forEach(t),ce=s(J,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),J.forEach(t),Se=p(T),G=r(T,"UL",{});var K=d(G);W=r(K,"LI",{});var z=d(W);Q=s(z,"a single Tensor with "),he=r(z,"CODE",{});var vt=d(he);pe=s(vt,"input_ids"),vt.forEach(t),Ye=s(z," only and nothing else: "),me=r(z,"CODE",{});var Ke=d(me);ue=s(Ke,"model(input_ids)"),Ke.forEach(t),z.forEach(t),De=p(K),P=r(K,"LI",{});var _e=d(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 bt=d(X);te=s(bt,"model([input_ids, attention_mask])"),bt.forEach(t),$e=s(_e," or "),O=r(_e,"CODE",{});var et=d(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=d(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 yt=d(D);Oe=s(yt,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),yt.forEach(t),tt.forEach(t),K.forEach(t),fe=p(T),A=r(T,"P",{});var ge=d(A);He=s(ge,`Note that when creating models and layers with
`),L=r(ge,"A",{href:!0,rel:!0});var wt=d(L);R=s(wt,"subclassing"),wt.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(){i(L,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),i(L,"rel","nofollow")},m(T,F){u(T,c,F),e(c,b),e(c,_),e(_,g),e(c,v),u(T,l,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($,ke),e($,Y),e(Y,Ve),e($,Ie),e($,q),e(q,Pe),e($,se),e($,ae),e(ae,Xe),e($,re),e($,de),e(de,Ae),e($,le),e($,ie),e(ie,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(l),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,b,_,g,v;return{c(){c=a("p"),b=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=a("code"),g=n("Module"),v=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(l){c=r(l,"P",{});var m=d(c);b=s(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=r(m,"CODE",{});var E=d(_);g=s(E,"Module"),E.forEach(t),v=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(l,m){u(l,c,m),e(c,b),e(c,_),e(_,g),e(c,v)},d(l){l&&t(c)}}}function ep(j){let c,b,_,g,v;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"),b=n("Example:"),_=h(),y(g.$$.fragment)},l(l){c=r(l,"P",{});var m=d(c);b=s(m,"Example:"),m.forEach(t),_=p(l),w(g.$$.fragment,l)},m(l,m){u(l,c,m),e(c,b),u(l,_,m),k(g,l,m),v=!0},p:ia,i(l){v||(x(g.$$.fragment,l),v=!0)},o(l){M(g.$$.fragment,l),v=!1},d(l){l&&t(c),l&&t(_),S(g,l)}}}function tp(j){let c,b,_,g,v,l,m,E,Z,N,I,U,C,$,ke,Y,Ve,Ie,q,Pe,se,ae,Xe,re,de,Ae,le,ie,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"),b=n("TensorFlow models and layers in "),_=a("code"),g=n("transformers"),v=n(" accept two formats as input:"),l=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"),ke=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 "),de=a("code"),Ae=n("predict()"),le=n(`, such as when creating your own layers or models with
the Keras `),ie=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=d(c);b=s(F,"TensorFlow models and layers in "),_=r(F,"CODE",{});var pt=d(_);g=s(pt,"transformers"),pt.forEach(t),v=s(F," accept two formats as input:"),F.forEach(t),l=p(T),m=r(T,"UL",{});var oe=d(m);E=r(oe,"LI",{});var mt=d(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=d(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 J=d($);ke=s(J,`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(J,"CODE",{});var ft=d(Y);Ve=s(ft,"model.fit()"),ft.forEach(t),Ie=s(J,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),q=r(J,"CODE",{});var _t=d(q);Pe=s(_t,"model.fit()"),_t.forEach(t),se=s(J,` supports! If, however, you want to use the second
format outside of Keras methods like `),ae=r(J,"CODE",{});var Ne=d(ae);Xe=s(Ne,"fit()"),Ne.forEach(t),re=s(J," and "),de=r(J,"CODE",{});var gt=d(de);Ae=s(gt,"predict()"),gt.forEach(t),le=s(J,`, such as when creating your own layers or models with
the Keras `),ie=r(J,"CODE",{});var Tt=d(ie);Be=s(Tt,"Functional"),Tt.forEach(t),ce=s(J,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),J.forEach(t),Se=p(T),G=r(T,"UL",{});var K=d(G);W=r(K,"LI",{});var z=d(W);Q=s(z,"a single Tensor with "),he=r(z,"CODE",{});var vt=d(he);pe=s(vt,"input_ids"),vt.forEach(t),Ye=s(z," only and nothing else: "),me=r(z,"CODE",{});var Ke=d(me);ue=s(Ke,"model(input_ids)"),Ke.forEach(t),z.forEach(t),De=p(K),P=r(K,"LI",{});var _e=d(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 bt=d(X);te=s(bt,"model([input_ids, attention_mask])"),bt.forEach(t),$e=s(_e," or "),O=r(_e,"CODE",{});var et=d(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=d(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 yt=d(D);Oe=s(yt,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),yt.forEach(t),tt.forEach(t),K.forEach(t),fe=p(T),A=r(T,"P",{});var ge=d(A);He=s(ge,`Note that when creating models and layers with
`),L=r(ge,"A",{href:!0,rel:!0});var wt=d(L);R=s(wt,"subclassing"),wt.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(){i(L,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),i(L,"rel","nofollow")},m(T,F){u(T,c,F),e(c,b),e(c,_),e(_,g),e(c,v),u(T,l,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($,ke),e($,Y),e(Y,Ve),e($,Ie),e($,q),e(q,Pe),e($,se),e($,ae),e(ae,Xe),e($,re),e($,de),e(de,Ae),e($,le),e($,ie),e(ie,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(l),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,b,_,g,v;return{c(){c=a("p"),b=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),_=a("code"),g=n("Module"),v=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(l){c=r(l,"P",{});var m=d(c);b=s(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),_=r(m,"CODE",{});var E=d(_);g=s(E,"Module"),E.forEach(t),v=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(l,m){u(l,c,m),e(c,b),e(c,_),e(_,g),e(c,v)},d(l){l&&t(c)}}}function np(j){let c,b,_,g,v;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"),b=n("Example:"),_=h(),y(g.$$.fragment)},l(l){c=r(l,"P",{});var m=d(c);b=s(m,"Example:"),m.forEach(t),_=p(l),w(g.$$.fragment,l)},m(l,m){u(l,c,m),e(c,b),u(l,_,m),k(g,l,m),v=!0},p:ia,i(l){v||(x(g.$$.fragment,l),v=!0)},o(l){M(g.$$.fragment,l),v=!1},d(l){l&&t(c),l&&t(_),S(g,l)}}}function sp(j){let c,b,_,g,v,l,m,E,Z,N,I,U,C,$,ke,Y,Ve,Ie,q,Pe,se,ae,Xe,re,de,Ae,le,ie,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,J,ft,_t,Ne,gt,Tt,K,z,vt,Ke,_e,bt,et,tt,yt,ge,wt,cr,is,hr,pr,cs,mr,ur,yo,fr,_r,hs,gr,ca,En,ps,Tr,ha,wo,pa,Fn,ko,ms,vr,br,Te,yr,us,wr,kr,fs,xr,Mr,_s,Sr,$r,gs,Er,Fr,Ts,Jr,zr,ma,xo,ua,Ut,jr,Mo,Ir,Cr,fa,kt,Gt,vs,So,qr,bs,Nr,_a,Fe,$o,Ur,xt,Gr,Jn,Zr,Wr,Eo,Rr,Vr,Pr,Mt,Xr,zn,Ar,Br,jn,Yr,Dr,Lr,Zt,ga,St,Wt,ys,Fo,Or,ws,Hr,Ta,H,Jo,Qr,ks,Kr,ed,zo,td,In,od,nd,sd,Rt,jo,ad,xs,rd,dd,Vt,Io,ld,Co,id,Ms,cd,hd,pd,at,qo,md,Cn,ud,qn,fd,_d,Ss,gd,Td,Nn,No,va,$t,Pt,$s,Uo,vd,Es,bd,ba,ve,Go,yd,Fs,wd,kd,Zo,xd,Un,Md,Sd,$d,Js,Ed,Fd,Xt,Wo,Jd,zs,zd,ya,Et,At,js,Ro,jd,Is,Id,wa,B,Vo,Cd,Cs,qd,Nd,xe,Gn,Ud,Gd,Zn,Zd,Wd,Wn,Rd,Vd,Po,qs,Pd,Xd,Ad,Rn,Bd,Yd,Dd,Bt,Xo,Ld,ot,Od,Ao,Ns,Hd,Qd,Kd,Us,el,tl,Bo,Gs,ol,nl,sl,al,rt,Yo,rl,Zs,dl,ll,Yt,il,dt,Do,cl,Lo,hl,Vn,pl,ml,ul,Dt,fl,Lt,Oo,_l,Ho,gl,Pn,Tl,vl,bl,Ot,Qo,yl,Ko,wl,Xn,kl,xl,ka,Ft,Ht,Ws,en,Ml,Rs,Sl,xa,Je,tn,$l,on,El,An,Fl,Jl,zl,nn,jl,sn,Il,Cl,ql,Ue,an,Nl,Jt,Ul,Bn,Gl,Zl,Vs,Wl,Rl,Vl,Qt,Pl,Kt,Ma,zt,eo,Ps,rn,Xl,Xs,Al,Sa,ze,dn,Bl,ln,Yl,Yn,Dl,Ll,Ol,cn,Hl,hn,Ql,Kl,ei,Ge,pn,ti,jt,oi,Dn,ni,si,As,ai,ri,di,to,li,oo,$a,It,no,Bs,mn,ii,Ys,ci,Ea,be,un,hi,fn,pi,Ln,mi,ui,fi,_n,_i,gn,gi,Ti,vi,so,bi,Ze,Tn,yi,Ct,wi,On,ki,xi,Ds,Mi,Si,$i,ao,Ei,ro,Fa,qt,lo,Ls,vn,Fi,Os,Ji,Ja,ye,bn,zi,yn,ji,Hn,Ii,Ci,qi,wn,Ni,kn,Ui,Gi,Zi,io,Wi,We,xn,Ri,Nt,Vi,Qn,Pi,Xi,Hs,Ai,Bi,Yi,co,Di,ho,za;return l=new st({}),$=new st({}),O=new st({}),wo=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/v4.30.0/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/v4.30.0/src/transformers/models/speech_to_text/configuration_speech_to_text.py#L31"}}),Zt=new la({props:{anchor:"transformers.Speech2TextConfig.example",$$slots:{default:[Ah]},$$scope:{ctx:j}}}),Fo=new st({}),Jo=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/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>`,name:"sp_model_kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/src/transformers/tokenization_utils_base.py#L3060",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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>) &#x2014;
If set, will return tensors instead of list of python integers. Acceptable values are:</p>
<ul>
<li><code>&apos;tf&apos;</code>: Return TensorFlow <code>tf.constant</code> objects.</li>
<li><code>&apos;pt&apos;</code>: Return PyTorch <code>torch.Tensor</code> objects.</li>
<li><code>&apos;np&apos;</code>: Return Numpy <code>np.ndarray</code> objects.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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:""},{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/v4.30.0/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.save_pretrained">save_pretrained()</a> method, e.g., <code>./my_model_directory/</code>.</li>
<li>a path or url to a saved feature extractor JSON <em>file</em>, e.g.,
<code>./my_model_directory/preprocessor_config.json</code>.
**kwargs &#x2014;
Additional keyword arguments passed along to both
<a href="/docs/transformers/v4.30.0/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.from_pretrained">from_pretrained()</a> and
<code>~tokenization_utils_base.PreTrainedTokenizer.from_pretrained</code>.</li>
</ul>`,name:"pretrained_model_name_or_path"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/processing_utils.py#L153"}}),Yt=new bo({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).
kwargs &#x2014;
Additional key word arguments passed along to the <a href="/docs/transformers/v4.30.0/en/internal/image_processing_utils#transformers.ImageProcessingMixin.push_to_hub">push_to_hub()</a> method.`,name:"push_to_hub"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/processing_utils.py#L91"}}),Dt=new bo({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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/speech_to_text/modeling_speech_to_text.py#L1131"}}),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/v4.30.0/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/v4.30.0/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/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/speech_to_text/modeling_speech_to_text.py#L1153",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.30.0/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/v4.30.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Qt=new bo({props:{$$slots:{default:[Dh]},$$scope:{ctx:j}}}),Kt=new la({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/v4.30.0/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/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/speech_to_text/modeling_speech_to_text.py#L1262"}}),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/v4.30.0/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/v4.30.0/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/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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/v4.30.0/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/v4.30.0/src/transformers/models/speech_to_text/modeling_speech_to_text.py#L1300",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.30.0/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/v4.30.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),to=new bo({props:{$$slots:{default:[Oh]},$$scope:{ctx:j}}}),oo=new la({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/v4.30.0/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/v4.30.0/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/v4.30.0/src/transformers/models/speech_to_text/modeling_tf_speech_to_text.py#L1215"}}),so=new bo({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/v4.30.0/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/v4.30.0/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/v4.30.0/en/model_doc/speech_to_text#transformers.Speech2TextTokenizer">Speech2TextTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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/v4.30.0/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/v4.30.0/src/transformers/models/speech_to_text/modeling_tf_speech_to_text.py#L1227",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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/v4.30.0/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/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqModelOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ao=new bo({props:{$$slots:{default:[Kh]},$$scope:{ctx:j}}}),ro=new la({props:{anchor:"transformers.TFSpeech2TextModel.call.example",$$slots:{default:[ep]},$$scope:{ctx:j}}}),vn=new st({}),bn=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/v4.30.0/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/v4.30.0/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/v4.30.0/src/transformers/models/speech_to_text/modeling_tf_speech_to_text.py#L1297"}}),io=new bo({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/v4.30.0/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/v4.30.0/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/v4.30.0/en/model_doc/speech_to_text#transformers.Speech2TextTokenizer">Speech2TextTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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/v4.30.0/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/v4.30.0/src/transformers/models/speech_to_text/modeling_tf_speech_to_text.py#L1321",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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/v4.30.0/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/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqLMOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),co=new bo({props:{$$slots:{default:[op]},$$scope:{ctx:j}}}),ho=new la({props:{anchor:"transformers.TFSpeech2TextForConditionalGeneration.call.example",$$slots:{default:[np]},$$scope:{ctx:j}}}),{c(){c=a("meta"),b=h(),_=a("h1"),g=a("a"),v=a("span"),y(l.$$.fragment),m=h(),E=a("span"),Z=n("Speech2Text"),N=h(),I=a("h2"),U=a("a"),C=a("span"),y($.$$.fragment),ke=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"),de=n("LibriSpeech"),Ae=n(", "),le=a("a"),ie=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"),y(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 "),J=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(),z=a("p"),vt=n("The feature extractor depends on "),Ke=a("code"),_e=n("torchaudio"),bt=n(" and the tokenizer depends on "),et=a("code"),tt=n("sentencepiece"),yt=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"),wt=n('pip install transformers"[speech, sentencepiece]"'),cr=n(" or install the packages separately with "),is=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 "),yo=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(),y(wo.$$.fragment),pa=h(),Fn=a("ul"),ko=a("li"),ms=a("p"),vr=n("Multilingual speech translation"),br=h(),Te=a("p"),yr=n("For multilingual speech translation models, "),us=a("code"),wr=n("eos_token_id"),kr=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"),Jr=n("facebook/s2t-medium-mustc-multilingual-st"),zr=n(`
checkpoint.`),ma=h(),y(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(),kt=a("h2"),Gt=a("a"),vs=a("span"),y(So.$$.fragment),qr=h(),bs=a("span"),Nr=n("Speech2TextConfig"),_a=h(),Fe=a("div"),y($o.$$.fragment),Ur=h(),xt=a("p"),Gr=n("This is the configuration class to store the configuration of a "),Jn=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 "),zn=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(),y(Zt.$$.fragment),ga=h(),St=a("h2"),Wt=a("a"),ys=a("span"),y(Fo.$$.fragment),Or=h(),ws=a("span"),Hr=n("Speech2TextTokenizer"),Ta=h(),H=a("div"),y(Jo.$$.fragment),Qr=h(),ks=a("p"),Kr=n("Construct an Speech2Text tokenizer."),ed=h(),zo=a("p"),td=n("This tokenizer inherits from "),In=a("a"),od=n("PreTrainedTokenizer"),nd=n(` which contains some of the main methods. Users should refer to
the superclass for more information regarding such methods.`),sd=h(),Rt=a("div"),y(jo.$$.fragment),ad=h(),xs=a("p"),rd=n("Build model inputs from a sequence by appending eos_token_id."),dd=h(),Vt=a("div"),y(Io.$$.fragment),ld=h(),Co=a("p"),id=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"),cd=n("prepare_for_model"),hd=n(" method."),pd=h(),at=a("div"),y(qo.$$.fragment),md=h(),Cn=a("p"),ud=n("Create the token type IDs corresponding to the sequences passed. "),qn=a("a"),fd=n(`What are token type
IDs?`),_d=h(),Ss=a("p"),gd=n("Should be overridden in a subclass if the model has a special way of building those."),Td=h(),Nn=a("div"),y(No.$$.fragment),va=h(),$t=a("h2"),Pt=a("a"),$s=a("span"),y(Uo.$$.fragment),vd=h(),Es=a("span"),bd=n("Speech2TextFeatureExtractor"),ba=h(),ve=a("div"),y(Go.$$.fragment),yd=h(),Fs=a("p"),wd=n("Constructs a Speech2Text feature extractor."),kd=h(),Zo=a("p"),xd=n("This feature extractor inherits from "),Un=a("a"),Md=n("Speech2TextFeatureExtractor"),Sd=n(` which contains most of the main methods. Users
should refer to this superclass for more information regarding those methods.`),$d=h(),Js=a("p"),Ed=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.`),Fd=h(),Xt=a("div"),y(Wo.$$.fragment),Jd=h(),zs=a("p"),zd=n("Main method to featurize and prepare for the model one or several sequence(s)."),ya=h(),Et=a("h2"),At=a("a"),js=a("span"),y(Ro.$$.fragment),jd=h(),Is=a("span"),Id=n("Speech2TextProcessor"),wa=h(),B=a("div"),y(Vo.$$.fragment),Cd=h(),Cs=a("p"),qd=n(`Constructs a Speech2Text processor which wraps a Speech2Text feature extractor and a Speech2Text tokenizer into a
single processor.`),Nd=h(),xe=a("p"),Gn=a("a"),Ud=n("Speech2TextProcessor"),Gd=n(" offers all the functionalities of "),Zn=a("a"),Zd=n("Speech2TextFeatureExtractor"),Wd=n(` and
`),Wn=a("a"),Rd=n("Speech2TextTokenizer"),Vd=n(". See the "),Po=a("a"),qs=a("strong"),Pd=n("call"),Xd=n("()"),Ad=n(" and "),Rn=a("a"),Bd=n("decode()"),Yd=n(` for more
information.`),Dd=h(),Bt=a("div"),y(Xo.$$.fragment),Ld=h(),ot=a("p"),Od=n(`When used in normal mode, this method forwards all its arguments to Speech2TextFeatureExtractor\u2019s
`),Ao=a("a"),Ns=a("strong"),Hd=n("call"),Qd=n("()"),Kd=n(` and returns its output. If used in the context
`),Us=a("code"),el=n("as_target_processor()"),tl=n(` this method forwards all its arguments to Speech2TextTokenizer\u2019s
`),Bo=a("a"),Gs=a("strong"),ol=n("call"),nl=n("()"),sl=n(`. Please refer to the doctsring of the above two methods for more
information.`),al=h(),rt=a("div"),y(Yo.$$.fragment),rl=h(),Zs=a("p"),dl=n("Instantiate a processor associated with a pretrained model."),ll=h(),y(Yt.$$.fragment),il=h(),dt=a("div"),y(Do.$$.fragment),cl=h(),Lo=a("p"),hl=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"),pl=n("from_pretrained()"),ml=n(" method."),ul=h(),y(Dt.$$.fragment),fl=h(),Lt=a("div"),y(Oo.$$.fragment),_l=h(),Ho=a("p"),gl=n("This method forwards all its arguments to Speech2TextTokenizer\u2019s "),Pn=a("a"),Tl=n("batch_decode()"),vl=n(`. Please
refer to the docstring of this method for more information.`),bl=h(),Ot=a("div"),y(Qo.$$.fragment),yl=h(),Ko=a("p"),wl=n("This method forwards all its arguments to Speech2TextTokenizer\u2019s "),Xn=a("a"),kl=n("decode()"),xl=n(`. Please refer
to the docstring of this method for more information.`),ka=h(),Ft=a("h2"),Ht=a("a"),Ws=a("span"),y(en.$$.fragment),Ml=h(),Rs=a("span"),Sl=n("Speech2TextModel"),xa=h(),Je=a("div"),y(tn.$$.fragment),$l=h(),on=a("p"),El=n(`The bare Speech2Text Model outputting raw hidden-states without any specific head on top.
This model inherits from `),An=a("a"),Fl=n("PreTrainedModel"),Jl=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.)`),zl=h(),nn=a("p"),jl=n("This model is also a PyTorch "),sn=a("a"),Il=n("torch.nn.Module"),Cl=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ql=h(),Ue=a("div"),y(an.$$.fragment),Nl=h(),Jt=a("p"),Ul=n("The "),Bn=a("a"),Gl=n("Speech2TextModel"),Zl=n(" forward method, overrides the "),Vs=a("code"),Wl=n("__call__"),Rl=n(" special method."),Vl=h(),y(Qt.$$.fragment),Pl=h(),y(Kt.$$.fragment),Ma=h(),zt=a("h2"),eo=a("a"),Ps=a("span"),y(rn.$$.fragment),Xl=h(),Xs=a("span"),Al=n("Speech2TextForConditionalGeneration"),Sa=h(),ze=a("div"),y(dn.$$.fragment),Bl=h(),ln=a("p"),Yl=n(`The Speech2Text Model with a language modeling head. Can be used for summarization.
This model inherits from `),Yn=a("a"),Dl=n("PreTrainedModel"),Ll=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.)`),Ol=h(),cn=a("p"),Hl=n("This model is also a PyTorch "),hn=a("a"),Ql=n("torch.nn.Module"),Kl=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ei=h(),Ge=a("div"),y(pn.$$.fragment),ti=h(),jt=a("p"),oi=n("The "),Dn=a("a"),ni=n("Speech2TextForConditionalGeneration"),si=n(" forward method, overrides the "),As=a("code"),ai=n("__call__"),ri=n(" special method."),di=h(),y(to.$$.fragment),li=h(),y(oo.$$.fragment),$a=h(),It=a("h2"),no=a("a"),Bs=a("span"),y(mn.$$.fragment),ii=h(),Ys=a("span"),ci=n("TFSpeech2TextModel"),Ea=h(),be=a("div"),y(un.$$.fragment),hi=h(),fn=a("p"),pi=n(`The bare Speech2Text Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Ln=a("a"),mi=n("TFPreTrainedModel"),ui=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.)`),fi=h(),_n=a("p"),_i=n("This model is also a "),gn=a("a"),gi=n("tf.keras.Model"),Ti=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.`),vi=h(),y(so.$$.fragment),bi=h(),Ze=a("div"),y(Tn.$$.fragment),yi=h(),Ct=a("p"),wi=n("The "),On=a("a"),ki=n("TFSpeech2TextModel"),xi=n(" forward method, overrides the "),Ds=a("code"),Mi=n("__call__"),Si=n(" special method."),$i=h(),y(ao.$$.fragment),Ei=h(),y(ro.$$.fragment),Fa=h(),qt=a("h2"),lo=a("a"),Ls=a("span"),y(vn.$$.fragment),Fi=h(),Os=a("span"),Ji=n("TFSpeech2TextForConditionalGeneration"),Ja=h(),ye=a("div"),y(bn.$$.fragment),zi=h(),yn=a("p"),ji=n(`The Speech2Text Model with a language modeling head. Can be used for summarization.
This model inherits from `),Hn=a("a"),Ii=n("TFPreTrainedModel"),Ci=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.)`),qi=h(),wn=a("p"),Ni=n("This model is also a "),kn=a("a"),Ui=n("tf.keras.Model"),Gi=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.`),Zi=h(),y(io.$$.fragment),Wi=h(),We=a("div"),y(xn.$$.fragment),Ri=h(),Nt=a("p"),Vi=n("The "),Qn=a("a"),Pi=n("TFSpeech2TextForConditionalGeneration"),Xi=n(" forward method, overrides the "),Hs=a("code"),Ai=n("__call__"),Bi=n(" special method."),Yi=h(),y(co.$$.fragment),Di=h(),y(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),b=p(o),_=r(o,"H1",{class:!0});var Mn=d(_);g=r(Mn,"A",{id:!0,class:!0,href:!0});var Qs=d(g);v=r(Qs,"SPAN",{});var Ks=d(v);w(l.$$.fragment,Ks),Ks.forEach(t),Qs.forEach(t),m=p(Mn),E=r(Mn,"SPAN",{});var ea=d(E);Z=s(ea,"Speech2Text"),ea.forEach(t),Mn.forEach(t),N=p(o),I=r(o,"H2",{class:!0});var Sn=d(I);U=r(Sn,"A",{id:!0,class:!0,href:!0});var ta=d(U);C=r(ta,"SPAN",{});var oa=d(C);w($.$$.fragment,oa),oa.forEach(t),ta.forEach(t),ke=p(Sn),Y=r(Sn,"SPAN",{});var na=d(Y);Ve=s(na,"Overview"),na.forEach(t),Sn.forEach(t),Ie=p(o),q=r(o,"P",{});var je=d(q);Pe=s(je,"The Speech2Text model was proposed in "),se=r(je,"A",{href:!0,rel:!0});var sa=d(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=d(re);de=s(aa,"LibriSpeech"),aa.forEach(t),Ae=s(je,", "),le=r(je,"A",{href:!0,rel:!0});var ra=d(le);ie=s(ra,"CoVoST 2"),ra.forEach(t),Be=s(je,", "),ce=r(je,"A",{href:!0,rel:!0});var da=d(ce);Se=s(da,"MuST-C"),da.forEach(t),G=s(je,"."),je.forEach(t),W=p(o),Q=r(o,"P",{});var Kn=d(Q);he=s(Kn,"This model was contributed by "),pe=r(Kn,"A",{href:!0,rel:!0});var Ki=d(pe);Ye=s(Ki,"valhalla"),Ki.forEach(t),me=s(Kn,". The original code can be found "),ue=r(Kn,"A",{href:!0,rel:!0});var ec=d(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=d(X);te=r(ja,"A",{id:!0,class:!0,href:!0});var tc=d(te);$e=r(tc,"SPAN",{});var oc=d($e);w(O.$$.fragment,oc),oc.forEach(t),tc.forEach(t),Le=p(ja),Ee=r(ja,"SPAN",{});var nc=d(Ee);ee=s(nc,"Inference"),nc.forEach(t),ja.forEach(t),qe=p(o),D=r(o,"P",{});var Ia=d(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=d(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 lt=d(R);Qe=s(lt,"The "),T=r(lt,"A",{href:!0});var ac=d(T);F=s(ac,"Speech2TextFeatureExtractor"),ac.forEach(t),pt=s(lt,` class is responsible for extracting the log-mel filter-bank
features. The `),oe=r(lt,"A",{href:!0});var rc=d(oe);mt=s(rc,"Speech2TextProcessor"),rc.forEach(t),ut=s(lt," wraps "),J=r(lt,"A",{href:!0});var dc=d(J);ft=s(dc,"Speech2TextFeatureExtractor"),dc.forEach(t),_t=s(lt,` and
`),Ne=r(lt,"A",{href:!0});var lc=d(Ne);gt=s(lc,"Speech2TextTokenizer"),lc.forEach(t),Tt=s(lt,` into a single instance to both extract the input features and decode the
predicted token ids.`),lt.forEach(t),K=p(o),z=r(o,"P",{});var we=d(z);vt=s(we,"The feature extractor depends on "),Ke=r(we,"CODE",{});var ic=d(Ke);_e=s(ic,"torchaudio"),ic.forEach(t),bt=s(we," and the tokenizer depends on "),et=r(we,"CODE",{});var cc=d(et);tt=s(cc,"sentencepiece"),cc.forEach(t),yt=s(we,` so be sure to
install those packages before running the examples. You could either install those as extra speech dependencies with
`),ge=r(we,"CODE",{});var hc=d(ge);wt=s(hc,'pip install transformers"[speech, sentencepiece]"'),hc.forEach(t),cr=s(we," or install the packages separately with "),is=r(we,"CODE",{});var pc=d(is);hr=s(pc,"pip install torchaudio sentencepiece"),pc.forEach(t),pr=s(we,". Also "),cs=r(we,"CODE",{});var mc=d(cs);mr=s(mc,"torchaudio"),mc.forEach(t),ur=s(we," requires the development version of the "),yo=r(we,"A",{href:!0,rel:!0});var uc=d(yo);fr=s(uc,"libsndfile"),uc.forEach(t),_r=s(we,` package which can be installed via a system package manager. On Ubuntu it can
be installed as follows: `),hs=r(we,"CODE",{});var fc=d(hs);gr=s(fc,"apt install libsndfile1-dev"),fc.forEach(t),we.forEach(t),ca=p(o),En=r(o,"UL",{});var _c=d(En);ps=r(_c,"LI",{});var gc=d(ps);Tr=s(gc,"ASR and Speech Translation"),gc.forEach(t),_c.forEach(t),ha=p(o),w(wo.$$.fragment,o),pa=p(o),Fn=r(o,"UL",{});var Tc=d(Fn);ko=r(Tc,"LI",{});var Ca=d(ko);ms=r(Ca,"P",{});var vc=d(ms);vr=s(vc,"Multilingual speech translation"),vc.forEach(t),br=p(Ca),Te=r(Ca,"P",{});var Re=d(Te);yr=s(Re,"For multilingual speech translation models, "),us=r(Re,"CODE",{});var bc=d(us);wr=s(bc,"eos_token_id"),bc.forEach(t),kr=s(Re," is used as the "),fs=r(Re,"CODE",{});var yc=d(fs);xr=s(yc,"decoder_start_token_id"),yc.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 wc=d(_s);Sr=s(wc,"forced_bos_token_id"),wc.forEach(t),$r=s(Re," parameter to the "),gs=r(Re,"CODE",{});var kc=d(gs);Er=s(kc,"generate()"),kc.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=d(Ts);Jr=s(xc,"facebook/s2t-medium-mustc-multilingual-st"),xc.forEach(t),zr=s(Re,`
checkpoint.`),Re.forEach(t),Ca.forEach(t),Tc.forEach(t),ma=p(o),w(xo.$$.fragment,o),ua=p(o),Ut=r(o,"P",{});var qa=d(Ut);jr=s(qa,"See the "),Mo=r(qa,"A",{href:!0,rel:!0});var Mc=d(Mo);Ir=s(Mc,"model hub"),Mc.forEach(t),Cr=s(qa," to look for Speech2Text checkpoints."),qa.forEach(t),fa=p(o),kt=r(o,"H2",{class:!0});var Na=d(kt);Gt=r(Na,"A",{id:!0,class:!0,href:!0});var Sc=d(Gt);vs=r(Sc,"SPAN",{});var $c=d(vs);w(So.$$.fragment,$c),$c.forEach(t),Sc.forEach(t),qr=p(Na),bs=r(Na,"SPAN",{});var Ec=d(bs);Nr=s(Ec,"Speech2TextConfig"),Ec.forEach(t),Na.forEach(t),_a=p(o),Fe=r(o,"DIV",{class:!0});var po=d(Fe);w($o.$$.fragment,po),Ur=p(po),xt=r(po,"P",{});var es=d(xt);Gr=s(es,"This is the configuration class to store the configuration of a "),Jn=r(es,"A",{href:!0});var Fc=d(Jn);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 Jc=d(Eo);Rr=s(Jc,"facebook/s2t-small-librispeech-asr"),Jc.forEach(t),Vr=s(es," architecture."),es.forEach(t),Pr=p(po),Mt=r(po,"P",{});var ts=d(Mt);Xr=s(ts,"Configuration objects inherit from "),zn=r(ts,"A",{href:!0});var zc=d(zn);Ar=s(zc,"PretrainedConfig"),zc.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=d(jn);Yr=s(jc,"PretrainedConfig"),jc.forEach(t),Dr=s(ts," for more information."),ts.forEach(t),Lr=p(po),w(Zt.$$.fragment,po),po.forEach(t),ga=p(o),St=r(o,"H2",{class:!0});var Ua=d(St);Wt=r(Ua,"A",{id:!0,class:!0,href:!0});var Ic=d(Wt);ys=r(Ic,"SPAN",{});var Cc=d(ys);w(Fo.$$.fragment,Cc),Cc.forEach(t),Ic.forEach(t),Or=p(Ua),ws=r(Ua,"SPAN",{});var qc=d(ws);Hr=s(qc,"Speech2TextTokenizer"),qc.forEach(t),Ua.forEach(t),Ta=p(o),H=r(o,"DIV",{class:!0});var Me=d(H);w(Jo.$$.fragment,Me),Qr=p(Me),ks=r(Me,"P",{});var Nc=d(ks);Kr=s(Nc,"Construct an Speech2Text tokenizer."),Nc.forEach(t),ed=p(Me),zo=r(Me,"P",{});var Ga=d(zo);td=s(Ga,"This tokenizer inherits from "),In=r(Ga,"A",{href:!0});var Uc=d(In);od=s(Uc,"PreTrainedTokenizer"),Uc.forEach(t),nd=s(Ga,` which contains some of the main methods. Users should refer to
the superclass for more information regarding such methods.`),Ga.forEach(t),sd=p(Me),Rt=r(Me,"DIV",{class:!0});var Za=d(Rt);w(jo.$$.fragment,Za),ad=p(Za),xs=r(Za,"P",{});var Gc=d(xs);rd=s(Gc,"Build model inputs from a sequence by appending eos_token_id."),Gc.forEach(t),Za.forEach(t),dd=p(Me),Vt=r(Me,"DIV",{class:!0});var Wa=d(Vt);w(Io.$$.fragment,Wa),ld=p(Wa),Co=r(Wa,"P",{});var Ra=d(Co);id=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=d(Ms);cd=s(Zc,"prepare_for_model"),Zc.forEach(t),hd=s(Ra," method."),Ra.forEach(t),Wa.forEach(t),pd=p(Me),at=r(Me,"DIV",{class:!0});var os=d(at);w(qo.$$.fragment,os),md=p(os),Cn=r(os,"P",{});var Li=d(Cn);ud=s(Li,"Create the token type IDs corresponding to the sequences passed. "),qn=r(Li,"A",{href:!0});var Wc=d(qn);fd=s(Wc,`What are token type
IDs?`),Wc.forEach(t),Li.forEach(t),_d=p(os),Ss=r(os,"P",{});var Rc=d(Ss);gd=s(Rc,"Should be overridden in a subclass if the model has a special way of building those."),Rc.forEach(t),os.forEach(t),Td=p(Me),Nn=r(Me,"DIV",{class:!0});var Vc=d(Nn);w(No.$$.fragment,Vc),Vc.forEach(t),Me.forEach(t),va=p(o),$t=r(o,"H2",{class:!0});var Va=d($t);Pt=r(Va,"A",{id:!0,class:!0,href:!0});var Pc=d(Pt);$s=r(Pc,"SPAN",{});var Xc=d($s);w(Uo.$$.fragment,Xc),Xc.forEach(t),Pc.forEach(t),vd=p(Va),Es=r(Va,"SPAN",{});var Ac=d(Es);bd=s(Ac,"Speech2TextFeatureExtractor"),Ac.forEach(t),Va.forEach(t),ba=p(o),ve=r(o,"DIV",{class:!0});var it=d(ve);w(Go.$$.fragment,it),yd=p(it),Fs=r(it,"P",{});var Bc=d(Fs);wd=s(Bc,"Constructs a Speech2Text feature extractor."),Bc.forEach(t),kd=p(it),Zo=r(it,"P",{});var Pa=d(Zo);xd=s(Pa,"This feature extractor inherits from "),Un=r(Pa,"A",{href:!0});var Yc=d(Un);Md=s(Yc,"Speech2TextFeatureExtractor"),Yc.forEach(t),Sd=s(Pa,` which contains most of the main methods. Users
should refer to this superclass for more information regarding those methods.`),Pa.forEach(t),$d=p(it),Js=r(it,"P",{});var Dc=d(Js);Ed=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),Fd=p(it),Xt=r(it,"DIV",{class:!0});var Xa=d(Xt);w(Wo.$$.fragment,Xa),Jd=p(Xa),zs=r(Xa,"P",{});var Lc=d(zs);zd=s(Lc,"Main method to featurize and prepare for the model one or several sequence(s)."),Lc.forEach(t),Xa.forEach(t),it.forEach(t),ya=p(o),Et=r(o,"H2",{class:!0});var Aa=d(Et);At=r(Aa,"A",{id:!0,class:!0,href:!0});var Oc=d(At);js=r(Oc,"SPAN",{});var Hc=d(js);w(Ro.$$.fragment,Hc),Hc.forEach(t),Oc.forEach(t),jd=p(Aa),Is=r(Aa,"SPAN",{});var Qc=d(Is);Id=s(Qc,"Speech2TextProcessor"),Qc.forEach(t),Aa.forEach(t),wa=p(o),B=r(o,"DIV",{class:!0});var ne=d(B);w(Vo.$$.fragment,ne),Cd=p(ne),Cs=r(ne,"P",{});var Kc=d(Cs);qd=s(Kc,`Constructs a Speech2Text processor which wraps a Speech2Text feature extractor and a Speech2Text tokenizer into a
single processor.`),Kc.forEach(t),Nd=p(ne),xe=r(ne,"P",{});var nt=d(xe);Gn=r(nt,"A",{href:!0});var eh=d(Gn);Ud=s(eh,"Speech2TextProcessor"),eh.forEach(t),Gd=s(nt," offers all the functionalities of "),Zn=r(nt,"A",{href:!0});var th=d(Zn);Zd=s(th,"Speech2TextFeatureExtractor"),th.forEach(t),Wd=s(nt,` and
`),Wn=r(nt,"A",{href:!0});var oh=d(Wn);Rd=s(oh,"Speech2TextTokenizer"),oh.forEach(t),Vd=s(nt,". See the "),Po=r(nt,"A",{href:!0});var Oi=d(Po);qs=r(Oi,"STRONG",{});var nh=d(qs);Pd=s(nh,"call"),nh.forEach(t),Xd=s(Oi,"()"),Oi.forEach(t),Ad=s(nt," and "),Rn=r(nt,"A",{href:!0});var sh=d(Rn);Bd=s(sh,"decode()"),sh.forEach(t),Yd=s(nt,` for more
information.`),nt.forEach(t),Dd=p(ne),Bt=r(ne,"DIV",{class:!0});var Ba=d(Bt);w(Xo.$$.fragment,Ba),Ld=p(Ba),ot=r(Ba,"P",{});var mo=d(ot);Od=s(mo,`When used in normal mode, this method forwards all its arguments to Speech2TextFeatureExtractor\u2019s
`),Ao=r(mo,"A",{href:!0});var Hi=d(Ao);Ns=r(Hi,"STRONG",{});var ah=d(Ns);Hd=s(ah,"call"),ah.forEach(t),Qd=s(Hi,"()"),Hi.forEach(t),Kd=s(mo,` and returns its output. If used in the context
`),Us=r(mo,"CODE",{});var rh=d(Us);el=s(rh,"as_target_processor()"),rh.forEach(t),tl=s(mo,` this method forwards all its arguments to Speech2TextTokenizer\u2019s
`),Bo=r(mo,"A",{href:!0});var Qi=d(Bo);Gs=r(Qi,"STRONG",{});var dh=d(Gs);ol=s(dh,"call"),dh.forEach(t),nl=s(Qi,"()"),Qi.forEach(t),sl=s(mo,`. Please refer to the doctsring of the above two methods for more
information.`),mo.forEach(t),Ba.forEach(t),al=p(ne),rt=r(ne,"DIV",{class:!0});var ns=d(rt);w(Yo.$$.fragment,ns),rl=p(ns),Zs=r(ns,"P",{});var lh=d(Zs);dl=s(lh,"Instantiate a processor associated with a pretrained model."),lh.forEach(t),ll=p(ns),w(Yt.$$.fragment,ns),ns.forEach(t),il=p(ne),dt=r(ne,"DIV",{class:!0});var ss=d(dt);w(Do.$$.fragment,ss),cl=p(ss),Lo=r(ss,"P",{});var Ya=d(Lo);hl=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 ih=d(Vn);pl=s(ih,"from_pretrained()"),ih.forEach(t),ml=s(Ya," method."),Ya.forEach(t),ul=p(ss),w(Dt.$$.fragment,ss),ss.forEach(t),fl=p(ne),Lt=r(ne,"DIV",{class:!0});var Da=d(Lt);w(Oo.$$.fragment,Da),_l=p(Da),Ho=r(Da,"P",{});var La=d(Ho);gl=s(La,"This method forwards all its arguments to Speech2TextTokenizer\u2019s "),Pn=r(La,"A",{href:!0});var ch=d(Pn);Tl=s(ch,"batch_decode()"),ch.forEach(t),vl=s(La,`. Please
refer to the docstring of this method for more information.`),La.forEach(t),Da.forEach(t),bl=p(ne),Ot=r(ne,"DIV",{class:!0});var Oa=d(Ot);w(Qo.$$.fragment,Oa),yl=p(Oa),Ko=r(Oa,"P",{});var Ha=d(Ko);wl=s(Ha,"This method forwards all its arguments to Speech2TextTokenizer\u2019s "),Xn=r(Ha,"A",{href:!0});var hh=d(Xn);kl=s(hh,"decode()"),hh.forEach(t),xl=s(Ha,`. Please refer
to the docstring of this method for more information.`),Ha.forEach(t),Oa.forEach(t),ne.forEach(t),ka=p(o),Ft=r(o,"H2",{class:!0});var Qa=d(Ft);Ht=r(Qa,"A",{id:!0,class:!0,href:!0});var ph=d(Ht);Ws=r(ph,"SPAN",{});var mh=d(Ws);w(en.$$.fragment,mh),mh.forEach(t),ph.forEach(t),Ml=p(Qa),Rs=r(Qa,"SPAN",{});var uh=d(Rs);Sl=s(uh,"Speech2TextModel"),uh.forEach(t),Qa.forEach(t),xa=p(o),Je=r(o,"DIV",{class:!0});var uo=d(Je);w(tn.$$.fragment,uo),$l=p(uo),on=r(uo,"P",{});var Ka=d(on);El=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=d(An);Fl=s(fh,"PreTrainedModel"),fh.forEach(t),Jl=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),zl=p(uo),nn=r(uo,"P",{});var er=d(nn);jl=s(er,"This model is also a PyTorch "),sn=r(er,"A",{href:!0,rel:!0});var _h=d(sn);Il=s(_h,"torch.nn.Module"),_h.forEach(t),Cl=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),ql=p(uo),Ue=r(uo,"DIV",{class:!0});var fo=d(Ue);w(an.$$.fragment,fo),Nl=p(fo),Jt=r(fo,"P",{});var as=d(Jt);Ul=s(as,"The "),Bn=r(as,"A",{href:!0});var gh=d(Bn);Gl=s(gh,"Speech2TextModel"),gh.forEach(t),Zl=s(as," forward method, overrides the "),Vs=r(as,"CODE",{});var Th=d(Vs);Wl=s(Th,"__call__"),Th.forEach(t),Rl=s(as," special method."),as.forEach(t),Vl=p(fo),w(Qt.$$.fragment,fo),Pl=p(fo),w(Kt.$$.fragment,fo),fo.forEach(t),uo.forEach(t),Ma=p(o),zt=r(o,"H2",{class:!0});var tr=d(zt);eo=r(tr,"A",{id:!0,class:!0,href:!0});var vh=d(eo);Ps=r(vh,"SPAN",{});var bh=d(Ps);w(rn.$$.fragment,bh),bh.forEach(t),vh.forEach(t),Xl=p(tr),Xs=r(tr,"SPAN",{});var yh=d(Xs);Al=s(yh,"Speech2TextForConditionalGeneration"),yh.forEach(t),tr.forEach(t),Sa=p(o),ze=r(o,"DIV",{class:!0});var _o=d(ze);w(dn.$$.fragment,_o),Bl=p(_o),ln=r(_o,"P",{});var or=d(ln);Yl=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 wh=d(Yn);Dl=s(wh,"PreTrainedModel"),wh.forEach(t),Ll=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),Ol=p(_o),cn=r(_o,"P",{});var nr=d(cn);Hl=s(nr,"This model is also a PyTorch "),hn=r(nr,"A",{href:!0,rel:!0});var kh=d(hn);Ql=s(kh,"torch.nn.Module"),kh.forEach(t),Kl=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),ei=p(_o),Ge=r(_o,"DIV",{class:!0});var go=d(Ge);w(pn.$$.fragment,go),ti=p(go),jt=r(go,"P",{});var rs=d(jt);oi=s(rs,"The "),Dn=r(rs,"A",{href:!0});var xh=d(Dn);ni=s(xh,"Speech2TextForConditionalGeneration"),xh.forEach(t),si=s(rs," forward method, overrides the "),As=r(rs,"CODE",{});var Mh=d(As);ai=s(Mh,"__call__"),Mh.forEach(t),ri=s(rs," special method."),rs.forEach(t),di=p(go),w(to.$$.fragment,go),li=p(go),w(oo.$$.fragment,go),go.forEach(t),_o.forEach(t),$a=p(o),It=r(o,"H2",{class:!0});var sr=d(It);no=r(sr,"A",{id:!0,class:!0,href:!0});var Sh=d(no);Bs=r(Sh,"SPAN",{});var $h=d(Bs);w(mn.$$.fragment,$h),$h.forEach(t),Sh.forEach(t),ii=p(sr),Ys=r(sr,"SPAN",{});var Eh=d(Ys);ci=s(Eh,"TFSpeech2TextModel"),Eh.forEach(t),sr.forEach(t),Ea=p(o),be=r(o,"DIV",{class:!0});var ct=d(be);w(un.$$.fragment,ct),hi=p(ct),fn=r(ct,"P",{});var ar=d(fn);pi=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=d(Ln);mi=s(Fh,"TFPreTrainedModel"),Fh.forEach(t),ui=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),fi=p(ct),_n=r(ct,"P",{});var rr=d(_n);_i=s(rr,"This model is also a "),gn=r(rr,"A",{href:!0,rel:!0});var Jh=d(gn);gi=s(Jh,"tf.keras.Model"),Jh.forEach(t),Ti=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),vi=p(ct),w(so.$$.fragment,ct),bi=p(ct),Ze=r(ct,"DIV",{class:!0});var To=d(Ze);w(Tn.$$.fragment,To),yi=p(To),Ct=r(To,"P",{});var ds=d(Ct);wi=s(ds,"The "),On=r(ds,"A",{href:!0});var zh=d(On);ki=s(zh,"TFSpeech2TextModel"),zh.forEach(t),xi=s(ds," forward method, overrides the "),Ds=r(ds,"CODE",{});var jh=d(Ds);Mi=s(jh,"__call__"),jh.forEach(t),Si=s(ds," special method."),ds.forEach(t),$i=p(To),w(ao.$$.fragment,To),Ei=p(To),w(ro.$$.fragment,To),To.forEach(t),ct.forEach(t),Fa=p(o),qt=r(o,"H2",{class:!0});var dr=d(qt);lo=r(dr,"A",{id:!0,class:!0,href:!0});var Ih=d(lo);Ls=r(Ih,"SPAN",{});var Ch=d(Ls);w(vn.$$.fragment,Ch),Ch.forEach(t),Ih.forEach(t),Fi=p(dr),Os=r(dr,"SPAN",{});var qh=d(Os);Ji=s(qh,"TFSpeech2TextForConditionalGeneration"),qh.forEach(t),dr.forEach(t),Ja=p(o),ye=r(o,"DIV",{class:!0});var ht=d(ye);w(bn.$$.fragment,ht),zi=p(ht),yn=r(ht,"P",{});var lr=d(yn);ji=s(lr,`The Speech2Text Model with a language modeling head. Can be used for summarization.
This model inherits from `),Hn=r(lr,"A",{href:!0});var Nh=d(Hn);Ii=s(Nh,"TFPreTrainedModel"),Nh.forEach(t),Ci=s(lr,`. 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.)`),lr.forEach(t),qi=p(ht),wn=r(ht,"P",{});var ir=d(wn);Ni=s(ir,"This model is also a "),kn=r(ir,"A",{href:!0,rel:!0});var Uh=d(kn);Ui=s(Uh,"tf.keras.Model"),Uh.forEach(t),Gi=s(ir,` 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.`),ir.forEach(t),Zi=p(ht),w(io.$$.fragment,ht),Wi=p(ht),We=r(ht,"DIV",{class:!0});var vo=d(We);w(xn.$$.fragment,vo),Ri=p(vo),Nt=r(vo,"P",{});var ls=d(Nt);Vi=s(ls,"The "),Qn=r(ls,"A",{href:!0});var Gh=d(Qn);Pi=s(Gh,"TFSpeech2TextForConditionalGeneration"),Gh.forEach(t),Xi=s(ls," forward method, overrides the "),Hs=r(ls,"CODE",{});var Zh=d(Hs);Ai=s(Zh,"__call__"),Zh.forEach(t),Bi=s(ls," special method."),ls.forEach(t),Yi=p(vo),w(co.$$.fragment,vo),Di=p(vo),w(ho.$$.fragment,vo),vo.forEach(t),ht.forEach(t),this.h()},h(){i(c,"name","hf:doc:metadata"),i(c,"content",JSON.stringify(ap)),i(g,"id","speech2text"),i(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"),i(g,"href","#speech2text"),i(_,"class","relative group"),i(U,"id","overview"),i(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"),i(U,"href","#overview"),i(I,"class","relative group"),i(se,"href","https://arxiv.org/abs/2010.05171"),i(se,"rel","nofollow"),i(re,"href","http://www.openslr.org/12"),i(re,"rel","nofollow"),i(le,"href","https://github.com/facebookresearch/covost"),i(le,"rel","nofollow"),i(ce,"href","https://ict.fbk.eu/must-c/"),i(ce,"rel","nofollow"),i(pe,"href","https://huggingface.co/valhalla"),i(pe,"rel","nofollow"),i(ue,"href","https://github.com/pytorch/fairseq/tree/master/examples/speech_to_text"),i(ue,"rel","nofollow"),i(te,"id","inference"),i(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"),i(te,"href","#inference"),i(X,"class","relative group"),i(T,"href","/docs/transformers/v4.30.0/en/model_doc/speech_to_text#transformers.Speech2TextFeatureExtractor"),i(oe,"href","/docs/transformers/v4.30.0/en/model_doc/speech_to_text#transformers.Speech2TextProcessor"),i(J,"href","/docs/transformers/v4.30.0/en/model_doc/speech_to_text#transformers.Speech2TextFeatureExtractor"),i(Ne,"href","/docs/transformers/v4.30.0/en/model_doc/speech_to_text#transformers.Speech2TextTokenizer"),i(yo,"href","http://www.mega-nerd.com/libsndfile/"),i(yo,"rel","nofollow"),i(Mo,"href","https://huggingface.co/models?filter=speech_to_text"),i(Mo,"rel","nofollow"),i(Gt,"id","transformers.Speech2TextConfig"),i(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"),i(Gt,"href","#transformers.Speech2TextConfig"),i(kt,"class","relative group"),i(Jn,"href","/docs/transformers/v4.30.0/en/model_doc/speech_to_text#transformers.Speech2TextModel"),i(Eo,"href","https://huggingface.co/facebook/s2t-small-librispeech-asr"),i(Eo,"rel","nofollow"),i(zn,"href","/docs/transformers/v4.30.0/en/main_classes/configuration#transformers.PretrainedConfig"),i(jn,"href","/docs/transformers/v4.30.0/en/main_classes/configuration#transformers.PretrainedConfig"),i(Fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(Wt,"id","transformers.Speech2TextTokenizer"),i(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"),i(Wt,"href","#transformers.Speech2TextTokenizer"),i(St,"class","relative group"),i(In,"href","/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),i(Rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(Vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(qn,"href","../glossary#token-type-ids"),i(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(Nn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(Pt,"id","transformers.Speech2TextFeatureExtractor"),i(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"),i(Pt,"href","#transformers.Speech2TextFeatureExtractor"),i($t,"class","relative group"),i(Un,"href","/docs/transformers/v4.30.0/en/model_doc/speech_to_text#transformers.Speech2TextFeatureExtractor"),i(Xt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(At,"id","transformers.Speech2TextProcessor"),i(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"),i(At,"href","#transformers.Speech2TextProcessor"),i(Et,"class","relative group"),i(Gn,"href","/docs/transformers/v4.30.0/en/model_doc/speech_to_text#transformers.Speech2TextProcessor"),i(Zn,"href","/docs/transformers/v4.30.0/en/model_doc/speech_to_text#transformers.Speech2TextFeatureExtractor"),i(Wn,"href","/docs/transformers/v4.30.0/en/model_doc/speech_to_text#transformers.Speech2TextTokenizer"),i(Po,"href","/docs/transformers/v4.30.0/en/model_doc/speech_to_text#transformers.Speech2TextProcessor.__call__"),i(Rn,"href","/docs/transformers/v4.30.0/en/model_doc/speech_to_text#transformers.Speech2TextProcessor.decode"),i(Ao,"href","/docs/transformers/v4.30.0/en/model_doc/speech_to_text#transformers.Speech2TextFeatureExtractor.__call__"),i(Bo,"href","/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__"),i(Bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(Vn,"href","/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Processor.from_pretrained"),i(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(Pn,"href","/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.batch_decode"),i(Lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(Xn,"href","/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.decode"),i(Ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(Ht,"id","transformers.Speech2TextModel"),i(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"),i(Ht,"href","#transformers.Speech2TextModel"),i(Ft,"class","relative group"),i(An,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),i(sn,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),i(sn,"rel","nofollow"),i(Bn,"href","/docs/transformers/v4.30.0/en/model_doc/speech_to_text#transformers.Speech2TextModel"),i(Ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(Je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(eo,"id","transformers.Speech2TextForConditionalGeneration"),i(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"),i(eo,"href","#transformers.Speech2TextForConditionalGeneration"),i(zt,"class","relative group"),i(Yn,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),i(hn,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),i(hn,"rel","nofollow"),i(Dn,"href","/docs/transformers/v4.30.0/en/model_doc/speech_to_text#transformers.Speech2TextForConditionalGeneration"),i(Ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(no,"id","transformers.TFSpeech2TextModel"),i(no,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),i(no,"href","#transformers.TFSpeech2TextModel"),i(It,"class","relative group"),i(Ln,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel"),i(gn,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),i(gn,"rel","nofollow"),i(On,"href","/docs/transformers/v4.30.0/en/model_doc/speech_to_text#transformers.TFSpeech2TextModel"),i(Ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(lo,"id","transformers.TFSpeech2TextForConditionalGeneration"),i(lo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),i(lo,"href","#transformers.TFSpeech2TextForConditionalGeneration"),i(qt,"class","relative group"),i(Hn,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel"),i(kn,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),i(kn,"rel","nofollow"),i(Qn,"href","/docs/transformers/v4.30.0/en/model_doc/speech_to_text#transformers.TFSpeech2TextForConditionalGeneration"),i(We,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(ye,"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,b,f),u(o,_,f),e(_,g),e(g,v),k(l,v,null),e(_,m),e(_,E),e(E,Z),u(o,N,f),u(o,I,f),e(I,U),e(U,C),k($,C,null),e(I,ke),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,de),e(q,Ae),e(q,le),e(le,ie),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),k(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,J),e(J,ft),e(R,_t),e(R,Ne),e(Ne,gt),e(R,Tt),u(o,K,f),u(o,z,f),e(z,vt),e(z,Ke),e(Ke,_e),e(z,bt),e(z,et),e(et,tt),e(z,yt),e(z,ge),e(ge,wt),e(z,cr),e(z,is),e(is,hr),e(z,pr),e(z,cs),e(cs,mr),e(z,ur),e(z,yo),e(yo,fr),e(z,_r),e(z,hs),e(hs,gr),u(o,ca,f),u(o,En,f),e(En,ps),e(ps,Tr),u(o,ha,f),k(wo,o,f),u(o,pa,f),u(o,Fn,f),e(Fn,ko),e(ko,ms),e(ms,vr),e(ko,br),e(ko,Te),e(Te,yr),e(Te,us),e(us,wr),e(Te,kr),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,Jr),e(Te,zr),u(o,ma,f),k(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,kt,f),e(kt,Gt),e(Gt,vs),k(So,vs,null),e(kt,qr),e(kt,bs),e(bs,Nr),u(o,_a,f),u(o,Fe,f),k($o,Fe,null),e(Fe,Ur),e(Fe,xt),e(xt,Gr),e(xt,Jn),e(Jn,Zr),e(xt,Wr),e(xt,Eo),e(Eo,Rr),e(xt,Vr),e(Fe,Pr),e(Fe,Mt),e(Mt,Xr),e(Mt,zn),e(zn,Ar),e(Mt,Br),e(Mt,jn),e(jn,Yr),e(Mt,Dr),e(Fe,Lr),k(Zt,Fe,null),u(o,ga,f),u(o,St,f),e(St,Wt),e(Wt,ys),k(Fo,ys,null),e(St,Or),e(St,ws),e(ws,Hr),u(o,Ta,f),u(o,H,f),k(Jo,H,null),e(H,Qr),e(H,ks),e(ks,Kr),e(H,ed),e(H,zo),e(zo,td),e(zo,In),e(In,od),e(zo,nd),e(H,sd),e(H,Rt),k(jo,Rt,null),e(Rt,ad),e(Rt,xs),e(xs,rd),e(H,dd),e(H,Vt),k(Io,Vt,null),e(Vt,ld),e(Vt,Co),e(Co,id),e(Co,Ms),e(Ms,cd),e(Co,hd),e(H,pd),e(H,at),k(qo,at,null),e(at,md),e(at,Cn),e(Cn,ud),e(Cn,qn),e(qn,fd),e(at,_d),e(at,Ss),e(Ss,gd),e(H,Td),e(H,Nn),k(No,Nn,null),u(o,va,f),u(o,$t,f),e($t,Pt),e(Pt,$s),k(Uo,$s,null),e($t,vd),e($t,Es),e(Es,bd),u(o,ba,f),u(o,ve,f),k(Go,ve,null),e(ve,yd),e(ve,Fs),e(Fs,wd),e(ve,kd),e(ve,Zo),e(Zo,xd),e(Zo,Un),e(Un,Md),e(Zo,Sd),e(ve,$d),e(ve,Js),e(Js,Ed),e(ve,Fd),e(ve,Xt),k(Wo,Xt,null),e(Xt,Jd),e(Xt,zs),e(zs,zd),u(o,ya,f),u(o,Et,f),e(Et,At),e(At,js),k(Ro,js,null),e(Et,jd),e(Et,Is),e(Is,Id),u(o,wa,f),u(o,B,f),k(Vo,B,null),e(B,Cd),e(B,Cs),e(Cs,qd),e(B,Nd),e(B,xe),e(xe,Gn),e(Gn,Ud),e(xe,Gd),e(xe,Zn),e(Zn,Zd),e(xe,Wd),e(xe,Wn),e(Wn,Rd),e(xe,Vd),e(xe,Po),e(Po,qs),e(qs,Pd),e(Po,Xd),e(xe,Ad),e(xe,Rn),e(Rn,Bd),e(xe,Yd),e(B,Dd),e(B,Bt),k(Xo,Bt,null),e(Bt,Ld),e(Bt,ot),e(ot,Od),e(ot,Ao),e(Ao,Ns),e(Ns,Hd),e(Ao,Qd),e(ot,Kd),e(ot,Us),e(Us,el),e(ot,tl),e(ot,Bo),e(Bo,Gs),e(Gs,ol),e(Bo,nl),e(ot,sl),e(B,al),e(B,rt),k(Yo,rt,null),e(rt,rl),e(rt,Zs),e(Zs,dl),e(rt,ll),k(Yt,rt,null),e(B,il),e(B,dt),k(Do,dt,null),e(dt,cl),e(dt,Lo),e(Lo,hl),e(Lo,Vn),e(Vn,pl),e(Lo,ml),e(dt,ul),k(Dt,dt,null),e(B,fl),e(B,Lt),k(Oo,Lt,null),e(Lt,_l),e(Lt,Ho),e(Ho,gl),e(Ho,Pn),e(Pn,Tl),e(Ho,vl),e(B,bl),e(B,Ot),k(Qo,Ot,null),e(Ot,yl),e(Ot,Ko),e(Ko,wl),e(Ko,Xn),e(Xn,kl),e(Ko,xl),u(o,ka,f),u(o,Ft,f),e(Ft,Ht),e(Ht,Ws),k(en,Ws,null),e(Ft,Ml),e(Ft,Rs),e(Rs,Sl),u(o,xa,f),u(o,Je,f),k(tn,Je,null),e(Je,$l),e(Je,on),e(on,El),e(on,An),e(An,Fl),e(on,Jl),e(Je,zl),e(Je,nn),e(nn,jl),e(nn,sn),e(sn,Il),e(nn,Cl),e(Je,ql),e(Je,Ue),k(an,Ue,null),e(Ue,Nl),e(Ue,Jt),e(Jt,Ul),e(Jt,Bn),e(Bn,Gl),e(Jt,Zl),e(Jt,Vs),e(Vs,Wl),e(Jt,Rl),e(Ue,Vl),k(Qt,Ue,null),e(Ue,Pl),k(Kt,Ue,null),u(o,Ma,f),u(o,zt,f),e(zt,eo),e(eo,Ps),k(rn,Ps,null),e(zt,Xl),e(zt,Xs),e(Xs,Al),u(o,Sa,f),u(o,ze,f),k(dn,ze,null),e(ze,Bl),e(ze,ln),e(ln,Yl),e(ln,Yn),e(Yn,Dl),e(ln,Ll),e(ze,Ol),e(ze,cn),e(cn,Hl),e(cn,hn),e(hn,Ql),e(cn,Kl),e(ze,ei),e(ze,Ge),k(pn,Ge,null),e(Ge,ti),e(Ge,jt),e(jt,oi),e(jt,Dn),e(Dn,ni),e(jt,si),e(jt,As),e(As,ai),e(jt,ri),e(Ge,di),k(to,Ge,null),e(Ge,li),k(oo,Ge,null),u(o,$a,f),u(o,It,f),e(It,no),e(no,Bs),k(mn,Bs,null),e(It,ii),e(It,Ys),e(Ys,ci),u(o,Ea,f),u(o,be,f),k(un,be,null),e(be,hi),e(be,fn),e(fn,pi),e(fn,Ln),e(Ln,mi),e(fn,ui),e(be,fi),e(be,_n),e(_n,_i),e(_n,gn),e(gn,gi),e(_n,Ti),e(be,vi),k(so,be,null),e(be,bi),e(be,Ze),k(Tn,Ze,null),e(Ze,yi),e(Ze,Ct),e(Ct,wi),e(Ct,On),e(On,ki),e(Ct,xi),e(Ct,Ds),e(Ds,Mi),e(Ct,Si),e(Ze,$i),k(ao,Ze,null),e(Ze,Ei),k(ro,Ze,null),u(o,Fa,f),u(o,qt,f),e(qt,lo),e(lo,Ls),k(vn,Ls,null),e(qt,Fi),e(qt,Os),e(Os,Ji),u(o,Ja,f),u(o,ye,f),k(bn,ye,null),e(ye,zi),e(ye,yn),e(yn,ji),e(yn,Hn),e(Hn,Ii),e(yn,Ci),e(ye,qi),e(ye,wn),e(wn,Ni),e(wn,kn),e(kn,Ui),e(wn,Gi),e(ye,Zi),k(io,ye,null),e(ye,Wi),e(ye,We),k(xn,We,null),e(We,Ri),e(We,Nt),e(Nt,Vi),e(Nt,Qn),e(Qn,Pi),e(Nt,Xi),e(Nt,Hs),e(Hs,Ai),e(Nt,Bi),e(We,Yi),k(co,We,null),e(We,Di),k(ho,We,null),za=!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}),io.$set(aa);const ra={};f&2&&(ra.$$scope={dirty:f,ctx:o}),co.$set(ra);const da={};f&2&&(da.$$scope={dirty:f,ctx:o}),ho.$set(da)},i(o){za||(x(l.$$.fragment,o),x($.$$.fragment,o),x(O.$$.fragment,o),x(wo.$$.fragment,o),x(xo.$$.fragment,o),x(So.$$.fragment,o),x($o.$$.fragment,o),x(Zt.$$.fragment,o),x(Fo.$$.fragment,o),x(Jo.$$.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(vn.$$.fragment,o),x(bn.$$.fragment,o),x(io.$$.fragment,o),x(xn.$$.fragment,o),x(co.$$.fragment,o),x(ho.$$.fragment,o),za=!0)},o(o){M(l.$$.fragment,o),M($.$$.fragment,o),M(O.$$.fragment,o),M(wo.$$.fragment,o),M(xo.$$.fragment,o),M(So.$$.fragment,o),M($o.$$.fragment,o),M(Zt.$$.fragment,o),M(Fo.$$.fragment,o),M(Jo.$$.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(vn.$$.fragment,o),M(bn.$$.fragment,o),M(io.$$.fragment,o),M(xn.$$.fragment,o),M(co.$$.fragment,o),M(ho.$$.fragment,o),za=!1},d(o){t(c),o&&t(b),o&&t(_),S(l),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(z),o&&t(ca),o&&t(En),o&&t(ha),S(wo,o),o&&t(pa),o&&t(Fn),o&&t(ma),S(xo,o),o&&t(ua),o&&t(Ut),o&&t(fa),o&&t(kt),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(Jo),S(jo),S(Io),S(qo),S(No),o&&t(va),o&&t($t),S(Uo),o&&t(ba),o&&t(ve),S(Go),S(Wo),o&&t(ya),o&&t(Et),S(Ro),o&&t(wa),o&&t(B),S(Vo),S(Xo),S(Yo),S(Yt),S(Do),S(Dt),S(Oo),S(Qo),o&&t(ka),o&&t(Ft),S(en),o&&t(xa),o&&t(Je),S(tn),S(an),S(Qt),S(Kt),o&&t(Ma),o&&t(zt),S(rn),o&&t(Sa),o&&t(ze),S(dn),S(pn),S(to),S(oo),o&&t($a),o&&t(It),S(mn),o&&t(Ea),o&&t(be),S(un),S(so),S(Tn),S(ao),S(ro),o&&t(Fa),o&&t(qt),S(vn),o&&t(Ja),o&&t(ye),S(bn),S(io),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};
