import{S as tg,i as og,s as ng,e as n,k as p,w as v,t as a,M as sg,c as s,d as t,m as h,a as r,x as k,h as i,b as l,G as e,g as y,y as w,q as T,o as W,B as x,v as rg,L as fe}from"../../chunks/vendor-hf-doc-builder.js";import{T as Fe}from"../../chunks/Tip-hf-doc-builder.js";import{D as F}from"../../chunks/Docstring-hf-doc-builder.js";import{C as _e}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as R}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as ue}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function ag($){let c,b,f,u,g;return u=new _e({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFdoaXNwZXJDb25maWclMkMlMjBXaGlzcGVyTW9kZWwlMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwV2hpc3BlciUyMHRpbnklMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwV2hpc3BlckNvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwKHdpdGglMjByYW5kb20lMjB3ZWlnaHRzKSUyMGZyb20lMjB0aGUlMjB0aW55JTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBXaGlzcGVyTW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> WhisperConfig, WhisperModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a Whisper tiny style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = WhisperConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the tiny style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = WhisperModel(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=n("p"),b=a("Example:"),f=p(),v(u.$$.fragment)},l(d){c=s(d,"P",{});var m=r(c);b=i(m,"Example:"),m.forEach(t),f=h(d),k(u.$$.fragment,d)},m(d,m){y(d,c,m),e(c,b),y(d,f,m),w(u,d,m),g=!0},p:fe,i(d){g||(T(u.$$.fragment,d),g=!0)},o(d){W(u.$$.fragment,d),g=!1},d(d){d&&t(c),d&&t(f),x(u,d)}}}function ig($){let c,b,f,u,g;return u=new _e({props:{code:"JTIzJTIwaW5zdGFudGlhdGUlMjB0aGUlMjB0b2tlbml6ZXIlMjBhbmQlMjBzZXQlMjB0aGUlMjBwcmVmaXglMjB0b2tlbiUyMHRvJTIwU3BhbmlzaCUwQXRva2VuaXplciUyMCUzRCUyMFdoaXNwZXJUb2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMm9wZW5haSUyRndoaXNwZXItdGlueSUyMiUyQyUyMGxhbmd1YWdlJTNEJTIyc3BhbmlzaCUyMiklMEElMjMlMjBub3clMjBzd2l0Y2glMjB0aGUlMjBwcmVmaXglMjB0b2tlbiUyMGZyb20lMjBTcGFuaXNoJTIwdG8lMjBGcmVuY2glMEF0b2tlbml6ZXIuc2V0X3ByZWZpeF90b2tlbnMobGFuZ3VhZ2UlM0QlMjJmcmVuY2glMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># instantiate the tokenizer and set the prefix token to Spanish</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = WhisperTokenizer.from_pretrained(<span class="hljs-string">&quot;openai/whisper-tiny&quot;</span>, language=<span class="hljs-string">&quot;spanish&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># now switch the prefix token from Spanish to French</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.set_prefix_tokens(language=<span class="hljs-string">&quot;french&quot;</span>)`}}),{c(){c=n("p"),b=a("update the prefix tokens as required when fine-tuning. Example:"),f=p(),v(u.$$.fragment)},l(d){c=s(d,"P",{});var m=r(c);b=i(m,"update the prefix tokens as required when fine-tuning. Example:"),m.forEach(t),f=h(d),k(u.$$.fragment,d)},m(d,m){y(d,c,m),e(c,b),y(d,f,m),w(u,d,m),g=!0},p:fe,i(d){g||(T(u.$$.fragment,d),g=!0)},o(d){W(u.$$.fragment,d),g=!1},d(d){d&&t(c),d&&t(f),x(u,d)}}}function dg($){let c,b,f,u,g;return u=new _e({props:{code:"JTIzJTIwaW5zdGFudGlhdGUlMjB0aGUlMjB0b2tlbml6ZXIlMjBhbmQlMjBzZXQlMjB0aGUlMjBwcmVmaXglMjB0b2tlbiUyMHRvJTIwU3BhbmlzaCUwQXRva2VuaXplciUyMCUzRCUyMFdoaXNwZXJUb2tlbml6ZXJGYXN0LmZyb21fcHJldHJhaW5lZCglMjJvcGVuYWklMkZ3aGlzcGVyLXRpbnklMjIlMkMlMjBsYW5ndWFnZSUzRCUyMnNwYW5pc2glMjIpJTBBJTIzJTIwbm93JTIwc3dpdGNoJTIwdGhlJTIwcHJlZml4JTIwdG9rZW4lMjBmcm9tJTIwU3BhbmlzaCUyMHRvJTIwRnJlbmNoJTBBdG9rZW5pemVyLnNldF9wcmVmaXhfdG9rZW5zKGxhbmd1YWdlJTNEJTIyZnJlbmNoJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># instantiate the tokenizer and set the prefix token to Spanish</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = WhisperTokenizerFast.from_pretrained(<span class="hljs-string">&quot;openai/whisper-tiny&quot;</span>, language=<span class="hljs-string">&quot;spanish&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># now switch the prefix token from Spanish to French</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.set_prefix_tokens(language=<span class="hljs-string">&quot;french&quot;</span>)`}}),{c(){c=n("p"),b=a("update the prefix tokens as required when fine-tuning. Example:"),f=p(),v(u.$$.fragment)},l(d){c=s(d,"P",{});var m=r(c);b=i(m,"update the prefix tokens as required when fine-tuning. Example:"),m.forEach(t),f=h(d),k(u.$$.fragment,d)},m(d,m){y(d,c,m),e(c,b),y(d,f,m),w(u,d,m),g=!0},p:fe,i(d){g||(T(u.$$.fragment,d),g=!0)},o(d){W(u.$$.fragment,d),g=!1},d(d){d&&t(c),d&&t(f),x(u,d)}}}function lg($){let c,b,f,u,g,d,m,M,Z,C,J;return{c(){c=n("p"),b=a(`This class method is simply calling the feature extractor
`),f=n("a"),u=a("from_pretrained()"),g=a(`, image processor
`),d=n("a"),m=a("ImageProcessingMixin"),M=a(` and the tokenizer
`),Z=n("code"),C=a("~tokenization_utils_base.PreTrainedTokenizer.from_pretrained"),J=a(` methods. Please refer to the docstrings of the
methods above for more information.`),this.h()},l(q){c=s(q,"P",{});var I=r(c);b=i(I,`This class method is simply calling the feature extractor
`),f=s(I,"A",{href:!0});var ge=r(f);u=i(ge,"from_pretrained()"),ge.forEach(t),g=i(I,`, image processor
`),d=s(I,"A",{href:!0});var ls=r(d);m=i(ls,"ImageProcessingMixin"),ls.forEach(t),M=i(I,` and the tokenizer
`),Z=s(I,"CODE",{});var tt=r(Z);C=i(tt,"~tokenization_utils_base.PreTrainedTokenizer.from_pretrained"),tt.forEach(t),J=i(I,` methods. Please refer to the docstrings of the
methods above for more information.`),I.forEach(t),this.h()},h(){l(f,"href","/docs/transformers/main/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.from_pretrained"),l(d,"href","/docs/transformers/main/en/internal/image_processing_utils#transformers.ImageProcessingMixin")},m(q,I){y(q,c,I),e(c,b),e(c,f),e(f,u),e(c,g),e(c,d),e(d,m),e(c,M),e(c,Z),e(Z,C),e(c,J)},d(q){q&&t(c)}}}function cg($){let c,b,f,u,g,d,m,M;return{c(){c=n("p"),b=a("This class method is simply calling "),f=n("a"),u=a("save_pretrained()"),g=a(` and
`),d=n("a"),m=a("save_pretrained()"),M=a(`. Please refer to the docstrings of the
methods above for more information.`),this.h()},l(Z){c=s(Z,"P",{});var C=r(c);b=i(C,"This class method is simply calling "),f=s(C,"A",{href:!0});var J=r(f);u=i(J,"save_pretrained()"),J.forEach(t),g=i(C,` and
`),d=s(C,"A",{href:!0});var q=r(d);m=i(q,"save_pretrained()"),q.forEach(t),M=i(C,`. Please refer to the docstrings of the
methods above for more information.`),C.forEach(t),this.h()},h(){l(f,"href","/docs/transformers/main/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.save_pretrained"),l(d,"href","/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.save_pretrained")},m(Z,C){y(Z,c,C),e(c,b),e(c,f),e(f,u),e(c,g),e(c,d),e(d,m),e(c,M)},d(Z){Z&&t(c)}}}function pg($){let c,b,f,u,g;return{c(){c=n("p"),b=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),u=a("Module"),g=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(d){c=s(d,"P",{});var m=r(c);b=i(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(m,"CODE",{});var M=r(f);u=i(M,"Module"),M.forEach(t),g=i(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(d,m){y(d,c,m),e(c,b),e(c,f),e(f,u),e(c,g)},d(d){d&&t(c)}}}function hg($){let c,b,f,u,g;return u=new _e({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b0ZlYXR1cmVFeHRyYWN0b3IlMkMlMjBXaGlzcGVyTW9kZWwlMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEElMEFtb2RlbCUyMCUzRCUyMFdoaXNwZXJNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyb3BlbmFpJTJGd2hpc3Blci1iYXNlJTIyKSUwQWZlYXR1cmVfZXh0cmFjdG9yJTIwJTNEJTIwQXV0b0ZlYXR1cmVFeHRyYWN0b3IuZnJvbV9wcmV0cmFpbmVkKCUyMm9wZW5haSUyRndoaXNwZXItYmFzZSUyMiklMEFkcyUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJoZi1pbnRlcm5hbC10ZXN0aW5nJTJGbGlicmlzcGVlY2hfYXNyX2R1bW15JTIyJTJDJTIwJTIyY2xlYW4lMjIlMkMlMjBzcGxpdCUzRCUyMnZhbGlkYXRpb24lMjIpJTBBaW5wdXRzJTIwJTNEJTIwZmVhdHVyZV9leHRyYWN0b3IoZHMlNUIwJTVEJTVCJTIyYXVkaW8lMjIlNUQlNUIlMjJhcnJheSUyMiU1RCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBaW5wdXRfZmVhdHVyZXMlMjAlM0QlMjBpbnB1dHMuaW5wdXRfZmVhdHVyZXMlMEFkZWNvZGVyX2lucHV0X2lkcyUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIlNUIxJTJDJTIwMSU1RCU1RCklMjAqJTIwbW9kZWwuY29uZmlnLmRlY29kZXJfc3RhcnRfdG9rZW5faWQlMEFsYXN0X2hpZGRlbl9zdGF0ZSUyMCUzRCUyMG1vZGVsKGlucHV0X2ZlYXR1cmVzJTJDJTIwZGVjb2Rlcl9pbnB1dF9pZHMlM0RkZWNvZGVyX2lucHV0X2lkcykubGFzdF9oaWRkZW5fc3RhdGUlMEFsaXN0KGxhc3RfaGlkZGVuX3N0YXRlLnNoYXBlKQ==",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> AutoFeatureExtractor, WhisperModel
<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 = WhisperModel.from_pretrained(<span class="hljs-string">&quot;openai/whisper-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;openai/whisper-base&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(ds[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>], return_tensors=<span class="hljs-string">&quot;pt&quot;</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">512</span>]`}}),{c(){c=n("p"),b=a("Example:"),f=p(),v(u.$$.fragment)},l(d){c=s(d,"P",{});var m=r(c);b=i(m,"Example:"),m.forEach(t),f=h(d),k(u.$$.fragment,d)},m(d,m){y(d,c,m),e(c,b),y(d,f,m),w(u,d,m),g=!0},p:fe,i(d){g||(T(u.$$.fragment,d),g=!0)},o(d){W(u.$$.fragment,d),g=!1},d(d){d&&t(c),d&&t(f),x(u,d)}}}function mg($){let c,b,f,u,g;return{c(){c=n("p"),b=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),u=a("Module"),g=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(d){c=s(d,"P",{});var m=r(c);b=i(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(m,"CODE",{});var M=r(f);u=i(M,"Module"),M.forEach(t),g=i(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(d,m){y(d,c,m),e(c,b),e(c,f),e(f,u),e(c,g)},d(d){d&&t(c)}}}function ug($){let c,b,f,u,g;return u=new _e({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMFdoaXNwZXJGb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEElMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYWklMkZ3aGlzcGVyLXRpbnkuZW4lMjIpJTBBbW9kZWwlMjAlM0QlMjBXaGlzcGVyRm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYWklMkZ3aGlzcGVyLXRpbnkuZW4lMjIpJTBBJTBBZHMlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaGYtaW50ZXJuYWwtdGVzdGluZyUyRmxpYnJpc3BlZWNoX2Fzcl9kdW1teSUyMiUyQyUyMCUyMmNsZWFuJTIyJTJDJTIwc3BsaXQlM0QlMjJ2YWxpZGF0aW9uJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3NvcihkcyU1QjAlNUQlNUIlMjJhdWRpbyUyMiU1RCU1QiUyMmFycmF5JTIyJTVEJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFpbnB1dF9mZWF0dXJlcyUyMCUzRCUyMGlucHV0cy5pbnB1dF9mZWF0dXJlcyUwQSUwQWdlbmVyYXRlZF9pZHMlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZShpbnB1dHMlM0RpbnB1dF9mZWF0dXJlcyklMEElMEF0cmFuc2NyaXB0aW9uJTIwJTNEJTIwcHJvY2Vzc29yLmJhdGNoX2RlY29kZShnZW5lcmF0ZWRfaWRzJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUpJTVCMCU1RCUwQXRyYW5zY3JpcHRpb24=",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> AutoProcessor, WhisperForConditionalGeneration
<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>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;openai/whisper-tiny.en&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = WhisperForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;openai/whisper-tiny.en&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(ds[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>], return_tensors=<span class="hljs-string">&quot;pt&quot;</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; Mr. Quilter is the apostle of the middle classes, and we are glad to welcome his gospel.&#x27;</span>`}}),{c(){c=n("p"),b=a("Example:"),f=p(),v(u.$$.fragment)},l(d){c=s(d,"P",{});var m=r(c);b=i(m,"Example:"),m.forEach(t),f=h(d),k(u.$$.fragment,d)},m(d,m){y(d,c,m),e(c,b),y(d,f,m),w(u,d,m),g=!0},p:fe,i(d){g||(T(u.$$.fragment,d),g=!0)},o(d){W(u.$$.fragment,d),g=!1},d(d){d&&t(c),d&&t(f),x(u,d)}}}function fg($){let c,b,f,u,g;return{c(){c=n("p"),b=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),u=a("Module"),g=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(d){c=s(d,"P",{});var m=r(c);b=i(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(m,"CODE",{});var M=r(f);u=i(M,"Module"),M.forEach(t),g=i(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(d,m){y(d,c,m),e(c,b),e(c,f),e(f,u),e(c,g)},d(d){d&&t(c)}}}function _g($){let c,b,f,u,g;return u=new _e({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b0ZlYXR1cmVFeHRyYWN0b3IlMkMlMjBXaGlzcGVyRm9yQXVkaW9DbGFzc2lmaWNhdGlvbiUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQWZlYXR1cmVfZXh0cmFjdG9yJTIwJTNEJTIwQXV0b0ZlYXR1cmVFeHRyYWN0b3IuZnJvbV9wcmV0cmFpbmVkKCUyMnNhbmNoaXQtZ2FuZGhpJTJGd2hpc3Blci1tZWRpdW0tZmxldXJzLWxhbmctaWQlMjIpJTBBbW9kZWwlMjAlM0QlMjBXaGlzcGVyRm9yQXVkaW9DbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyc2FuY2hpdC1nYW5kaGklMkZ3aGlzcGVyLW1lZGl1bS1mbGV1cnMtbGFuZy1pZCUyMiklMEElMEFkcyUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJnb29nbGUlMkZmbGV1cnMlMjIlMkMlMjAlMjJhbGwlMjIlMkMlMjBzcGxpdCUzRCUyMnZhbGlkYXRpb24lMjIlMkMlMjBzdHJlYW1pbmclM0RUcnVlKSUwQXNhbXBsZSUyMCUzRCUyMG5leHQoaXRlcihkcykpJTBBJTBBaW5wdXRzJTIwJTNEJTIwZmVhdHVyZV9leHRyYWN0b3IoJTBBJTIwJTIwJTIwJTIwc2FtcGxlJTVCJTIyYXVkaW8lMjIlNUQlNUIlMjJhcnJheSUyMiU1RCUyQyUyMHNhbXBsaW5nX3JhdGUlM0RzYW1wbGUlNUIlMjJhdWRpbyUyMiU1RCU1QiUyMnNhbXBsaW5nX3JhdGUlMjIlNUQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyJTBBKSUwQWlucHV0X2ZlYXR1cmVzJTIwJTNEJTIwaW5wdXRzLmlucHV0X2ZlYXR1cmVzJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKGlucHV0X2ZlYXR1cmVzKS5sb2dpdHMlMEElMEFwcmVkaWN0ZWRfY2xhc3NfaWRzJTIwJTNEJTIwdG9yY2guYXJnbWF4KGxvZ2l0cykuaXRlbSgpJTBBcHJlZGljdGVkX2xhYmVsJTIwJTNEJTIwbW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCcHJlZGljdGVkX2NsYXNzX2lkcyU1RCUwQXByZWRpY3RlZF9sYWJlbA==",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> AutoFeatureExtractor, WhisperForAudioClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;sanchit-gandhi/whisper-medium-fleurs-lang-id&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = WhisperForAudioClassification.from_pretrained(<span class="hljs-string">&quot;sanchit-gandhi/whisper-medium-fleurs-lang-id&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;google/fleurs&quot;</span>, <span class="hljs-string">&quot;all&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>, streaming=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>sample = <span class="hljs-built_in">next</span>(<span class="hljs-built_in">iter</span>(ds))

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = feature_extractor(
<span class="hljs-meta">... </span>    sample[<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>], sampling_rate=sample[<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><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(input_features).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_ids = torch.argmax(logits).item()
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_label = model.config.id2label[predicted_class_ids]
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_label
<span class="hljs-string">&#x27;Afrikaans&#x27;</span>`}}),{c(){c=n("p"),b=a("Example:"),f=p(),v(u.$$.fragment)},l(d){c=s(d,"P",{});var m=r(c);b=i(m,"Example:"),m.forEach(t),f=h(d),k(u.$$.fragment,d)},m(d,m){y(d,c,m),e(c,b),y(d,f,m),w(u,d,m),g=!0},p:fe,i(d){g||(T(u.$$.fragment,d),g=!0)},o(d){W(u.$$.fragment,d),g=!1},d(d){d&&t(c),d&&t(f),x(u,d)}}}function gg($){let c,b,f,u,g;return{c(){c=n("p"),b=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),u=a("Module"),g=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(d){c=s(d,"P",{});var m=r(c);b=i(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(m,"CODE",{});var M=r(f);u=i(M,"Module"),M.forEach(t),g=i(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(d,m){y(d,c,m),e(c,b),e(c,f),e(f,u),e(c,g)},d(d){d&&t(c)}}}function yg($){let c,b,f,u,g;return u=new _e({props:{code:"aW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwVEZXaGlzcGVyTW9kZWwlMkMlMjBBdXRvRmVhdHVyZUV4dHJhY3RvciUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQW1vZGVsJTIwJTNEJTIwVEZXaGlzcGVyTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMm9wZW5haSUyRndoaXNwZXItYmFzZSUyMiklMEFmZWF0dXJlX2V4dHJhY3RvciUyMCUzRCUyMEF1dG9GZWF0dXJlRXh0cmFjdG9yLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYWklMkZ3aGlzcGVyLWJhc2UlMjIpJTBBZHMlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaGYtaW50ZXJuYWwtdGVzdGluZyUyRmxpYnJpc3BlZWNoX2Fzcl9kdW1teSUyMiUyQyUyMCUyMmNsZWFuJTIyJTJDJTIwc3BsaXQlM0QlMjJ2YWxpZGF0aW9uJTIyKSUwQWlucHV0cyUyMCUzRCUyMGZlYXR1cmVfZXh0cmFjdG9yKGRzJTVCMCU1RCU1QiUyMmF1ZGlvJTIyJTVEJTVCJTIyYXJyYXklMjIlNUQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKSUwQWlucHV0X2ZlYXR1cmVzJTIwJTNEJTIwaW5wdXRzLmlucHV0X2ZlYXR1cmVzJTBBZGVjb2Rlcl9pbnB1dF9pZHMlMjAlM0QlMjB0Zi5jb252ZXJ0X3RvX3RlbnNvciglNUIlNUIxJTJDJTIwMSU1RCU1RCklMjAqJTIwbW9kZWwuY29uZmlnLmRlY29kZXJfc3RhcnRfdG9rZW5faWQlMEFsYXN0X2hpZGRlbl9zdGF0ZSUyMCUzRCUyMG1vZGVsKGlucHV0X2ZlYXR1cmVzJTJDJTIwZGVjb2Rlcl9pbnB1dF9pZHMlM0RkZWNvZGVyX2lucHV0X2lkcykubGFzdF9oaWRkZW5fc3RhdGUlMEFsaXN0KGxhc3RfaGlkZGVuX3N0YXRlLnNoYXBlKQ==",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> TFWhisperModel, 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 = TFWhisperModel.from_pretrained(<span class="hljs-string">&quot;openai/whisper-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;openai/whisper-base&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(ds[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>], return_tensors=<span class="hljs-string">&quot;tf&quot;</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 = tf.convert_to_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">512</span>]`}}),{c(){c=n("p"),b=a("Example:"),f=p(),v(u.$$.fragment)},l(d){c=s(d,"P",{});var m=r(c);b=i(m,"Example:"),m.forEach(t),f=h(d),k(u.$$.fragment,d)},m(d,m){y(d,c,m),e(c,b),y(d,f,m),w(u,d,m),g=!0},p:fe,i(d){g||(T(u.$$.fragment,d),g=!0)},o(d){W(u.$$.fragment,d),g=!1},d(d){d&&t(c),d&&t(f),x(u,d)}}}function bg($){let c,b,f,u,g;return{c(){c=n("p"),b=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),u=a("Module"),g=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(d){c=s(d,"P",{});var m=r(c);b=i(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(m,"CODE",{});var M=r(f);u=i(M,"Module"),M.forEach(t),g=i(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(d,m){y(d,c,m),e(c,b),e(c,f),e(f,u),e(c,g)},d(d){d&&t(c)}}}function vg($){let c,b,f,u,g;return u=new _e({props:{code:"aW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMFRGV2hpc3BlckZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbiUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMm9wZW5haSUyRndoaXNwZXItdGlueS5lbiUyMiklMEFtb2RlbCUyMCUzRCUyMFRGV2hpc3BlckZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyb3BlbmFpJTJGd2hpc3Blci10aW55LmVuJTIyKSUwQSUwQWRzJTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmhmLWludGVybmFsLXRlc3RpbmclMkZsaWJyaXNwZWVjaF9hc3JfZHVtbXklMjIlMkMlMjAlMjJjbGVhbiUyMiUyQyUyMHNwbGl0JTNEJTIydmFsaWRhdGlvbiUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoZHMlNUIwJTVEJTVCJTIyYXVkaW8lMjIlNUQlNUIlMjJhcnJheSUyMiU1RCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIpJTBBaW5wdXRfZmVhdHVyZXMlMjAlM0QlMjBpbnB1dHMuaW5wdXRfZmVhdHVyZXMlMEElMEFnZW5lcmF0ZWRfaWRzJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoaW5wdXRfZmVhdHVyZXMlM0RpbnB1dF9mZWF0dXJlcyklMEElMEF0cmFuc2NyaXB0aW9uJTIwJTNEJTIwcHJvY2Vzc29yLmJhdGNoX2RlY29kZShnZW5lcmF0ZWRfaWRzJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUpJTVCMCU1RCUwQXRyYW5zY3JpcHRpb24=",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> AutoProcessor, TFWhisperForConditionalGeneration
<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>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;openai/whisper-tiny.en&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFWhisperForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;openai/whisper-tiny.en&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(ds[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>], return_tensors=<span class="hljs-string">&quot;tf&quot;</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(input_features=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; Mr. Quilter is the apostle of the middle classes, and we are glad to welcome his gospel.&#x27;</span>`}}),{c(){c=n("p"),b=a("Example:"),f=p(),v(u.$$.fragment)},l(d){c=s(d,"P",{});var m=r(c);b=i(m,"Example:"),m.forEach(t),f=h(d),k(u.$$.fragment,d)},m(d,m){y(d,c,m),e(c,b),y(d,f,m),w(u,d,m),g=!0},p:fe,i(d){g||(T(u.$$.fragment,d),g=!0)},o(d){W(u.$$.fragment,d),g=!1},d(d){d&&t(c),d&&t(f),x(u,d)}}}function kg($){let c,b,f,u,g;return{c(){c=n("p"),b=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),u=a("Module"),g=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(d){c=s(d,"P",{});var m=r(c);b=i(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(m,"CODE",{});var M=r(f);u=i(M,"Module"),M.forEach(t),g=i(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(d,m){y(d,c,m),e(c,b),e(c,f),e(f,u),e(c,g)},d(d){d&&t(c)}}}function wg($){let c,b,f,u,g;return u=new _e({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4V2hpc3Blck1vZGVsJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyb3BlbmFpJTJGd2hpc3Blci10aW55JTIyKSUwQW1vZGVsJTIwJTNEJTIwRmxheFdoaXNwZXJNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyb3BlbmFpJTJGd2hpc3Blci10aW55JTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJqYXglMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxWhisperModel

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;openai/whisper-tiny&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxWhisperModel.from_pretrained(<span class="hljs-string">&quot;openai/whisper-tiny&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;jax&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=n("p"),b=a("Example:"),f=p(),v(u.$$.fragment)},l(d){c=s(d,"P",{});var m=r(c);b=i(m,"Example:"),m.forEach(t),f=h(d),k(u.$$.fragment,d)},m(d,m){y(d,c,m),e(c,b),y(d,f,m),w(u,d,m),g=!0},p:fe,i(d){g||(T(u.$$.fragment,d),g=!0)},o(d){W(u.$$.fragment,d),g=!1},d(d){d&&t(c),d&&t(f),x(u,d)}}}function Tg($){let c,b,f,u,g;return{c(){c=n("p"),b=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),u=a("Module"),g=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(d){c=s(d,"P",{});var m=r(c);b=i(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(m,"CODE",{});var M=r(f);u=i(M,"Module"),M.forEach(t),g=i(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(d,m){y(d,c,m),e(c,b),e(c,f),e(f,u),e(c,g)},d(d){d&&t(c)}}}function Wg($){let c,b,f,u,g;return u=new _e({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFdoaXNwZXJQcm9jZXNzb3IlMkMlMjBGbGF4V2hpc3BlckZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbiUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQXByb2Nlc3NvciUyMCUzRCUyMFdoaXNwZXJQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMm9wZW5haSUyRndoaXNwZXItdGlueS5lbiUyMiklMEFtb2RlbCUyMCUzRCUyMEZsYXhXaGlzcGVyRm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYWklMkZ3aGlzcGVyLXRpbnkuZW4lMjIlMkMlMjBmcm9tX3B0JTNEVHJ1ZSklMEFkcyUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJoZi1pbnRlcm5hbC10ZXN0aW5nJTJGbGlicmlzcGVlY2hfYXNyX2R1bW15JTIyJTJDJTIwJTIyY2xlYW4lMjIlMkMlMjBzcGxpdCUzRCUyMnZhbGlkYXRpb24lMjIpJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGRzJTVCMCU1RCU1QiUyMmF1ZGlvJTIyJTVEJTVCJTIyYXJyYXklMjIlNUQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMm5wJTIyKSUwQWlucHV0X2ZlYXR1cmVzJTIwJTNEJTIwaW5wdXRzLmlucHV0X2ZlYXR1cmVzJTBBZ2VuZXJhdGVkX2lkcyUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKGlucHV0X2lkcyUzRGlucHV0X2ZlYXR1cmVzKSUwQXRyYW5zY3JpcHRpb24lMjAlM0QlMjBwcm9jZXNzb3IuYmF0Y2hfZGVjb2RlKGdlbmVyYXRlZF9pZHMlMkMlMjBza2lwX3NwZWNpYWxfdG9rZW5zJTNEVHJ1ZSklNUIwJTVEJTBBdHJhbnNjcmlwdGlvbg==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> WhisperProcessor, FlaxWhisperForConditionalGeneration
<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>processor = WhisperProcessor.from_pretrained(<span class="hljs-string">&quot;openai/whisper-tiny.en&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxWhisperForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;openai/whisper-tiny.en&quot;</span>, from_pt=<span class="hljs-literal">True</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(ds[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>], return_tensors=<span class="hljs-string">&quot;np&quot;</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(input_ids=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; Mr. Quilter is the apostle of the middle classes, and we are glad to welcome his gospel.&#x27;</span>`}}),{c(){c=n("p"),b=a("Transcription example:"),f=p(),v(u.$$.fragment)},l(d){c=s(d,"P",{});var m=r(c);b=i(m,"Transcription example:"),m.forEach(t),f=h(d),k(u.$$.fragment,d)},m(d,m){y(d,c,m),e(c,b),y(d,f,m),w(u,d,m),g=!0},p:fe,i(d){g||(T(u.$$.fragment,d),g=!0)},o(d){W(u.$$.fragment,d),g=!1},d(d){d&&t(c),d&&t(f),x(u,d)}}}function xg($){let c,b,f,u,g;return{c(){c=n("p"),b=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),u=a("Module"),g=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(d){c=s(d,"P",{});var m=r(c);b=i(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(m,"CODE",{});var M=r(f);u=i(M,"Module"),M.forEach(t),g=i(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(d,m){y(d,c,m),e(c,b),e(c,f),e(f,u),e(c,g)},d(d){d&&t(c)}}}function $g($){let c,b,f,u,g;return u=new _e({props:{code:"aW1wb3J0JTIwamF4Lm51bXB5JTIwYXMlMjBqbnAlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b0ZlYXR1cmVFeHRyYWN0b3IlMkMlMjBGbGF4V2hpc3BlckZvckF1ZGlvQ2xhc3NpZmljYXRpb24lMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEElMEFmZWF0dXJlX2V4dHJhY3RvciUyMCUzRCUyMEF1dG9GZWF0dXJlRXh0cmFjdG9yLmZyb21fcHJldHJhaW5lZCglMjJzYW5jaGl0LWdhbmRoaSUyRndoaXNwZXItbWVkaXVtLWZsZXVycy1sYW5nLWlkJTIyKSUwQW1vZGVsJTIwJTNEJTIwRmxheFdoaXNwZXJGb3JBdWRpb0NsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJzYW5jaGl0LWdhbmRoaSUyRndoaXNwZXItbWVkaXVtLWZsZXVycy1sYW5nLWlkJTIyJTJDJTIwZnJvbV9wdCUzRFRydWUlMEEpJTBBZHMlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyZ29vZ2xlJTJGZmxldXJzJTIyJTJDJTIwJTIyYWxsJTIyJTJDJTIwc3BsaXQlM0QlMjJ2YWxpZGF0aW9uJTIyJTJDJTIwc3RyZWFtaW5nJTNEVHJ1ZSklMEElMEFzYW1wbGUlMjAlM0QlMjBuZXh0KGl0ZXIoZHMpKSUwQSUwQWlucHV0cyUyMCUzRCUyMGZlYXR1cmVfZXh0cmFjdG9yKCUwQSUyMCUyMCUyMCUyMHNhbXBsZSU1QiUyMmF1ZGlvJTIyJTVEJTVCJTIyYXJyYXklMjIlNUQlMkMlMjBzYW1wbGluZ19yYXRlJTNEc2FtcGxlJTVCJTIyYXVkaW8lMjIlNUQlNUIlMjJzYW1wbGluZ19yYXRlJTIyJTVEJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJucCUyMiUwQSklMEFpbnB1dF9mZWF0dXJlcyUyMCUzRCUyMGlucHV0cy5pbnB1dF9mZWF0dXJlcyUwQSUwQWxvZ2l0cyUyMCUzRCUyMG1vZGVsKGlucHV0X2ZlYXR1cmVzKS5sb2dpdHMlMEElMEFwcmVkaWN0ZWRfY2xhc3NfaWRzJTIwJTNEJTIwam5wLmFyZ21heChsb2dpdHMpLml0ZW0oKSUwQXByZWRpY3RlZF9sYWJlbCUyMCUzRCUyMG1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QnByZWRpY3RlZF9jbGFzc19pZHMlNUQlMEFwcmVkaWN0ZWRfbGFiZWw=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> jax.numpy <span class="hljs-keyword">as</span> jnp
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor, FlaxWhisperForAudioClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;sanchit-gandhi/whisper-medium-fleurs-lang-id&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxWhisperForAudioClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;sanchit-gandhi/whisper-medium-fleurs-lang-id&quot;</span>, from_pt=<span class="hljs-literal">True</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;google/fleurs&quot;</span>, <span class="hljs-string">&quot;all&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>, streaming=<span class="hljs-literal">True</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>sample = <span class="hljs-built_in">next</span>(<span class="hljs-built_in">iter</span>(ds))

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = feature_extractor(
<span class="hljs-meta">... </span>    sample[<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>], sampling_rate=sample[<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;sampling_rate&quot;</span>], return_tensors=<span class="hljs-string">&quot;np&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>logits = model(input_features).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_ids = jnp.argmax(logits).item()
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_label = model.config.id2label[predicted_class_ids]
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_label
<span class="hljs-string">&#x27;af_za&#x27;</span>`}}),{c(){c=n("p"),b=a("Transcription example:"),f=p(),v(u.$$.fragment)},l(d){c=s(d,"P",{});var m=r(c);b=i(m,"Transcription example:"),m.forEach(t),f=h(d),k(u.$$.fragment,d)},m(d,m){y(d,c,m),e(c,b),y(d,f,m),w(u,d,m),g=!0},p:fe,i(d){g||(T(u.$$.fragment,d),g=!0)},o(d){W(u.$$.fragment,d),g=!1},d(d){d&&t(c),d&&t(f),x(u,d)}}}function Fg($){let c,b,f,u,g,d,m,M,Z,C,J,q,I,ge,ls,tt,md,Ya,ot,ud,ho,fd,_d,Da,cs,gd,Oa,ps,ur,yd,Ha,hs,bd,Qa,Q,fr,vd,kd,mo,wd,ms,Td,Wd,xd,_r,$d,Fd,uo,Md,us,zd,jd,Ka,K,Ed,fo,Cd,qd,_o,Jd,Id,go,Gd,Nd,ei,Me,nt,gr,yo,Ud,yr,Zd,ti,V,bo,Xd,ze,Ad,fs,Rd,Pd,vo,Vd,Sd,Bd,je,Ld,_s,Yd,Dd,gs,Od,Hd,Qd,st,oi,Ee,rt,br,ko,Kd,vr,el,ni,z,wo,tl,kr,ol,nl,To,sl,ys,rl,al,il,ye,Wo,dl,wr,ll,cl,at,pl,it,xo,hl,Tr,ml,ul,dt,$o,fl,Fo,_l,Wr,gl,yl,bl,be,Mo,vl,bs,kl,vs,wl,Tl,xr,Wl,xl,ks,zo,si,Ce,lt,$r,jo,$l,Fr,Fl,ri,j,Eo,Ml,Co,zl,Mr,jl,El,Cl,qo,ql,ws,Jl,Il,Gl,ve,Jo,Nl,zr,Ul,Zl,ct,Xl,pt,Io,Al,jr,Rl,Pl,ht,Go,Vl,No,Sl,Er,Bl,Ll,Yl,ke,Uo,Dl,Ts,Ol,Ws,Hl,Ql,Cr,Kl,ec,xs,Zo,ai,qe,mt,qr,Xo,tc,Jr,oc,ii,X,Ao,nc,Ir,sc,rc,Ro,ac,$s,ic,dc,lc,Je,cc,Gr,pc,hc,Nr,mc,uc,fc,ut,Po,_c,Ur,gc,di,Ie,ft,Zr,Vo,yc,Xr,bc,li,E,So,vc,Ar,kc,wc,P,Fs,Tc,Wc,Ms,xc,$c,zs,Fc,Mc,Bo,Rr,zc,jc,Ec,js,Cc,qc,Jc,_t,Lo,Ic,S,Gc,Pr,Nc,Uc,Yo,Vr,Zc,Xc,Ac,Sr,Rc,Pc,Do,Br,Vc,Sc,Bc,Lc,we,Oo,Yc,Lr,Dc,Oc,gt,Hc,Te,Ho,Qc,Qo,Kc,Es,ep,tp,op,yt,np,bt,Ko,sp,en,rp,Cs,ap,ip,dp,vt,tn,lp,on,cp,qs,pp,hp,ci,Ge,kt,Yr,nn,mp,Dr,up,pi,A,sn,fp,rn,_p,Js,gp,yp,bp,an,vp,dn,kp,wp,Tp,ee,ln,Wp,Ne,xp,Is,$p,Fp,Or,Mp,zp,jp,wt,Ep,Tt,Cp,Wt,cn,qp,pn,Jp,hn,Ip,Gp,hi,Ue,xt,Hr,mn,Np,Qr,Up,mi,B,un,Zp,fn,Xp,Gs,Ap,Rp,Pp,_n,Vp,gn,Sp,Bp,Lp,te,yn,Yp,Ze,Dp,Ns,Op,Hp,Kr,Qp,Kp,eh,$t,th,Ft,ui,Xe,Mt,ea,bn,oh,ta,nh,fi,de,vn,sh,oa,rh,ah,oe,kn,ih,Ae,dh,Us,lh,ch,na,ph,hh,mh,zt,uh,jt,_i,Re,Et,sa,wn,fh,ra,_h,gi,L,Tn,gh,Wn,yh,Zs,bh,vh,kh,xn,wh,$n,Th,Wh,xh,ne,Fn,$h,Pe,Fh,Xs,Mh,zh,aa,jh,Eh,Ch,Ct,qh,qt,yi,Ve,Jt,ia,Mn,Jh,da,Ih,bi,Y,zn,Gh,jn,Nh,As,Uh,Zh,Xh,En,Ah,Cn,Rh,Ph,Vh,se,qn,Sh,Se,Bh,Rs,Lh,Yh,la,Dh,Oh,Hh,It,Qh,Gt,vi,Be,Nt,ca,Jn,Kh,pa,em,ki,D,In,tm,Le,om,Ps,nm,sm,Gn,rm,am,im,le,ha,Nn,dm,lm,ma,Un,cm,pm,ua,Zn,hm,mm,fa,Xn,um,fm,re,An,_m,Ye,gm,_a,ym,bm,ga,vm,km,wm,Ut,Tm,Zt,wi,De,Xt,ya,Rn,Wm,ba,xm,Ti,O,Pn,$m,Oe,Fm,Vs,Mm,zm,Vn,jm,Em,Cm,ce,va,Sn,qm,Jm,ka,Bn,Im,Gm,wa,Ln,Nm,Um,Ta,Yn,Zm,Xm,ae,Dn,Am,He,Rm,Wa,Pm,Vm,xa,Sm,Bm,Lm,At,Ym,Rt,Wi,Qe,Pt,$a,On,Dm,Fa,Om,xi,H,Hn,Hm,Ke,Qm,Ss,Km,eu,Qn,tu,ou,nu,pe,Ma,Kn,su,ru,za,es,au,iu,ja,ts,du,lu,Ea,os,cu,pu,ie,ns,hu,et,mu,Bs,uu,fu,Ca,_u,gu,yu,Vt,bu,St,$i;return d=new R({}),ge=new R({}),yo=new R({}),bo=new F({props:{name:"class transformers.WhisperConfig",anchor:"transformers.WhisperConfig",parameters:[{name:"vocab_size",val:" = 51865"},{name:"num_mel_bins",val:" = 80"},{name:"encoder_layers",val:" = 6"},{name:"encoder_attention_heads",val:" = 4"},{name:"decoder_layers",val:" = 6"},{name:"decoder_attention_heads",val:" = 4"},{name:"decoder_ffn_dim",val:" = 1536"},{name:"encoder_ffn_dim",val:" = 1536"},{name:"encoder_layerdrop",val:" = 0.0"},{name:"decoder_layerdrop",val:" = 0.0"},{name:"decoder_start_token_id",val:" = 50257"},{name:"use_cache",val:" = True"},{name:"is_encoder_decoder",val:" = True"},{name:"activation_function",val:" = 'gelu'"},{name:"d_model",val:" = 256"},{name:"dropout",val:" = 0.0"},{name:"attention_dropout",val:" = 0.0"},{name:"activation_dropout",val:" = 0.0"},{name:"init_std",val:" = 0.02"},{name:"scale_embedding",val:" = False"},{name:"max_source_positions",val:" = 1500"},{name:"max_target_positions",val:" = 448"},{name:"pad_token_id",val:" = 50256"},{name:"bos_token_id",val:" = 50256"},{name:"eos_token_id",val:" = 50256"},{name:"suppress_tokens",val:" = None"},{name:"begin_suppress_tokens",val:" = [220, 50256]"},{name:"use_weighted_layer_sum",val:" = False"},{name:"classifier_proj_size",val:" = 256"},{name:"apply_spec_augment",val:" = False"},{name:"mask_time_prob",val:" = 0.05"},{name:"mask_time_length",val:" = 10"},{name:"mask_time_min_masks",val:" = 2"},{name:"mask_feature_prob",val:" = 0.0"},{name:"mask_feature_length",val:" = 10"},{name:"mask_feature_min_masks",val:" = 0"},{name:"median_filter_width",val:" = 7"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.WhisperConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 51865) &#x2014;
Vocabulary size of the Whisper model. Defines the number of different tokens that can be represented by the
<code>decoder_input_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperModel">WhisperModel</a>`,name:"vocab_size"},{anchor:"transformers.WhisperConfig.num_mel_bins",description:`<strong>num_mel_bins</strong> (<code>int</code>, <em>optional</em>, defaults to 80) &#x2014;
Number of mel features used per input features. Should correspond to the value used in the
<code>WhisperProcessor</code> class.`,name:"num_mel_bins"},{anchor:"transformers.WhisperConfig.encoder_layers",description:`<strong>encoder_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 6) &#x2014;
Number of encoder layers.`,name:"encoder_layers"},{anchor:"transformers.WhisperConfig.decoder_layers",description:`<strong>decoder_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 6) &#x2014;
Number of decoder layers.`,name:"decoder_layers"},{anchor:"transformers.WhisperConfig.encoder_attention_heads",description:`<strong>encoder_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"encoder_attention_heads"},{anchor:"transformers.WhisperConfig.decoder_attention_heads",description:`<strong>decoder_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
Number of attention heads for each attention layer in the Transformer decoder.`,name:"decoder_attention_heads"},{anchor:"transformers.WhisperConfig.encoder_ffn_dim",description:`<strong>encoder_ffn_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 1536) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in encoder.`,name:"encoder_ffn_dim"},{anchor:"transformers.WhisperConfig.decoder_ffn_dim",description:`<strong>decoder_ffn_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 1536) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in decoder.`,name:"decoder_ffn_dim"},{anchor:"transformers.WhisperConfig.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.WhisperConfig.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.WhisperConfig.decoder_start_token_id",description:`<strong>decoder_start_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 50257) &#x2014;
Corresponds to the &#x201D;&lt;|startoftranscript|&gt;&#x201D; token, which is automatically used when no <code>decoder_input_ids</code>
are provided to the <code>generate</code> function. It is used to guide the model\`s generation process depending on
the task.`,name:"decoder_start_token_id"},{anchor:"transformers.WhisperConfig.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.WhisperConfig.is_encoder_decoder",description:`<strong>is_encoder_decoder</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether the model is used as an encoder/decoder or not.`,name:"is_encoder_decoder"},{anchor:"transformers.WhisperConfig.activation_function",description:`<strong>activation_function</strong> (<code>str</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.WhisperConfig.d_model",description:`<strong>d_model</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Dimensionality of the layers.`,name:"d_model"},{anchor:"transformers.WhisperConfig.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.WhisperConfig.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.WhisperConfig.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.WhisperConfig.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.WhisperConfig.scale_embedding",description:`<strong>scale_embedding</strong> (<code>bool</code>, <em>optional</em>, defaults to False) &#x2014;
Scale embeddings by diving by sqrt(d_model).`,name:"scale_embedding"},{anchor:"transformers.WhisperConfig.max_source_positions",description:`<strong>max_source_positions</strong> (<code>int</code>, <em>optional</em>, defaults to 1500) &#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.WhisperConfig.max_target_positions",description:`<strong>max_target_positions</strong> (<code>int</code>, <em>optional</em>, defaults to 448) &#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.WhisperConfig.pad_token_id",description:`<strong>pad_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 50256) &#x2014;
Padding token id.`,name:"pad_token_id"},{anchor:"transformers.WhisperConfig.bos_token_id",description:`<strong>bos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 50256) &#x2014;
Begin of stream token id.`,name:"bos_token_id"},{anchor:"transformers.WhisperConfig.eos_token_id",description:`<strong>eos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 50256) &#x2014;
End of stream token id.`,name:"eos_token_id"},{anchor:"transformers.WhisperConfig.suppress_tokens",description:`<strong>suppress_tokens</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
A list containing the non-speech tokens that will be used by the logit processor in the <code>generate</code>
function. NON_SPEECH_TOKENS and NON_SPEECH_TOKENS_MULTI each correspond to the <code>english-only</code> and the
<code>multilingual</code> model.`,name:"suppress_tokens"},{anchor:"transformers.WhisperConfig.begin_suppress_tokens",description:`<strong>begin_suppress_tokens</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[220,50256]</code>) &#x2014;
A list containing tokens that will be supressed at the beginning of the sampling process. Initialized as
the token for <code>&quot; &quot;</code> (<code>blank_token_id</code>) and the <code>eos_token_id</code>`,name:"begin_suppress_tokens"},{anchor:"transformers.WhisperConfig.use_weighted_layer_sum",description:`<strong>use_weighted_layer_sum</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use a weighted average of layer outputs with learned weights. Only relevant when using an
instance of <a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperForAudioClassification">WhisperForAudioClassification</a>.`,name:"use_weighted_layer_sum"},{anchor:"transformers.WhisperConfig.classifier_proj_size",description:`<strong>classifier_proj_size</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Dimensionality of the projection before token mean-pooling for classification. Only relevant when using an
instance of <a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperForAudioClassification">WhisperForAudioClassification</a>.`,name:"classifier_proj_size"},{anchor:"transformers.WhisperConfig.apply_spec_augment",description:`<strong>apply_spec_augment</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to apply <em>SpecAugment</em> data augmentation to the outputs of the feature encoder. For reference see
<a href="https://arxiv.org/abs/1904.08779" rel="nofollow">SpecAugment: A Simple Data Augmentation Method for Automatic Speech
Recognition</a>.`,name:"apply_spec_augment"},{anchor:"transformers.WhisperConfig.mask_time_prob",description:`<strong>mask_time_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.05) &#x2014;
Percentage (between 0 and 1) of all feature vectors along the time axis which will be masked. The masking
procecure generates <code>mask_time_prob*len(time_axis)/mask_time_length</code> independent masks over the axis. If
reasoning from the propability of each feature vector to be chosen as the start of the vector span to be
masked, <em>mask_time_prob</em> should be <code>prob_vector_start*mask_time_length</code>. Note that overlap may decrease the
actual percentage of masked vectors. This is only relevant if <code>apply_spec_augment == True</code>.`,name:"mask_time_prob"},{anchor:"transformers.WhisperConfig.mask_time_length",description:`<strong>mask_time_length</strong> (<code>int</code>, <em>optional</em>, defaults to 10) &#x2014;
Length of vector span along the time axis.`,name:"mask_time_length"},{anchor:"transformers.WhisperConfig.mask_time_min_masks",description:`<strong>mask_time_min_masks</strong> (<code>int</code>, <em>optional</em>, defaults to 2), &#x2014;
The minimum number of masks of length <code>mask_feature_length</code> generated along the time axis, each time step,
irrespectively of <code>mask_feature_prob</code>. Only relevant if &#x201D;mask_time_prob*len(time_axis)/mask_time_length &lt;
mask_time_min_masks&#x201D;`,name:"mask_time_min_masks"},{anchor:"transformers.WhisperConfig.mask_feature_prob",description:`<strong>mask_feature_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Percentage (between 0 and 1) of all feature vectors along the feature axis which will be masked. The
masking procecure generates <code>mask_feature_prob*len(feature_axis)/mask_time_length</code> independent masks over
the axis. If reasoning from the propability of each feature vector to be chosen as the start of the vector
span to be masked, <em>mask_feature_prob</em> should be <code>prob_vector_start*mask_feature_length</code>. Note that overlap
may decrease the actual percentage of masked vectors. This is only relevant if <code>apply_spec_augment is True</code>.`,name:"mask_feature_prob"},{anchor:"transformers.WhisperConfig.mask_feature_length",description:`<strong>mask_feature_length</strong> (<code>int</code>, <em>optional</em>, defaults to 10) &#x2014;
Length of vector span along the feature axis.`,name:"mask_feature_length"},{anchor:"transformers.WhisperConfig.mask_feature_min_masks",description:`<strong>mask_feature_min_masks</strong> (<code>int</code>, <em>optional</em>, defaults to 0), &#x2014;
The minimum number of masks of length <code>mask_feature_length</code> generated along the feature axis, each time
step, irrespectively of <code>mask_feature_prob</code>. Only relevant if
<code>mask_feature_prob*len(feature_axis)/mask_feature_length &lt; mask_feature_min_masks</code>.`,name:"mask_feature_min_masks"},{anchor:"transformers.WhisperConfig.median_filter_width",description:`<strong>median_filter_width</strong> (<code>int</code>, <em>optional</em>, defaults to 7) &#x2014;
Width of the median filter used to smoothen to cross-attention outputs when computing token timestamps.
Should be an odd number.`,name:"median_filter_width"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/configuration_whisper.py#L62"}}),st=new ue({props:{anchor:"transformers.WhisperConfig.example",$$slots:{default:[ag]},$$scope:{ctx:$}}}),ko=new R({}),wo=new F({props:{name:"class transformers.WhisperTokenizer",anchor:"transformers.WhisperTokenizer",parameters:[{name:"vocab_file",val:""},{name:"merges_file",val:""},{name:"normalizer_file",val:" = None"},{name:"errors",val:" = 'replace'"},{name:"unk_token",val:" = '<|endoftext|>'"},{name:"bos_token",val:" = '<|endoftext|>'"},{name:"eos_token",val:" = '<|endoftext|>'"},{name:"pad_token",val:" = None"},{name:"add_prefix_space",val:" = False"},{name:"language",val:" = None"},{name:"task",val:" = None"},{name:"predict_timestamps",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.WhisperTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.WhisperTokenizer.merges_file",description:`<strong>merges_file</strong> (<code>str</code>) &#x2014;
Path to the merges file.`,name:"merges_file"},{anchor:"transformers.WhisperTokenizer.normalizer_file",description:`<strong>normalizer_file</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Path to the normalizer_file file.`,name:"normalizer_file"},{anchor:"transformers.WhisperTokenizer.errors",description:`<strong>errors</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;replace&quot;</code>) &#x2014;
Paradigm to follow when decoding bytes to UTF-8. See
<a href="https://docs.python.org/3/library/stdtypes.html#bytes.decode" rel="nofollow">bytes.decode</a> for more information.`,name:"errors"},{anchor:"transformers.WhisperTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;|endoftext|&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.WhisperTokenizer.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;|endoftext|&gt;&quot;</code>) &#x2014;
The beginning of sequence token. The <code>decoder_start_token_id</code> is used to set the first token as
<code>&quot;&lt;|startoftranscript|&gt;&quot;</code> when generating.`,name:"bos_token"},{anchor:"transformers.WhisperTokenizer.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;|endoftext|&gt;&quot;</code>) &#x2014;
The end of sequence token.`,name:"eos_token"},{anchor:"transformers.WhisperTokenizer.add_prefix_space",description:`<strong>add_prefix_space</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to add an initial space to the input. This allows to treat the leading word just as any
other word.`,name:"add_prefix_space"},{anchor:"transformers.WhisperTokenizer.language",description:`<strong>language</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The language of the transcription text. The corresponding language id token is appended to the start of the
sequence for multilingual speech recognition and speech translation tasks, e.g. for Spanish the token
<code>&quot;&lt;|es|&gt;&quot;</code> is appended to the start of sequence. This should be used for multilingual fine-tuning only.`,name:"language"},{anchor:"transformers.WhisperTokenizer.task",description:`<strong>task</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Task identifier to append at the start of sequence (if any). This should be used for mulitlingual
fine-tuning, with <code>&quot;transcribe&quot;</code> for speech recognition and <code>&quot;translate&quot;</code> for speech translation.`,name:"task"},{anchor:"transformers.WhisperTokenizer.predict_timestamps",description:`<strong>predict_timestamps</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to omit the <code>&lt;|notimestamps|&gt;</code> token at the start of the sequence.`,name:"predict_timestamps"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/tokenization_whisper.py#L218"}}),Wo=new F({props:{name:"set_prefix_tokens",anchor:"transformers.WhisperTokenizer.set_prefix_tokens",parameters:[{name:"language",val:": str = None"},{name:"task",val:": str = None"},{name:"predict_timestamps",val:": bool = None"}],parametersDescription:[{anchor:"transformers.WhisperTokenizer.set_prefix_tokens.language",description:`<strong>language</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The language of the transcription text.`,name:"language"},{anchor:"transformers.WhisperTokenizer.set_prefix_tokens.task",description:`<strong>task</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Task identifier to append at the start of sequence (if any).`,name:"task"},{anchor:"transformers.WhisperTokenizer.set_prefix_tokens.predict_timestamps",description:`<strong>predict_timestamps</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Whether to omit the <code>&lt;|notimestamps|&gt;</code> token at the start of the sequence.`,name:"predict_timestamps"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/tokenization_whisper.py#L370"}}),at=new ue({props:{anchor:"transformers.WhisperTokenizer.set_prefix_tokens.example",$$slots:{default:[ig]},$$scope:{ctx:$}}}),xo=new F({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.WhisperTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:""},{name:"token_ids_1",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/tokenization_whisper.py#L430"}}),$o=new F({props:{name:"get_special_tokens_mask",anchor:"transformers.WhisperTokenizer.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.WhisperTokenizer.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.WhisperTokenizer.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.WhisperTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/tokenization_whisper.py#L438",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>
`}}),Mo=new F({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.WhisperTokenizer.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.WhisperTokenizer.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.WhisperTokenizer.create_token_type_ids_from_sequences.token_ids_1",description:"<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014; The second tokenized sequence.",name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils_base.py#L3101",returnDescription:`
<p>The token type ids.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),zo=new F({props:{name:"save_vocabulary",anchor:"transformers.WhisperTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/tokenization_whisper.py#L658"}}),jo=new R({}),Eo=new F({props:{name:"class transformers.WhisperTokenizerFast",anchor:"transformers.WhisperTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"merges_file",val:" = None"},{name:"normalizer_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"unk_token",val:" = '<|endoftext|>'"},{name:"bos_token",val:" = '<|endoftext|>'"},{name:"eos_token",val:" = '<|endoftext|>'"},{name:"add_prefix_space",val:" = False"},{name:"language",val:" = None"},{name:"task",val:" = None"},{name:"predict_timestamps",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.WhisperTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.WhisperTokenizerFast.merges_file",description:`<strong>merges_file</strong> (<code>str</code>) &#x2014;
Path to the merges file.`,name:"merges_file"},{anchor:"transformers.WhisperTokenizerFast.normalizer_file",description:`<strong>normalizer_file</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Path to the normalizer_file file.`,name:"normalizer_file"},{anchor:"transformers.WhisperTokenizerFast.errors",description:`<strong>errors</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;replace&quot;</code>) &#x2014;
Paradigm to follow when decoding bytes to UTF-8. See
<a href="https://docs.python.org/3/library/stdtypes.html#bytes.decode" rel="nofollow">bytes.decode</a> for more information.`,name:"errors"},{anchor:"transformers.WhisperTokenizerFast.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&lt;|endoftext|&gt;</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.WhisperTokenizerFast.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;|endoftext|&gt;&quot;</code>) &#x2014;
The beginning of sequence token. The <code>decoder_start_token_id</code> is used to set the first token as
<code>&quot;&lt;|startoftranscript|&gt;&quot;</code> when generating.`,name:"bos_token"},{anchor:"transformers.WhisperTokenizerFast.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&lt;|endoftext|&gt;</code>) &#x2014;
The end of sequence token.`,name:"eos_token"},{anchor:"transformers.WhisperTokenizerFast.add_prefix_space",description:`<strong>add_prefix_space</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to add an initial space to the input. This allows to treat the leading word just as any
other word. (Whisper tokenizer detect beginning of words by the preceding space).`,name:"add_prefix_space"},{anchor:"transformers.WhisperTokenizerFast.trim_offsets",description:`<strong>trim_offsets</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the post-processing step should trim offsets to avoid including whitespaces.`,name:"trim_offsets"},{anchor:"transformers.WhisperTokenizerFast.language",description:`<strong>language</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The language of the transcription text. The corresponding language id token is appended to the start of the
sequence for multilingual speech recognition and speech translation tasks, e.g. for Spanish the token
<code>&quot;&lt;|es|&gt;&quot;</code> is appended to the start of sequence. This should be used for multilingual fine-tuning only.`,name:"language"},{anchor:"transformers.WhisperTokenizerFast.task",description:`<strong>task</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Task identifier to append at the start of sequence (if any). This should be used for mulitlingual
fine-tuning, with <code>&quot;transcribe&quot;</code> for speech recognition and <code>&quot;translate&quot;</code> for speech translation.`,name:"task"},{anchor:"transformers.WhisperTokenizerFast.predict_timestamps",description:`<strong>predict_timestamps</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to omit the <code>&lt;|notimestamps|&gt;</code> token at the start of the sequence.`,name:"predict_timestamps"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/tokenization_whisper_fast.py#L92"}}),Jo=new F({props:{name:"set_prefix_tokens",anchor:"transformers.WhisperTokenizerFast.set_prefix_tokens",parameters:[{name:"language",val:": str = None"},{name:"task",val:": str = None"},{name:"predict_timestamps",val:": bool = None"}],parametersDescription:[{anchor:"transformers.WhisperTokenizerFast.set_prefix_tokens.language",description:`<strong>language</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The language of the transcription text.`,name:"language"},{anchor:"transformers.WhisperTokenizerFast.set_prefix_tokens.task",description:`<strong>task</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Task identifier to append at the start of sequence (if any).`,name:"task"},{anchor:"transformers.WhisperTokenizerFast.set_prefix_tokens.predict_timestamps",description:`<strong>predict_timestamps</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Whether to omit the <code>&lt;|notimestamps|&gt;</code> token at the start of the sequence.`,name:"predict_timestamps"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/tokenization_whisper_fast.py#L361"}}),ct=new ue({props:{anchor:"transformers.WhisperTokenizerFast.set_prefix_tokens.example",$$slots:{default:[dg]},$$scope:{ctx:$}}}),Io=new F({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.WhisperTokenizerFast.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:""},{name:"token_ids_1",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/tokenization_whisper_fast.py#L436"}}),Go=new F({props:{name:"get_special_tokens_mask",anchor:"transformers.WhisperTokenizerFast.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.WhisperTokenizerFast.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.WhisperTokenizerFast.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.WhisperTokenizerFast.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/tokenization_whisper_fast.py#L444",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>
`}}),Uo=new F({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.WhisperTokenizerFast.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.WhisperTokenizerFast.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.WhisperTokenizerFast.create_token_type_ids_from_sequences.token_ids_1",description:"<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014; The second tokenized sequence.",name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils_base.py#L3101",returnDescription:`
<p>The token type ids.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Zo=new F({props:{name:"save_vocabulary",anchor:"transformers.WhisperTokenizerFast.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/tokenization_whisper_fast.py#L346"}}),Xo=new R({}),Ao=new F({props:{name:"class transformers.WhisperFeatureExtractor",anchor:"transformers.WhisperFeatureExtractor",parameters:[{name:"feature_size",val:" = 80"},{name:"sampling_rate",val:" = 16000"},{name:"hop_length",val:" = 160"},{name:"chunk_length",val:" = 30"},{name:"n_fft",val:" = 400"},{name:"padding_value",val:" = 0.0"},{name:"return_attention_mask",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.WhisperFeatureExtractor.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.WhisperFeatureExtractor.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.WhisperFeatureExtractor.hop_length",description:`<strong>hop_length</strong> (<code>int</code>, defaults to 160) &#x2014;
Length of the overlaping windows for the STFT used to obtain the Mel Frequency coefficients.`,name:"hop_length"},{anchor:"transformers.WhisperFeatureExtractor.chunk_length",description:`<strong>chunk_length</strong> (<code>int</code>, defaults to 30) &#x2014;
The maximum number of chuncks of <code>sampling_rate</code> samples used to trim and pad longer or shorter audio
sequences.`,name:"chunk_length"},{anchor:"transformers.WhisperFeatureExtractor.n_fft",description:`<strong>n_fft</strong> (<code>int</code>, defaults to 400) &#x2014;
Size of the Fourier transform.`,name:"n_fft"},{anchor:"transformers.WhisperFeatureExtractor.padding_value",description:`<strong>padding_value</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Padding value used to pad the audio. Should correspond to silences.`,name:"padding_value"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/feature_extraction_whisper.py#L32"}}),Po=new F({props:{name:"__call__",anchor:"transformers.WhisperFeatureExtractor.__call__",parameters:[{name:"raw_speech",val:": typing.Union[numpy.ndarray, typing.List[float], typing.List[numpy.ndarray], typing.List[typing.List[float]]]"},{name:"truncation",val:": bool = True"},{name:"pad_to_multiple_of",val:": typing.Optional[int] = None"},{name:"return_tensors",val:": typing.Union[transformers.utils.generic.TensorType, str, NoneType] = None"},{name:"return_attention_mask",val:": typing.Optional[bool] = None"},{name:"padding",val:": typing.Optional[str] = 'max_length'"},{name:"max_length",val:": typing.Optional[int] = None"},{name:"sampling_rate",val:": typing.Optional[int] = None"},{name:"do_normalize",val:": typing.Optional[bool] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.WhisperFeatureExtractor.__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.WhisperFeatureExtractor.__call__.truncation",description:`<strong>truncation</strong> (<code>bool</code>, <em>optional</em>, default to <code>True</code>) &#x2014;
Activates truncation to cut input sequences longer than <em>max_length</em> to <em>max_length</em>.`,name:"truncation"},{anchor:"transformers.WhisperFeatureExtractor.__call__.pad_to_multiple_of",description:`<strong>pad_to_multiple_of</strong> (<code>int</code>, <em>optional</em>, defaults to None) &#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.WhisperFeatureExtractor.__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 Whisper models, <code>attention_mask</code> should always be passed for batched inference, to avoid subtle
bugs.</p>

					</div>`,name:"return_attention_mask"},{anchor:"transformers.WhisperFeatureExtractor.__call__.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <a href="/docs/transformers/main/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>) &#x2014;
If set, will return tensors instead of list of python integers. Acceptable values are:</p>
<ul>
<li><code>&apos;tf&apos;</code>: Return TensorFlow <code>tf.constant</code> objects.</li>
<li><code>&apos;pt&apos;</code>: Return PyTorch <code>torch.Tensor</code> objects.</li>
<li><code>&apos;np&apos;</code>: Return Numpy <code>np.ndarray</code> objects.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.WhisperFeatureExtractor.__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 and allow automatic speech recognition
pipeline.`,name:"sampling_rate"},{anchor:"transformers.WhisperFeatureExtractor.__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"},{anchor:"transformers.WhisperFeatureExtractor.__call__.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to zero-mean unit-variance normalize the input. Normalizing can help to significantly
improve the performance of the model.`,name:"do_normalize"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/feature_extraction_whisper.py#L136"}}),Vo=new R({}),So=new F({props:{name:"class transformers.WhisperProcessor",anchor:"transformers.WhisperProcessor",parameters:[{name:"feature_extractor",val:""},{name:"tokenizer",val:""}],parametersDescription:[{anchor:"transformers.WhisperProcessor.feature_extractor",description:`<strong>feature_extractor</strong> (<code>WhisperFeatureExtractor</code>) &#x2014;
An instance of <a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperFeatureExtractor">WhisperFeatureExtractor</a>. The feature extractor is a required input.`,name:"feature_extractor"},{anchor:"transformers.WhisperProcessor.tokenizer",description:`<strong>tokenizer</strong> (<code>WhisperTokenizer</code>) &#x2014;
An instance of <a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperTokenizer">WhisperTokenizer</a>. The tokenizer is a required input.`,name:"tokenizer"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/processing_whisper.py#L23"}}),Lo=new F({props:{name:"__call__",anchor:"transformers.WhisperProcessor.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/processing_whisper.py#L48"}}),Oo=new F({props:{name:"from_pretrained",anchor:"transformers.WhisperProcessor.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.WhisperProcessor.from_pretrained.pretrained_model_name_or_path",description:`<strong>pretrained_model_name_or_path</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
This can be either:</p>
<ul>
<li>a string, the <em>model id</em> of a pretrained feature_extractor hosted inside a model repo on
huggingface.co. Valid model ids can be located at the root-level, like <code>bert-base-uncased</code>, or
namespaced under a user or organization name, like <code>dbmdz/bert-base-german-cased</code>.</li>
<li>a path to a <em>directory</em> containing a feature extractor file saved using the
<a href="/docs/transformers/main/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.save_pretrained">save_pretrained()</a> method, e.g., <code>./my_model_directory/</code>.</li>
<li>a path or url to a saved feature extractor JSON <em>file</em>, e.g.,
<code>./my_model_directory/preprocessor_config.json</code>.
**kwargs &#x2014;
Additional keyword arguments passed along to both
<a href="/docs/transformers/main/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.from_pretrained">from_pretrained()</a> and
<code>~tokenization_utils_base.PreTrainedTokenizer.from_pretrained</code>.</li>
</ul>`,name:"pretrained_model_name_or_path"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/processing_utils.py#L167"}}),gt=new Fe({props:{$$slots:{default:[lg]},$$scope:{ctx:$}}}),Ho=new F({props:{name:"save_pretrained",anchor:"transformers.WhisperProcessor.save_pretrained",parameters:[{name:"save_directory",val:""},{name:"push_to_hub",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.WhisperProcessor.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.WhisperProcessor.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.WhisperProcessor.save_pretrained.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Additional key word arguments passed along to the <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.push_to_hub">push_to_hub()</a> method.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/processing_utils.py#L93"}}),yt=new Fe({props:{$$slots:{default:[cg]},$$scope:{ctx:$}}}),Ko=new F({props:{name:"batch_decode",anchor:"transformers.WhisperProcessor.batch_decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/processing_whisper.py#L82"}}),tn=new F({props:{name:"decode",anchor:"transformers.WhisperProcessor.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/processing_whisper.py#L89"}}),nn=new R({}),sn=new F({props:{name:"class transformers.WhisperModel",anchor:"transformers.WhisperModel",parameters:[{name:"config",val:": WhisperConfig"}],parametersDescription:[{anchor:"transformers.WhisperModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperConfig">WhisperConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/modeling_whisper.py#L1227"}}),ln=new F({props:{name:"forward",anchor:"transformers.WhisperModel.forward",parameters:[{name:"input_features",val:": typing.Optional[torch.FloatTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.LongTensor] = 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[typing.Tuple[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.WhisperModel.forward.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, feature_size, sequence_length)</code>) &#x2014;
Float values mel features extracted from the raw speech waveform. Raw speech waveform can be obtained by
loading a <code>.flac</code> or <code>.wav</code> audio file into an array of type <code>List[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em> via
the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_features</code>, the
<a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoFeatureExtractor">AutoFeatureExtractor</a> should be used for extracting the mel features, padding and conversion into a
tensor of type <code>torch.FloatTensor</code>. See <a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperFeatureExtractor.__call__"><strong>call</strong>()</a>`,name:"input_features"},{anchor:"transformers.WhisperModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing <em>SpecAugment</em> data augmentation 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.WhisperModel.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 <a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperTokenizer">WhisperTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>Whisper uses the <code>decoder_start_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.WhisperModel.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_whisper._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 BART
paper</a> for more information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.WhisperModel.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.WhisperModel.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.WhisperModel.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.WhisperModel.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.WhisperModel.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.WhisperModel.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.WhisperModel.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.WhisperModel.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.WhisperModel.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.WhisperModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/modeling_whisper.py#L1298",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqModelOutput"
>transformers.modeling_outputs.Seq2SeqModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperConfig"
>WhisperConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</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>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 optional 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 optional initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqModelOutput"
>transformers.modeling_outputs.Seq2SeqModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),wt=new Fe({props:{$$slots:{default:[pg]},$$scope:{ctx:$}}}),Tt=new ue({props:{anchor:"transformers.WhisperModel.forward.example",$$slots:{default:[hg]},$$scope:{ctx:$}}}),cn=new F({props:{name:"_mask_input_features",anchor:"transformers.WhisperModel._mask_input_features",parameters:[{name:"input_features",val:": FloatTensor"},{name:"attention_mask",val:": typing.Optional[torch.LongTensor] = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/modeling_whisper.py#L1255"}}),mn=new R({}),un=new F({props:{name:"class transformers.WhisperForConditionalGeneration",anchor:"transformers.WhisperForConditionalGeneration",parameters:[{name:"config",val:": WhisperConfig"}],parametersDescription:[{anchor:"transformers.WhisperForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperConfig">WhisperConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/modeling_whisper.py#L1395"}}),yn=new F({props:{name:"forward",anchor:"transformers.WhisperForConditionalGeneration.forward",parameters:[{name:"input_features",val:": typing.Optional[torch.FloatTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.LongTensor] = 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[typing.Tuple[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.WhisperForConditionalGeneration.forward.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, feature_size, sequence_length)</code>) &#x2014;
Float values mel features extracted from the raw speech waveform. Raw speech waveform can be obtained by
loading a <code>.flac</code> or <code>.wav</code> audio file into an array of type <code>List[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em> via
the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_features</code>, the
<a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoFeatureExtractor">AutoFeatureExtractor</a> should be used for extracting the mel features, padding and conversion into a
tensor of type <code>torch.FloatTensor</code>. See <a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperFeatureExtractor.__call__"><strong>call</strong>()</a>`,name:"input_features"},{anchor:"transformers.WhisperForConditionalGeneration.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing <em>SpecAugment</em> data augmentation 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.WhisperForConditionalGeneration.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 <a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperTokenizer">WhisperTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>Whisper uses the <code>decoder_start_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.WhisperForConditionalGeneration.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_whisper._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 BART
paper</a> for more information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.WhisperForConditionalGeneration.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.WhisperForConditionalGeneration.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.WhisperForConditionalGeneration.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.WhisperForConditionalGeneration.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.WhisperForConditionalGeneration.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.WhisperForConditionalGeneration.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.WhisperForConditionalGeneration.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.WhisperForConditionalGeneration.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.WhisperForConditionalGeneration.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.WhisperForConditionalGeneration.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.WhisperForConditionalGeneration.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the language modeling loss. Indices should either be in <code>[0, ..., config.vocab_size]</code>
or -100 (see <code>input_ids</code> docstring). Tokens with indices set to <code>-100</code> are ignored (masked), the loss is
only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/modeling_whisper.py#L1429",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperConfig"
>WhisperConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Language modeling loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),$t=new Fe({props:{$$slots:{default:[mg]},$$scope:{ctx:$}}}),Ft=new ue({props:{anchor:"transformers.WhisperForConditionalGeneration.forward.example",$$slots:{default:[ug]},$$scope:{ctx:$}}}),bn=new R({}),vn=new F({props:{name:"class transformers.WhisperForAudioClassification",anchor:"transformers.WhisperForAudioClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.WhisperForAudioClassification.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, feature_size, sequence_length)</code>) &#x2014;
Float values mel features extracted from the raw speech waveform. Raw speech waveform can be obtained by
loading a <code>.flac</code> or <code>.wav</code> audio file into an array of type <code>List[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em> via
the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_features</code>, the
<a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoFeatureExtractor">AutoFeatureExtractor</a> should be used for extracting the mel features, padding and conversion into a
tensor of type <code>torch.FloatTensor</code>. See <a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperFeatureExtractor.__call__"><strong>call</strong>()</a>`,name:"input_features"},{anchor:"transformers.WhisperForAudioClassification.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.WhisperForAudioClassification.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.`,name:"encoder_outputs"},{anchor:"transformers.WhisperForAudioClassification.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.WhisperForAudioClassification.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.WhisperForAudioClassification.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/modeling_whisper.py#L1846"}}),kn=new F({props:{name:"forward",anchor:"transformers.WhisperForAudioClassification.forward",parameters:[{name:"input_features",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_outputs",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = 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.WhisperForAudioClassification.forward.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, feature_size, sequence_length)</code>) &#x2014;
Float values mel features extracted from the raw speech waveform. Raw speech waveform can be obtained by
loading a <code>.flac</code> or <code>.wav</code> audio file into an array of type <code>List[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em> via
the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_features</code>, the
<a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoFeatureExtractor">AutoFeatureExtractor</a> should be used for extracting the mel features, padding and conversion into a
tensor of type <code>torch.FloatTensor</code>. See <a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperFeatureExtractor.__call__"><strong>call</strong>()</a>`,name:"input_features"},{anchor:"transformers.WhisperForAudioClassification.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.WhisperForAudioClassification.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.`,name:"encoder_outputs"},{anchor:"transformers.WhisperForAudioClassification.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.WhisperForAudioClassification.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.WhisperForAudioClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.WhisperForAudioClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/modeling_whisper.py#L1873",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperConfig"
>WhisperConfig</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 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),zt=new Fe({props:{$$slots:{default:[fg]},$$scope:{ctx:$}}}),jt=new ue({props:{anchor:"transformers.WhisperForAudioClassification.forward.example",$$slots:{default:[_g]},$$scope:{ctx:$}}}),wn=new R({}),Tn=new F({props:{name:"class transformers.TFWhisperModel",anchor:"transformers.TFWhisperModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFWhisperModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperConfig">WhisperConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/modeling_tf_whisper.py#L1093"}}),Fn=new F({props:{name:"call",anchor:"transformers.TFWhisperModel.call",parameters:[{name:"input_features",val:": TFModelInputType | 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:"decoder_position_ids",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:": Optional[Tuple[Tuple[Union[np.ndarray, tf.Tensor]]]] = None"},{name:"past_key_values",val:": Optional[Tuple[Tuple[Union[np.ndarray, tf.Tensor]]]] = None"},{name:"decoder_inputs_embeds",val:": Optional[Tuple[Union[np.ndarray, tf.Tensor]]] = 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"}],parametersDescription:[{anchor:"transformers.TFWhisperModel.call.input_features",description:`<strong>input_features</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, feature_size, sequence_length)</code>) &#x2014;
Float values of fbank features extracted from the raw speech waveform. Raw speech waveform can be obtained
by loading a <code>.flac</code> or <code>.wav</code> audio file into an array of type <code>List[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em>
via the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_features</code>, the
<a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoFeatureExtractor">AutoFeatureExtractor</a> should be used for extracting the fbank features, padding and conversion into a
tensor of type <code>tf.Tensor</code>. See <a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperFeatureExtractor.__call__"><strong>call</strong>()</a>`,name:"input_features"},{anchor:"transformers.TFWhisperModel.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 <code>SpeechToTextTokenizer</code>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>SpeechToText uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).`,name:"decoder_input_ids"},{anchor:"transformers.TFWhisperModel.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;
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_whisper._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.TFWhisperModel.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.TFWhisperModel.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.TFWhisperModel.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.TFWhisperModel.call.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(tf.Tensor)</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.TFWhisperModel.call.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(tf.Tensor))</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(tf.Tensor)</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.TFWhisperModel.call.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>tf.Tensor</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.TFWhisperModel.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.TFWhisperModel.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.`,name:"output_attentions"},{anchor:"transformers.TFWhisperModel.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.`,name:"output_hidden_states"},{anchor:"transformers.TFWhisperModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/modeling_tf_whisper.py#L1117",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqModelOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperConfig"
>WhisperConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the decoder of the model.</p>
<p>If <code>past_key_values</code> is used only the last hidden-state of the sequences of shape <code>(batch_size, 1, hidden_size)</code> is output.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</code>).</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) of the decoder that can be
used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqModelOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Ct=new Fe({props:{$$slots:{default:[gg]},$$scope:{ctx:$}}}),qt=new ue({props:{anchor:"transformers.TFWhisperModel.call.example",$$slots:{default:[yg]},$$scope:{ctx:$}}}),Mn=new R({}),zn=new F({props:{name:"class transformers.TFWhisperForConditionalGeneration",anchor:"transformers.TFWhisperForConditionalGeneration",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFWhisperForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperConfig">WhisperConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/modeling_tf_whisper.py#L1201"}}),qn=new F({props:{name:"call",anchor:"transformers.TFWhisperForConditionalGeneration.call",parameters:[{name:"input_features",val:": TFModelInputType | 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:"decoder_position_ids",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:": Optional[Tuple[Tuple[Union[np.ndarray, tf.Tensor]]]] = None"},{name:"past_key_values",val:": Optional[Tuple[Tuple[Union[np.ndarray, tf.Tensor]]]] = None"},{name:"decoder_inputs_embeds",val:": Optional[Tuple[Union[np.ndarray, tf.Tensor]]] = 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:": bool = False"}],parametersDescription:[{anchor:"transformers.TFWhisperForConditionalGeneration.call.input_features",description:`<strong>input_features</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, feature_size, sequence_length)</code>) &#x2014;
Float values of fbank features extracted from the raw speech waveform. Raw speech waveform can be obtained
by loading a <code>.flac</code> or <code>.wav</code> audio file into an array of type <code>List[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em>
via the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_features</code>, the
<a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoFeatureExtractor">AutoFeatureExtractor</a> should be used for extracting the fbank features, padding and conversion into a
tensor of type <code>tf.Tensor</code>. See <a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperFeatureExtractor.__call__"><strong>call</strong>()</a>`,name:"input_features"},{anchor:"transformers.TFWhisperForConditionalGeneration.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 <code>SpeechToTextTokenizer</code>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>SpeechToText uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).`,name:"decoder_input_ids"},{anchor:"transformers.TFWhisperForConditionalGeneration.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;
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_whisper._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.TFWhisperForConditionalGeneration.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.TFWhisperForConditionalGeneration.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.TFWhisperForConditionalGeneration.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.TFWhisperForConditionalGeneration.call.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(tf.Tensor)</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.TFWhisperForConditionalGeneration.call.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(tf.Tensor))</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(tf.Tensor)</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.TFWhisperForConditionalGeneration.call.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>tf.Tensor</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.TFWhisperForConditionalGeneration.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.TFWhisperForConditionalGeneration.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.`,name:"output_attentions"},{anchor:"transformers.TFWhisperForConditionalGeneration.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.`,name:"output_hidden_states"},{anchor:"transformers.TFWhisperForConditionalGeneration.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.TFWhisperForConditionalGeneration.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 language modeling loss. Indices should either be in <code>[0, ..., config.vocab_size]</code>
or -100 (see <code>input_ids</code> docstring). Tokens with indices set to <code>-100</code> are ignored (masked), the loss is
only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/modeling_tf_whisper.py#L1232",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqLMOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqLMOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperConfig"
>WhisperConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of non-masked labels, returned when <code>labels</code> is provided) \u2014 Language modeling loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</code>).</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) of the decoder that can be
used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqLMOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),It=new Fe({props:{$$slots:{default:[bg]},$$scope:{ctx:$}}}),Gt=new ue({props:{anchor:"transformers.TFWhisperForConditionalGeneration.call.example",$$slots:{default:[vg]},$$scope:{ctx:$}}}),Jn=new R({}),In=new F({props:{name:"class transformers.FlaxWhisperModel",anchor:"transformers.FlaxWhisperModel",parameters:[{name:"config",val:": WhisperConfig"},{name:"input_shape",val:": typing.Tuple[int] = (1, 80, 3000)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxWhisperModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperConfig">WhisperConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxWhisperModel.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs). This can be used to enable mixed-precision training or half-precision
inference on GPUs or TPUs. If specified all the computation will be performed with the given <code>dtype</code>.
<strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong> If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a>
and <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/modeling_flax_whisper.py#L1165"}}),An=new F({props:{name:"__call__",anchor:"transformers.FlaxWhisperModel.__call__",parameters:[{name:"input_features",val:": Array"},{name:"decoder_input_ids",val:": Array"},{name:"attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"position_ids",val:": typing.Optional[jax.Array] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax.Array] = 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"},{name:"train",val:": bool = False"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"}],parametersDescription:[{anchor:"transformers.FlaxWhisperModel.__call__.input_features",description:`<strong>input_features</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, feature_size, sequence_length)</code>) &#x2014;
Float values mel features extracted from the raw speech waveform. Raw speech waveform can be obtained by
loading a <code>.flac</code> or <code>.wav</code> audio file into an array of type <code>List[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em> via
the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_features</code>, the
<a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperFeatureExtractor">WhisperFeatureExtractor</a> should be used for extracting the features, padding and conversion into a
tensor of type <code>numpy.ndarray</code>. See <a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperFeatureExtractor.__call__"><strong>call</strong>()</a>`,name:"input_features"},{anchor:"transformers.FlaxWhisperModel.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Whisper does not support masking of the <code>input_features</code>, this argument is preserved for compatibility, but
is not used. By default the silence in the input log mel spectrogram are ignored.`,name:"attention_mask"},{anchor:"transformers.FlaxWhisperModel.__call__.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary. Indices can be obtained using
<a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperTokenizer">WhisperTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.
<a href="../glossary#decoder-input-ids">What are decoder input IDs?</a> Whisper uses the <code>decoder_start_token_id</code> as
the starting token for <code>decoder_input_ids</code> generation.`,name:"decoder_input_ids"},{anchor:"transformers.FlaxWhisperModel.__call__.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>numpy.ndarray</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. If you want to change padding behavior, you should 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.FlaxWhisperModel.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Whisper does not use <code>position_ids</code> in the encoder as <code>input_features</code> is always the same size and doesn&#x2019;t
use masking, but this argument is preserved for compatibility. By default the silence in the input log mel
spectrogram are ignored.`,name:"position_ids"},{anchor:"transformers.FlaxWhisperModel.__call__.decoder_position_ids",description:`<strong>decoder_position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each decoder input sequence tokens in the position embeddings. Selected in the
range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"decoder_position_ids"},{anchor:"transformers.FlaxWhisperModel.__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.`,name:"output_attentions"},{anchor:"transformers.FlaxWhisperModel.__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.`,name:"output_hidden_states"},{anchor:"transformers.FlaxWhisperModel.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/modeling_flax_whisper.py#L1110",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperConfig"
>WhisperConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</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>tuple(tuple(jnp.ndarray))</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(jnp.ndarray)</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(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ut=new Fe({props:{$$slots:{default:[kg]},$$scope:{ctx:$}}}),Zt=new ue({props:{anchor:"transformers.FlaxWhisperModel.__call__.example",$$slots:{default:[wg]},$$scope:{ctx:$}}}),Rn=new R({}),Pn=new F({props:{name:"class transformers.FlaxWhisperForConditionalGeneration",anchor:"transformers.FlaxWhisperForConditionalGeneration",parameters:[{name:"config",val:": WhisperConfig"},{name:"input_shape",val:": typing.Tuple[int] = (1, 80, 3000)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxWhisperForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperConfig">WhisperConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxWhisperForConditionalGeneration.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs). This can be used to enable mixed-precision training or half-precision
inference on GPUs or TPUs. If specified all the computation will be performed with the given <code>dtype</code>.
<strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong> If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a>
and <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/modeling_flax_whisper.py#L1244"}}),Dn=new F({props:{name:"__call__",anchor:"transformers.FlaxWhisperForConditionalGeneration.__call__",parameters:[{name:"input_features",val:": Array"},{name:"decoder_input_ids",val:": Array"},{name:"attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"position_ids",val:": typing.Optional[jax.Array] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax.Array] = 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"},{name:"train",val:": bool = False"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"}],parametersDescription:[{anchor:"transformers.FlaxWhisperForConditionalGeneration.__call__.input_features",description:`<strong>input_features</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, feature_size, sequence_length)</code>) &#x2014;
Float values mel features extracted from the raw speech waveform. Raw speech waveform can be obtained by
loading a <code>.flac</code> or <code>.wav</code> audio file into an array of type <code>List[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em> via
the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_features</code>, the
<a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperFeatureExtractor">WhisperFeatureExtractor</a> should be used for extracting the features, padding and conversion into a
tensor of type <code>numpy.ndarray</code>. See <a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperFeatureExtractor.__call__"><strong>call</strong>()</a>`,name:"input_features"},{anchor:"transformers.FlaxWhisperForConditionalGeneration.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Whisper does not support masking of the <code>input_features</code>, this argument is preserved for compatibility, but
is not used. By default the silence in the input log mel spectrogram are ignored.`,name:"attention_mask"},{anchor:"transformers.FlaxWhisperForConditionalGeneration.__call__.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary. Indices can be obtained using
<a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperTokenizer">WhisperTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.
<a href="../glossary#decoder-input-ids">What are decoder input IDs?</a> Whisper uses the <code>decoder_start_token_id</code> as
the starting token for <code>decoder_input_ids</code> generation.`,name:"decoder_input_ids"},{anchor:"transformers.FlaxWhisperForConditionalGeneration.__call__.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>numpy.ndarray</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. If you want to change padding behavior, you should 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.FlaxWhisperForConditionalGeneration.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Whisper does not use <code>position_ids</code> in the encoder as <code>input_features</code> is always the same size and doesn&#x2019;t
use masking, but this argument is preserved for compatibility. By default the silence in the input log mel
spectrogram are ignored.`,name:"position_ids"},{anchor:"transformers.FlaxWhisperForConditionalGeneration.__call__.decoder_position_ids",description:`<strong>decoder_position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each decoder input sequence tokens in the position embeddings. Selected in the
range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"decoder_position_ids"},{anchor:"transformers.FlaxWhisperForConditionalGeneration.__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.`,name:"output_attentions"},{anchor:"transformers.FlaxWhisperForConditionalGeneration.__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.`,name:"output_hidden_states"},{anchor:"transformers.FlaxWhisperForConditionalGeneration.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/modeling_flax_whisper.py#L1110",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperConfig"
>WhisperConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</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(jnp.ndarray))</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(jnp.ndarray)</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(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),At=new Fe({props:{$$slots:{default:[Tg]},$$scope:{ctx:$}}}),Rt=new ue({props:{anchor:"transformers.FlaxWhisperForConditionalGeneration.__call__.example",$$slots:{default:[Wg]},$$scope:{ctx:$}}}),On=new R({}),Hn=new F({props:{name:"class transformers.FlaxWhisperForAudioClassification",anchor:"transformers.FlaxWhisperForAudioClassification",parameters:[{name:"config",val:": WhisperConfig"},{name:"input_shape",val:": typing.Tuple[int] = (1, 80, 3000)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxWhisperForAudioClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperConfig">WhisperConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxWhisperForAudioClassification.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs). This can be used to enable mixed-precision training or half-precision
inference on GPUs or TPUs. If specified all the computation will be performed with the given <code>dtype</code>.
<strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong> If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a>
and <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/modeling_flax_whisper.py#L1574"}}),ns=new F({props:{name:"__call__",anchor:"transformers.FlaxWhisperForAudioClassification.__call__",parameters:[{name:"input_features",val:": Array"},{name:"attention_mask",val:": typing.Optional[jax.Array] = 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"},{name:"train",val:": bool = False"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxWhisperForAudioClassification.__call__.input_features",description:`<strong>input_features</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, feature_size, sequence_length)</code>) &#x2014;
Float values mel features extracted from the raw speech waveform. Raw speech waveform can be obtained by
loading a <code>.flac</code> or <code>.wav</code> audio file into an array of type <code>List[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em> via
the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_features</code>, the
<a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperFeatureExtractor">WhisperFeatureExtractor</a> should be used for extracting the features, padding and conversion into a
tensor of type <code>numpy.ndarray</code>. See <a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperFeatureExtractor.__call__"><strong>call</strong>()</a>`,name:"input_features"},{anchor:"transformers.FlaxWhisperForAudioClassification.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Whisper does not support masking of the <code>input_features</code>, this argument is preserved for compatibility, but
is not used. By default the silence in the input log mel spectrogram are ignored.`,name:"attention_mask"},{anchor:"transformers.FlaxWhisperForAudioClassification.__call__.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary. Indices can be obtained using
<a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperTokenizer">WhisperTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.
<a href="../glossary#decoder-input-ids">What are decoder input IDs?</a> Whisper uses the <code>decoder_start_token_id</code> as
the starting token for <code>decoder_input_ids</code> generation.`,name:"decoder_input_ids"},{anchor:"transformers.FlaxWhisperForAudioClassification.__call__.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>numpy.ndarray</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. If you want to change padding behavior, you should 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.FlaxWhisperForAudioClassification.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Whisper does not use <code>position_ids</code> in the encoder as <code>input_features</code> is always the same size and doesn&#x2019;t
use masking, but this argument is preserved for compatibility. By default the silence in the input log mel
spectrogram are ignored.`,name:"position_ids"},{anchor:"transformers.FlaxWhisperForAudioClassification.__call__.decoder_position_ids",description:`<strong>decoder_position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each decoder input sequence tokens in the position embeddings. Selected in the
range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"decoder_position_ids"},{anchor:"transformers.FlaxWhisperForAudioClassification.__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.`,name:"output_attentions"},{anchor:"transformers.FlaxWhisperForAudioClassification.__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.`,name:"output_hidden_states"},{anchor:"transformers.FlaxWhisperForAudioClassification.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/modeling_flax_whisper.py#L1601",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperConfig"
>WhisperConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</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 model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Vt=new Fe({props:{$$slots:{default:[xg]},$$scope:{ctx:$}}}),St=new ue({props:{anchor:"transformers.FlaxWhisperForAudioClassification.__call__.example",$$slots:{default:[$g]},$$scope:{ctx:$}}}),{c(){c=n("meta"),b=p(),f=n("h1"),u=n("a"),g=n("span"),v(d.$$.fragment),m=p(),M=n("span"),Z=a("Whisper"),C=p(),J=n("h2"),q=n("a"),I=n("span"),v(ge.$$.fragment),ls=p(),tt=n("span"),md=a("Overview"),Ya=p(),ot=n("p"),ud=a("The Whisper model was proposed in "),ho=n("a"),fd=a("Robust Speech Recognition via Large-Scale Weak Supervision"),_d=a(" by Alec Radford, Jong Wook Kim, Tao Xu, Greg Brockman, Christine McLeavey, Ilya Sutskever."),Da=p(),cs=n("p"),gd=a("The abstract from the paper is the following:"),Oa=p(),ps=n("p"),ur=n("em"),yd=a("We study the capabilities of speech processing systems trained simply to predict large amounts of transcripts of audio on the internet. When scaled to 680,000 hours of multilingual and multitask supervision, the resulting models generalize well to standard benchmarks and are often competitive with prior fully supervised results but in a zeroshot transfer setting without the need for any finetuning. When compared to humans, the models approach their accuracy and robustness. We are releasing models and inference code to serve as a foundation for further work on robust speech processing."),Ha=p(),hs=n("p"),bd=a("Tips:"),Qa=p(),Q=n("ul"),fr=n("li"),vd=a("The model usually performs well without requiring any finetuning."),kd=p(),mo=n("li"),wd=a("The architecture follows a classic encoder-decoder architecture, which means that it relies on the "),ms=n("a"),Td=a("generate()"),Wd=a(" function for inference."),xd=p(),_r=n("li"),$d=a("Inference is currently only implemented for short-form i.e. audio is pre-segmented into <=30s segments. Long-form (including timestamps) will be implemented in a future release."),Fd=p(),uo=n("li"),Md=a("One can use "),us=n("a"),zd=a("WhisperProcessor"),jd=a(" to prepare audio for the model, and decode the predicted ID\u2019s back into text."),Ka=p(),K=n("p"),Ed=a("This model was contributed by "),fo=n("a"),Cd=a("Arthur Zucker"),qd=a(". The Tensorflow version of this model was contributed by "),_o=n("a"),Jd=a("amyeroberts"),Id=a(`.
The original code can be found `),go=n("a"),Gd=a("here"),Nd=a("."),ei=p(),Me=n("h2"),nt=n("a"),gr=n("span"),v(yo.$$.fragment),Ud=p(),yr=n("span"),Zd=a("WhisperConfig"),ti=p(),V=n("div"),v(bo.$$.fragment),Xd=p(),ze=n("p"),Ad=a("This is the configuration class to store the configuration of a "),fs=n("a"),Rd=a("WhisperModel"),Pd=a(`. It is used to instantiate a
Whisper 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 Whisper
`),vo=n("a"),Vd=a("openai/whisper-tiny"),Sd=a(" architecture."),Bd=p(),je=n("p"),Ld=a("Configuration objects inherit from "),_s=n("a"),Yd=a("PretrainedConfig"),Dd=a(` and can be used to control the model outputs. Read the
documentation from `),gs=n("a"),Od=a("PretrainedConfig"),Hd=a(" for more information."),Qd=p(),v(st.$$.fragment),oi=p(),Ee=n("h2"),rt=n("a"),br=n("span"),v(ko.$$.fragment),Kd=p(),vr=n("span"),el=a("WhisperTokenizer"),ni=p(),z=n("div"),v(wo.$$.fragment),tl=p(),kr=n("p"),ol=a("Construct a Whisper tokenizer."),nl=p(),To=n("p"),sl=a("This tokenizer inherits from "),ys=n("a"),rl=a("PreTrainedTokenizer"),al=a(` which contains some of the main methods. Users should refer to
the superclass for more information regarding such methods.`),il=p(),ye=n("div"),v(Wo.$$.fragment),dl=p(),wr=n("p"),ll=a("Override the prefix tokens appended to the start of the label sequence. This method can be used standalone to"),cl=p(),v(at.$$.fragment),pl=p(),it=n("div"),v(xo.$$.fragment),hl=p(),Tr=n("p"),ml=a("Build model inputs from a sequence by appending eos_token_id."),ul=p(),dt=n("div"),v($o.$$.fragment),fl=p(),Fo=n("p"),_l=a(`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Wr=n("code"),gl=a("prepare_for_model"),yl=a(" method."),bl=p(),be=n("div"),v(Mo.$$.fragment),vl=p(),bs=n("p"),kl=a("Create the token type IDs corresponding to the sequences passed. "),vs=n("a"),wl=a(`What are token type
IDs?`),Tl=p(),xr=n("p"),Wl=a("Should be overridden in a subclass if the model has a special way of building those."),xl=p(),ks=n("div"),v(zo.$$.fragment),si=p(),Ce=n("h2"),lt=n("a"),$r=n("span"),v(jo.$$.fragment),$l=p(),Fr=n("span"),Fl=a("WhisperTokenizerFast"),ri=p(),j=n("div"),v(Eo.$$.fragment),Ml=p(),Co=n("p"),zl=a("Construct a \u201Cfast\u201D Whisper tokenizer (backed by HuggingFace\u2019s "),Mr=n("em"),jl=a("tokenizers"),El=a(" library)."),Cl=p(),qo=n("p"),ql=a("This tokenizer inherits from "),ws=n("a"),Jl=a("PreTrainedTokenizerFast"),Il=a(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Gl=p(),ve=n("div"),v(Jo.$$.fragment),Nl=p(),zr=n("p"),Ul=a("Override the prefix tokens appended to the start of the label sequence. This method can be used standalone to"),Zl=p(),v(ct.$$.fragment),Xl=p(),pt=n("div"),v(Io.$$.fragment),Al=p(),jr=n("p"),Rl=a("Build model inputs from a sequence by appending eos_token_id."),Pl=p(),ht=n("div"),v(Go.$$.fragment),Vl=p(),No=n("p"),Sl=a(`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Er=n("code"),Bl=a("prepare_for_model"),Ll=a(" method."),Yl=p(),ke=n("div"),v(Uo.$$.fragment),Dl=p(),Ts=n("p"),Ol=a("Create the token type IDs corresponding to the sequences passed. "),Ws=n("a"),Hl=a(`What are token type
IDs?`),Ql=p(),Cr=n("p"),Kl=a("Should be overridden in a subclass if the model has a special way of building those."),ec=p(),xs=n("div"),v(Zo.$$.fragment),ai=p(),qe=n("h2"),mt=n("a"),qr=n("span"),v(Xo.$$.fragment),tc=p(),Jr=n("span"),oc=a("WhisperFeatureExtractor"),ii=p(),X=n("div"),v(Ao.$$.fragment),nc=p(),Ir=n("p"),sc=a("Constructs a Whisper feature extractor."),rc=p(),Ro=n("p"),ac=a("This feature extractor inherits from "),$s=n("a"),ic=a("SequenceFeatureExtractor"),dc=a(` which contains
most of the main methods. Users should refer to this superclass for more information regarding those methods.`),lc=p(),Je=n("p"),cc=a("This class extracts mel-filter bank features from raw speech using a custom numpy implementation of the "),Gr=n("code"),pc=a("Short Time Fourier Transform"),hc=a(" which should match pytorch\u2019s "),Nr=n("code"),mc=a("torch.stft"),uc=a(" equivalent."),fc=p(),ut=n("div"),v(Po.$$.fragment),_c=p(),Ur=n("p"),gc=a("Main method to featurize and prepare for the model one or several sequence(s)."),di=p(),Ie=n("h2"),ft=n("a"),Zr=n("span"),v(Vo.$$.fragment),yc=p(),Xr=n("span"),bc=a("WhisperProcessor"),li=p(),E=n("div"),v(So.$$.fragment),vc=p(),Ar=n("p"),kc=a(`Constructs a Whisper processor which wraps a Whisper feature extractor and a Whisper tokenizer into a single
processor.`),wc=p(),P=n("p"),Fs=n("a"),Tc=a("WhisperProcessor"),Wc=a(" offers all the functionalities of "),Ms=n("a"),xc=a("WhisperFeatureExtractor"),$c=a(" and "),zs=n("a"),Fc=a("WhisperTokenizer"),Mc=a(`. See
the `),Bo=n("a"),Rr=n("strong"),zc=a("call"),jc=a("()"),Ec=a(" and "),js=n("a"),Cc=a("decode()"),qc=a(" for more information."),Jc=p(),_t=n("div"),v(Lo.$$.fragment),Ic=p(),S=n("p"),Gc=a("Forwards the "),Pr=n("code"),Nc=a("audio"),Uc=a(" argument to WhisperFeatureExtractor\u2019s "),Yo=n("a"),Vr=n("strong"),Zc=a("call"),Xc=a("()"),Ac=a(" and the "),Sr=n("code"),Rc=a("text"),Pc=a(`
argument to `),Do=n("a"),Br=n("strong"),Vc=a("call"),Sc=a("()"),Bc=a(`. Please refer to the doctsring of the above two methods for more
information.`),Lc=p(),we=n("div"),v(Oo.$$.fragment),Yc=p(),Lr=n("p"),Dc=a("Instantiate a processor associated with a pretrained model."),Oc=p(),v(gt.$$.fragment),Hc=p(),Te=n("div"),v(Ho.$$.fragment),Qc=p(),Qo=n("p"),Kc=a(`Saves the attributes of this processor (feature extractor, tokenizer\u2026) in the specified directory so that it
can be reloaded using the `),Es=n("a"),ep=a("from_pretrained()"),tp=a(" method."),op=p(),v(yt.$$.fragment),np=p(),bt=n("div"),v(Ko.$$.fragment),sp=p(),en=n("p"),rp=a("This method forwards all its arguments to WhisperTokenizer\u2019s "),Cs=n("a"),ap=a("batch_decode()"),ip=a(`. Please
refer to the docstring of this method for more information.`),dp=p(),vt=n("div"),v(tn.$$.fragment),lp=p(),on=n("p"),cp=a("This method forwards all its arguments to WhisperTokenizer\u2019s "),qs=n("a"),pp=a("decode()"),hp=a(`. Please refer to
the docstring of this method for more information.`),ci=p(),Ge=n("h2"),kt=n("a"),Yr=n("span"),v(nn.$$.fragment),mp=p(),Dr=n("span"),up=a("WhisperModel"),pi=p(),A=n("div"),v(sn.$$.fragment),fp=p(),rn=n("p"),_p=a(`The bare Whisper Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Js=n("a"),gp=a("PreTrainedModel"),yp=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),bp=p(),an=n("p"),vp=a("This model is also a PyTorch "),dn=n("a"),kp=a("torch.nn.Module"),wp=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Tp=p(),ee=n("div"),v(ln.$$.fragment),Wp=p(),Ne=n("p"),xp=a("The "),Is=n("a"),$p=a("WhisperModel"),Fp=a(" forward method, overrides the "),Or=n("code"),Mp=a("__call__"),zp=a(" special method."),jp=p(),v(wt.$$.fragment),Ep=p(),v(Tt.$$.fragment),Cp=p(),Wt=n("div"),v(cn.$$.fragment),qp=p(),pn=n("p"),Jp=a(`Masks extracted features along time axis and/or along feature axis according to
`),hn=n("a"),Ip=a("SpecAugment"),Gp=a("."),hi=p(),Ue=n("h2"),xt=n("a"),Hr=n("span"),v(mn.$$.fragment),Np=p(),Qr=n("span"),Up=a("WhisperForConditionalGeneration"),mi=p(),B=n("div"),v(un.$$.fragment),Zp=p(),fn=n("p"),Xp=a(`The Whisper Model with a language modeling head. Can be used for automatic speech recognition.
This model inherits from `),Gs=n("a"),Ap=a("PreTrainedModel"),Rp=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Pp=p(),_n=n("p"),Vp=a("This model is also a PyTorch "),gn=n("a"),Sp=a("torch.nn.Module"),Bp=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Lp=p(),te=n("div"),v(yn.$$.fragment),Yp=p(),Ze=n("p"),Dp=a("The "),Ns=n("a"),Op=a("WhisperForConditionalGeneration"),Hp=a(" forward method, overrides the "),Kr=n("code"),Qp=a("__call__"),Kp=a(" special method."),eh=p(),v($t.$$.fragment),th=p(),v(Ft.$$.fragment),ui=p(),Xe=n("h2"),Mt=n("a"),ea=n("span"),v(bn.$$.fragment),oh=p(),ta=n("span"),nh=a("WhisperForAudioClassification"),fi=p(),de=n("div"),v(vn.$$.fragment),sh=p(),oa=n("p"),rh=a(`Whisper Encoder Model with a sequence classification head on top (a linear layer over the pooled output) for tasks
like SUPERB Keyword Spotting.`),ah=p(),oe=n("div"),v(kn.$$.fragment),ih=p(),Ae=n("p"),dh=a("The "),Us=n("a"),lh=a("WhisperForAudioClassification"),ch=a(" forward method, overrides the "),na=n("code"),ph=a("__call__"),hh=a(" special method."),mh=p(),v(zt.$$.fragment),uh=p(),v(jt.$$.fragment),_i=p(),Re=n("h2"),Et=n("a"),sa=n("span"),v(wn.$$.fragment),fh=p(),ra=n("span"),_h=a("TFWhisperModel"),gi=p(),L=n("div"),v(Tn.$$.fragment),gh=p(),Wn=n("p"),yh=a(`The bare Whisper Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Zs=n("a"),bh=a("TFPreTrainedModel"),vh=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),kh=p(),xn=n("p"),wh=a("This model is also a "),$n=n("a"),Th=a("tf.keras.Model"),Wh=a(` 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.`),xh=p(),ne=n("div"),v(Fn.$$.fragment),$h=p(),Pe=n("p"),Fh=a("The "),Xs=n("a"),Mh=a("TFWhisperModel"),zh=a(" forward method, overrides the "),aa=n("code"),jh=a("__call__"),Eh=a(" special method."),Ch=p(),v(Ct.$$.fragment),qh=p(),v(qt.$$.fragment),yi=p(),Ve=n("h2"),Jt=n("a"),ia=n("span"),v(Mn.$$.fragment),Jh=p(),da=n("span"),Ih=a("TFWhisperForConditionalGeneration"),bi=p(),Y=n("div"),v(zn.$$.fragment),Gh=p(),jn=n("p"),Nh=a(`The Whisper Model with a language modeling head. Can be used for automatic speech recognition.
This model inherits from `),As=n("a"),Uh=a("TFPreTrainedModel"),Zh=a(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Xh=p(),En=n("p"),Ah=a("This model is also a "),Cn=n("a"),Rh=a("tf.keras.Model"),Ph=a(` 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.`),Vh=p(),se=n("div"),v(qn.$$.fragment),Sh=p(),Se=n("p"),Bh=a("The "),Rs=n("a"),Lh=a("TFWhisperForConditionalGeneration"),Yh=a(" forward method, overrides the "),la=n("code"),Dh=a("__call__"),Oh=a(" special method."),Hh=p(),v(It.$$.fragment),Qh=p(),v(Gt.$$.fragment),vi=p(),Be=n("h2"),Nt=n("a"),ca=n("span"),v(Jn.$$.fragment),Kh=p(),pa=n("span"),em=a("FlaxWhisperModel"),ki=p(),D=n("div"),v(In.$$.fragment),tm=p(),Le=n("p"),om=a(`The bare Whisper Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),Ps=n("a"),nm=a("FlaxPreTrainedModel"),sm=a(`. Check the superclass documentation for the generic methods the
library implements for all its models (such as downloading or saving, resizing the input embeddings, pruning heads
etc.) This model is also a Flax Linen
`),Gn=n("a"),rm=a("flax.nn.Module"),am=a(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.
Finally, this model supports inherent JAX features such as:`),im=p(),le=n("ul"),ha=n("li"),Nn=n("a"),dm=a("Just-In-Time (JIT) compilation"),lm=p(),ma=n("li"),Un=n("a"),cm=a("Automatic Differentiation"),pm=p(),ua=n("li"),Zn=n("a"),hm=a("Vectorization"),mm=p(),fa=n("li"),Xn=n("a"),um=a("Parallelization"),fm=p(),re=n("div"),v(An.$$.fragment),_m=p(),Ye=n("p"),gm=a("The "),_a=n("code"),ym=a("FlaxWhisperPreTrainedModel"),bm=a(" forward method, overrides the "),ga=n("code"),vm=a("__call__"),km=a(" special method."),wm=p(),v(Ut.$$.fragment),Tm=p(),v(Zt.$$.fragment),wi=p(),De=n("h2"),Xt=n("a"),ya=n("span"),v(Rn.$$.fragment),Wm=p(),ba=n("span"),xm=a("FlaxWhisperForConditionalGeneration"),Ti=p(),O=n("div"),v(Pn.$$.fragment),$m=p(),Oe=n("p"),Fm=a(`The Whisper Model with a language modeling head.
This model inherits from `),Vs=n("a"),Mm=a("FlaxPreTrainedModel"),zm=a(`. Check the superclass documentation for the generic methods the
library implements for all its models (such as downloading or saving, resizing the input embeddings, pruning heads
etc.) This model is also a Flax Linen
`),Vn=n("a"),jm=a("flax.nn.Module"),Em=a(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.
Finally, this model supports inherent JAX features such as:`),Cm=p(),ce=n("ul"),va=n("li"),Sn=n("a"),qm=a("Just-In-Time (JIT) compilation"),Jm=p(),ka=n("li"),Bn=n("a"),Im=a("Automatic Differentiation"),Gm=p(),wa=n("li"),Ln=n("a"),Nm=a("Vectorization"),Um=p(),Ta=n("li"),Yn=n("a"),Zm=a("Parallelization"),Xm=p(),ae=n("div"),v(Dn.$$.fragment),Am=p(),He=n("p"),Rm=a("The "),Wa=n("code"),Pm=a("FlaxWhisperPreTrainedModel"),Vm=a(" forward method, overrides the "),xa=n("code"),Sm=a("__call__"),Bm=a(" special method."),Lm=p(),v(At.$$.fragment),Ym=p(),v(Rt.$$.fragment),Wi=p(),Qe=n("h2"),Pt=n("a"),$a=n("span"),v(On.$$.fragment),Dm=p(),Fa=n("span"),Om=a("FlaxWhisperForAudioClassification"),xi=p(),H=n("div"),v(Hn.$$.fragment),Hm=p(),Ke=n("p"),Qm=a(`The Whisper Model with an audio classification head on top.
This model inherits from `),Ss=n("a"),Km=a("FlaxPreTrainedModel"),eu=a(`. Check the superclass documentation for the generic methods the
library implements for all its models (such as downloading or saving, resizing the input embeddings, pruning heads
etc.) This model is also a Flax Linen
`),Qn=n("a"),tu=a("flax.nn.Module"),ou=a(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.
Finally, this model supports inherent JAX features such as:`),nu=p(),pe=n("ul"),Ma=n("li"),Kn=n("a"),su=a("Just-In-Time (JIT) compilation"),ru=p(),za=n("li"),es=n("a"),au=a("Automatic Differentiation"),iu=p(),ja=n("li"),ts=n("a"),du=a("Vectorization"),lu=p(),Ea=n("li"),os=n("a"),cu=a("Parallelization"),pu=p(),ie=n("div"),v(ns.$$.fragment),hu=p(),et=n("p"),mu=a("The "),Bs=n("a"),uu=a("FlaxWhisperForAudioClassification"),fu=a(" forward method, overrides the "),Ca=n("code"),_u=a("__call__"),gu=a(" special method."),yu=p(),v(Vt.$$.fragment),bu=p(),v(St.$$.fragment),this.h()},l(o){const _=sg('[data-svelte="svelte-1phssyn"]',document.head);c=s(_,"META",{name:!0,content:!0}),_.forEach(t),b=h(o),f=s(o,"H1",{class:!0});var ss=r(f);u=s(ss,"A",{id:!0,class:!0,href:!0});var qa=r(u);g=s(qa,"SPAN",{});var Ja=r(g);k(d.$$.fragment,Ja),Ja.forEach(t),qa.forEach(t),m=h(ss),M=s(ss,"SPAN",{});var Ia=r(M);Z=i(Ia,"Whisper"),Ia.forEach(t),ss.forEach(t),C=h(o),J=s(o,"H2",{class:!0});var rs=r(J);q=s(rs,"A",{id:!0,class:!0,href:!0});var Ga=r(q);I=s(Ga,"SPAN",{});var Na=r(I);k(ge.$$.fragment,Na),Na.forEach(t),Ga.forEach(t),ls=h(rs),tt=s(rs,"SPAN",{});var Ua=r(tt);md=i(Ua,"Overview"),Ua.forEach(t),rs.forEach(t),Ya=h(o),ot=s(o,"P",{});var as=r(ot);ud=i(as,"The Whisper model was proposed in "),ho=s(as,"A",{href:!0,rel:!0});var Za=r(ho);fd=i(Za,"Robust Speech Recognition via Large-Scale Weak Supervision"),Za.forEach(t),_d=i(as," by Alec Radford, Jong Wook Kim, Tao Xu, Greg Brockman, Christine McLeavey, Ilya Sutskever."),as.forEach(t),Da=h(o),cs=s(o,"P",{});var Xa=r(cs);gd=i(Xa,"The abstract from the paper is the following:"),Xa.forEach(t),Oa=h(o),ps=s(o,"P",{});var Aa=r(ps);ur=s(Aa,"EM",{});var Ra=r(ur);yd=i(Ra,"We study the capabilities of speech processing systems trained simply to predict large amounts of transcripts of audio on the internet. When scaled to 680,000 hours of multilingual and multitask supervision, the resulting models generalize well to standard benchmarks and are often competitive with prior fully supervised results but in a zeroshot transfer setting without the need for any finetuning. When compared to humans, the models approach their accuracy and robustness. We are releasing models and inference code to serve as a foundation for further work on robust speech processing."),Ra.forEach(t),Aa.forEach(t),Ha=h(o),hs=s(o,"P",{});var Pa=r(hs);bd=i(Pa,"Tips:"),Pa.forEach(t),Qa=h(o),Q=s(o,"UL",{});var he=r(Q);fr=s(he,"LI",{});var Va=r(fr);vd=i(Va,"The model usually performs well without requiring any finetuning."),Va.forEach(t),kd=h(he),mo=s(he,"LI",{});var is=r(mo);wd=i(is,"The architecture follows a classic encoder-decoder architecture, which means that it relies on the "),ms=s(is,"A",{href:!0});var Sa=r(ms);Td=i(Sa,"generate()"),Sa.forEach(t),Wd=i(is," function for inference."),is.forEach(t),xd=h(he),_r=s(he,"LI",{});var Ba=r(_r);$d=i(Ba,"Inference is currently only implemented for short-form i.e. audio is pre-segmented into <=30s segments. Long-form (including timestamps) will be implemented in a future release."),Ba.forEach(t),Fd=h(he),uo=s(he,"LI",{});var ds=r(uo);Md=i(ds,"One can use "),us=s(ds,"A",{href:!0});var La=r(us);zd=i(La,"WhisperProcessor"),La.forEach(t),jd=i(ds," to prepare audio for the model, and decode the predicted ID\u2019s back into text."),ds.forEach(t),he.forEach(t),Ka=h(o),K=s(o,"P",{});var Bt=r(K);Ed=i(Bt,"This model was contributed by "),fo=s(Bt,"A",{href:!0,rel:!0});var xu=r(fo);Cd=i(xu,"Arthur Zucker"),xu.forEach(t),qd=i(Bt,". The Tensorflow version of this model was contributed by "),_o=s(Bt,"A",{href:!0,rel:!0});var $u=r(_o);Jd=i($u,"amyeroberts"),$u.forEach(t),Id=i(Bt,`.
The original code can be found `),go=s(Bt,"A",{href:!0,rel:!0});var Fu=r(go);Gd=i(Fu,"here"),Fu.forEach(t),Nd=i(Bt,"."),Bt.forEach(t),ei=h(o),Me=s(o,"H2",{class:!0});var Fi=r(Me);nt=s(Fi,"A",{id:!0,class:!0,href:!0});var Mu=r(nt);gr=s(Mu,"SPAN",{});var zu=r(gr);k(yo.$$.fragment,zu),zu.forEach(t),Mu.forEach(t),Ud=h(Fi),yr=s(Fi,"SPAN",{});var ju=r(yr);Zd=i(ju,"WhisperConfig"),ju.forEach(t),Fi.forEach(t),ti=h(o),V=s(o,"DIV",{class:!0});var Lt=r(V);k(bo.$$.fragment,Lt),Xd=h(Lt),ze=s(Lt,"P",{});var Ls=r(ze);Ad=i(Ls,"This is the configuration class to store the configuration of a "),fs=s(Ls,"A",{href:!0});var Eu=r(fs);Rd=i(Eu,"WhisperModel"),Eu.forEach(t),Pd=i(Ls,`. It is used to instantiate a
Whisper 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 Whisper
`),vo=s(Ls,"A",{href:!0,rel:!0});var Cu=r(vo);Vd=i(Cu,"openai/whisper-tiny"),Cu.forEach(t),Sd=i(Ls," architecture."),Ls.forEach(t),Bd=h(Lt),je=s(Lt,"P",{});var Ys=r(je);Ld=i(Ys,"Configuration objects inherit from "),_s=s(Ys,"A",{href:!0});var qu=r(_s);Yd=i(qu,"PretrainedConfig"),qu.forEach(t),Dd=i(Ys,` and can be used to control the model outputs. Read the
documentation from `),gs=s(Ys,"A",{href:!0});var Ju=r(gs);Od=i(Ju,"PretrainedConfig"),Ju.forEach(t),Hd=i(Ys," for more information."),Ys.forEach(t),Qd=h(Lt),k(st.$$.fragment,Lt),Lt.forEach(t),oi=h(o),Ee=s(o,"H2",{class:!0});var Mi=r(Ee);rt=s(Mi,"A",{id:!0,class:!0,href:!0});var Iu=r(rt);br=s(Iu,"SPAN",{});var Gu=r(br);k(ko.$$.fragment,Gu),Gu.forEach(t),Iu.forEach(t),Kd=h(Mi),vr=s(Mi,"SPAN",{});var Nu=r(vr);el=i(Nu,"WhisperTokenizer"),Nu.forEach(t),Mi.forEach(t),ni=h(o),z=s(o,"DIV",{class:!0});var G=r(z);k(wo.$$.fragment,G),tl=h(G),kr=s(G,"P",{});var Uu=r(kr);ol=i(Uu,"Construct a Whisper tokenizer."),Uu.forEach(t),nl=h(G),To=s(G,"P",{});var zi=r(To);sl=i(zi,"This tokenizer inherits from "),ys=s(zi,"A",{href:!0});var Zu=r(ys);rl=i(Zu,"PreTrainedTokenizer"),Zu.forEach(t),al=i(zi,` which contains some of the main methods. Users should refer to
the superclass for more information regarding such methods.`),zi.forEach(t),il=h(G),ye=s(G,"DIV",{class:!0});var Ds=r(ye);k(Wo.$$.fragment,Ds),dl=h(Ds),wr=s(Ds,"P",{});var Xu=r(wr);ll=i(Xu,"Override the prefix tokens appended to the start of the label sequence. This method can be used standalone to"),Xu.forEach(t),cl=h(Ds),k(at.$$.fragment,Ds),Ds.forEach(t),pl=h(G),it=s(G,"DIV",{class:!0});var ji=r(it);k(xo.$$.fragment,ji),hl=h(ji),Tr=s(ji,"P",{});var Au=r(Tr);ml=i(Au,"Build model inputs from a sequence by appending eos_token_id."),Au.forEach(t),ji.forEach(t),ul=h(G),dt=s(G,"DIV",{class:!0});var Ei=r(dt);k($o.$$.fragment,Ei),fl=h(Ei),Fo=s(Ei,"P",{});var Ci=r(Fo);_l=i(Ci,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Wr=s(Ci,"CODE",{});var Ru=r(Wr);gl=i(Ru,"prepare_for_model"),Ru.forEach(t),yl=i(Ci," method."),Ci.forEach(t),Ei.forEach(t),bl=h(G),be=s(G,"DIV",{class:!0});var Os=r(be);k(Mo.$$.fragment,Os),vl=h(Os),bs=s(Os,"P",{});var vu=r(bs);kl=i(vu,"Create the token type IDs corresponding to the sequences passed. "),vs=s(vu,"A",{href:!0});var Pu=r(vs);wl=i(Pu,`What are token type
IDs?`),Pu.forEach(t),vu.forEach(t),Tl=h(Os),xr=s(Os,"P",{});var Vu=r(xr);Wl=i(Vu,"Should be overridden in a subclass if the model has a special way of building those."),Vu.forEach(t),Os.forEach(t),xl=h(G),ks=s(G,"DIV",{class:!0});var Su=r(ks);k(zo.$$.fragment,Su),Su.forEach(t),G.forEach(t),si=h(o),Ce=s(o,"H2",{class:!0});var qi=r(Ce);lt=s(qi,"A",{id:!0,class:!0,href:!0});var Bu=r(lt);$r=s(Bu,"SPAN",{});var Lu=r($r);k(jo.$$.fragment,Lu),Lu.forEach(t),Bu.forEach(t),$l=h(qi),Fr=s(qi,"SPAN",{});var Yu=r(Fr);Fl=i(Yu,"WhisperTokenizerFast"),Yu.forEach(t),qi.forEach(t),ri=h(o),j=s(o,"DIV",{class:!0});var N=r(j);k(Eo.$$.fragment,N),Ml=h(N),Co=s(N,"P",{});var Ji=r(Co);zl=i(Ji,"Construct a \u201Cfast\u201D Whisper tokenizer (backed by HuggingFace\u2019s "),Mr=s(Ji,"EM",{});var Du=r(Mr);jl=i(Du,"tokenizers"),Du.forEach(t),El=i(Ji," library)."),Ji.forEach(t),Cl=h(N),qo=s(N,"P",{});var Ii=r(qo);ql=i(Ii,"This tokenizer inherits from "),ws=s(Ii,"A",{href:!0});var Ou=r(ws);Jl=i(Ou,"PreTrainedTokenizerFast"),Ou.forEach(t),Il=i(Ii,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Ii.forEach(t),Gl=h(N),ve=s(N,"DIV",{class:!0});var Hs=r(ve);k(Jo.$$.fragment,Hs),Nl=h(Hs),zr=s(Hs,"P",{});var Hu=r(zr);Ul=i(Hu,"Override the prefix tokens appended to the start of the label sequence. This method can be used standalone to"),Hu.forEach(t),Zl=h(Hs),k(ct.$$.fragment,Hs),Hs.forEach(t),Xl=h(N),pt=s(N,"DIV",{class:!0});var Gi=r(pt);k(Io.$$.fragment,Gi),Al=h(Gi),jr=s(Gi,"P",{});var Qu=r(jr);Rl=i(Qu,"Build model inputs from a sequence by appending eos_token_id."),Qu.forEach(t),Gi.forEach(t),Pl=h(N),ht=s(N,"DIV",{class:!0});var Ni=r(ht);k(Go.$$.fragment,Ni),Vl=h(Ni),No=s(Ni,"P",{});var Ui=r(No);Sl=i(Ui,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Er=s(Ui,"CODE",{});var Ku=r(Er);Bl=i(Ku,"prepare_for_model"),Ku.forEach(t),Ll=i(Ui," method."),Ui.forEach(t),Ni.forEach(t),Yl=h(N),ke=s(N,"DIV",{class:!0});var Qs=r(ke);k(Uo.$$.fragment,Qs),Dl=h(Qs),Ts=s(Qs,"P",{});var ku=r(Ts);Ol=i(ku,"Create the token type IDs corresponding to the sequences passed. "),Ws=s(ku,"A",{href:!0});var ef=r(Ws);Hl=i(ef,`What are token type
IDs?`),ef.forEach(t),ku.forEach(t),Ql=h(Qs),Cr=s(Qs,"P",{});var tf=r(Cr);Kl=i(tf,"Should be overridden in a subclass if the model has a special way of building those."),tf.forEach(t),Qs.forEach(t),ec=h(N),xs=s(N,"DIV",{class:!0});var of=r(xs);k(Zo.$$.fragment,of),of.forEach(t),N.forEach(t),ai=h(o),qe=s(o,"H2",{class:!0});var Zi=r(qe);mt=s(Zi,"A",{id:!0,class:!0,href:!0});var nf=r(mt);qr=s(nf,"SPAN",{});var sf=r(qr);k(Xo.$$.fragment,sf),sf.forEach(t),nf.forEach(t),tc=h(Zi),Jr=s(Zi,"SPAN",{});var rf=r(Jr);oc=i(rf,"WhisperFeatureExtractor"),rf.forEach(t),Zi.forEach(t),ii=h(o),X=s(o,"DIV",{class:!0});var We=r(X);k(Ao.$$.fragment,We),nc=h(We),Ir=s(We,"P",{});var af=r(Ir);sc=i(af,"Constructs a Whisper feature extractor."),af.forEach(t),rc=h(We),Ro=s(We,"P",{});var Xi=r(Ro);ac=i(Xi,"This feature extractor inherits from "),$s=s(Xi,"A",{href:!0});var df=r($s);ic=i(df,"SequenceFeatureExtractor"),df.forEach(t),dc=i(Xi,` which contains
most of the main methods. Users should refer to this superclass for more information regarding those methods.`),Xi.forEach(t),lc=h(We),Je=s(We,"P",{});var Ks=r(Je);cc=i(Ks,"This class extracts mel-filter bank features from raw speech using a custom numpy implementation of the "),Gr=s(Ks,"CODE",{});var lf=r(Gr);pc=i(lf,"Short Time Fourier Transform"),lf.forEach(t),hc=i(Ks," which should match pytorch\u2019s "),Nr=s(Ks,"CODE",{});var cf=r(Nr);mc=i(cf,"torch.stft"),cf.forEach(t),uc=i(Ks," equivalent."),Ks.forEach(t),fc=h(We),ut=s(We,"DIV",{class:!0});var Ai=r(ut);k(Po.$$.fragment,Ai),_c=h(Ai),Ur=s(Ai,"P",{});var pf=r(Ur);gc=i(pf,"Main method to featurize and prepare for the model one or several sequence(s)."),pf.forEach(t),Ai.forEach(t),We.forEach(t),di=h(o),Ie=s(o,"H2",{class:!0});var Ri=r(Ie);ft=s(Ri,"A",{id:!0,class:!0,href:!0});var hf=r(ft);Zr=s(hf,"SPAN",{});var mf=r(Zr);k(Vo.$$.fragment,mf),mf.forEach(t),hf.forEach(t),yc=h(Ri),Xr=s(Ri,"SPAN",{});var uf=r(Xr);bc=i(uf,"WhisperProcessor"),uf.forEach(t),Ri.forEach(t),li=h(o),E=s(o,"DIV",{class:!0});var U=r(E);k(So.$$.fragment,U),vc=h(U),Ar=s(U,"P",{});var ff=r(Ar);kc=i(ff,`Constructs a Whisper processor which wraps a Whisper feature extractor and a Whisper tokenizer into a single
processor.`),ff.forEach(t),wc=h(U),P=s(U,"P",{});var me=r(P);Fs=s(me,"A",{href:!0});var _f=r(Fs);Tc=i(_f,"WhisperProcessor"),_f.forEach(t),Wc=i(me," offers all the functionalities of "),Ms=s(me,"A",{href:!0});var gf=r(Ms);xc=i(gf,"WhisperFeatureExtractor"),gf.forEach(t),$c=i(me," and "),zs=s(me,"A",{href:!0});var yf=r(zs);Fc=i(yf,"WhisperTokenizer"),yf.forEach(t),Mc=i(me,`. See
the `),Bo=s(me,"A",{href:!0});var wu=r(Bo);Rr=s(wu,"STRONG",{});var bf=r(Rr);zc=i(bf,"call"),bf.forEach(t),jc=i(wu,"()"),wu.forEach(t),Ec=i(me," and "),js=s(me,"A",{href:!0});var vf=r(js);Cc=i(vf,"decode()"),vf.forEach(t),qc=i(me," for more information."),me.forEach(t),Jc=h(U),_t=s(U,"DIV",{class:!0});var Pi=r(_t);k(Lo.$$.fragment,Pi),Ic=h(Pi),S=s(Pi,"P",{});var xe=r(S);Gc=i(xe,"Forwards the "),Pr=s(xe,"CODE",{});var kf=r(Pr);Nc=i(kf,"audio"),kf.forEach(t),Uc=i(xe," argument to WhisperFeatureExtractor\u2019s "),Yo=s(xe,"A",{href:!0});var Tu=r(Yo);Vr=s(Tu,"STRONG",{});var wf=r(Vr);Zc=i(wf,"call"),wf.forEach(t),Xc=i(Tu,"()"),Tu.forEach(t),Ac=i(xe," and the "),Sr=s(xe,"CODE",{});var Tf=r(Sr);Rc=i(Tf,"text"),Tf.forEach(t),Pc=i(xe,`
argument to `),Do=s(xe,"A",{href:!0});var Wu=r(Do);Br=s(Wu,"STRONG",{});var Wf=r(Br);Vc=i(Wf,"call"),Wf.forEach(t),Sc=i(Wu,"()"),Wu.forEach(t),Bc=i(xe,`. Please refer to the doctsring of the above two methods for more
information.`),xe.forEach(t),Pi.forEach(t),Lc=h(U),we=s(U,"DIV",{class:!0});var er=r(we);k(Oo.$$.fragment,er),Yc=h(er),Lr=s(er,"P",{});var xf=r(Lr);Dc=i(xf,"Instantiate a processor associated with a pretrained model."),xf.forEach(t),Oc=h(er),k(gt.$$.fragment,er),er.forEach(t),Hc=h(U),Te=s(U,"DIV",{class:!0});var tr=r(Te);k(Ho.$$.fragment,tr),Qc=h(tr),Qo=s(tr,"P",{});var Vi=r(Qo);Kc=i(Vi,`Saves the attributes of this processor (feature extractor, tokenizer\u2026) in the specified directory so that it
can be reloaded using the `),Es=s(Vi,"A",{href:!0});var $f=r(Es);ep=i($f,"from_pretrained()"),$f.forEach(t),tp=i(Vi," method."),Vi.forEach(t),op=h(tr),k(yt.$$.fragment,tr),tr.forEach(t),np=h(U),bt=s(U,"DIV",{class:!0});var Si=r(bt);k(Ko.$$.fragment,Si),sp=h(Si),en=s(Si,"P",{});var Bi=r(en);rp=i(Bi,"This method forwards all its arguments to WhisperTokenizer\u2019s "),Cs=s(Bi,"A",{href:!0});var Ff=r(Cs);ap=i(Ff,"batch_decode()"),Ff.forEach(t),ip=i(Bi,`. Please
refer to the docstring of this method for more information.`),Bi.forEach(t),Si.forEach(t),dp=h(U),vt=s(U,"DIV",{class:!0});var Li=r(vt);k(tn.$$.fragment,Li),lp=h(Li),on=s(Li,"P",{});var Yi=r(on);cp=i(Yi,"This method forwards all its arguments to WhisperTokenizer\u2019s "),qs=s(Yi,"A",{href:!0});var Mf=r(qs);pp=i(Mf,"decode()"),Mf.forEach(t),hp=i(Yi,`. Please refer to
the docstring of this method for more information.`),Yi.forEach(t),Li.forEach(t),U.forEach(t),ci=h(o),Ge=s(o,"H2",{class:!0});var Di=r(Ge);kt=s(Di,"A",{id:!0,class:!0,href:!0});var zf=r(kt);Yr=s(zf,"SPAN",{});var jf=r(Yr);k(nn.$$.fragment,jf),jf.forEach(t),zf.forEach(t),mp=h(Di),Dr=s(Di,"SPAN",{});var Ef=r(Dr);up=i(Ef,"WhisperModel"),Ef.forEach(t),Di.forEach(t),pi=h(o),A=s(o,"DIV",{class:!0});var $e=r(A);k(sn.$$.fragment,$e),fp=h($e),rn=s($e,"P",{});var Oi=r(rn);_p=i(Oi,`The bare Whisper Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Js=s(Oi,"A",{href:!0});var Cf=r(Js);gp=i(Cf,"PreTrainedModel"),Cf.forEach(t),yp=i(Oi,`. 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.forEach(t),bp=h($e),an=s($e,"P",{});var Hi=r(an);vp=i(Hi,"This model is also a PyTorch "),dn=s(Hi,"A",{href:!0,rel:!0});var qf=r(dn);kp=i(qf,"torch.nn.Module"),qf.forEach(t),wp=i(Hi,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Hi.forEach(t),Tp=h($e),ee=s($e,"DIV",{class:!0});var Yt=r(ee);k(ln.$$.fragment,Yt),Wp=h(Yt),Ne=s(Yt,"P",{});var or=r(Ne);xp=i(or,"The "),Is=s(or,"A",{href:!0});var Jf=r(Is);$p=i(Jf,"WhisperModel"),Jf.forEach(t),Fp=i(or," forward method, overrides the "),Or=s(or,"CODE",{});var If=r(Or);Mp=i(If,"__call__"),If.forEach(t),zp=i(or," special method."),or.forEach(t),jp=h(Yt),k(wt.$$.fragment,Yt),Ep=h(Yt),k(Tt.$$.fragment,Yt),Yt.forEach(t),Cp=h($e),Wt=s($e,"DIV",{class:!0});var Qi=r(Wt);k(cn.$$.fragment,Qi),qp=h(Qi),pn=s(Qi,"P",{});var Ki=r(pn);Jp=i(Ki,`Masks extracted features along time axis and/or along feature axis according to
`),hn=s(Ki,"A",{href:!0,rel:!0});var Gf=r(hn);Ip=i(Gf,"SpecAugment"),Gf.forEach(t),Gp=i(Ki,"."),Ki.forEach(t),Qi.forEach(t),$e.forEach(t),hi=h(o),Ue=s(o,"H2",{class:!0});var ed=r(Ue);xt=s(ed,"A",{id:!0,class:!0,href:!0});var Nf=r(xt);Hr=s(Nf,"SPAN",{});var Uf=r(Hr);k(mn.$$.fragment,Uf),Uf.forEach(t),Nf.forEach(t),Np=h(ed),Qr=s(ed,"SPAN",{});var Zf=r(Qr);Up=i(Zf,"WhisperForConditionalGeneration"),Zf.forEach(t),ed.forEach(t),mi=h(o),B=s(o,"DIV",{class:!0});var Dt=r(B);k(un.$$.fragment,Dt),Zp=h(Dt),fn=s(Dt,"P",{});var td=r(fn);Xp=i(td,`The Whisper Model with a language modeling head. Can be used for automatic speech recognition.
This model inherits from `),Gs=s(td,"A",{href:!0});var Xf=r(Gs);Ap=i(Xf,"PreTrainedModel"),Xf.forEach(t),Rp=i(td,`. 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.)`),td.forEach(t),Pp=h(Dt),_n=s(Dt,"P",{});var od=r(_n);Vp=i(od,"This model is also a PyTorch "),gn=s(od,"A",{href:!0,rel:!0});var Af=r(gn);Sp=i(Af,"torch.nn.Module"),Af.forEach(t),Bp=i(od,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),od.forEach(t),Lp=h(Dt),te=s(Dt,"DIV",{class:!0});var Ot=r(te);k(yn.$$.fragment,Ot),Yp=h(Ot),Ze=s(Ot,"P",{});var nr=r(Ze);Dp=i(nr,"The "),Ns=s(nr,"A",{href:!0});var Rf=r(Ns);Op=i(Rf,"WhisperForConditionalGeneration"),Rf.forEach(t),Hp=i(nr," forward method, overrides the "),Kr=s(nr,"CODE",{});var Pf=r(Kr);Qp=i(Pf,"__call__"),Pf.forEach(t),Kp=i(nr," special method."),nr.forEach(t),eh=h(Ot),k($t.$$.fragment,Ot),th=h(Ot),k(Ft.$$.fragment,Ot),Ot.forEach(t),Dt.forEach(t),ui=h(o),Xe=s(o,"H2",{class:!0});var nd=r(Xe);Mt=s(nd,"A",{id:!0,class:!0,href:!0});var Vf=r(Mt);ea=s(Vf,"SPAN",{});var Sf=r(ea);k(bn.$$.fragment,Sf),Sf.forEach(t),Vf.forEach(t),oh=h(nd),ta=s(nd,"SPAN",{});var Bf=r(ta);nh=i(Bf,"WhisperForAudioClassification"),Bf.forEach(t),nd.forEach(t),fi=h(o),de=s(o,"DIV",{class:!0});var sr=r(de);k(vn.$$.fragment,sr),sh=h(sr),oa=s(sr,"P",{});var Lf=r(oa);rh=i(Lf,`Whisper Encoder Model with a sequence classification head on top (a linear layer over the pooled output) for tasks
like SUPERB Keyword Spotting.`),Lf.forEach(t),ah=h(sr),oe=s(sr,"DIV",{class:!0});var Ht=r(oe);k(kn.$$.fragment,Ht),ih=h(Ht),Ae=s(Ht,"P",{});var rr=r(Ae);dh=i(rr,"The "),Us=s(rr,"A",{href:!0});var Yf=r(Us);lh=i(Yf,"WhisperForAudioClassification"),Yf.forEach(t),ch=i(rr," forward method, overrides the "),na=s(rr,"CODE",{});var Df=r(na);ph=i(Df,"__call__"),Df.forEach(t),hh=i(rr," special method."),rr.forEach(t),mh=h(Ht),k(zt.$$.fragment,Ht),uh=h(Ht),k(jt.$$.fragment,Ht),Ht.forEach(t),sr.forEach(t),_i=h(o),Re=s(o,"H2",{class:!0});var sd=r(Re);Et=s(sd,"A",{id:!0,class:!0,href:!0});var Of=r(Et);sa=s(Of,"SPAN",{});var Hf=r(sa);k(wn.$$.fragment,Hf),Hf.forEach(t),Of.forEach(t),fh=h(sd),ra=s(sd,"SPAN",{});var Qf=r(ra);_h=i(Qf,"TFWhisperModel"),Qf.forEach(t),sd.forEach(t),gi=h(o),L=s(o,"DIV",{class:!0});var Qt=r(L);k(Tn.$$.fragment,Qt),gh=h(Qt),Wn=s(Qt,"P",{});var rd=r(Wn);yh=i(rd,`The bare Whisper Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Zs=s(rd,"A",{href:!0});var Kf=r(Zs);bh=i(Kf,"TFPreTrainedModel"),Kf.forEach(t),vh=i(rd,`. 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.)`),rd.forEach(t),kh=h(Qt),xn=s(Qt,"P",{});var ad=r(xn);wh=i(ad,"This model is also a "),$n=s(ad,"A",{href:!0,rel:!0});var e_=r($n);Th=i(e_,"tf.keras.Model"),e_.forEach(t),Wh=i(ad,` 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.`),ad.forEach(t),xh=h(Qt),ne=s(Qt,"DIV",{class:!0});var Kt=r(ne);k(Fn.$$.fragment,Kt),$h=h(Kt),Pe=s(Kt,"P",{});var ar=r(Pe);Fh=i(ar,"The "),Xs=s(ar,"A",{href:!0});var t_=r(Xs);Mh=i(t_,"TFWhisperModel"),t_.forEach(t),zh=i(ar," forward method, overrides the "),aa=s(ar,"CODE",{});var o_=r(aa);jh=i(o_,"__call__"),o_.forEach(t),Eh=i(ar," special method."),ar.forEach(t),Ch=h(Kt),k(Ct.$$.fragment,Kt),qh=h(Kt),k(qt.$$.fragment,Kt),Kt.forEach(t),Qt.forEach(t),yi=h(o),Ve=s(o,"H2",{class:!0});var id=r(Ve);Jt=s(id,"A",{id:!0,class:!0,href:!0});var n_=r(Jt);ia=s(n_,"SPAN",{});var s_=r(ia);k(Mn.$$.fragment,s_),s_.forEach(t),n_.forEach(t),Jh=h(id),da=s(id,"SPAN",{});var r_=r(da);Ih=i(r_,"TFWhisperForConditionalGeneration"),r_.forEach(t),id.forEach(t),bi=h(o),Y=s(o,"DIV",{class:!0});var eo=r(Y);k(zn.$$.fragment,eo),Gh=h(eo),jn=s(eo,"P",{});var dd=r(jn);Nh=i(dd,`The Whisper Model with a language modeling head. Can be used for automatic speech recognition.
This model inherits from `),As=s(dd,"A",{href:!0});var a_=r(As);Uh=i(a_,"TFPreTrainedModel"),a_.forEach(t),Zh=i(dd,`. 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.)`),dd.forEach(t),Xh=h(eo),En=s(eo,"P",{});var ld=r(En);Ah=i(ld,"This model is also a "),Cn=s(ld,"A",{href:!0,rel:!0});var i_=r(Cn);Rh=i(i_,"tf.keras.Model"),i_.forEach(t),Ph=i(ld,` 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.`),ld.forEach(t),Vh=h(eo),se=s(eo,"DIV",{class:!0});var to=r(se);k(qn.$$.fragment,to),Sh=h(to),Se=s(to,"P",{});var ir=r(Se);Bh=i(ir,"The "),Rs=s(ir,"A",{href:!0});var d_=r(Rs);Lh=i(d_,"TFWhisperForConditionalGeneration"),d_.forEach(t),Yh=i(ir," forward method, overrides the "),la=s(ir,"CODE",{});var l_=r(la);Dh=i(l_,"__call__"),l_.forEach(t),Oh=i(ir," special method."),ir.forEach(t),Hh=h(to),k(It.$$.fragment,to),Qh=h(to),k(Gt.$$.fragment,to),to.forEach(t),eo.forEach(t),vi=h(o),Be=s(o,"H2",{class:!0});var cd=r(Be);Nt=s(cd,"A",{id:!0,class:!0,href:!0});var c_=r(Nt);ca=s(c_,"SPAN",{});var p_=r(ca);k(Jn.$$.fragment,p_),p_.forEach(t),c_.forEach(t),Kh=h(cd),pa=s(cd,"SPAN",{});var h_=r(pa);em=i(h_,"FlaxWhisperModel"),h_.forEach(t),cd.forEach(t),ki=h(o),D=s(o,"DIV",{class:!0});var oo=r(D);k(In.$$.fragment,oo),tm=h(oo),Le=s(oo,"P",{});var dr=r(Le);om=i(dr,`The bare Whisper Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),Ps=s(dr,"A",{href:!0});var m_=r(Ps);nm=i(m_,"FlaxPreTrainedModel"),m_.forEach(t),sm=i(dr,`. Check the superclass documentation for the generic methods the
library implements for all its models (such as downloading or saving, resizing the input embeddings, pruning heads
etc.) This model is also a Flax Linen
`),Gn=s(dr,"A",{href:!0,rel:!0});var u_=r(Gn);rm=i(u_,"flax.nn.Module"),u_.forEach(t),am=i(dr,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.
Finally, this model supports inherent JAX features such as:`),dr.forEach(t),im=h(oo),le=s(oo,"UL",{});var no=r(le);ha=s(no,"LI",{});var f_=r(ha);Nn=s(f_,"A",{href:!0,rel:!0});var __=r(Nn);dm=i(__,"Just-In-Time (JIT) compilation"),__.forEach(t),f_.forEach(t),lm=h(no),ma=s(no,"LI",{});var g_=r(ma);Un=s(g_,"A",{href:!0,rel:!0});var y_=r(Un);cm=i(y_,"Automatic Differentiation"),y_.forEach(t),g_.forEach(t),pm=h(no),ua=s(no,"LI",{});var b_=r(ua);Zn=s(b_,"A",{href:!0,rel:!0});var v_=r(Zn);hm=i(v_,"Vectorization"),v_.forEach(t),b_.forEach(t),mm=h(no),fa=s(no,"LI",{});var k_=r(fa);Xn=s(k_,"A",{href:!0,rel:!0});var w_=r(Xn);um=i(w_,"Parallelization"),w_.forEach(t),k_.forEach(t),no.forEach(t),fm=h(oo),re=s(oo,"DIV",{class:!0});var so=r(re);k(An.$$.fragment,so),_m=h(so),Ye=s(so,"P",{});var lr=r(Ye);gm=i(lr,"The "),_a=s(lr,"CODE",{});var T_=r(_a);ym=i(T_,"FlaxWhisperPreTrainedModel"),T_.forEach(t),bm=i(lr," forward method, overrides the "),ga=s(lr,"CODE",{});var W_=r(ga);vm=i(W_,"__call__"),W_.forEach(t),km=i(lr," special method."),lr.forEach(t),wm=h(so),k(Ut.$$.fragment,so),Tm=h(so),k(Zt.$$.fragment,so),so.forEach(t),oo.forEach(t),wi=h(o),De=s(o,"H2",{class:!0});var pd=r(De);Xt=s(pd,"A",{id:!0,class:!0,href:!0});var x_=r(Xt);ya=s(x_,"SPAN",{});var $_=r(ya);k(Rn.$$.fragment,$_),$_.forEach(t),x_.forEach(t),Wm=h(pd),ba=s(pd,"SPAN",{});var F_=r(ba);xm=i(F_,"FlaxWhisperForConditionalGeneration"),F_.forEach(t),pd.forEach(t),Ti=h(o),O=s(o,"DIV",{class:!0});var ro=r(O);k(Pn.$$.fragment,ro),$m=h(ro),Oe=s(ro,"P",{});var cr=r(Oe);Fm=i(cr,`The Whisper Model with a language modeling head.
This model inherits from `),Vs=s(cr,"A",{href:!0});var M_=r(Vs);Mm=i(M_,"FlaxPreTrainedModel"),M_.forEach(t),zm=i(cr,`. Check the superclass documentation for the generic methods the
library implements for all its models (such as downloading or saving, resizing the input embeddings, pruning heads
etc.) This model is also a Flax Linen
`),Vn=s(cr,"A",{href:!0,rel:!0});var z_=r(Vn);jm=i(z_,"flax.nn.Module"),z_.forEach(t),Em=i(cr,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.
Finally, this model supports inherent JAX features such as:`),cr.forEach(t),Cm=h(ro),ce=s(ro,"UL",{});var ao=r(ce);va=s(ao,"LI",{});var j_=r(va);Sn=s(j_,"A",{href:!0,rel:!0});var E_=r(Sn);qm=i(E_,"Just-In-Time (JIT) compilation"),E_.forEach(t),j_.forEach(t),Jm=h(ao),ka=s(ao,"LI",{});var C_=r(ka);Bn=s(C_,"A",{href:!0,rel:!0});var q_=r(Bn);Im=i(q_,"Automatic Differentiation"),q_.forEach(t),C_.forEach(t),Gm=h(ao),wa=s(ao,"LI",{});var J_=r(wa);Ln=s(J_,"A",{href:!0,rel:!0});var I_=r(Ln);Nm=i(I_,"Vectorization"),I_.forEach(t),J_.forEach(t),Um=h(ao),Ta=s(ao,"LI",{});var G_=r(Ta);Yn=s(G_,"A",{href:!0,rel:!0});var N_=r(Yn);Zm=i(N_,"Parallelization"),N_.forEach(t),G_.forEach(t),ao.forEach(t),Xm=h(ro),ae=s(ro,"DIV",{class:!0});var io=r(ae);k(Dn.$$.fragment,io),Am=h(io),He=s(io,"P",{});var pr=r(He);Rm=i(pr,"The "),Wa=s(pr,"CODE",{});var U_=r(Wa);Pm=i(U_,"FlaxWhisperPreTrainedModel"),U_.forEach(t),Vm=i(pr," forward method, overrides the "),xa=s(pr,"CODE",{});var Z_=r(xa);Sm=i(Z_,"__call__"),Z_.forEach(t),Bm=i(pr," special method."),pr.forEach(t),Lm=h(io),k(At.$$.fragment,io),Ym=h(io),k(Rt.$$.fragment,io),io.forEach(t),ro.forEach(t),Wi=h(o),Qe=s(o,"H2",{class:!0});var hd=r(Qe);Pt=s(hd,"A",{id:!0,class:!0,href:!0});var X_=r(Pt);$a=s(X_,"SPAN",{});var A_=r($a);k(On.$$.fragment,A_),A_.forEach(t),X_.forEach(t),Dm=h(hd),Fa=s(hd,"SPAN",{});var R_=r(Fa);Om=i(R_,"FlaxWhisperForAudioClassification"),R_.forEach(t),hd.forEach(t),xi=h(o),H=s(o,"DIV",{class:!0});var lo=r(H);k(Hn.$$.fragment,lo),Hm=h(lo),Ke=s(lo,"P",{});var hr=r(Ke);Qm=i(hr,`The Whisper Model with an audio classification head on top.
This model inherits from `),Ss=s(hr,"A",{href:!0});var P_=r(Ss);Km=i(P_,"FlaxPreTrainedModel"),P_.forEach(t),eu=i(hr,`. Check the superclass documentation for the generic methods the
library implements for all its models (such as downloading or saving, resizing the input embeddings, pruning heads
etc.) This model is also a Flax Linen
`),Qn=s(hr,"A",{href:!0,rel:!0});var V_=r(Qn);tu=i(V_,"flax.nn.Module"),V_.forEach(t),ou=i(hr,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.
Finally, this model supports inherent JAX features such as:`),hr.forEach(t),nu=h(lo),pe=s(lo,"UL",{});var co=r(pe);Ma=s(co,"LI",{});var S_=r(Ma);Kn=s(S_,"A",{href:!0,rel:!0});var B_=r(Kn);su=i(B_,"Just-In-Time (JIT) compilation"),B_.forEach(t),S_.forEach(t),ru=h(co),za=s(co,"LI",{});var L_=r(za);es=s(L_,"A",{href:!0,rel:!0});var Y_=r(es);au=i(Y_,"Automatic Differentiation"),Y_.forEach(t),L_.forEach(t),iu=h(co),ja=s(co,"LI",{});var D_=r(ja);ts=s(D_,"A",{href:!0,rel:!0});var O_=r(ts);du=i(O_,"Vectorization"),O_.forEach(t),D_.forEach(t),lu=h(co),Ea=s(co,"LI",{});var H_=r(Ea);os=s(H_,"A",{href:!0,rel:!0});var Q_=r(os);cu=i(Q_,"Parallelization"),Q_.forEach(t),H_.forEach(t),co.forEach(t),pu=h(lo),ie=s(lo,"DIV",{class:!0});var po=r(ie);k(ns.$$.fragment,po),hu=h(po),et=s(po,"P",{});var mr=r(et);mu=i(mr,"The "),Bs=s(mr,"A",{href:!0});var K_=r(Bs);uu=i(K_,"FlaxWhisperForAudioClassification"),K_.forEach(t),fu=i(mr," forward method, overrides the "),Ca=s(mr,"CODE",{});var eg=r(Ca);_u=i(eg,"__call__"),eg.forEach(t),gu=i(mr," special method."),mr.forEach(t),yu=h(po),k(Vt.$$.fragment,po),bu=h(po),k(St.$$.fragment,po),po.forEach(t),lo.forEach(t),this.h()},h(){l(c,"name","hf:doc:metadata"),l(c,"content",JSON.stringify(Mg)),l(u,"id","whisper"),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","#whisper"),l(f,"class","relative group"),l(q,"id","overview"),l(q,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(q,"href","#overview"),l(J,"class","relative group"),l(ho,"href","https://cdn.openai.com/papers/whisper.pdf"),l(ho,"rel","nofollow"),l(ms,"href","/docs/transformers/main/en/main_classes/text_generation#transformers.GenerationMixin.generate"),l(us,"href","/docs/transformers/main/en/model_doc/whisper#transformers.WhisperProcessor"),l(fo,"href","https://huggingface.co/ArthurZ"),l(fo,"rel","nofollow"),l(_o,"href","https://huggingface.co/amyeroberts"),l(_o,"rel","nofollow"),l(go,"href","https://github.com/openai/whisper"),l(go,"rel","nofollow"),l(nt,"id","transformers.WhisperConfig"),l(nt,"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(nt,"href","#transformers.WhisperConfig"),l(Me,"class","relative group"),l(fs,"href","/docs/transformers/main/en/model_doc/whisper#transformers.WhisperModel"),l(vo,"href","https://huggingface.co/openai/whisper-tiny"),l(vo,"rel","nofollow"),l(_s,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),l(gs,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),l(V,"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,"id","transformers.WhisperTokenizer"),l(rt,"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(rt,"href","#transformers.WhisperTokenizer"),l(Ee,"class","relative group"),l(ys,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),l(ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(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(vs,"href","../glossary#token-type-ids"),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(ks,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(lt,"id","transformers.WhisperTokenizerFast"),l(lt,"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(lt,"href","#transformers.WhisperTokenizerFast"),l(Ce,"class","relative group"),l(ws,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),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(pt,"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,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Ws,"href","../glossary#token-type-ids"),l(ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(xs,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(mt,"id","transformers.WhisperFeatureExtractor"),l(mt,"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(mt,"href","#transformers.WhisperFeatureExtractor"),l(qe,"class","relative group"),l($s,"href","/docs/transformers/main/en/main_classes/feature_extractor#transformers.SequenceFeatureExtractor"),l(ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ft,"id","transformers.WhisperProcessor"),l(ft,"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(ft,"href","#transformers.WhisperProcessor"),l(Ie,"class","relative group"),l(Fs,"href","/docs/transformers/main/en/model_doc/whisper#transformers.WhisperProcessor"),l(Ms,"href","/docs/transformers/main/en/model_doc/whisper#transformers.WhisperFeatureExtractor"),l(zs,"href","/docs/transformers/main/en/model_doc/whisper#transformers.WhisperTokenizer"),l(Bo,"href","/docs/transformers/main/en/model_doc/whisper#transformers.WhisperProcessor.__call__"),l(js,"href","/docs/transformers/main/en/model_doc/whisper#transformers.WhisperProcessor.decode"),l(Yo,"href","/docs/transformers/main/en/model_doc/whisper#transformers.WhisperFeatureExtractor.__call__"),l(Do,"href","/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__"),l(_t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),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(Es,"href","/docs/transformers/main/en/model_doc/donut#transformers.DonutProcessor.from_pretrained"),l(Te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Cs,"href","/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.batch_decode"),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(qs,"href","/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.decode"),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(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(kt,"id","transformers.WhisperModel"),l(kt,"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(kt,"href","#transformers.WhisperModel"),l(Ge,"class","relative group"),l(Js,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),l(dn,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(dn,"rel","nofollow"),l(Is,"href","/docs/transformers/main/en/model_doc/whisper#transformers.WhisperModel"),l(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(hn,"href","https://arxiv.org/abs/1904.08779"),l(hn,"rel","nofollow"),l(Wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(xt,"id","transformers.WhisperForConditionalGeneration"),l(xt,"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(xt,"href","#transformers.WhisperForConditionalGeneration"),l(Ue,"class","relative group"),l(Gs,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),l(gn,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(gn,"rel","nofollow"),l(Ns,"href","/docs/transformers/main/en/model_doc/whisper#transformers.WhisperForConditionalGeneration"),l(te,"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(Mt,"id","transformers.WhisperForAudioClassification"),l(Mt,"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(Mt,"href","#transformers.WhisperForAudioClassification"),l(Xe,"class","relative group"),l(Us,"href","/docs/transformers/main/en/model_doc/whisper#transformers.WhisperForAudioClassification"),l(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Et,"id","transformers.TFWhisperModel"),l(Et,"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(Et,"href","#transformers.TFWhisperModel"),l(Re,"class","relative group"),l(Zs,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),l($n,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),l($n,"rel","nofollow"),l(Xs,"href","/docs/transformers/main/en/model_doc/whisper#transformers.TFWhisperModel"),l(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Jt,"id","transformers.TFWhisperForConditionalGeneration"),l(Jt,"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(Jt,"href","#transformers.TFWhisperForConditionalGeneration"),l(Ve,"class","relative group"),l(As,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),l(Cn,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),l(Cn,"rel","nofollow"),l(Rs,"href","/docs/transformers/main/en/model_doc/whisper#transformers.TFWhisperForConditionalGeneration"),l(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Nt,"id","transformers.FlaxWhisperModel"),l(Nt,"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(Nt,"href","#transformers.FlaxWhisperModel"),l(Be,"class","relative group"),l(Ps,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),l(Gn,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),l(Gn,"rel","nofollow"),l(Nn,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),l(Nn,"rel","nofollow"),l(Un,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),l(Un,"rel","nofollow"),l(Zn,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),l(Zn,"rel","nofollow"),l(Xn,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),l(Xn,"rel","nofollow"),l(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Xt,"id","transformers.FlaxWhisperForConditionalGeneration"),l(Xt,"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(Xt,"href","#transformers.FlaxWhisperForConditionalGeneration"),l(De,"class","relative group"),l(Vs,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),l(Vn,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),l(Vn,"rel","nofollow"),l(Sn,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),l(Sn,"rel","nofollow"),l(Bn,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),l(Bn,"rel","nofollow"),l(Ln,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),l(Ln,"rel","nofollow"),l(Yn,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),l(Yn,"rel","nofollow"),l(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(O,"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.FlaxWhisperForAudioClassification"),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.FlaxWhisperForAudioClassification"),l(Qe,"class","relative group"),l(Ss,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),l(Qn,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),l(Qn,"rel","nofollow"),l(Kn,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),l(Kn,"rel","nofollow"),l(es,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),l(es,"rel","nofollow"),l(ts,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),l(ts,"rel","nofollow"),l(os,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),l(os,"rel","nofollow"),l(Bs,"href","/docs/transformers/main/en/model_doc/whisper#transformers.FlaxWhisperForAudioClassification"),l(ie,"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")},m(o,_){e(document.head,c),y(o,b,_),y(o,f,_),e(f,u),e(u,g),w(d,g,null),e(f,m),e(f,M),e(M,Z),y(o,C,_),y(o,J,_),e(J,q),e(q,I),w(ge,I,null),e(J,ls),e(J,tt),e(tt,md),y(o,Ya,_),y(o,ot,_),e(ot,ud),e(ot,ho),e(ho,fd),e(ot,_d),y(o,Da,_),y(o,cs,_),e(cs,gd),y(o,Oa,_),y(o,ps,_),e(ps,ur),e(ur,yd),y(o,Ha,_),y(o,hs,_),e(hs,bd),y(o,Qa,_),y(o,Q,_),e(Q,fr),e(fr,vd),e(Q,kd),e(Q,mo),e(mo,wd),e(mo,ms),e(ms,Td),e(mo,Wd),e(Q,xd),e(Q,_r),e(_r,$d),e(Q,Fd),e(Q,uo),e(uo,Md),e(uo,us),e(us,zd),e(uo,jd),y(o,Ka,_),y(o,K,_),e(K,Ed),e(K,fo),e(fo,Cd),e(K,qd),e(K,_o),e(_o,Jd),e(K,Id),e(K,go),e(go,Gd),e(K,Nd),y(o,ei,_),y(o,Me,_),e(Me,nt),e(nt,gr),w(yo,gr,null),e(Me,Ud),e(Me,yr),e(yr,Zd),y(o,ti,_),y(o,V,_),w(bo,V,null),e(V,Xd),e(V,ze),e(ze,Ad),e(ze,fs),e(fs,Rd),e(ze,Pd),e(ze,vo),e(vo,Vd),e(ze,Sd),e(V,Bd),e(V,je),e(je,Ld),e(je,_s),e(_s,Yd),e(je,Dd),e(je,gs),e(gs,Od),e(je,Hd),e(V,Qd),w(st,V,null),y(o,oi,_),y(o,Ee,_),e(Ee,rt),e(rt,br),w(ko,br,null),e(Ee,Kd),e(Ee,vr),e(vr,el),y(o,ni,_),y(o,z,_),w(wo,z,null),e(z,tl),e(z,kr),e(kr,ol),e(z,nl),e(z,To),e(To,sl),e(To,ys),e(ys,rl),e(To,al),e(z,il),e(z,ye),w(Wo,ye,null),e(ye,dl),e(ye,wr),e(wr,ll),e(ye,cl),w(at,ye,null),e(z,pl),e(z,it),w(xo,it,null),e(it,hl),e(it,Tr),e(Tr,ml),e(z,ul),e(z,dt),w($o,dt,null),e(dt,fl),e(dt,Fo),e(Fo,_l),e(Fo,Wr),e(Wr,gl),e(Fo,yl),e(z,bl),e(z,be),w(Mo,be,null),e(be,vl),e(be,bs),e(bs,kl),e(bs,vs),e(vs,wl),e(be,Tl),e(be,xr),e(xr,Wl),e(z,xl),e(z,ks),w(zo,ks,null),y(o,si,_),y(o,Ce,_),e(Ce,lt),e(lt,$r),w(jo,$r,null),e(Ce,$l),e(Ce,Fr),e(Fr,Fl),y(o,ri,_),y(o,j,_),w(Eo,j,null),e(j,Ml),e(j,Co),e(Co,zl),e(Co,Mr),e(Mr,jl),e(Co,El),e(j,Cl),e(j,qo),e(qo,ql),e(qo,ws),e(ws,Jl),e(qo,Il),e(j,Gl),e(j,ve),w(Jo,ve,null),e(ve,Nl),e(ve,zr),e(zr,Ul),e(ve,Zl),w(ct,ve,null),e(j,Xl),e(j,pt),w(Io,pt,null),e(pt,Al),e(pt,jr),e(jr,Rl),e(j,Pl),e(j,ht),w(Go,ht,null),e(ht,Vl),e(ht,No),e(No,Sl),e(No,Er),e(Er,Bl),e(No,Ll),e(j,Yl),e(j,ke),w(Uo,ke,null),e(ke,Dl),e(ke,Ts),e(Ts,Ol),e(Ts,Ws),e(Ws,Hl),e(ke,Ql),e(ke,Cr),e(Cr,Kl),e(j,ec),e(j,xs),w(Zo,xs,null),y(o,ai,_),y(o,qe,_),e(qe,mt),e(mt,qr),w(Xo,qr,null),e(qe,tc),e(qe,Jr),e(Jr,oc),y(o,ii,_),y(o,X,_),w(Ao,X,null),e(X,nc),e(X,Ir),e(Ir,sc),e(X,rc),e(X,Ro),e(Ro,ac),e(Ro,$s),e($s,ic),e(Ro,dc),e(X,lc),e(X,Je),e(Je,cc),e(Je,Gr),e(Gr,pc),e(Je,hc),e(Je,Nr),e(Nr,mc),e(Je,uc),e(X,fc),e(X,ut),w(Po,ut,null),e(ut,_c),e(ut,Ur),e(Ur,gc),y(o,di,_),y(o,Ie,_),e(Ie,ft),e(ft,Zr),w(Vo,Zr,null),e(Ie,yc),e(Ie,Xr),e(Xr,bc),y(o,li,_),y(o,E,_),w(So,E,null),e(E,vc),e(E,Ar),e(Ar,kc),e(E,wc),e(E,P),e(P,Fs),e(Fs,Tc),e(P,Wc),e(P,Ms),e(Ms,xc),e(P,$c),e(P,zs),e(zs,Fc),e(P,Mc),e(P,Bo),e(Bo,Rr),e(Rr,zc),e(Bo,jc),e(P,Ec),e(P,js),e(js,Cc),e(P,qc),e(E,Jc),e(E,_t),w(Lo,_t,null),e(_t,Ic),e(_t,S),e(S,Gc),e(S,Pr),e(Pr,Nc),e(S,Uc),e(S,Yo),e(Yo,Vr),e(Vr,Zc),e(Yo,Xc),e(S,Ac),e(S,Sr),e(Sr,Rc),e(S,Pc),e(S,Do),e(Do,Br),e(Br,Vc),e(Do,Sc),e(S,Bc),e(E,Lc),e(E,we),w(Oo,we,null),e(we,Yc),e(we,Lr),e(Lr,Dc),e(we,Oc),w(gt,we,null),e(E,Hc),e(E,Te),w(Ho,Te,null),e(Te,Qc),e(Te,Qo),e(Qo,Kc),e(Qo,Es),e(Es,ep),e(Qo,tp),e(Te,op),w(yt,Te,null),e(E,np),e(E,bt),w(Ko,bt,null),e(bt,sp),e(bt,en),e(en,rp),e(en,Cs),e(Cs,ap),e(en,ip),e(E,dp),e(E,vt),w(tn,vt,null),e(vt,lp),e(vt,on),e(on,cp),e(on,qs),e(qs,pp),e(on,hp),y(o,ci,_),y(o,Ge,_),e(Ge,kt),e(kt,Yr),w(nn,Yr,null),e(Ge,mp),e(Ge,Dr),e(Dr,up),y(o,pi,_),y(o,A,_),w(sn,A,null),e(A,fp),e(A,rn),e(rn,_p),e(rn,Js),e(Js,gp),e(rn,yp),e(A,bp),e(A,an),e(an,vp),e(an,dn),e(dn,kp),e(an,wp),e(A,Tp),e(A,ee),w(ln,ee,null),e(ee,Wp),e(ee,Ne),e(Ne,xp),e(Ne,Is),e(Is,$p),e(Ne,Fp),e(Ne,Or),e(Or,Mp),e(Ne,zp),e(ee,jp),w(wt,ee,null),e(ee,Ep),w(Tt,ee,null),e(A,Cp),e(A,Wt),w(cn,Wt,null),e(Wt,qp),e(Wt,pn),e(pn,Jp),e(pn,hn),e(hn,Ip),e(pn,Gp),y(o,hi,_),y(o,Ue,_),e(Ue,xt),e(xt,Hr),w(mn,Hr,null),e(Ue,Np),e(Ue,Qr),e(Qr,Up),y(o,mi,_),y(o,B,_),w(un,B,null),e(B,Zp),e(B,fn),e(fn,Xp),e(fn,Gs),e(Gs,Ap),e(fn,Rp),e(B,Pp),e(B,_n),e(_n,Vp),e(_n,gn),e(gn,Sp),e(_n,Bp),e(B,Lp),e(B,te),w(yn,te,null),e(te,Yp),e(te,Ze),e(Ze,Dp),e(Ze,Ns),e(Ns,Op),e(Ze,Hp),e(Ze,Kr),e(Kr,Qp),e(Ze,Kp),e(te,eh),w($t,te,null),e(te,th),w(Ft,te,null),y(o,ui,_),y(o,Xe,_),e(Xe,Mt),e(Mt,ea),w(bn,ea,null),e(Xe,oh),e(Xe,ta),e(ta,nh),y(o,fi,_),y(o,de,_),w(vn,de,null),e(de,sh),e(de,oa),e(oa,rh),e(de,ah),e(de,oe),w(kn,oe,null),e(oe,ih),e(oe,Ae),e(Ae,dh),e(Ae,Us),e(Us,lh),e(Ae,ch),e(Ae,na),e(na,ph),e(Ae,hh),e(oe,mh),w(zt,oe,null),e(oe,uh),w(jt,oe,null),y(o,_i,_),y(o,Re,_),e(Re,Et),e(Et,sa),w(wn,sa,null),e(Re,fh),e(Re,ra),e(ra,_h),y(o,gi,_),y(o,L,_),w(Tn,L,null),e(L,gh),e(L,Wn),e(Wn,yh),e(Wn,Zs),e(Zs,bh),e(Wn,vh),e(L,kh),e(L,xn),e(xn,wh),e(xn,$n),e($n,Th),e(xn,Wh),e(L,xh),e(L,ne),w(Fn,ne,null),e(ne,$h),e(ne,Pe),e(Pe,Fh),e(Pe,Xs),e(Xs,Mh),e(Pe,zh),e(Pe,aa),e(aa,jh),e(Pe,Eh),e(ne,Ch),w(Ct,ne,null),e(ne,qh),w(qt,ne,null),y(o,yi,_),y(o,Ve,_),e(Ve,Jt),e(Jt,ia),w(Mn,ia,null),e(Ve,Jh),e(Ve,da),e(da,Ih),y(o,bi,_),y(o,Y,_),w(zn,Y,null),e(Y,Gh),e(Y,jn),e(jn,Nh),e(jn,As),e(As,Uh),e(jn,Zh),e(Y,Xh),e(Y,En),e(En,Ah),e(En,Cn),e(Cn,Rh),e(En,Ph),e(Y,Vh),e(Y,se),w(qn,se,null),e(se,Sh),e(se,Se),e(Se,Bh),e(Se,Rs),e(Rs,Lh),e(Se,Yh),e(Se,la),e(la,Dh),e(Se,Oh),e(se,Hh),w(It,se,null),e(se,Qh),w(Gt,se,null),y(o,vi,_),y(o,Be,_),e(Be,Nt),e(Nt,ca),w(Jn,ca,null),e(Be,Kh),e(Be,pa),e(pa,em),y(o,ki,_),y(o,D,_),w(In,D,null),e(D,tm),e(D,Le),e(Le,om),e(Le,Ps),e(Ps,nm),e(Le,sm),e(Le,Gn),e(Gn,rm),e(Le,am),e(D,im),e(D,le),e(le,ha),e(ha,Nn),e(Nn,dm),e(le,lm),e(le,ma),e(ma,Un),e(Un,cm),e(le,pm),e(le,ua),e(ua,Zn),e(Zn,hm),e(le,mm),e(le,fa),e(fa,Xn),e(Xn,um),e(D,fm),e(D,re),w(An,re,null),e(re,_m),e(re,Ye),e(Ye,gm),e(Ye,_a),e(_a,ym),e(Ye,bm),e(Ye,ga),e(ga,vm),e(Ye,km),e(re,wm),w(Ut,re,null),e(re,Tm),w(Zt,re,null),y(o,wi,_),y(o,De,_),e(De,Xt),e(Xt,ya),w(Rn,ya,null),e(De,Wm),e(De,ba),e(ba,xm),y(o,Ti,_),y(o,O,_),w(Pn,O,null),e(O,$m),e(O,Oe),e(Oe,Fm),e(Oe,Vs),e(Vs,Mm),e(Oe,zm),e(Oe,Vn),e(Vn,jm),e(Oe,Em),e(O,Cm),e(O,ce),e(ce,va),e(va,Sn),e(Sn,qm),e(ce,Jm),e(ce,ka),e(ka,Bn),e(Bn,Im),e(ce,Gm),e(ce,wa),e(wa,Ln),e(Ln,Nm),e(ce,Um),e(ce,Ta),e(Ta,Yn),e(Yn,Zm),e(O,Xm),e(O,ae),w(Dn,ae,null),e(ae,Am),e(ae,He),e(He,Rm),e(He,Wa),e(Wa,Pm),e(He,Vm),e(He,xa),e(xa,Sm),e(He,Bm),e(ae,Lm),w(At,ae,null),e(ae,Ym),w(Rt,ae,null),y(o,Wi,_),y(o,Qe,_),e(Qe,Pt),e(Pt,$a),w(On,$a,null),e(Qe,Dm),e(Qe,Fa),e(Fa,Om),y(o,xi,_),y(o,H,_),w(Hn,H,null),e(H,Hm),e(H,Ke),e(Ke,Qm),e(Ke,Ss),e(Ss,Km),e(Ke,eu),e(Ke,Qn),e(Qn,tu),e(Ke,ou),e(H,nu),e(H,pe),e(pe,Ma),e(Ma,Kn),e(Kn,su),e(pe,ru),e(pe,za),e(za,es),e(es,au),e(pe,iu),e(pe,ja),e(ja,ts),e(ts,du),e(pe,lu),e(pe,Ea),e(Ea,os),e(os,cu),e(H,pu),e(H,ie),w(ns,ie,null),e(ie,hu),e(ie,et),e(et,mu),e(et,Bs),e(Bs,uu),e(et,fu),e(et,Ca),e(Ca,_u),e(et,gu),e(ie,yu),w(Vt,ie,null),e(ie,bu),w(St,ie,null),$i=!0},p(o,[_]){const ss={};_&2&&(ss.$$scope={dirty:_,ctx:o}),st.$set(ss);const qa={};_&2&&(qa.$$scope={dirty:_,ctx:o}),at.$set(qa);const Ja={};_&2&&(Ja.$$scope={dirty:_,ctx:o}),ct.$set(Ja);const Ia={};_&2&&(Ia.$$scope={dirty:_,ctx:o}),gt.$set(Ia);const rs={};_&2&&(rs.$$scope={dirty:_,ctx:o}),yt.$set(rs);const Ga={};_&2&&(Ga.$$scope={dirty:_,ctx:o}),wt.$set(Ga);const Na={};_&2&&(Na.$$scope={dirty:_,ctx:o}),Tt.$set(Na);const Ua={};_&2&&(Ua.$$scope={dirty:_,ctx:o}),$t.$set(Ua);const as={};_&2&&(as.$$scope={dirty:_,ctx:o}),Ft.$set(as);const Za={};_&2&&(Za.$$scope={dirty:_,ctx:o}),zt.$set(Za);const Xa={};_&2&&(Xa.$$scope={dirty:_,ctx:o}),jt.$set(Xa);const Aa={};_&2&&(Aa.$$scope={dirty:_,ctx:o}),Ct.$set(Aa);const Ra={};_&2&&(Ra.$$scope={dirty:_,ctx:o}),qt.$set(Ra);const Pa={};_&2&&(Pa.$$scope={dirty:_,ctx:o}),It.$set(Pa);const he={};_&2&&(he.$$scope={dirty:_,ctx:o}),Gt.$set(he);const Va={};_&2&&(Va.$$scope={dirty:_,ctx:o}),Ut.$set(Va);const is={};_&2&&(is.$$scope={dirty:_,ctx:o}),Zt.$set(is);const Sa={};_&2&&(Sa.$$scope={dirty:_,ctx:o}),At.$set(Sa);const Ba={};_&2&&(Ba.$$scope={dirty:_,ctx:o}),Rt.$set(Ba);const ds={};_&2&&(ds.$$scope={dirty:_,ctx:o}),Vt.$set(ds);const La={};_&2&&(La.$$scope={dirty:_,ctx:o}),St.$set(La)},i(o){$i||(T(d.$$.fragment,o),T(ge.$$.fragment,o),T(yo.$$.fragment,o),T(bo.$$.fragment,o),T(st.$$.fragment,o),T(ko.$$.fragment,o),T(wo.$$.fragment,o),T(Wo.$$.fragment,o),T(at.$$.fragment,o),T(xo.$$.fragment,o),T($o.$$.fragment,o),T(Mo.$$.fragment,o),T(zo.$$.fragment,o),T(jo.$$.fragment,o),T(Eo.$$.fragment,o),T(Jo.$$.fragment,o),T(ct.$$.fragment,o),T(Io.$$.fragment,o),T(Go.$$.fragment,o),T(Uo.$$.fragment,o),T(Zo.$$.fragment,o),T(Xo.$$.fragment,o),T(Ao.$$.fragment,o),T(Po.$$.fragment,o),T(Vo.$$.fragment,o),T(So.$$.fragment,o),T(Lo.$$.fragment,o),T(Oo.$$.fragment,o),T(gt.$$.fragment,o),T(Ho.$$.fragment,o),T(yt.$$.fragment,o),T(Ko.$$.fragment,o),T(tn.$$.fragment,o),T(nn.$$.fragment,o),T(sn.$$.fragment,o),T(ln.$$.fragment,o),T(wt.$$.fragment,o),T(Tt.$$.fragment,o),T(cn.$$.fragment,o),T(mn.$$.fragment,o),T(un.$$.fragment,o),T(yn.$$.fragment,o),T($t.$$.fragment,o),T(Ft.$$.fragment,o),T(bn.$$.fragment,o),T(vn.$$.fragment,o),T(kn.$$.fragment,o),T(zt.$$.fragment,o),T(jt.$$.fragment,o),T(wn.$$.fragment,o),T(Tn.$$.fragment,o),T(Fn.$$.fragment,o),T(Ct.$$.fragment,o),T(qt.$$.fragment,o),T(Mn.$$.fragment,o),T(zn.$$.fragment,o),T(qn.$$.fragment,o),T(It.$$.fragment,o),T(Gt.$$.fragment,o),T(Jn.$$.fragment,o),T(In.$$.fragment,o),T(An.$$.fragment,o),T(Ut.$$.fragment,o),T(Zt.$$.fragment,o),T(Rn.$$.fragment,o),T(Pn.$$.fragment,o),T(Dn.$$.fragment,o),T(At.$$.fragment,o),T(Rt.$$.fragment,o),T(On.$$.fragment,o),T(Hn.$$.fragment,o),T(ns.$$.fragment,o),T(Vt.$$.fragment,o),T(St.$$.fragment,o),$i=!0)},o(o){W(d.$$.fragment,o),W(ge.$$.fragment,o),W(yo.$$.fragment,o),W(bo.$$.fragment,o),W(st.$$.fragment,o),W(ko.$$.fragment,o),W(wo.$$.fragment,o),W(Wo.$$.fragment,o),W(at.$$.fragment,o),W(xo.$$.fragment,o),W($o.$$.fragment,o),W(Mo.$$.fragment,o),W(zo.$$.fragment,o),W(jo.$$.fragment,o),W(Eo.$$.fragment,o),W(Jo.$$.fragment,o),W(ct.$$.fragment,o),W(Io.$$.fragment,o),W(Go.$$.fragment,o),W(Uo.$$.fragment,o),W(Zo.$$.fragment,o),W(Xo.$$.fragment,o),W(Ao.$$.fragment,o),W(Po.$$.fragment,o),W(Vo.$$.fragment,o),W(So.$$.fragment,o),W(Lo.$$.fragment,o),W(Oo.$$.fragment,o),W(gt.$$.fragment,o),W(Ho.$$.fragment,o),W(yt.$$.fragment,o),W(Ko.$$.fragment,o),W(tn.$$.fragment,o),W(nn.$$.fragment,o),W(sn.$$.fragment,o),W(ln.$$.fragment,o),W(wt.$$.fragment,o),W(Tt.$$.fragment,o),W(cn.$$.fragment,o),W(mn.$$.fragment,o),W(un.$$.fragment,o),W(yn.$$.fragment,o),W($t.$$.fragment,o),W(Ft.$$.fragment,o),W(bn.$$.fragment,o),W(vn.$$.fragment,o),W(kn.$$.fragment,o),W(zt.$$.fragment,o),W(jt.$$.fragment,o),W(wn.$$.fragment,o),W(Tn.$$.fragment,o),W(Fn.$$.fragment,o),W(Ct.$$.fragment,o),W(qt.$$.fragment,o),W(Mn.$$.fragment,o),W(zn.$$.fragment,o),W(qn.$$.fragment,o),W(It.$$.fragment,o),W(Gt.$$.fragment,o),W(Jn.$$.fragment,o),W(In.$$.fragment,o),W(An.$$.fragment,o),W(Ut.$$.fragment,o),W(Zt.$$.fragment,o),W(Rn.$$.fragment,o),W(Pn.$$.fragment,o),W(Dn.$$.fragment,o),W(At.$$.fragment,o),W(Rt.$$.fragment,o),W(On.$$.fragment,o),W(Hn.$$.fragment,o),W(ns.$$.fragment,o),W(Vt.$$.fragment,o),W(St.$$.fragment,o),$i=!1},d(o){t(c),o&&t(b),o&&t(f),x(d),o&&t(C),o&&t(J),x(ge),o&&t(Ya),o&&t(ot),o&&t(Da),o&&t(cs),o&&t(Oa),o&&t(ps),o&&t(Ha),o&&t(hs),o&&t(Qa),o&&t(Q),o&&t(Ka),o&&t(K),o&&t(ei),o&&t(Me),x(yo),o&&t(ti),o&&t(V),x(bo),x(st),o&&t(oi),o&&t(Ee),x(ko),o&&t(ni),o&&t(z),x(wo),x(Wo),x(at),x(xo),x($o),x(Mo),x(zo),o&&t(si),o&&t(Ce),x(jo),o&&t(ri),o&&t(j),x(Eo),x(Jo),x(ct),x(Io),x(Go),x(Uo),x(Zo),o&&t(ai),o&&t(qe),x(Xo),o&&t(ii),o&&t(X),x(Ao),x(Po),o&&t(di),o&&t(Ie),x(Vo),o&&t(li),o&&t(E),x(So),x(Lo),x(Oo),x(gt),x(Ho),x(yt),x(Ko),x(tn),o&&t(ci),o&&t(Ge),x(nn),o&&t(pi),o&&t(A),x(sn),x(ln),x(wt),x(Tt),x(cn),o&&t(hi),o&&t(Ue),x(mn),o&&t(mi),o&&t(B),x(un),x(yn),x($t),x(Ft),o&&t(ui),o&&t(Xe),x(bn),o&&t(fi),o&&t(de),x(vn),x(kn),x(zt),x(jt),o&&t(_i),o&&t(Re),x(wn),o&&t(gi),o&&t(L),x(Tn),x(Fn),x(Ct),x(qt),o&&t(yi),o&&t(Ve),x(Mn),o&&t(bi),o&&t(Y),x(zn),x(qn),x(It),x(Gt),o&&t(vi),o&&t(Be),x(Jn),o&&t(ki),o&&t(D),x(In),x(An),x(Ut),x(Zt),o&&t(wi),o&&t(De),x(Rn),o&&t(Ti),o&&t(O),x(Pn),x(Dn),x(At),x(Rt),o&&t(Wi),o&&t(Qe),x(On),o&&t(xi),o&&t(H),x(Hn),x(ns),x(Vt),x(St)}}}const Mg={local:"whisper",sections:[{local:"overview",title:"Overview"},{local:"transformers.WhisperConfig",title:"WhisperConfig"},{local:"transformers.WhisperTokenizer",title:"WhisperTokenizer"},{local:"transformers.WhisperTokenizerFast",title:"WhisperTokenizerFast"},{local:"transformers.WhisperFeatureExtractor",title:"WhisperFeatureExtractor"},{local:"transformers.WhisperProcessor",title:"WhisperProcessor"},{local:"transformers.WhisperModel",title:"WhisperModel"},{local:"transformers.WhisperForConditionalGeneration",title:"WhisperForConditionalGeneration"},{local:"transformers.WhisperForAudioClassification",title:"WhisperForAudioClassification"},{local:"transformers.TFWhisperModel",title:"TFWhisperModel"},{local:"transformers.TFWhisperForConditionalGeneration",title:"TFWhisperForConditionalGeneration"},{local:"transformers.FlaxWhisperModel",title:"FlaxWhisperModel"},{local:"transformers.FlaxWhisperForConditionalGeneration",title:"FlaxWhisperForConditionalGeneration"},{local:"transformers.FlaxWhisperForAudioClassification",title:"FlaxWhisperForAudioClassification"}],title:"Whisper"};function zg($){return rg(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Gg extends tg{constructor(c){super();og(this,c,zg,Fg,ng,{})}}export{Gg as default,Mg as metadata};
