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 k,h as s,b as l,G as e,g as u,y as w,q as x,o as M,B as S,v as Xh,L as la}from"../../chunks/vendor-hf-doc-builder.js";import{T as 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 ia}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(i){c=r(i,"P",{});var m=d(c);b=s(m,"Example:"),m.forEach(t),_=p(i),k(g.$$.fragment,i)},m(i,m){u(i,c,m),e(c,b),u(i,_,m),w(g,i,m),v=!0},p:la,i(i){v||(x(g.$$.fragment,i),v=!0)},o(i){M(g.$$.fragment,i),v=!1},d(i){i&&t(c),i&&t(_),S(g,i)}}}function Bh(j){let c,b,_,g,v,i,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
`),i=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
`),i=r(C,"A",{href:!0});var we=d(i);m=s(we,"ImageProcessingMixin"),we.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(){l(_,"href","/docs/transformers/v4.32.0/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.from_pretrained"),l(i,"href","/docs/transformers/v4.32.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,i),e(i,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,i,m,E;return{c(){c=a("p"),b=n("This class method is simply calling "),_=a("a"),g=n("save_pretrained()"),v=n(` and
`),i=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
`),i=r(N,"A",{href:!0});var U=d(i);m=s(U,"save_pretrained()"),U.forEach(t),E=s(N,`. Please refer to the docstrings of the
methods above for more information.`),N.forEach(t),this.h()},h(){l(_,"href","/docs/transformers/v4.32.0/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.save_pretrained"),l(i,"href","/docs/transformers/v4.32.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,i),e(i,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(i){c=r(i,"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(i,m){u(i,c,m),e(c,b),e(c,_),e(_,g),e(c,v)},d(i){i&&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(i){c=r(i,"P",{});var m=d(c);b=s(m,"Example:"),m.forEach(t),_=p(i),k(g.$$.fragment,i)},m(i,m){u(i,c,m),e(c,b),u(i,_,m),w(g,i,m),v=!0},p:la,i(i){v||(x(g.$$.fragment,i),v=!0)},o(i){M(g.$$.fragment,i),v=!1},d(i){i&&t(c),i&&t(_),S(g,i)}}}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(i){c=r(i,"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(i,m){u(i,c,m),e(c,b),e(c,_),e(_,g),e(c,v)},d(i){i&&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(i){c=r(i,"P",{});var m=d(c);b=s(m,"Example:"),m.forEach(t),_=p(i),k(g.$$.fragment,i)},m(i,m){u(i,c,m),e(c,b),u(i,_,m),w(g,i,m),v=!0},p:la,i(i){v||(x(g.$$.fragment,i),v=!0)},o(i){M(g.$$.fragment,i),v=!1},d(i){i&&t(c),i&&t(_),S(g,i)}}}function Qh(j){let c,b,_,g,v,i,m,E,Z,N,I,U,C,$,we,Y,Ve,Ie,q,Pe,se,ae,Xe,re,de,Ae,ie,le,Be,ce,Se,G,W,Q,he,pe,Ye,me,ue,De,P,Ce,X,te,$e,O,Le,Ee,ee,qe,D,Oe,fe,A,He,L,R,Qe;return{c(){c=a("p"),b=n("TensorFlow models and layers in "),_=a("code"),g=n("transformers"),v=n(" accept two formats as input:"),i=h(),m=a("ul"),E=a("li"),Z=n("having all inputs as keyword arguments (like PyTorch models), or"),N=h(),I=a("li"),U=n("having all inputs as a list, tuple or dict in the first positional argument."),C=h(),$=a("p"),we=n(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),Y=a("code"),Ve=n("model.fit()"),Ie=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),q=a("code"),Pe=n("model.fit()"),se=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),ae=a("code"),Xe=n("fit()"),re=n(" and "),de=a("code"),Ae=n("predict()"),ie=n(`, such as when creating your own layers or models with
the Keras `),le=a("code"),Be=n("Functional"),ce=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),Se=h(),G=a("ul"),W=a("li"),Q=n("a single Tensor with "),he=a("code"),pe=n("input_ids"),Ye=n(" only and nothing else: "),me=a("code"),ue=n("model(input_ids)"),De=h(),P=a("li"),Ce=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),X=a("code"),te=n("model([input_ids, attention_mask])"),$e=n(" or "),O=a("code"),Le=n("model([input_ids, attention_mask, token_type_ids])"),Ee=h(),ee=a("li"),qe=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),D=a("code"),Oe=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),fe=h(),A=a("p"),He=n(`Note that when creating models and layers with
`),L=a("a"),R=n("subclassing"),Qe=n(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(T){c=r(T,"P",{});var F=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),i=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 z=d($);we=s(z,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),Y=r(z,"CODE",{});var ft=d(Y);Ve=s(ft,"model.fit()"),ft.forEach(t),Ie=s(z,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),q=r(z,"CODE",{});var _t=d(q);Pe=s(_t,"model.fit()"),_t.forEach(t),se=s(z,` supports! If, however, you want to use the second
format outside of Keras methods like `),ae=r(z,"CODE",{});var Ne=d(ae);Xe=s(Ne,"fit()"),Ne.forEach(t),re=s(z," and "),de=r(z,"CODE",{});var gt=d(de);Ae=s(gt,"predict()"),gt.forEach(t),ie=s(z,`, such as when creating your own layers or models with
the Keras `),le=r(z,"CODE",{});var Tt=d(le);Be=s(Tt,"Functional"),Tt.forEach(t),ce=s(z,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),z.forEach(t),Se=p(T),G=r(T,"UL",{});var K=d(G);W=r(K,"LI",{});var J=d(W);Q=s(J,"a single Tensor with "),he=r(J,"CODE",{});var vt=d(he);pe=s(vt,"input_ids"),vt.forEach(t),Ye=s(J," only and nothing else: "),me=r(J,"CODE",{});var Ke=d(me);ue=s(Ke,"model(input_ids)"),Ke.forEach(t),J.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 kt=d(L);R=s(kt,"subclassing"),kt.forEach(t),Qe=s(ge,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),ge.forEach(t),this.h()},h(){l(L,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),l(L,"rel","nofollow")},m(T,F){u(T,c,F),e(c,b),e(c,_),e(_,g),e(c,v),u(T,i,F),u(T,m,F),e(m,E),e(E,Z),e(m,N),e(m,I),e(I,U),u(T,C,F),u(T,$,F),e($,we),e($,Y),e(Y,Ve),e($,Ie),e($,q),e(q,Pe),e($,se),e($,ae),e(ae,Xe),e($,re),e($,de),e(de,Ae),e($,ie),e($,le),e(le,Be),e($,ce),u(T,Se,F),u(T,G,F),e(G,W),e(W,Q),e(W,he),e(he,pe),e(W,Ye),e(W,me),e(me,ue),e(G,De),e(G,P),e(P,Ce),e(P,X),e(X,te),e(P,$e),e(P,O),e(O,Le),e(G,Ee),e(G,ee),e(ee,qe),e(ee,D),e(D,Oe),u(T,fe,F),u(T,A,F),e(A,He),e(A,L),e(L,R),e(A,Qe)},d(T){T&&t(c),T&&t(i),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(i){c=r(i,"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(i,m){u(i,c,m),e(c,b),e(c,_),e(_,g),e(c,v)},d(i){i&&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(i){c=r(i,"P",{});var m=d(c);b=s(m,"Example:"),m.forEach(t),_=p(i),k(g.$$.fragment,i)},m(i,m){u(i,c,m),e(c,b),u(i,_,m),w(g,i,m),v=!0},p:la,i(i){v||(x(g.$$.fragment,i),v=!0)},o(i){M(g.$$.fragment,i),v=!1},d(i){i&&t(c),i&&t(_),S(g,i)}}}function tp(j){let c,b,_,g,v,i,m,E,Z,N,I,U,C,$,we,Y,Ve,Ie,q,Pe,se,ae,Xe,re,de,Ae,ie,le,Be,ce,Se,G,W,Q,he,pe,Ye,me,ue,De,P,Ce,X,te,$e,O,Le,Ee,ee,qe,D,Oe,fe,A,He,L,R,Qe;return{c(){c=a("p"),b=n("TensorFlow models and layers in "),_=a("code"),g=n("transformers"),v=n(" accept two formats as input:"),i=h(),m=a("ul"),E=a("li"),Z=n("having all inputs as keyword arguments (like PyTorch models), or"),N=h(),I=a("li"),U=n("having all inputs as a list, tuple or dict in the first positional argument."),C=h(),$=a("p"),we=n(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),Y=a("code"),Ve=n("model.fit()"),Ie=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),q=a("code"),Pe=n("model.fit()"),se=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),ae=a("code"),Xe=n("fit()"),re=n(" and "),de=a("code"),Ae=n("predict()"),ie=n(`, such as when creating your own layers or models with
the Keras `),le=a("code"),Be=n("Functional"),ce=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),Se=h(),G=a("ul"),W=a("li"),Q=n("a single Tensor with "),he=a("code"),pe=n("input_ids"),Ye=n(" only and nothing else: "),me=a("code"),ue=n("model(input_ids)"),De=h(),P=a("li"),Ce=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),X=a("code"),te=n("model([input_ids, attention_mask])"),$e=n(" or "),O=a("code"),Le=n("model([input_ids, attention_mask, token_type_ids])"),Ee=h(),ee=a("li"),qe=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),D=a("code"),Oe=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),fe=h(),A=a("p"),He=n(`Note that when creating models and layers with
`),L=a("a"),R=n("subclassing"),Qe=n(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(T){c=r(T,"P",{});var F=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),i=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 z=d($);we=s(z,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),Y=r(z,"CODE",{});var ft=d(Y);Ve=s(ft,"model.fit()"),ft.forEach(t),Ie=s(z,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),q=r(z,"CODE",{});var _t=d(q);Pe=s(_t,"model.fit()"),_t.forEach(t),se=s(z,` supports! If, however, you want to use the second
format outside of Keras methods like `),ae=r(z,"CODE",{});var Ne=d(ae);Xe=s(Ne,"fit()"),Ne.forEach(t),re=s(z," and "),de=r(z,"CODE",{});var gt=d(de);Ae=s(gt,"predict()"),gt.forEach(t),ie=s(z,`, such as when creating your own layers or models with
the Keras `),le=r(z,"CODE",{});var Tt=d(le);Be=s(Tt,"Functional"),Tt.forEach(t),ce=s(z,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),z.forEach(t),Se=p(T),G=r(T,"UL",{});var K=d(G);W=r(K,"LI",{});var J=d(W);Q=s(J,"a single Tensor with "),he=r(J,"CODE",{});var vt=d(he);pe=s(vt,"input_ids"),vt.forEach(t),Ye=s(J," only and nothing else: "),me=r(J,"CODE",{});var Ke=d(me);ue=s(Ke,"model(input_ids)"),Ke.forEach(t),J.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 kt=d(L);R=s(kt,"subclassing"),kt.forEach(t),Qe=s(ge,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),ge.forEach(t),this.h()},h(){l(L,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),l(L,"rel","nofollow")},m(T,F){u(T,c,F),e(c,b),e(c,_),e(_,g),e(c,v),u(T,i,F),u(T,m,F),e(m,E),e(E,Z),e(m,N),e(m,I),e(I,U),u(T,C,F),u(T,$,F),e($,we),e($,Y),e(Y,Ve),e($,Ie),e($,q),e(q,Pe),e($,se),e($,ae),e(ae,Xe),e($,re),e($,de),e(de,Ae),e($,ie),e($,le),e(le,Be),e($,ce),u(T,Se,F),u(T,G,F),e(G,W),e(W,Q),e(W,he),e(he,pe),e(W,Ye),e(W,me),e(me,ue),e(G,De),e(G,P),e(P,Ce),e(P,X),e(X,te),e(P,$e),e(P,O),e(O,Le),e(G,Ee),e(G,ee),e(ee,qe),e(ee,D),e(D,Oe),u(T,fe,F),u(T,A,F),e(A,He),e(A,L),e(L,R),e(A,Qe)},d(T){T&&t(c),T&&t(i),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(i){c=r(i,"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(i,m){u(i,c,m),e(c,b),e(c,_),e(_,g),e(c,v)},d(i){i&&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(i){c=r(i,"P",{});var m=d(c);b=s(m,"Example:"),m.forEach(t),_=p(i),k(g.$$.fragment,i)},m(i,m){u(i,c,m),e(c,b),u(i,_,m),w(g,i,m),v=!0},p:la,i(i){v||(x(g.$$.fragment,i),v=!0)},o(i){M(g.$$.fragment,i),v=!1},d(i){i&&t(c),i&&t(_),S(g,i)}}}function sp(j){let c,b,_,g,v,i,m,E,Z,N,I,U,C,$,we,Y,Ve,Ie,q,Pe,se,ae,Xe,re,de,Ae,ie,le,Be,ce,Se,G,W,Q,he,pe,Ye,me,ue,De,P,Ce,X,te,$e,O,Le,Ee,ee,qe,D,Oe,fe,A,He,L,R,Qe,T,F,pt,oe,mt,ut,z,ft,_t,Ne,gt,Tt,K,J,vt,Ke,_e,bt,et,tt,yt,ge,kt,cr,ls,hr,pr,cs,mr,ur,yo,fr,_r,hs,gr,ca,En,ps,Tr,ha,ko,pa,Fn,wo,ms,vr,br,Te,yr,us,kr,wr,fs,xr,Mr,_s,Sr,$r,gs,Er,Fr,Ts,zr,Jr,ma,xo,ua,Ut,jr,Mo,Ir,Cr,fa,wt,Gt,vs,So,qr,bs,Nr,_a,Fe,$o,Ur,xt,Gr,zn,Zr,Wr,Eo,Rr,Vr,Pr,Mt,Xr,Jn,Ar,Br,jn,Yr,Dr,Lr,Zt,ga,St,Wt,ys,Fo,Or,ks,Hr,Ta,H,zo,Qr,ws,Kr,ed,Jo,td,In,od,nd,sd,Rt,jo,ad,xs,rd,dd,Vt,Io,id,Co,ld,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,kd,wd,Zo,xd,Un,Md,Sd,$d,zs,Ed,Fd,Xt,Wo,zd,Js,Jd,ya,Et,At,js,Ro,jd,Is,Id,ka,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,ei,ti,Bo,Gs,oi,ni,si,ai,rt,Yo,ri,Zs,di,ii,Yt,li,dt,Do,ci,Lo,hi,Vn,pi,mi,ui,Dt,fi,Lt,Oo,_i,Ho,gi,Pn,Ti,vi,bi,Ot,Qo,yi,Ko,ki,Xn,wi,xi,wa,Ft,Ht,Ws,en,Mi,Rs,Si,xa,ze,tn,$i,on,Ei,An,Fi,zi,Ji,nn,ji,sn,Ii,Ci,qi,Ue,an,Ni,zt,Ui,Bn,Gi,Zi,Vs,Wi,Ri,Vi,Qt,Pi,Kt,Ma,Jt,eo,Ps,rn,Xi,Xs,Ai,Sa,Je,dn,Bi,ln,Yi,Yn,Di,Li,Oi,cn,Hi,hn,Qi,Ki,el,Ge,pn,tl,jt,ol,Dn,nl,sl,As,al,rl,dl,to,il,oo,$a,It,no,Bs,mn,ll,Ys,cl,Ea,be,un,hl,fn,pl,Ln,ml,ul,fl,_n,_l,gn,gl,Tl,vl,so,bl,Ze,Tn,yl,Ct,kl,On,wl,xl,Ds,Ml,Sl,$l,ao,El,ro,Fa,qt,io,Ls,vn,Fl,Os,zl,za,ye,bn,Jl,yn,jl,Hn,Il,Cl,ql,kn,Nl,wn,Ul,Gl,Zl,lo,Wl,We,xn,Rl,Nt,Vl,Qn,Pl,Xl,Hs,Al,Bl,Yl,co,Dl,ho,Ja;return i=new st({}),$=new st({}),O=new st({}),ko=new $n({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwU3BlZWNoMlRleHRQcm9jZXNzb3IlMkMlMjBTcGVlY2gyVGV4dEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbiUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQW1vZGVsJTIwJTNEJTIwU3BlZWNoMlRleHRGb3JDb25kaXRpb25hbEdlbmVyYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGczJ0LXNtYWxsLWxpYnJpc3BlZWNoLWFzciUyMiklMEFwcm9jZXNzb3IlMjAlM0QlMjBTcGVlY2gyVGV4dFByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZzMnQtc21hbGwtbGlicmlzcGVlY2gtYXNyJTIyKSUwQSUwQSUwQWRzJTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmhmLWludGVybmFsLXRlc3RpbmclMkZsaWJyaXNwZWVjaF9hc3JfZGVtbyUyMiUyQyUyMCUyMmNsZWFuJTIyJTJDJTIwc3BsaXQlM0QlMjJ2YWxpZGF0aW9uJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3NvcihkcyU1QjAlNUQlNUIlMjJhdWRpbyUyMiU1RCU1QiUyMmFycmF5JTIyJTVEJTJDJTIwc2FtcGxpbmdfcmF0ZSUzRGRzJTVCMCU1RCU1QiUyMmF1ZGlvJTIyJTVEJTVCJTIyc2FtcGxpbmdfcmF0ZSUyMiU1RCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBZ2VuZXJhdGVkX2lkcyUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKGlucHV0cyU1QiUyMmlucHV0X2ZlYXR1cmVzJTIyJTVEJTJDJTIwYXR0ZW50aW9uX21hc2slM0RpbnB1dHMlNUIlMjJhdHRlbnRpb25fbWFzayUyMiU1RCklMEElMEF0cmFuc2NyaXB0aW9uJTIwJTNEJTIwcHJvY2Vzc29yLmJhdGNoX2RlY29kZShnZW5lcmF0ZWRfaWRzJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUpJTBBdHJhbnNjcmlwdGlvbg==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Speech2TextProcessor, Speech2TextForConditionalGeneration
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

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


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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>transcription = processor.batch_decode(generated_ids, skip_special_tokens=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>transcription
[<span class="hljs-string">&#x27;mister quilter is the apostle of the middle classes and we are glad to welcome his gospel&#x27;</span>]`}}),xo=new $n({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwU3BlZWNoMlRleHRQcm9jZXNzb3IlMkMlMjBTcGVlY2gyVGV4dEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbiUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQW1vZGVsJTIwJTNEJTIwU3BlZWNoMlRleHRGb3JDb25kaXRpb25hbEdlbmVyYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGczJ0LW1lZGl1bS1tdXN0Yy1tdWx0aWxpbmd1YWwtc3QlMjIpJTBBcHJvY2Vzc29yJTIwJTNEJTIwU3BlZWNoMlRleHRQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGczJ0LW1lZGl1bS1tdXN0Yy1tdWx0aWxpbmd1YWwtc3QlMjIpJTBBJTBBZHMlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaGYtaW50ZXJuYWwtdGVzdGluZyUyRmxpYnJpc3BlZWNoX2Fzcl9kZW1vJTIyJTJDJTIwJTIyY2xlYW4lMjIlMkMlMjBzcGxpdCUzRCUyMnZhbGlkYXRpb24lMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGRzJTVCMCU1RCU1QiUyMmF1ZGlvJTIyJTVEJTVCJTIyYXJyYXklMjIlNUQlMkMlMjBzYW1wbGluZ19yYXRlJTNEZHMlNUIwJTVEJTVCJTIyYXVkaW8lMjIlNUQlNUIlMjJzYW1wbGluZ19yYXRlJTIyJTVEJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFnZW5lcmF0ZWRfaWRzJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoJTBBJTIwJTIwJTIwJTIwaW5wdXRzJTVCJTIyaW5wdXRfZmVhdHVyZXMlMjIlNUQlMkMlMEElMjAlMjAlMjAlMjBhdHRlbnRpb25fbWFzayUzRGlucHV0cyU1QiUyMmF0dGVudGlvbl9tYXNrJTIyJTVEJTJDJTBBJTIwJTIwJTIwJTIwZm9yY2VkX2Jvc190b2tlbl9pZCUzRHByb2Nlc3Nvci50b2tlbml6ZXIubGFuZ19jb2RlX3RvX2lkJTVCJTIyZnIlMjIlNUQlMkMlMEEpJTBBJTBBdHJhbnNsYXRpb24lMjAlM0QlMjBwcm9jZXNzb3IuYmF0Y2hfZGVjb2RlKGdlbmVyYXRlZF9pZHMlMkMlMjBza2lwX3NwZWNpYWxfdG9rZW5zJTNEVHJ1ZSklMEF0cmFuc2xhdGlvbg==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Speech2TextProcessor, Speech2TextForConditionalGeneration
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>model = Speech2TextForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/s2t-medium-mustc-multilingual-st&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = Speech2TextProcessor.from_pretrained(<span class="hljs-string">&quot;facebook/s2t-medium-mustc-multilingual-st&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(ds[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>], sampling_rate=ds[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;sampling_rate&quot;</span>], return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>generated_ids = model.generate(
<span class="hljs-meta">... </span>    inputs[<span class="hljs-string">&quot;input_features&quot;</span>],
<span class="hljs-meta">... </span>    attention_mask=inputs[<span class="hljs-string">&quot;attention_mask&quot;</span>],
<span class="hljs-meta">... </span>    forced_bos_token_id=processor.tokenizer.lang_code_to_id[<span class="hljs-string">&quot;fr&quot;</span>],
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>translation = processor.batch_decode(generated_ids, skip_special_tokens=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>translation
[<span class="hljs-string">&quot;(Vid\xE9o) Si M. Kilder est l&#x27;apossible des classes moyennes, et nous sommes heureux d&#x27;\xEAtre accueillis dans son \xE9vangile.&quot;</span>]`}}),So=new st({}),$o=new V({props:{name:"class transformers.Speech2TextConfig",anchor:"transformers.Speech2TextConfig",parameters:[{name:"vocab_size",val:" = 10000"},{name:"encoder_layers",val:" = 12"},{name:"encoder_ffn_dim",val:" = 2048"},{name:"encoder_attention_heads",val:" = 4"},{name:"decoder_layers",val:" = 6"},{name:"decoder_ffn_dim",val:" = 2048"},{name:"decoder_attention_heads",val:" = 4"},{name:"encoder_layerdrop",val:" = 0.0"},{name:"decoder_layerdrop",val:" = 0.0"},{name:"use_cache",val:" = True"},{name:"is_encoder_decoder",val:" = True"},{name:"activation_function",val:" = 'relu'"},{name:"d_model",val:" = 256"},{name:"dropout",val:" = 0.1"},{name:"attention_dropout",val:" = 0.0"},{name:"activation_dropout",val:" = 0.0"},{name:"init_std",val:" = 0.02"},{name:"decoder_start_token_id",val:" = 2"},{name:"scale_embedding",val:" = True"},{name:"pad_token_id",val:" = 1"},{name:"bos_token_id",val:" = 0"},{name:"eos_token_id",val:" = 2"},{name:"max_source_positions",val:" = 6000"},{name:"max_target_positions",val:" = 1024"},{name:"num_conv_layers",val:" = 2"},{name:"conv_kernel_sizes",val:" = (5, 5)"},{name:"conv_channels",val:" = 1024"},{name:"input_feat_per_channel",val:" = 80"},{name:"input_channels",val:" = 1"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Speech2TextConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 50265) &#x2014;
Vocabulary size of the Speech2Text model. Defines the number of different tokens that can be represented by
the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.32.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.32.0/src/transformers/models/speech_to_text/configuration_speech_to_text.py#L31"}}),Zt=new ia({props:{anchor:"transformers.Speech2TextConfig.example",$$slots:{default:[Ah]},$$scope:{ctx:j}}}),Fo=new st({}),zo=new V({props:{name:"class transformers.Speech2TextTokenizer",anchor:"transformers.Speech2TextTokenizer",parameters:[{name:"vocab_file",val:""},{name:"spm_file",val:""},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"pad_token",val:" = '<pad>'"},{name:"unk_token",val:" = '<unk>'"},{name:"do_upper_case",val:" = False"},{name:"do_lower_case",val:" = False"},{name:"tgt_lang",val:" = None"},{name:"lang_codes",val:" = None"},{name:"sp_model_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Speech2TextTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
File containing the vocabulary.`,name:"vocab_file"},{anchor:"transformers.Speech2TextTokenizer.spm_file",description:`<strong>spm_file</strong> (<code>str</code>) &#x2014;
Path to the <a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a> model file`,name:"spm_file"},{anchor:"transformers.Speech2TextTokenizer.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The beginning of sentence token.`,name:"bos_token"},{anchor:"transformers.Speech2TextTokenizer.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The end of sentence token.`,name:"eos_token"},{anchor:"transformers.Speech2TextTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.Speech2TextTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.Speech2TextTokenizer.do_upper_case",description:`<strong>do_upper_case</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to uppercase the output when decoding.`,name:"do_upper_case"},{anchor:"transformers.Speech2TextTokenizer.do_lower_case",description:`<strong>do_lower_case</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to lowercase the input when tokenizing.`,name:"do_lower_case"},{anchor:"transformers.Speech2TextTokenizer.tgt_lang",description:`<strong>tgt_lang</strong> (<code>str</code>, <em>optional</em>) &#x2014;
A string representing the target language.`,name:"tgt_lang"},{anchor:"transformers.Speech2TextTokenizer.sp_model_kwargs",description:`<strong>sp_model_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Will be passed to the <code>SentencePieceProcessor.__init__()</code> method. The <a href="https://github.com/google/sentencepiece/tree/master/python" rel="nofollow">Python wrapper for
SentencePiece</a> can be used, among other things,
to set:</p>
<ul>
<li>
<p><code>enable_sampling</code>: Enable subword regularization.</p>
</li>
<li>
<p><code>nbest_size</code>: Sampling parameters for unigram. Invalid for BPE-Dropout.</p>
<ul>
<li><code>nbest_size = {0,1}</code>: No sampling is performed.</li>
<li><code>nbest_size &gt; 1</code>: samples from the nbest_size results.</li>
<li><code>nbest_size &lt; 0</code>: assuming that nbest_size is infinite and samples from the all hypothesis (lattice)
using forward-filtering-and-backward-sampling algorithm.</li>
</ul>
</li>
<li>
<p><code>alpha</code>: Smoothing parameter for unigram sampling, and dropout probability of merge operations for
BPE-dropout.</p>
</li>
</ul>
<p>**kwargs &#x2014;
Additional keyword arguments passed along to <a href="/docs/transformers/v4.32.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>`,name:"sp_model_kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.32.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.32.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.32.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.32.0/src/transformers/tokenization_utils_base.py#L3101",returnDescription:`
<p>The token type ids.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),No=new V({props:{name:"save_vocabulary",anchor:"transformers.Speech2TextTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/v4.32.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.32.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.32.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.32.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.32.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.32.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.32.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.32.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.32.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:": typing.Union[str, os.PathLike]"},{name:"cache_dir",val:": typing.Union[str, os.PathLike, NoneType] = None"},{name:"force_download",val:": bool = False"},{name:"local_files_only",val:": bool = False"},{name:"token",val:": typing.Union[bool, str, NoneType] = None"},{name:"revision",val:": str = 'main'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Speech2TextProcessor.from_pretrained.pretrained_model_name_or_path",description:`<strong>pretrained_model_name_or_path</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
This can be either:</p>
<ul>
<li>a string, the <em>model id</em> of a pretrained feature_extractor hosted inside a model repo on
huggingface.co. Valid model ids can be located at the root-level, like <code>bert-base-uncased</code>, or
namespaced under a user or organization name, like <code>dbmdz/bert-base-german-cased</code>.</li>
<li>a path to a <em>directory</em> containing a feature extractor file saved using the
<a href="/docs/transformers/v4.32.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.32.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.32.0/src/transformers/processing_utils.py#L167"}}),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).`,name:"push_to_hub"},{anchor:"transformers.Speech2TextProcessor.save_pretrained.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Additional key word arguments passed along to the <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.push_to_hub">push_to_hub()</a> method.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/processing_utils.py#L93"}}),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.32.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.32.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.32.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.32.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.32.0/src/transformers/models/speech_to_text/modeling_speech_to_text.py#L1136"}}),an=new V({props:{name:"forward",anchor:"transformers.Speech2TextModel.forward",parameters:[{name:"input_features",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_outputs",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"decoder_inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.Speech2TextModel.forward.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, feature_size)</code>) &#x2014;
Float values of fbank features extracted from the raw speech waveform. Raw speech waveform can be obtained
by loading a <code>.flac</code> or <code>.wav</code> audio file into an array of type <code>List[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em>
via the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_features</code>, the
<a href="/docs/transformers/v4.32.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.32.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.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>SpeechToText uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).`,name:"decoder_input_ids"},{anchor:"transformers.Speech2TextModel.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.</p>
<p>If you want to change padding behavior, you should read
<code>modeling_speech_to_text._prepare_decoder_attention_mask</code> and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the
paper</a> for more information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.Speech2TextModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.Speech2TextModel.forward.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.Speech2TextModel.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.Speech2TextModel.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.Speech2TextModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.Speech2TextModel.forward.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.`,name:"decoder_inputs_embeds"},{anchor:"transformers.Speech2TextModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.Speech2TextModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.Speech2TextModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.Speech2TextModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.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.32.0/src/transformers/models/speech_to_text/modeling_speech_to_text.py#L1158",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.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.32.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.32.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 ia({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.32.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.32.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.32.0/src/transformers/models/speech_to_text/modeling_speech_to_text.py#L1267"}}),pn=new V({props:{name:"forward",anchor:"transformers.Speech2TextForConditionalGeneration.forward",parameters:[{name:"input_features",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_outputs",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"decoder_inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.Speech2TextForConditionalGeneration.forward.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, feature_size)</code>) &#x2014;
Float values of fbank features extracted from the raw speech waveform. Raw speech waveform can be obtained
by loading a <code>.flac</code> or <code>.wav</code> audio file into an array of type <code>List[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em>
via the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_features</code>, the
<a href="/docs/transformers/v4.32.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.32.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.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>SpeechToText uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).`,name:"decoder_input_ids"},{anchor:"transformers.Speech2TextForConditionalGeneration.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.</p>
<p>If you want to change padding behavior, you should read
<code>modeling_speech_to_text._prepare_decoder_attention_mask</code> and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the
paper</a> for more information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.Speech2TextForConditionalGeneration.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.Speech2TextForConditionalGeneration.forward.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.Speech2TextForConditionalGeneration.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.Speech2TextForConditionalGeneration.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.Speech2TextForConditionalGeneration.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.Speech2TextForConditionalGeneration.forward.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.`,name:"decoder_inputs_embeds"},{anchor:"transformers.Speech2TextForConditionalGeneration.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.Speech2TextForConditionalGeneration.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.Speech2TextForConditionalGeneration.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.Speech2TextForConditionalGeneration.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.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.32.0/src/transformers/models/speech_to_text/modeling_speech_to_text.py#L1291",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.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.32.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.32.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 ia({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.32.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.32.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.32.0/src/transformers/models/speech_to_text/modeling_tf_speech_to_text.py#L1205"}}),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.32.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.32.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.32.0/en/model_doc/speech_to_text#transformers.Speech2TextTokenizer">Speech2TextTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>SpeechToText uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.TFSpeech2TextModel.call.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
will be made by default and ignore pad tokens. It is not recommended to set this for most use cases.`,name:"decoder_attention_mask"},{anchor:"transformers.TFSpeech2TextModel.call.head_mask",description:`<strong>head_mask</strong> (<code>tf.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFSpeech2TextModel.call.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>tf.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.TFSpeech2TextModel.call.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>tf.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.TFSpeech2TextModel.call.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tf.FloatTensor</code>, <em>optional</em>) &#x2014;
hidden states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.
of shape <code>(batch_size, sequence_length, hidden_size)</code> is a sequence of`,name:"encoder_outputs"},{anchor:"transformers.TFSpeech2TextModel.call.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[tf.Tensor]]</code> of length <code>config.n_layers</code>) &#x2014;
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.TFSpeech2TextModel.call.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>tf.FloatTensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.`,name:"decoder_inputs_embeds"},{anchor:"transformers.TFSpeech2TextModel.call.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.TFSpeech2TextModel.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFSpeech2TextModel.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFSpeech2TextModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.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.32.0/src/transformers/models/speech_to_text/modeling_tf_speech_to_text.py#L1217",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.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.32.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.32.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 ia({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.32.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.32.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.32.0/src/transformers/models/speech_to_text/modeling_tf_speech_to_text.py#L1287"}}),lo=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.32.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.32.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.32.0/en/model_doc/speech_to_text#transformers.Speech2TextTokenizer">Speech2TextTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>SpeechToText uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.TFSpeech2TextForConditionalGeneration.call.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
will be made by default and ignore pad tokens. It is not recommended to set this for most use cases.`,name:"decoder_attention_mask"},{anchor:"transformers.TFSpeech2TextForConditionalGeneration.call.head_mask",description:`<strong>head_mask</strong> (<code>tf.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFSpeech2TextForConditionalGeneration.call.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>tf.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.TFSpeech2TextForConditionalGeneration.call.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>tf.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.TFSpeech2TextForConditionalGeneration.call.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tf.FloatTensor</code>, <em>optional</em>) &#x2014;
hidden states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.
of shape <code>(batch_size, sequence_length, hidden_size)</code> is a sequence of`,name:"encoder_outputs"},{anchor:"transformers.TFSpeech2TextForConditionalGeneration.call.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[tf.Tensor]]</code> of length <code>config.n_layers</code>) &#x2014;
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.TFSpeech2TextForConditionalGeneration.call.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>tf.FloatTensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.`,name:"decoder_inputs_embeds"},{anchor:"transformers.TFSpeech2TextForConditionalGeneration.call.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.TFSpeech2TextForConditionalGeneration.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFSpeech2TextForConditionalGeneration.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFSpeech2TextForConditionalGeneration.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.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.32.0/src/transformers/models/speech_to_text/modeling_tf_speech_to_text.py#L1311",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.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.32.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.32.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 ia({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(i.$$.fragment),m=h(),E=a("span"),Z=n("Speech2Text"),N=h(),I=a("h2"),U=a("a"),C=a("span"),y($.$$.fragment),we=h(),Y=a("span"),Ve=n("Overview"),Ie=h(),q=a("p"),Pe=n("The Speech2Text model was proposed in "),se=a("a"),ae=n("fairseq S2T: Fast Speech-to-Text Modeling with fairseq"),Xe=n(` by Changhan Wang, Yun Tang, Xutai Ma, Anne Wu, Dmytro Okhonko, Juan Pino. It\u2019s a
transformer-based seq2seq (encoder-decoder) model designed for end-to-end Automatic Speech Recognition (ASR) and Speech
Translation (ST). It uses a convolutional downsampler to reduce the length of speech inputs by 3/4th before they are
fed into the encoder. The model is trained with standard autoregressive cross-entropy loss and generates the
transcripts/translations autoregressively. Speech2Text has been fine-tuned on several datasets for ASR and ST:
`),re=a("a"),de=n("LibriSpeech"),Ae=n(", "),ie=a("a"),le=n("CoVoST 2"),Be=n(", "),ce=a("a"),Se=n("MuST-C"),G=n("."),W=h(),Q=a("p"),he=n("This model was contributed by "),pe=a("a"),Ye=n("valhalla"),me=n(". The original code can be found "),ue=a("a"),De=n("here"),P=n("."),Ce=h(),X=a("h2"),te=a("a"),$e=a("span"),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 "),z=a("a"),ft=n("Speech2TextFeatureExtractor"),_t=n(` and
`),Ne=a("a"),gt=n("Speech2TextTokenizer"),Tt=n(` into a single instance to both extract the input features and decode the
predicted token ids.`),K=h(),J=a("p"),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"),kt=n('pip install transformers"[speech, sentencepiece]"'),cr=n(" or install the packages separately with "),ls=a("code"),hr=n("pip install torchaudio sentencepiece"),pr=n(". Also "),cs=a("code"),mr=n("torchaudio"),ur=n(" requires the development version of the "),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(ko.$$.fragment),pa=h(),Fn=a("ul"),wo=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"),kr=n("eos_token_id"),wr=n(" is used as the "),fs=a("code"),xr=n("decoder_start_token_id"),Mr=n(` and
the target language id is forced as the first generated token. To force the target language id as the first
generated token, pass the `),_s=a("code"),Sr=n("forced_bos_token_id"),$r=n(" parameter to the "),gs=a("code"),Er=n("generate()"),Fr=n(` method. The following
example shows how to transate English speech to French text using the `),Ts=a("em"),zr=n("facebook/s2t-medium-mustc-multilingual-st"),Jr=n(`
checkpoint.`),ma=h(),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(),wt=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 "),zn=a("a"),Zr=n("Speech2TextModel"),Wr=n(`. It is used to instantiate an
Speech2Text model according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the Speech2Text
`),Eo=a("a"),Rr=n("facebook/s2t-small-librispeech-asr"),Vr=n(" architecture."),Pr=h(),Mt=a("p"),Xr=n("Configuration objects inherit from "),Jn=a("a"),Ar=n("PretrainedConfig"),Br=n(` and can be used to control the model outputs. Read the
documentation from `),jn=a("a"),Yr=n("PretrainedConfig"),Dr=n(" for more information."),Lr=h(),y(Zt.$$.fragment),ga=h(),St=a("h2"),Wt=a("a"),ys=a("span"),y(Fo.$$.fragment),Or=h(),ks=a("span"),Hr=n("Speech2TextTokenizer"),Ta=h(),H=a("div"),y(zo.$$.fragment),Qr=h(),ws=a("p"),Kr=n("Construct an Speech2Text tokenizer."),ed=h(),Jo=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),id=h(),Co=a("p"),ld=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"),kd=n("Constructs a Speech2Text feature extractor."),wd=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(),zs=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),zd=h(),Js=a("p"),Jd=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"),ka=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"),ei=n("as_target_processor()"),ti=n(` this method forwards all its arguments to Speech2TextTokenizer\u2019s
`),Bo=a("a"),Gs=a("strong"),oi=n("call"),ni=n("()"),si=n(`. Please refer to the doctsring of the above two methods for more
information.`),ai=h(),rt=a("div"),y(Yo.$$.fragment),ri=h(),Zs=a("p"),di=n("Instantiate a processor associated with a pretrained model."),ii=h(),y(Yt.$$.fragment),li=h(),dt=a("div"),y(Do.$$.fragment),ci=h(),Lo=a("p"),hi=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"),pi=n("from_pretrained()"),mi=n(" method."),ui=h(),y(Dt.$$.fragment),fi=h(),Lt=a("div"),y(Oo.$$.fragment),_i=h(),Ho=a("p"),gi=n("This method forwards all its arguments to Speech2TextTokenizer\u2019s "),Pn=a("a"),Ti=n("batch_decode()"),vi=n(`. Please
refer to the docstring of this method for more information.`),bi=h(),Ot=a("div"),y(Qo.$$.fragment),yi=h(),Ko=a("p"),ki=n("This method forwards all its arguments to Speech2TextTokenizer\u2019s "),Xn=a("a"),wi=n("decode()"),xi=n(`. Please refer
to the docstring of this method for more information.`),wa=h(),Ft=a("h2"),Ht=a("a"),Ws=a("span"),y(en.$$.fragment),Mi=h(),Rs=a("span"),Si=n("Speech2TextModel"),xa=h(),ze=a("div"),y(tn.$$.fragment),$i=h(),on=a("p"),Ei=n(`The bare Speech2Text Model outputting raw hidden-states without any specific head on top.
This model inherits from `),An=a("a"),Fi=n("PreTrainedModel"),zi=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.)`),Ji=h(),nn=a("p"),ji=n("This model is also a PyTorch "),sn=a("a"),Ii=n("torch.nn.Module"),Ci=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),qi=h(),Ue=a("div"),y(an.$$.fragment),Ni=h(),zt=a("p"),Ui=n("The "),Bn=a("a"),Gi=n("Speech2TextModel"),Zi=n(" forward method, overrides the "),Vs=a("code"),Wi=n("__call__"),Ri=n(" special method."),Vi=h(),y(Qt.$$.fragment),Pi=h(),y(Kt.$$.fragment),Ma=h(),Jt=a("h2"),eo=a("a"),Ps=a("span"),y(rn.$$.fragment),Xi=h(),Xs=a("span"),Ai=n("Speech2TextForConditionalGeneration"),Sa=h(),Je=a("div"),y(dn.$$.fragment),Bi=h(),ln=a("p"),Yi=n(`The Speech2Text Model with a language modeling head. Can be used for summarization.
This model inherits from `),Yn=a("a"),Di=n("PreTrainedModel"),Li=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.)`),Oi=h(),cn=a("p"),Hi=n("This model is also a PyTorch "),hn=a("a"),Qi=n("torch.nn.Module"),Ki=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),el=h(),Ge=a("div"),y(pn.$$.fragment),tl=h(),jt=a("p"),ol=n("The "),Dn=a("a"),nl=n("Speech2TextForConditionalGeneration"),sl=n(" forward method, overrides the "),As=a("code"),al=n("__call__"),rl=n(" special method."),dl=h(),y(to.$$.fragment),il=h(),y(oo.$$.fragment),$a=h(),It=a("h2"),no=a("a"),Bs=a("span"),y(mn.$$.fragment),ll=h(),Ys=a("span"),cl=n("TFSpeech2TextModel"),Ea=h(),be=a("div"),y(un.$$.fragment),hl=h(),fn=a("p"),pl=n(`The bare Speech2Text Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Ln=a("a"),ml=n("TFPreTrainedModel"),ul=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),fl=h(),_n=a("p"),_l=n("This model is also a "),gn=a("a"),gl=n("tf.keras.Model"),Tl=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),vl=h(),y(so.$$.fragment),bl=h(),Ze=a("div"),y(Tn.$$.fragment),yl=h(),Ct=a("p"),kl=n("The "),On=a("a"),wl=n("TFSpeech2TextModel"),xl=n(" forward method, overrides the "),Ds=a("code"),Ml=n("__call__"),Sl=n(" special method."),$l=h(),y(ao.$$.fragment),El=h(),y(ro.$$.fragment),Fa=h(),qt=a("h2"),io=a("a"),Ls=a("span"),y(vn.$$.fragment),Fl=h(),Os=a("span"),zl=n("TFSpeech2TextForConditionalGeneration"),za=h(),ye=a("div"),y(bn.$$.fragment),Jl=h(),yn=a("p"),jl=n(`The Speech2Text Model with a language modeling head. Can be used for summarization.
This model inherits from `),Hn=a("a"),Il=n("TFPreTrainedModel"),Cl=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),ql=h(),kn=a("p"),Nl=n("This model is also a "),wn=a("a"),Ul=n("tf.keras.Model"),Gl=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Zl=h(),y(lo.$$.fragment),Wl=h(),We=a("div"),y(xn.$$.fragment),Rl=h(),Nt=a("p"),Vl=n("The "),Qn=a("a"),Pl=n("TFSpeech2TextForConditionalGeneration"),Xl=n(" forward method, overrides the "),Hs=a("code"),Al=n("__call__"),Bl=n(" special method."),Yl=h(),y(co.$$.fragment),Dl=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);k(i.$$.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);k($.$$.fragment,oa),oa.forEach(t),ta.forEach(t),we=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,", "),ie=r(je,"A",{href:!0,rel:!0});var ra=d(ie);le=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 Kl=d(pe);Ye=s(Kl,"valhalla"),Kl.forEach(t),me=s(Kn,". The original code can be found "),ue=r(Kn,"A",{href:!0,rel:!0});var ec=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);k(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 it=d(R);Qe=s(it,"The "),T=r(it,"A",{href:!0});var ac=d(T);F=s(ac,"Speech2TextFeatureExtractor"),ac.forEach(t),pt=s(it,` class is responsible for extracting the log-mel filter-bank
features. The `),oe=r(it,"A",{href:!0});var rc=d(oe);mt=s(rc,"Speech2TextProcessor"),rc.forEach(t),ut=s(it," wraps "),z=r(it,"A",{href:!0});var dc=d(z);ft=s(dc,"Speech2TextFeatureExtractor"),dc.forEach(t),_t=s(it,` and
`),Ne=r(it,"A",{href:!0});var ic=d(Ne);gt=s(ic,"Speech2TextTokenizer"),ic.forEach(t),Tt=s(it,` into a single instance to both extract the input features and decode the
predicted token ids.`),it.forEach(t),K=p(o),J=r(o,"P",{});var ke=d(J);vt=s(ke,"The feature extractor depends on "),Ke=r(ke,"CODE",{});var lc=d(Ke);_e=s(lc,"torchaudio"),lc.forEach(t),bt=s(ke," and the tokenizer depends on "),et=r(ke,"CODE",{});var cc=d(et);tt=s(cc,"sentencepiece"),cc.forEach(t),yt=s(ke,` so be sure to
install those packages before running the examples. You could either install those as extra speech dependencies with
`),ge=r(ke,"CODE",{});var hc=d(ge);kt=s(hc,'pip install transformers"[speech, sentencepiece]"'),hc.forEach(t),cr=s(ke," or install the packages separately with "),ls=r(ke,"CODE",{});var pc=d(ls);hr=s(pc,"pip install torchaudio sentencepiece"),pc.forEach(t),pr=s(ke,". Also "),cs=r(ke,"CODE",{});var mc=d(cs);mr=s(mc,"torchaudio"),mc.forEach(t),ur=s(ke," requires the development version of the "),yo=r(ke,"A",{href:!0,rel:!0});var uc=d(yo);fr=s(uc,"libsndfile"),uc.forEach(t),_r=s(ke,` package which can be installed via a system package manager. On Ubuntu it can
be installed as follows: `),hs=r(ke,"CODE",{});var fc=d(hs);gr=s(fc,"apt install libsndfile1-dev"),fc.forEach(t),ke.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),k(ko.$$.fragment,o),pa=p(o),Fn=r(o,"UL",{});var Tc=d(Fn);wo=r(Tc,"LI",{});var Ca=d(wo);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);kr=s(bc,"eos_token_id"),bc.forEach(t),wr=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 kc=d(_s);Sr=s(kc,"forced_bos_token_id"),kc.forEach(t),$r=s(Re," parameter to the "),gs=r(Re,"CODE",{});var wc=d(gs);Er=s(wc,"generate()"),wc.forEach(t),Fr=s(Re,` method. The following
example shows how to transate English speech to French text using the `),Ts=r(Re,"EM",{});var xc=d(Ts);zr=s(xc,"facebook/s2t-medium-mustc-multilingual-st"),xc.forEach(t),Jr=s(Re,`
checkpoint.`),Re.forEach(t),Ca.forEach(t),Tc.forEach(t),ma=p(o),k(xo.$$.fragment,o),ua=p(o),Ut=r(o,"P",{});var qa=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),wt=r(o,"H2",{class:!0});var Na=d(wt);Gt=r(Na,"A",{id:!0,class:!0,href:!0});var Sc=d(Gt);vs=r(Sc,"SPAN",{});var $c=d(vs);k(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);k($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 "),zn=r(es,"A",{href:!0});var Fc=d(zn);Zr=s(Fc,"Speech2TextModel"),Fc.forEach(t),Wr=s(es,`. It is used to instantiate an
Speech2Text model according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the Speech2Text
`),Eo=r(es,"A",{href:!0,rel:!0});var zc=d(Eo);Rr=s(zc,"facebook/s2t-small-librispeech-asr"),zc.forEach(t),Vr=s(es," architecture."),es.forEach(t),Pr=p(po),Mt=r(po,"P",{});var ts=d(Mt);Xr=s(ts,"Configuration objects inherit from "),Jn=r(ts,"A",{href:!0});var Jc=d(Jn);Ar=s(Jc,"PretrainedConfig"),Jc.forEach(t),Br=s(ts,` and can be used to control the model outputs. Read the
documentation from `),jn=r(ts,"A",{href:!0});var jc=d(jn);Yr=s(jc,"PretrainedConfig"),jc.forEach(t),Dr=s(ts," for more information."),ts.forEach(t),Lr=p(po),k(Zt.$$.fragment,po),po.forEach(t),ga=p(o),St=r(o,"H2",{class:!0});var Ua=d(St);Wt=r(Ua,"A",{id:!0,class:!0,href:!0});var Ic=d(Wt);ys=r(Ic,"SPAN",{});var Cc=d(ys);k(Fo.$$.fragment,Cc),Cc.forEach(t),Ic.forEach(t),Or=p(Ua),ks=r(Ua,"SPAN",{});var qc=d(ks);Hr=s(qc,"Speech2TextTokenizer"),qc.forEach(t),Ua.forEach(t),Ta=p(o),H=r(o,"DIV",{class:!0});var Me=d(H);k(zo.$$.fragment,Me),Qr=p(Me),ws=r(Me,"P",{});var Nc=d(ws);Kr=s(Nc,"Construct an Speech2Text tokenizer."),Nc.forEach(t),ed=p(Me),Jo=r(Me,"P",{});var Ga=d(Jo);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);k(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);k(Io.$$.fragment,Wa),id=p(Wa),Co=r(Wa,"P",{});var Ra=d(Co);ld=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);k(qo.$$.fragment,os),md=p(os),Cn=r(os,"P",{});var Ll=d(Cn);ud=s(Ll,"Create the token type IDs corresponding to the sequences passed. "),qn=r(Ll,"A",{href:!0});var Wc=d(qn);fd=s(Wc,`What are token type
IDs?`),Wc.forEach(t),Ll.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);k(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);k(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 lt=d(ve);k(Go.$$.fragment,lt),yd=p(lt),Fs=r(lt,"P",{});var Bc=d(Fs);kd=s(Bc,"Constructs a Speech2Text feature extractor."),Bc.forEach(t),wd=p(lt),Zo=r(lt,"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(lt),zs=r(lt,"P",{});var Dc=d(zs);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(lt),Xt=r(lt,"DIV",{class:!0});var Xa=d(Xt);k(Wo.$$.fragment,Xa),zd=p(Xa),Js=r(Xa,"P",{});var Lc=d(Js);Jd=s(Lc,"Main method to featurize and prepare for the model one or several sequence(s)."),Lc.forEach(t),Xa.forEach(t),lt.forEach(t),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);k(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),ka=p(o),B=r(o,"DIV",{class:!0});var ne=d(B);k(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 Ol=d(Po);qs=r(Ol,"STRONG",{});var nh=d(qs);Pd=s(nh,"call"),nh.forEach(t),Xd=s(Ol,"()"),Ol.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);k(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 Hl=d(Ao);Ns=r(Hl,"STRONG",{});var ah=d(Ns);Hd=s(ah,"call"),ah.forEach(t),Qd=s(Hl,"()"),Hl.forEach(t),Kd=s(mo,` and returns its output. If used in the context
`),Us=r(mo,"CODE",{});var rh=d(Us);ei=s(rh,"as_target_processor()"),rh.forEach(t),ti=s(mo,` this method forwards all its arguments to Speech2TextTokenizer\u2019s
`),Bo=r(mo,"A",{href:!0});var Ql=d(Bo);Gs=r(Ql,"STRONG",{});var dh=d(Gs);oi=s(dh,"call"),dh.forEach(t),ni=s(Ql,"()"),Ql.forEach(t),si=s(mo,`. Please refer to the doctsring of the above two methods for more
information.`),mo.forEach(t),Ba.forEach(t),ai=p(ne),rt=r(ne,"DIV",{class:!0});var ns=d(rt);k(Yo.$$.fragment,ns),ri=p(ns),Zs=r(ns,"P",{});var ih=d(Zs);di=s(ih,"Instantiate a processor associated with a pretrained model."),ih.forEach(t),ii=p(ns),k(Yt.$$.fragment,ns),ns.forEach(t),li=p(ne),dt=r(ne,"DIV",{class:!0});var ss=d(dt);k(Do.$$.fragment,ss),ci=p(ss),Lo=r(ss,"P",{});var Ya=d(Lo);hi=s(Ya,`Saves the attributes of this processor (feature extractor, tokenizer\u2026) in the specified directory so that it
can be reloaded using the `),Vn=r(Ya,"A",{href:!0});var lh=d(Vn);pi=s(lh,"from_pretrained()"),lh.forEach(t),mi=s(Ya," method."),Ya.forEach(t),ui=p(ss),k(Dt.$$.fragment,ss),ss.forEach(t),fi=p(ne),Lt=r(ne,"DIV",{class:!0});var Da=d(Lt);k(Oo.$$.fragment,Da),_i=p(Da),Ho=r(Da,"P",{});var La=d(Ho);gi=s(La,"This method forwards all its arguments to Speech2TextTokenizer\u2019s "),Pn=r(La,"A",{href:!0});var ch=d(Pn);Ti=s(ch,"batch_decode()"),ch.forEach(t),vi=s(La,`. Please
refer to the docstring of this method for more information.`),La.forEach(t),Da.forEach(t),bi=p(ne),Ot=r(ne,"DIV",{class:!0});var Oa=d(Ot);k(Qo.$$.fragment,Oa),yi=p(Oa),Ko=r(Oa,"P",{});var Ha=d(Ko);ki=s(Ha,"This method forwards all its arguments to Speech2TextTokenizer\u2019s "),Xn=r(Ha,"A",{href:!0});var hh=d(Xn);wi=s(hh,"decode()"),hh.forEach(t),xi=s(Ha,`. Please refer
to the docstring of this method for more information.`),Ha.forEach(t),Oa.forEach(t),ne.forEach(t),wa=p(o),Ft=r(o,"H2",{class:!0});var Qa=d(Ft);Ht=r(Qa,"A",{id:!0,class:!0,href:!0});var ph=d(Ht);Ws=r(ph,"SPAN",{});var mh=d(Ws);k(en.$$.fragment,mh),mh.forEach(t),ph.forEach(t),Mi=p(Qa),Rs=r(Qa,"SPAN",{});var uh=d(Rs);Si=s(uh,"Speech2TextModel"),uh.forEach(t),Qa.forEach(t),xa=p(o),ze=r(o,"DIV",{class:!0});var uo=d(ze);k(tn.$$.fragment,uo),$i=p(uo),on=r(uo,"P",{});var Ka=d(on);Ei=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);Fi=s(fh,"PreTrainedModel"),fh.forEach(t),zi=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),Ji=p(uo),nn=r(uo,"P",{});var er=d(nn);ji=s(er,"This model is also a PyTorch "),sn=r(er,"A",{href:!0,rel:!0});var _h=d(sn);Ii=s(_h,"torch.nn.Module"),_h.forEach(t),Ci=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),qi=p(uo),Ue=r(uo,"DIV",{class:!0});var fo=d(Ue);k(an.$$.fragment,fo),Ni=p(fo),zt=r(fo,"P",{});var as=d(zt);Ui=s(as,"The "),Bn=r(as,"A",{href:!0});var gh=d(Bn);Gi=s(gh,"Speech2TextModel"),gh.forEach(t),Zi=s(as," forward method, overrides the "),Vs=r(as,"CODE",{});var Th=d(Vs);Wi=s(Th,"__call__"),Th.forEach(t),Ri=s(as," special method."),as.forEach(t),Vi=p(fo),k(Qt.$$.fragment,fo),Pi=p(fo),k(Kt.$$.fragment,fo),fo.forEach(t),uo.forEach(t),Ma=p(o),Jt=r(o,"H2",{class:!0});var tr=d(Jt);eo=r(tr,"A",{id:!0,class:!0,href:!0});var vh=d(eo);Ps=r(vh,"SPAN",{});var bh=d(Ps);k(rn.$$.fragment,bh),bh.forEach(t),vh.forEach(t),Xi=p(tr),Xs=r(tr,"SPAN",{});var yh=d(Xs);Ai=s(yh,"Speech2TextForConditionalGeneration"),yh.forEach(t),tr.forEach(t),Sa=p(o),Je=r(o,"DIV",{class:!0});var _o=d(Je);k(dn.$$.fragment,_o),Bi=p(_o),ln=r(_o,"P",{});var or=d(ln);Yi=s(or,`The Speech2Text Model with a language modeling head. Can be used for summarization.
This model inherits from `),Yn=r(or,"A",{href:!0});var kh=d(Yn);Di=s(kh,"PreTrainedModel"),kh.forEach(t),Li=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),Oi=p(_o),cn=r(_o,"P",{});var nr=d(cn);Hi=s(nr,"This model is also a PyTorch "),hn=r(nr,"A",{href:!0,rel:!0});var wh=d(hn);Qi=s(wh,"torch.nn.Module"),wh.forEach(t),Ki=s(nr,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),nr.forEach(t),el=p(_o),Ge=r(_o,"DIV",{class:!0});var go=d(Ge);k(pn.$$.fragment,go),tl=p(go),jt=r(go,"P",{});var rs=d(jt);ol=s(rs,"The "),Dn=r(rs,"A",{href:!0});var xh=d(Dn);nl=s(xh,"Speech2TextForConditionalGeneration"),xh.forEach(t),sl=s(rs," forward method, overrides the "),As=r(rs,"CODE",{});var Mh=d(As);al=s(Mh,"__call__"),Mh.forEach(t),rl=s(rs," special method."),rs.forEach(t),dl=p(go),k(to.$$.fragment,go),il=p(go),k(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);k(mn.$$.fragment,$h),$h.forEach(t),Sh.forEach(t),ll=p(sr),Ys=r(sr,"SPAN",{});var Eh=d(Ys);cl=s(Eh,"TFSpeech2TextModel"),Eh.forEach(t),sr.forEach(t),Ea=p(o),be=r(o,"DIV",{class:!0});var ct=d(be);k(un.$$.fragment,ct),hl=p(ct),fn=r(ct,"P",{});var ar=d(fn);pl=s(ar,`The bare Speech2Text Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Ln=r(ar,"A",{href:!0});var Fh=d(Ln);ml=s(Fh,"TFPreTrainedModel"),Fh.forEach(t),ul=s(ar,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),ar.forEach(t),fl=p(ct),_n=r(ct,"P",{});var rr=d(_n);_l=s(rr,"This model is also a "),gn=r(rr,"A",{href:!0,rel:!0});var zh=d(gn);gl=s(zh,"tf.keras.Model"),zh.forEach(t),Tl=s(rr,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),rr.forEach(t),vl=p(ct),k(so.$$.fragment,ct),bl=p(ct),Ze=r(ct,"DIV",{class:!0});var To=d(Ze);k(Tn.$$.fragment,To),yl=p(To),Ct=r(To,"P",{});var ds=d(Ct);kl=s(ds,"The "),On=r(ds,"A",{href:!0});var Jh=d(On);wl=s(Jh,"TFSpeech2TextModel"),Jh.forEach(t),xl=s(ds," forward method, overrides the "),Ds=r(ds,"CODE",{});var jh=d(Ds);Ml=s(jh,"__call__"),jh.forEach(t),Sl=s(ds," special method."),ds.forEach(t),$l=p(To),k(ao.$$.fragment,To),El=p(To),k(ro.$$.fragment,To),To.forEach(t),ct.forEach(t),Fa=p(o),qt=r(o,"H2",{class:!0});var dr=d(qt);io=r(dr,"A",{id:!0,class:!0,href:!0});var Ih=d(io);Ls=r(Ih,"SPAN",{});var Ch=d(Ls);k(vn.$$.fragment,Ch),Ch.forEach(t),Ih.forEach(t),Fl=p(dr),Os=r(dr,"SPAN",{});var qh=d(Os);zl=s(qh,"TFSpeech2TextForConditionalGeneration"),qh.forEach(t),dr.forEach(t),za=p(o),ye=r(o,"DIV",{class:!0});var ht=d(ye);k(bn.$$.fragment,ht),Jl=p(ht),yn=r(ht,"P",{});var ir=d(yn);jl=s(ir,`The Speech2Text Model with a language modeling head. Can be used for summarization.
This model inherits from `),Hn=r(ir,"A",{href:!0});var Nh=d(Hn);Il=s(Nh,"TFPreTrainedModel"),Nh.forEach(t),Cl=s(ir,`. 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.)`),ir.forEach(t),ql=p(ht),kn=r(ht,"P",{});var lr=d(kn);Nl=s(lr,"This model is also a "),wn=r(lr,"A",{href:!0,rel:!0});var Uh=d(wn);Ul=s(Uh,"tf.keras.Model"),Uh.forEach(t),Gl=s(lr,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),lr.forEach(t),Zl=p(ht),k(lo.$$.fragment,ht),Wl=p(ht),We=r(ht,"DIV",{class:!0});var vo=d(We);k(xn.$$.fragment,vo),Rl=p(vo),Nt=r(vo,"P",{});var is=d(Nt);Vl=s(is,"The "),Qn=r(is,"A",{href:!0});var Gh=d(Qn);Pl=s(Gh,"TFSpeech2TextForConditionalGeneration"),Gh.forEach(t),Xl=s(is," forward method, overrides the "),Hs=r(is,"CODE",{});var Zh=d(Hs);Al=s(Zh,"__call__"),Zh.forEach(t),Bl=s(is," special method."),is.forEach(t),Yl=p(vo),k(co.$$.fragment,vo),Dl=p(vo),k(ho.$$.fragment,vo),vo.forEach(t),ht.forEach(t),this.h()},h(){l(c,"name","hf:doc:metadata"),l(c,"content",JSON.stringify(ap)),l(g,"id","speech2text"),l(g,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(g,"href","#speech2text"),l(_,"class","relative group"),l(U,"id","overview"),l(U,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(U,"href","#overview"),l(I,"class","relative group"),l(se,"href","https://arxiv.org/abs/2010.05171"),l(se,"rel","nofollow"),l(re,"href","http://www.openslr.org/12"),l(re,"rel","nofollow"),l(ie,"href","https://github.com/facebookresearch/covost"),l(ie,"rel","nofollow"),l(ce,"href","https://ict.fbk.eu/must-c/"),l(ce,"rel","nofollow"),l(pe,"href","https://huggingface.co/valhalla"),l(pe,"rel","nofollow"),l(ue,"href","https://github.com/pytorch/fairseq/tree/master/examples/speech_to_text"),l(ue,"rel","nofollow"),l(te,"id","inference"),l(te,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(te,"href","#inference"),l(X,"class","relative group"),l(T,"href","/docs/transformers/v4.32.0/en/model_doc/speech_to_text#transformers.Speech2TextFeatureExtractor"),l(oe,"href","/docs/transformers/v4.32.0/en/model_doc/speech_to_text#transformers.Speech2TextProcessor"),l(z,"href","/docs/transformers/v4.32.0/en/model_doc/speech_to_text#transformers.Speech2TextFeatureExtractor"),l(Ne,"href","/docs/transformers/v4.32.0/en/model_doc/speech_to_text#transformers.Speech2TextTokenizer"),l(yo,"href","http://www.mega-nerd.com/libsndfile/"),l(yo,"rel","nofollow"),l(Mo,"href","https://huggingface.co/models?filter=speech_to_text"),l(Mo,"rel","nofollow"),l(Gt,"id","transformers.Speech2TextConfig"),l(Gt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(Gt,"href","#transformers.Speech2TextConfig"),l(wt,"class","relative group"),l(zn,"href","/docs/transformers/v4.32.0/en/model_doc/speech_to_text#transformers.Speech2TextModel"),l(Eo,"href","https://huggingface.co/facebook/s2t-small-librispeech-asr"),l(Eo,"rel","nofollow"),l(Jn,"href","/docs/transformers/v4.32.0/en/main_classes/configuration#transformers.PretrainedConfig"),l(jn,"href","/docs/transformers/v4.32.0/en/main_classes/configuration#transformers.PretrainedConfig"),l(Fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Wt,"id","transformers.Speech2TextTokenizer"),l(Wt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(Wt,"href","#transformers.Speech2TextTokenizer"),l(St,"class","relative group"),l(In,"href","/docs/transformers/v4.32.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),l(Rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(qn,"href","../glossary#token-type-ids"),l(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Nn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Pt,"id","transformers.Speech2TextFeatureExtractor"),l(Pt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(Pt,"href","#transformers.Speech2TextFeatureExtractor"),l($t,"class","relative group"),l(Un,"href","/docs/transformers/v4.32.0/en/model_doc/speech_to_text#transformers.Speech2TextFeatureExtractor"),l(Xt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(At,"id","transformers.Speech2TextProcessor"),l(At,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(At,"href","#transformers.Speech2TextProcessor"),l(Et,"class","relative group"),l(Gn,"href","/docs/transformers/v4.32.0/en/model_doc/speech_to_text#transformers.Speech2TextProcessor"),l(Zn,"href","/docs/transformers/v4.32.0/en/model_doc/speech_to_text#transformers.Speech2TextFeatureExtractor"),l(Wn,"href","/docs/transformers/v4.32.0/en/model_doc/speech_to_text#transformers.Speech2TextTokenizer"),l(Po,"href","/docs/transformers/v4.32.0/en/model_doc/speech_to_text#transformers.Speech2TextProcessor.__call__"),l(Rn,"href","/docs/transformers/v4.32.0/en/model_doc/speech_to_text#transformers.Speech2TextProcessor.decode"),l(Ao,"href","/docs/transformers/v4.32.0/en/model_doc/speech_to_text#transformers.Speech2TextFeatureExtractor.__call__"),l(Bo,"href","/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__"),l(Bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Vn,"href","/docs/transformers/v4.32.0/en/model_doc/donut#transformers.DonutProcessor.from_pretrained"),l(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Pn,"href","/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.batch_decode"),l(Lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Xn,"href","/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.decode"),l(Ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Ht,"id","transformers.Speech2TextModel"),l(Ht,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(Ht,"href","#transformers.Speech2TextModel"),l(Ft,"class","relative group"),l(An,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),l(sn,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(sn,"rel","nofollow"),l(Bn,"href","/docs/transformers/v4.32.0/en/model_doc/speech_to_text#transformers.Speech2TextModel"),l(Ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(eo,"id","transformers.Speech2TextForConditionalGeneration"),l(eo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(eo,"href","#transformers.Speech2TextForConditionalGeneration"),l(Jt,"class","relative group"),l(Yn,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),l(hn,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(hn,"rel","nofollow"),l(Dn,"href","/docs/transformers/v4.32.0/en/model_doc/speech_to_text#transformers.Speech2TextForConditionalGeneration"),l(Ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(no,"id","transformers.TFSpeech2TextModel"),l(no,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(no,"href","#transformers.TFSpeech2TextModel"),l(It,"class","relative group"),l(Ln,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.TFPreTrainedModel"),l(gn,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),l(gn,"rel","nofollow"),l(On,"href","/docs/transformers/v4.32.0/en/model_doc/speech_to_text#transformers.TFSpeech2TextModel"),l(Ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(io,"id","transformers.TFSpeech2TextForConditionalGeneration"),l(io,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(io,"href","#transformers.TFSpeech2TextForConditionalGeneration"),l(qt,"class","relative group"),l(Hn,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.TFPreTrainedModel"),l(wn,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),l(wn,"rel","nofollow"),l(Qn,"href","/docs/transformers/v4.32.0/en/model_doc/speech_to_text#transformers.TFSpeech2TextForConditionalGeneration"),l(We,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(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),w(i,v,null),e(_,m),e(_,E),e(E,Z),u(o,N,f),u(o,I,f),e(I,U),e(U,C),w($,C,null),e(I,we),e(I,Y),e(Y,Ve),u(o,Ie,f),u(o,q,f),e(q,Pe),e(q,se),e(se,ae),e(q,Xe),e(q,re),e(re,de),e(q,Ae),e(q,ie),e(ie,le),e(q,Be),e(q,ce),e(ce,Se),e(q,G),u(o,W,f),u(o,Q,f),e(Q,he),e(Q,pe),e(pe,Ye),e(Q,me),e(Q,ue),e(ue,De),e(Q,P),u(o,Ce,f),u(o,X,f),e(X,te),e(te,$e),w(O,$e,null),e(X,Le),e(X,Ee),e(Ee,ee),u(o,qe,f),u(o,D,f),e(D,Oe),e(D,fe),e(fe,A),e(D,He),u(o,L,f),u(o,R,f),e(R,Qe),e(R,T),e(T,F),e(R,pt),e(R,oe),e(oe,mt),e(R,ut),e(R,z),e(z,ft),e(R,_t),e(R,Ne),e(Ne,gt),e(R,Tt),u(o,K,f),u(o,J,f),e(J,vt),e(J,Ke),e(Ke,_e),e(J,bt),e(J,et),e(et,tt),e(J,yt),e(J,ge),e(ge,kt),e(J,cr),e(J,ls),e(ls,hr),e(J,pr),e(J,cs),e(cs,mr),e(J,ur),e(J,yo),e(yo,fr),e(J,_r),e(J,hs),e(hs,gr),u(o,ca,f),u(o,En,f),e(En,ps),e(ps,Tr),u(o,ha,f),w(ko,o,f),u(o,pa,f),u(o,Fn,f),e(Fn,wo),e(wo,ms),e(ms,vr),e(wo,br),e(wo,Te),e(Te,yr),e(Te,us),e(us,kr),e(Te,wr),e(Te,fs),e(fs,xr),e(Te,Mr),e(Te,_s),e(_s,Sr),e(Te,$r),e(Te,gs),e(gs,Er),e(Te,Fr),e(Te,Ts),e(Ts,zr),e(Te,Jr),u(o,ma,f),w(xo,o,f),u(o,ua,f),u(o,Ut,f),e(Ut,jr),e(Ut,Mo),e(Mo,Ir),e(Ut,Cr),u(o,fa,f),u(o,wt,f),e(wt,Gt),e(Gt,vs),w(So,vs,null),e(wt,qr),e(wt,bs),e(bs,Nr),u(o,_a,f),u(o,Fe,f),w($o,Fe,null),e(Fe,Ur),e(Fe,xt),e(xt,Gr),e(xt,zn),e(zn,Zr),e(xt,Wr),e(xt,Eo),e(Eo,Rr),e(xt,Vr),e(Fe,Pr),e(Fe,Mt),e(Mt,Xr),e(Mt,Jn),e(Jn,Ar),e(Mt,Br),e(Mt,jn),e(jn,Yr),e(Mt,Dr),e(Fe,Lr),w(Zt,Fe,null),u(o,ga,f),u(o,St,f),e(St,Wt),e(Wt,ys),w(Fo,ys,null),e(St,Or),e(St,ks),e(ks,Hr),u(o,Ta,f),u(o,H,f),w(zo,H,null),e(H,Qr),e(H,ws),e(ws,Kr),e(H,ed),e(H,Jo),e(Jo,td),e(Jo,In),e(In,od),e(Jo,nd),e(H,sd),e(H,Rt),w(jo,Rt,null),e(Rt,ad),e(Rt,xs),e(xs,rd),e(H,dd),e(H,Vt),w(Io,Vt,null),e(Vt,id),e(Vt,Co),e(Co,ld),e(Co,Ms),e(Ms,cd),e(Co,hd),e(H,pd),e(H,at),w(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),w(No,Nn,null),u(o,va,f),u(o,$t,f),e($t,Pt),e(Pt,$s),w(Uo,$s,null),e($t,vd),e($t,Es),e(Es,bd),u(o,ba,f),u(o,ve,f),w(Go,ve,null),e(ve,yd),e(ve,Fs),e(Fs,kd),e(ve,wd),e(ve,Zo),e(Zo,xd),e(Zo,Un),e(Un,Md),e(Zo,Sd),e(ve,$d),e(ve,zs),e(zs,Ed),e(ve,Fd),e(ve,Xt),w(Wo,Xt,null),e(Xt,zd),e(Xt,Js),e(Js,Jd),u(o,ya,f),u(o,Et,f),e(Et,At),e(At,js),w(Ro,js,null),e(Et,jd),e(Et,Is),e(Is,Id),u(o,ka,f),u(o,B,f),w(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),w(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,ei),e(ot,ti),e(ot,Bo),e(Bo,Gs),e(Gs,oi),e(Bo,ni),e(ot,si),e(B,ai),e(B,rt),w(Yo,rt,null),e(rt,ri),e(rt,Zs),e(Zs,di),e(rt,ii),w(Yt,rt,null),e(B,li),e(B,dt),w(Do,dt,null),e(dt,ci),e(dt,Lo),e(Lo,hi),e(Lo,Vn),e(Vn,pi),e(Lo,mi),e(dt,ui),w(Dt,dt,null),e(B,fi),e(B,Lt),w(Oo,Lt,null),e(Lt,_i),e(Lt,Ho),e(Ho,gi),e(Ho,Pn),e(Pn,Ti),e(Ho,vi),e(B,bi),e(B,Ot),w(Qo,Ot,null),e(Ot,yi),e(Ot,Ko),e(Ko,ki),e(Ko,Xn),e(Xn,wi),e(Ko,xi),u(o,wa,f),u(o,Ft,f),e(Ft,Ht),e(Ht,Ws),w(en,Ws,null),e(Ft,Mi),e(Ft,Rs),e(Rs,Si),u(o,xa,f),u(o,ze,f),w(tn,ze,null),e(ze,$i),e(ze,on),e(on,Ei),e(on,An),e(An,Fi),e(on,zi),e(ze,Ji),e(ze,nn),e(nn,ji),e(nn,sn),e(sn,Ii),e(nn,Ci),e(ze,qi),e(ze,Ue),w(an,Ue,null),e(Ue,Ni),e(Ue,zt),e(zt,Ui),e(zt,Bn),e(Bn,Gi),e(zt,Zi),e(zt,Vs),e(Vs,Wi),e(zt,Ri),e(Ue,Vi),w(Qt,Ue,null),e(Ue,Pi),w(Kt,Ue,null),u(o,Ma,f),u(o,Jt,f),e(Jt,eo),e(eo,Ps),w(rn,Ps,null),e(Jt,Xi),e(Jt,Xs),e(Xs,Ai),u(o,Sa,f),u(o,Je,f),w(dn,Je,null),e(Je,Bi),e(Je,ln),e(ln,Yi),e(ln,Yn),e(Yn,Di),e(ln,Li),e(Je,Oi),e(Je,cn),e(cn,Hi),e(cn,hn),e(hn,Qi),e(cn,Ki),e(Je,el),e(Je,Ge),w(pn,Ge,null),e(Ge,tl),e(Ge,jt),e(jt,ol),e(jt,Dn),e(Dn,nl),e(jt,sl),e(jt,As),e(As,al),e(jt,rl),e(Ge,dl),w(to,Ge,null),e(Ge,il),w(oo,Ge,null),u(o,$a,f),u(o,It,f),e(It,no),e(no,Bs),w(mn,Bs,null),e(It,ll),e(It,Ys),e(Ys,cl),u(o,Ea,f),u(o,be,f),w(un,be,null),e(be,hl),e(be,fn),e(fn,pl),e(fn,Ln),e(Ln,ml),e(fn,ul),e(be,fl),e(be,_n),e(_n,_l),e(_n,gn),e(gn,gl),e(_n,Tl),e(be,vl),w(so,be,null),e(be,bl),e(be,Ze),w(Tn,Ze,null),e(Ze,yl),e(Ze,Ct),e(Ct,kl),e(Ct,On),e(On,wl),e(Ct,xl),e(Ct,Ds),e(Ds,Ml),e(Ct,Sl),e(Ze,$l),w(ao,Ze,null),e(Ze,El),w(ro,Ze,null),u(o,Fa,f),u(o,qt,f),e(qt,io),e(io,Ls),w(vn,Ls,null),e(qt,Fl),e(qt,Os),e(Os,zl),u(o,za,f),u(o,ye,f),w(bn,ye,null),e(ye,Jl),e(ye,yn),e(yn,jl),e(yn,Hn),e(Hn,Il),e(yn,Cl),e(ye,ql),e(ye,kn),e(kn,Nl),e(kn,wn),e(wn,Ul),e(kn,Gl),e(ye,Zl),w(lo,ye,null),e(ye,Wl),e(ye,We),w(xn,We,null),e(We,Rl),e(We,Nt),e(Nt,Vl),e(Nt,Qn),e(Qn,Pl),e(Nt,Xl),e(Nt,Hs),e(Hs,Al),e(Nt,Bl),e(We,Yl),w(co,We,null),e(We,Dl),w(ho,We,null),Ja=!0},p(o,[f]){const Mn={};f&2&&(Mn.$$scope={dirty:f,ctx:o}),Zt.$set(Mn);const Qs={};f&2&&(Qs.$$scope={dirty:f,ctx:o}),Yt.$set(Qs);const Ks={};f&2&&(Ks.$$scope={dirty:f,ctx:o}),Dt.$set(Ks);const ea={};f&2&&(ea.$$scope={dirty:f,ctx:o}),Qt.$set(ea);const Sn={};f&2&&(Sn.$$scope={dirty:f,ctx:o}),Kt.$set(Sn);const ta={};f&2&&(ta.$$scope={dirty:f,ctx:o}),to.$set(ta);const oa={};f&2&&(oa.$$scope={dirty:f,ctx:o}),oo.$set(oa);const na={};f&2&&(na.$$scope={dirty:f,ctx:o}),so.$set(na);const je={};f&2&&(je.$$scope={dirty:f,ctx:o}),ao.$set(je);const sa={};f&2&&(sa.$$scope={dirty:f,ctx:o}),ro.$set(sa);const aa={};f&2&&(aa.$$scope={dirty:f,ctx:o}),lo.$set(aa);const ra={};f&2&&(ra.$$scope={dirty:f,ctx:o}),co.$set(ra);const da={};f&2&&(da.$$scope={dirty:f,ctx:o}),ho.$set(da)},i(o){Ja||(x(i.$$.fragment,o),x($.$$.fragment,o),x(O.$$.fragment,o),x(ko.$$.fragment,o),x(xo.$$.fragment,o),x(So.$$.fragment,o),x($o.$$.fragment,o),x(Zt.$$.fragment,o),x(Fo.$$.fragment,o),x(zo.$$.fragment,o),x(jo.$$.fragment,o),x(Io.$$.fragment,o),x(qo.$$.fragment,o),x(No.$$.fragment,o),x(Uo.$$.fragment,o),x(Go.$$.fragment,o),x(Wo.$$.fragment,o),x(Ro.$$.fragment,o),x(Vo.$$.fragment,o),x(Xo.$$.fragment,o),x(Yo.$$.fragment,o),x(Yt.$$.fragment,o),x(Do.$$.fragment,o),x(Dt.$$.fragment,o),x(Oo.$$.fragment,o),x(Qo.$$.fragment,o),x(en.$$.fragment,o),x(tn.$$.fragment,o),x(an.$$.fragment,o),x(Qt.$$.fragment,o),x(Kt.$$.fragment,o),x(rn.$$.fragment,o),x(dn.$$.fragment,o),x(pn.$$.fragment,o),x(to.$$.fragment,o),x(oo.$$.fragment,o),x(mn.$$.fragment,o),x(un.$$.fragment,o),x(so.$$.fragment,o),x(Tn.$$.fragment,o),x(ao.$$.fragment,o),x(ro.$$.fragment,o),x(vn.$$.fragment,o),x(bn.$$.fragment,o),x(lo.$$.fragment,o),x(xn.$$.fragment,o),x(co.$$.fragment,o),x(ho.$$.fragment,o),Ja=!0)},o(o){M(i.$$.fragment,o),M($.$$.fragment,o),M(O.$$.fragment,o),M(ko.$$.fragment,o),M(xo.$$.fragment,o),M(So.$$.fragment,o),M($o.$$.fragment,o),M(Zt.$$.fragment,o),M(Fo.$$.fragment,o),M(zo.$$.fragment,o),M(jo.$$.fragment,o),M(Io.$$.fragment,o),M(qo.$$.fragment,o),M(No.$$.fragment,o),M(Uo.$$.fragment,o),M(Go.$$.fragment,o),M(Wo.$$.fragment,o),M(Ro.$$.fragment,o),M(Vo.$$.fragment,o),M(Xo.$$.fragment,o),M(Yo.$$.fragment,o),M(Yt.$$.fragment,o),M(Do.$$.fragment,o),M(Dt.$$.fragment,o),M(Oo.$$.fragment,o),M(Qo.$$.fragment,o),M(en.$$.fragment,o),M(tn.$$.fragment,o),M(an.$$.fragment,o),M(Qt.$$.fragment,o),M(Kt.$$.fragment,o),M(rn.$$.fragment,o),M(dn.$$.fragment,o),M(pn.$$.fragment,o),M(to.$$.fragment,o),M(oo.$$.fragment,o),M(mn.$$.fragment,o),M(un.$$.fragment,o),M(so.$$.fragment,o),M(Tn.$$.fragment,o),M(ao.$$.fragment,o),M(ro.$$.fragment,o),M(vn.$$.fragment,o),M(bn.$$.fragment,o),M(lo.$$.fragment,o),M(xn.$$.fragment,o),M(co.$$.fragment,o),M(ho.$$.fragment,o),Ja=!1},d(o){t(c),o&&t(b),o&&t(_),S(i),o&&t(N),o&&t(I),S($),o&&t(Ie),o&&t(q),o&&t(W),o&&t(Q),o&&t(Ce),o&&t(X),S(O),o&&t(qe),o&&t(D),o&&t(L),o&&t(R),o&&t(K),o&&t(J),o&&t(ca),o&&t(En),o&&t(ha),S(ko,o),o&&t(pa),o&&t(Fn),o&&t(ma),S(xo,o),o&&t(ua),o&&t(Ut),o&&t(fa),o&&t(wt),S(So),o&&t(_a),o&&t(Fe),S($o),S(Zt),o&&t(ga),o&&t(St),S(Fo),o&&t(Ta),o&&t(H),S(zo),S(jo),S(Io),S(qo),S(No),o&&t(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(ka),o&&t(B),S(Vo),S(Xo),S(Yo),S(Yt),S(Do),S(Dt),S(Oo),S(Qo),o&&t(wa),o&&t(Ft),S(en),o&&t(xa),o&&t(ze),S(tn),S(an),S(Qt),S(Kt),o&&t(Ma),o&&t(Jt),S(rn),o&&t(Sa),o&&t(Je),S(dn),S(pn),S(to),S(oo),o&&t($a),o&&t(It),S(mn),o&&t(Ea),o&&t(be),S(un),S(so),S(Tn),S(ao),S(ro),o&&t(Fa),o&&t(qt),S(vn),o&&t(za),o&&t(ye),S(bn),S(lo),S(xn),S(co),S(ho)}}}const ap={local:"speech2text",sections:[{local:"overview",title:"Overview"},{local:"inference",title:"Inference"},{local:"transformers.Speech2TextConfig",title:"Speech2TextConfig"},{local:"transformers.Speech2TextTokenizer",title:"Speech2TextTokenizer"},{local:"transformers.Speech2TextFeatureExtractor",title:"Speech2TextFeatureExtractor"},{local:"transformers.Speech2TextProcessor",title:"Speech2TextProcessor"},{local:"transformers.Speech2TextModel",title:"Speech2TextModel"},{local:"transformers.Speech2TextForConditionalGeneration",title:"Speech2TextForConditionalGeneration"},{local:"transformers.TFSpeech2TextModel",title:"TFSpeech2TextModel"},{local:"transformers.TFSpeech2TextForConditionalGeneration",title:"TFSpeech2TextForConditionalGeneration"}],title:"Speech2Text"};function rp(j){return Xh(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class mp extends Wh{constructor(c){super();Rh(this,c,rp,sp,Vh,{})}}export{mp as default,ap as metadata};
