import{S as tg,i as og,s as ng,e as n,k as p,w as b,t as a,M as sg,c as s,d as t,m as h,a as r,x as w,h as i,b as l,G as e,g as v,y as k,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,y,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"),y=a("Example:"),f=p(),b(u.$$.fragment)},l(d){c=s(d,"P",{});var m=r(c);y=i(m,"Example:"),m.forEach(t),f=h(d),w(u.$$.fragment,d)},m(d,m){v(d,c,m),e(c,y),v(d,f,m),k(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,y,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"),y=a("update the prefix tokens as required when fine-tuning. Example:"),f=p(),b(u.$$.fragment)},l(d){c=s(d,"P",{});var m=r(c);y=i(m,"update the prefix tokens as required when fine-tuning. Example:"),m.forEach(t),f=h(d),w(u.$$.fragment,d)},m(d,m){v(d,c,m),e(c,y),v(d,f,m),k(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,y,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"),y=a("update the prefix tokens as required when fine-tuning. Example:"),f=p(),b(u.$$.fragment)},l(d){c=s(d,"P",{});var m=r(c);y=i(m,"update the prefix tokens as required when fine-tuning. Example:"),m.forEach(t),f=h(d),w(u.$$.fragment,d)},m(d,m){v(d,c,m),e(c,y),v(d,f,m),k(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,y,f,u,g,d,m,M,Z,C,J;return{c(){c=n("p"),y=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);y=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/v4.31.0/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.from_pretrained"),l(d,"href","/docs/transformers/v4.31.0/en/internal/image_processing_utils#transformers.ImageProcessingMixin")},m(q,I){v(q,c,I),e(c,y),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,y,f,u,g,d,m,M;return{c(){c=n("p"),y=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);y=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/v4.31.0/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.save_pretrained"),l(d,"href","/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.save_pretrained")},m(Z,C){v(Z,c,C),e(c,y),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,y,f,u,g;return{c(){c=n("p"),y=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);y=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){v(d,c,m),e(c,y),e(c,f),e(f,u),e(c,g)},d(d){d&&t(c)}}}function hg($){let c,y,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"),y=a("Example:"),f=p(),b(u.$$.fragment)},l(d){c=s(d,"P",{});var m=r(c);y=i(m,"Example:"),m.forEach(t),f=h(d),w(u.$$.fragment,d)},m(d,m){v(d,c,m),e(c,y),v(d,f,m),k(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,y,f,u,g;return{c(){c=n("p"),y=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);y=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){v(d,c,m),e(c,y),e(c,f),e(f,u),e(c,g)},d(d){d&&t(c)}}}function ug($){let c,y,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"),y=a("Example:"),f=p(),b(u.$$.fragment)},l(d){c=s(d,"P",{});var m=r(c);y=i(m,"Example:"),m.forEach(t),f=h(d),w(u.$$.fragment,d)},m(d,m){v(d,c,m),e(c,y),v(d,f,m),k(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,y,f,u,g;return{c(){c=n("p"),y=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);y=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){v(d,c,m),e(c,y),e(c,f),e(f,u),e(c,g)},d(d){d&&t(c)}}}function _g($){let c,y,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"),y=a("Example:"),f=p(),b(u.$$.fragment)},l(d){c=s(d,"P",{});var m=r(c);y=i(m,"Example:"),m.forEach(t),f=h(d),w(u.$$.fragment,d)},m(d,m){v(d,c,m),e(c,y),v(d,f,m),k(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,y,f,u,g;return{c(){c=n("p"),y=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);y=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){v(d,c,m),e(c,y),e(c,f),e(f,u),e(c,g)},d(d){d&&t(c)}}}function vg($){let c,y,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"),y=a("Example:"),f=p(),b(u.$$.fragment)},l(d){c=s(d,"P",{});var m=r(c);y=i(m,"Example:"),m.forEach(t),f=h(d),w(u.$$.fragment,d)},m(d,m){v(d,c,m),e(c,y),v(d,f,m),k(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 yg($){let c,y,f,u,g;return{c(){c=n("p"),y=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);y=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){v(d,c,m),e(c,y),e(c,f),e(f,u),e(c,g)},d(d){d&&t(c)}}}function bg($){let c,y,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"),y=a("Example:"),f=p(),b(u.$$.fragment)},l(d){c=s(d,"P",{});var m=r(c);y=i(m,"Example:"),m.forEach(t),f=h(d),w(u.$$.fragment,d)},m(d,m){v(d,c,m),e(c,y),v(d,f,m),k(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 wg($){let c,y,f,u,g;return{c(){c=n("p"),y=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);y=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){v(d,c,m),e(c,y),e(c,f),e(f,u),e(c,g)},d(d){d&&t(c)}}}function kg($){let c,y,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"),y=a("Example:"),f=p(),b(u.$$.fragment)},l(d){c=s(d,"P",{});var m=r(c);y=i(m,"Example:"),m.forEach(t),f=h(d),w(u.$$.fragment,d)},m(d,m){v(d,c,m),e(c,y),v(d,f,m),k(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,y,f,u,g;return{c(){c=n("p"),y=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);y=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){v(d,c,m),e(c,y),e(c,f),e(f,u),e(c,g)},d(d){d&&t(c)}}}function Wg($){let c,y,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"),y=a("Transcription example:"),f=p(),b(u.$$.fragment)},l(d){c=s(d,"P",{});var m=r(c);y=i(m,"Transcription example:"),m.forEach(t),f=h(d),w(u.$$.fragment,d)},m(d,m){v(d,c,m),e(c,y),v(d,f,m),k(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,y,f,u,g;return{c(){c=n("p"),y=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);y=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){v(d,c,m),e(c,y),e(c,f),e(f,u),e(c,g)},d(d){d&&t(c)}}}function $g($){let c,y,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"),y=a("Transcription example:"),f=p(),b(u.$$.fragment)},l(d){c=s(d,"P",{});var m=r(c);y=i(m,"Transcription example:"),m.forEach(t),f=h(d),w(u.$$.fragment,d)},m(d,m){v(d,c,m),e(c,y),v(d,f,m),k(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,y,f,u,g,d,m,M,Z,C,J,q,I,ge,ls,tt,md,Ya,ot,ud,ho,fd,_d,Oa,cs,gd,Da,ps,ur,vd,Ha,hs,yd,Qa,Q,fr,bd,wd,mo,kd,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,vo,Ud,vr,Zd,ti,P,yo,Xd,ze,Ad,fs,Rd,Vd,bo,Pd,Sd,Bd,je,Ld,_s,Yd,Od,gs,Dd,Hd,Qd,st,oi,Ee,rt,yr,wo,Kd,br,el,ni,z,ko,tl,wr,ol,nl,To,sl,vs,rl,al,il,ve,Wo,dl,kr,ll,cl,at,pl,it,xo,hl,Tr,ml,ul,dt,$o,fl,Fo,_l,Wr,gl,vl,yl,ye,Mo,bl,ys,wl,bs,kl,Tl,xr,Wl,xl,ws,zo,si,Ce,lt,$r,jo,$l,Fr,Fl,ri,j,Eo,Ml,Co,zl,Mr,jl,El,Cl,qo,ql,ks,Jl,Il,Gl,be,Jo,Nl,zr,Ul,Zl,ct,Xl,pt,Io,Al,jr,Rl,Vl,ht,Go,Pl,No,Sl,Er,Bl,Ll,Yl,we,Uo,Ol,Ts,Dl,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,Vo,_c,Ur,gc,di,Ie,ft,Zr,Po,vc,Xr,yc,li,E,So,bc,Ar,wc,kc,V,Fs,Tc,Wc,Ms,xc,$c,zs,Fc,Mc,Bo,Rr,zc,jc,Ec,js,Cc,qc,Jc,_t,Lo,Ic,S,Gc,Vr,Nc,Uc,Yo,Pr,Zc,Xc,Ac,Sr,Rc,Vc,Oo,Br,Pc,Sc,Bc,Lc,ke,Do,Yc,Lr,Oc,Dc,gt,Hc,Te,Ho,Qc,Qo,Kc,Es,ep,tp,op,vt,np,yt,Ko,sp,en,rp,Cs,ap,ip,dp,bt,tn,lp,on,cp,qs,pp,hp,ci,Ge,wt,Yr,nn,mp,Or,up,pi,A,sn,fp,rn,_p,Js,gp,vp,yp,an,bp,dn,wp,kp,Tp,ee,ln,Wp,Ne,xp,Is,$p,Fp,Dr,Mp,zp,jp,kt,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,Vp,_n,Pp,gn,Sp,Bp,Lp,te,vn,Yp,Ze,Op,Ns,Dp,Hp,Kr,Qp,Kp,eh,$t,th,Ft,ui,Xe,Mt,ea,yn,oh,ta,nh,fi,de,bn,sh,oa,rh,ah,oe,wn,ih,Ae,dh,Us,lh,ch,na,ph,hh,mh,zt,uh,jt,_i,Re,Et,sa,kn,fh,ra,_h,gi,L,Tn,gh,Wn,vh,Zs,yh,bh,wh,xn,kh,$n,Th,Wh,xh,ne,Fn,$h,Ve,Fh,Xs,Mh,zh,aa,jh,Eh,Ch,Ct,qh,qt,vi,Pe,Jt,ia,Mn,Jh,da,Ih,yi,Y,zn,Gh,jn,Nh,As,Uh,Zh,Xh,En,Ah,Cn,Rh,Vh,Ph,se,qn,Sh,Se,Bh,Rs,Lh,Yh,la,Oh,Dh,Hh,It,Qh,Gt,bi,Be,Nt,ca,Jn,Kh,pa,em,wi,O,In,tm,Le,om,Vs,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,vm,ym,ga,bm,wm,km,Ut,Tm,Zt,ki,Oe,Xt,va,Rn,Wm,ya,xm,Ti,D,Vn,$m,De,Fm,Ps,Mm,zm,Pn,jm,Em,Cm,ce,ba,Sn,qm,Jm,wa,Bn,Im,Gm,ka,Ln,Nm,Um,Ta,Yn,Zm,Xm,ae,On,Am,He,Rm,Wa,Vm,Pm,xa,Sm,Bm,Lm,At,Ym,Rt,Wi,Qe,Vt,$a,Dn,Om,Fa,Dm,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,vu,Pt,yu,St,$i;return d=new R({}),ge=new R({}),vo=new R({}),yo=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/v4.31.0/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/v4.31.0/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/v4.31.0/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/v4.31.0/src/transformers/models/whisper/configuration_whisper.py#L62"}}),st=new ue({props:{anchor:"transformers.WhisperConfig.example",$$slots:{default:[ag]},$$scope:{ctx:$}}}),wo=new R({}),ko=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/v4.31.0/src/transformers/models/whisper/tokenization_whisper.py#L214"}}),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/v4.31.0/src/transformers/models/whisper/tokenization_whisper.py#L366"}}),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/v4.31.0/src/transformers/models/whisper/tokenization_whisper.py#L426"}}),$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/v4.31.0/src/transformers/models/whisper/tokenization_whisper.py#L434",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/v4.31.0/src/transformers/tokenization_utils_base.py#L3076",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/v4.31.0/src/transformers/models/whisper/tokenization_whisper.py#L654"}}),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/v4.31.0/src/transformers/models/whisper/tokenization_whisper_fast.py#L88"}}),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/v4.31.0/src/transformers/models/whisper/tokenization_whisper_fast.py#L357"}}),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/v4.31.0/src/transformers/models/whisper/tokenization_whisper_fast.py#L432"}}),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/v4.31.0/src/transformers/models/whisper/tokenization_whisper_fast.py#L440",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/v4.31.0/src/transformers/tokenization_utils_base.py#L3076",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/v4.31.0/src/transformers/models/whisper/tokenization_whisper_fast.py#L342"}}),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/v4.31.0/src/transformers/models/whisper/feature_extraction_whisper.py#L32"}}),Vo=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[str, transformers.utils.generic.TensorType, 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/v4.31.0/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>) &#x2014;
If set, will return tensors instead of list of python integers. Acceptable values are:</p>
<ul>
<li><code>&apos;tf&apos;</code>: Return TensorFlow <code>tf.constant</code> objects.</li>
<li><code>&apos;pt&apos;</code>: Return PyTorch <code>torch.Tensor</code> objects.</li>
<li><code>&apos;np&apos;</code>: Return Numpy <code>np.ndarray</code> objects.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.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/v4.31.0/src/transformers/models/whisper/feature_extraction_whisper.py#L136"}}),Po=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/v4.31.0/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/v4.31.0/en/model_doc/whisper#transformers.WhisperTokenizer">WhisperTokenizer</a>. The tokenizer is a required input.`,name:"tokenizer"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/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/v4.31.0/src/transformers/models/whisper/processing_whisper.py#L48"}}),Do=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/v4.31.0/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.save_pretrained">save_pretrained()</a> method, e.g., <code>./my_model_directory/</code>.</li>
<li>a path or url to a saved feature extractor JSON <em>file</em>, e.g.,
<code>./my_model_directory/preprocessor_config.json</code>.
**kwargs &#x2014;
Additional keyword arguments passed along to both
<a href="/docs/transformers/v4.31.0/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.from_pretrained">from_pretrained()</a> and
<code>~tokenization_utils_base.PreTrainedTokenizer.from_pretrained</code>.</li>
</ul>`,name:"pretrained_model_name_or_path"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/processing_utils.py#L155"}}),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/v4.31.0/en/internal/image_processing_utils#transformers.ImageProcessingMixin.push_to_hub">push_to_hub()</a> method.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/processing_utils.py#L93"}}),vt=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/v4.31.0/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/v4.31.0/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/v4.31.0/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/v4.31.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/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/v4.31.0/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/v4.31.0/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/v4.31.0/en/model_doc/whisper#transformers.WhisperTokenizer">WhisperTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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/v4.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/whisper/modeling_whisper.py#L1298",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/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/v4.31.0/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/v4.31.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqModelOutput"
>transformers.modeling_outputs.Seq2SeqModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),kt=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/v4.31.0/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/v4.31.0/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/v4.31.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/whisper/modeling_whisper.py#L1395"}}),vn=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/v4.31.0/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/v4.31.0/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/v4.31.0/en/model_doc/whisper#transformers.WhisperTokenizer">WhisperTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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/v4.31.0/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/v4.31.0/src/transformers/models/whisper/modeling_whisper.py#L1433",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.31.0/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/v4.31.0/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:$}}}),yn=new R({}),bn=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/v4.31.0/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/v4.31.0/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/v4.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/whisper/modeling_whisper.py#L1838"}}),wn=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/v4.31.0/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/v4.31.0/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/v4.31.0/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/v4.31.0/src/transformers/models/whisper/modeling_whisper.py#L1865",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/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/v4.31.0/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/v4.31.0/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:$}}}),kn=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/v4.31.0/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/v4.31.0/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/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/v4.31.0/en/model_doc/auto#transformers.AutoFeatureExtractor">AutoFeatureExtractor</a> should be used for extracting the fbank features, padding and conversion into a
tensor of type <code>tf.Tensor</code>. See <a href="/docs/transformers/v4.31.0/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/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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/v4.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/whisper/modeling_tf_whisper.py#L1117",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqModelOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.31.0/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/v4.31.0/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:[vg]},$$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/v4.31.0/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/v4.31.0/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/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/v4.31.0/en/model_doc/auto#transformers.AutoFeatureExtractor">AutoFeatureExtractor</a> should be used for extracting the fbank features, padding and conversion into a
tensor of type <code>tf.Tensor</code>. See <a href="/docs/transformers/v4.31.0/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/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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/v4.31.0/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/v4.31.0/src/transformers/models/whisper/modeling_tf_whisper.py#L1232",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqLMOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqLMOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.31.0/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/v4.31.0/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:[yg]},$$scope:{ctx:$}}}),Gt=new ue({props:{anchor:"transformers.TFWhisperForConditionalGeneration.call.example",$$slots:{default:[bg]},$$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/v4.31.0/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/v4.31.0/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/v4.31.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a>
and <a href="/docs/transformers/v4.31.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/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/v4.31.0/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/v4.31.0/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/v4.31.0/en/model_doc/whisper#transformers.WhisperTokenizer">WhisperTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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/v4.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/whisper/modeling_flax_whisper.py#L1110",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/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/v4.31.0/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/v4.31.0/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:[wg]},$$scope:{ctx:$}}}),Zt=new ue({props:{anchor:"transformers.FlaxWhisperModel.__call__.example",$$slots:{default:[kg]},$$scope:{ctx:$}}}),Rn=new R({}),Vn=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/v4.31.0/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/v4.31.0/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/v4.31.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a>
and <a href="/docs/transformers/v4.31.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/whisper/modeling_flax_whisper.py#L1244"}}),On=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/v4.31.0/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/v4.31.0/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/v4.31.0/en/model_doc/whisper#transformers.WhisperTokenizer">WhisperTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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/v4.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/whisper/modeling_flax_whisper.py#L1110",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/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/v4.31.0/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/v4.31.0/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:$}}}),Dn=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/v4.31.0/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/v4.31.0/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/v4.31.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a>
and <a href="/docs/transformers/v4.31.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/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/v4.31.0/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/v4.31.0/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/v4.31.0/en/model_doc/whisper#transformers.WhisperTokenizer">WhisperTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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/v4.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/whisper/modeling_flax_whisper.py#L1601",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/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/v4.31.0/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/v4.31.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Pt=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"),y=p(),f=n("h1"),u=n("a"),g=n("span"),b(d.$$.fragment),m=p(),M=n("span"),Z=a("Whisper"),C=p(),J=n("h2"),q=n("a"),I=n("span"),b(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."),Oa=p(),cs=n("p"),gd=a("The abstract from the paper is the following:"),Da=p(),ps=n("p"),ur=n("em"),vd=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"),yd=a("Tips:"),Qa=p(),Q=n("ul"),fr=n("li"),bd=a("The model usually performs well without requiring any finetuning."),wd=p(),mo=n("li"),kd=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"),b(vo.$$.fragment),Ud=p(),vr=n("span"),Zd=a("WhisperConfig"),ti=p(),P=n("div"),b(yo.$$.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"),Vd=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
`),bo=n("a"),Pd=a("openai/whisper-tiny"),Sd=a(" architecture."),Bd=p(),je=n("p"),Ld=a("Configuration objects inherit from "),_s=n("a"),Yd=a("PretrainedConfig"),Od=a(` and can be used to control the model outputs. Read the
documentation from `),gs=n("a"),Dd=a("PretrainedConfig"),Hd=a(" for more information."),Qd=p(),b(st.$$.fragment),oi=p(),Ee=n("h2"),rt=n("a"),yr=n("span"),b(wo.$$.fragment),Kd=p(),br=n("span"),el=a("WhisperTokenizer"),ni=p(),z=n("div"),b(ko.$$.fragment),tl=p(),wr=n("p"),ol=a("Construct a Whisper tokenizer."),nl=p(),To=n("p"),sl=a("This tokenizer inherits from "),vs=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(),ve=n("div"),b(Wo.$$.fragment),dl=p(),kr=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(),b(at.$$.fragment),pl=p(),it=n("div"),b(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"),b($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"),vl=a(" method."),yl=p(),ye=n("div"),b(Mo.$$.fragment),bl=p(),ys=n("p"),wl=a("Create the token type IDs corresponding to the sequences passed. "),bs=n("a"),kl=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(),ws=n("div"),b(zo.$$.fragment),si=p(),Ce=n("h2"),lt=n("a"),$r=n("span"),b(jo.$$.fragment),$l=p(),Fr=n("span"),Fl=a("WhisperTokenizerFast"),ri=p(),j=n("div"),b(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 "),ks=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(),be=n("div"),b(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(),b(ct.$$.fragment),Xl=p(),pt=n("div"),b(Io.$$.fragment),Al=p(),jr=n("p"),Rl=a("Build model inputs from a sequence by appending eos_token_id."),Vl=p(),ht=n("div"),b(Go.$$.fragment),Pl=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(),we=n("div"),b(Uo.$$.fragment),Ol=p(),Ts=n("p"),Dl=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"),b(Zo.$$.fragment),ai=p(),qe=n("h2"),mt=n("a"),qr=n("span"),b(Xo.$$.fragment),tc=p(),Jr=n("span"),oc=a("WhisperFeatureExtractor"),ii=p(),X=n("div"),b(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"),b(Vo.$$.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"),b(Po.$$.fragment),vc=p(),Xr=n("span"),yc=a("WhisperProcessor"),li=p(),E=n("div"),b(So.$$.fragment),bc=p(),Ar=n("p"),wc=a(`Constructs a Whisper processor which wraps a Whisper feature extractor and a Whisper tokenizer into a single
processor.`),kc=p(),V=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"),b(Lo.$$.fragment),Ic=p(),S=n("p"),Gc=a("Forwards the "),Vr=n("code"),Nc=a("audio"),Uc=a(" argument to WhisperFeatureExtractor\u2019s "),Yo=n("a"),Pr=n("strong"),Zc=a("call"),Xc=a("()"),Ac=a(" and the "),Sr=n("code"),Rc=a("text"),Vc=a(`
argument to `),Oo=n("a"),Br=n("strong"),Pc=a("call"),Sc=a("()"),Bc=a(`. Please refer to the doctsring of the above two methods for more
information.`),Lc=p(),ke=n("div"),b(Do.$$.fragment),Yc=p(),Lr=n("p"),Oc=a("Instantiate a processor associated with a pretrained model."),Dc=p(),b(gt.$$.fragment),Hc=p(),Te=n("div"),b(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(),b(vt.$$.fragment),np=p(),yt=n("div"),b(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(),bt=n("div"),b(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"),wt=n("a"),Yr=n("span"),b(nn.$$.fragment),mp=p(),Or=n("span"),up=a("WhisperModel"),pi=p(),A=n("div"),b(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"),vp=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.)`),yp=p(),an=n("p"),bp=a("This model is also a PyTorch "),dn=n("a"),wp=a("torch.nn.Module"),kp=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"),b(ln.$$.fragment),Wp=p(),Ne=n("p"),xp=a("The "),Is=n("a"),$p=a("WhisperModel"),Fp=a(" forward method, overrides the "),Dr=n("code"),Mp=a("__call__"),zp=a(" special method."),jp=p(),b(kt.$$.fragment),Ep=p(),b(Tt.$$.fragment),Cp=p(),Wt=n("div"),b(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"),b(mn.$$.fragment),Np=p(),Qr=n("span"),Up=a("WhisperForConditionalGeneration"),mi=p(),B=n("div"),b(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.)`),Vp=p(),_n=n("p"),Pp=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"),b(vn.$$.fragment),Yp=p(),Ze=n("p"),Op=a("The "),Ns=n("a"),Dp=a("WhisperForConditionalGeneration"),Hp=a(" forward method, overrides the "),Kr=n("code"),Qp=a("__call__"),Kp=a(" special method."),eh=p(),b($t.$$.fragment),th=p(),b(Ft.$$.fragment),ui=p(),Xe=n("h2"),Mt=n("a"),ea=n("span"),b(yn.$$.fragment),oh=p(),ta=n("span"),nh=a("WhisperForAudioClassification"),fi=p(),de=n("div"),b(bn.$$.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"),b(wn.$$.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(),b(zt.$$.fragment),uh=p(),b(jt.$$.fragment),_i=p(),Re=n("h2"),Et=n("a"),sa=n("span"),b(kn.$$.fragment),fh=p(),ra=n("span"),_h=a("TFWhisperModel"),gi=p(),L=n("div"),b(Tn.$$.fragment),gh=p(),Wn=n("p"),vh=a(`The bare Whisper Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Zs=n("a"),yh=a("TFPreTrainedModel"),bh=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.)`),wh=p(),xn=n("p"),kh=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"),b(Fn.$$.fragment),$h=p(),Ve=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(),b(Ct.$$.fragment),qh=p(),b(qt.$$.fragment),vi=p(),Pe=n("h2"),Jt=n("a"),ia=n("span"),b(Mn.$$.fragment),Jh=p(),da=n("span"),Ih=a("TFWhisperForConditionalGeneration"),yi=p(),Y=n("div"),b(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"),Vh=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.`),Ph=p(),se=n("div"),b(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"),Oh=a("__call__"),Dh=a(" special method."),Hh=p(),b(It.$$.fragment),Qh=p(),b(Gt.$$.fragment),bi=p(),Be=n("h2"),Nt=n("a"),ca=n("span"),b(Jn.$$.fragment),Kh=p(),pa=n("span"),em=a("FlaxWhisperModel"),wi=p(),O=n("div"),b(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 `),Vs=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"),b(An.$$.fragment),_m=p(),Ye=n("p"),gm=a("The "),_a=n("code"),vm=a("FlaxWhisperPreTrainedModel"),ym=a(" forward method, overrides the "),ga=n("code"),bm=a("__call__"),wm=a(" special method."),km=p(),b(Ut.$$.fragment),Tm=p(),b(Zt.$$.fragment),ki=p(),Oe=n("h2"),Xt=n("a"),va=n("span"),b(Rn.$$.fragment),Wm=p(),ya=n("span"),xm=a("FlaxWhisperForConditionalGeneration"),Ti=p(),D=n("div"),b(Vn.$$.fragment),$m=p(),De=n("p"),Fm=a(`The Whisper Model with a language modeling head.
This model inherits from `),Ps=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
`),Pn=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"),ba=n("li"),Sn=n("a"),qm=a("Just-In-Time (JIT) compilation"),Jm=p(),wa=n("li"),Bn=n("a"),Im=a("Automatic Differentiation"),Gm=p(),ka=n("li"),Ln=n("a"),Nm=a("Vectorization"),Um=p(),Ta=n("li"),Yn=n("a"),Zm=a("Parallelization"),Xm=p(),ae=n("div"),b(On.$$.fragment),Am=p(),He=n("p"),Rm=a("The "),Wa=n("code"),Vm=a("FlaxWhisperPreTrainedModel"),Pm=a(" forward method, overrides the "),xa=n("code"),Sm=a("__call__"),Bm=a(" special method."),Lm=p(),b(At.$$.fragment),Ym=p(),b(Rt.$$.fragment),Wi=p(),Qe=n("h2"),Vt=n("a"),$a=n("span"),b(Dn.$$.fragment),Om=p(),Fa=n("span"),Dm=a("FlaxWhisperForAudioClassification"),xi=p(),H=n("div"),b(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"),b(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."),vu=p(),b(Pt.$$.fragment),yu=p(),b(St.$$.fragment),this.h()},l(o){const _=sg('[data-svelte="svelte-1phssyn"]',document.head);c=s(_,"META",{name:!0,content:!0}),_.forEach(t),y=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);w(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);w(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),Oa=h(o),cs=s(o,"P",{});var Xa=r(cs);gd=i(Xa,"The abstract from the paper is the following:"),Xa.forEach(t),Da=h(o),ps=s(o,"P",{});var Aa=r(ps);ur=s(Aa,"EM",{});var Ra=r(ur);vd=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 Va=r(hs);yd=i(Va,"Tips:"),Va.forEach(t),Qa=h(o),Q=s(o,"UL",{});var he=r(Q);fr=s(he,"LI",{});var Pa=r(fr);bd=i(Pa,"The model usually performs well without requiring any finetuning."),Pa.forEach(t),wd=h(he),mo=s(he,"LI",{});var is=r(mo);kd=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);w(vo.$$.fragment,zu),zu.forEach(t),Mu.forEach(t),Ud=h(Fi),vr=s(Fi,"SPAN",{});var ju=r(vr);Zd=i(ju,"WhisperConfig"),ju.forEach(t),Fi.forEach(t),ti=h(o),P=s(o,"DIV",{class:!0});var Lt=r(P);w(yo.$$.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),Vd=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
`),bo=s(Ls,"A",{href:!0,rel:!0});var Cu=r(bo);Pd=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),Od=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);Dd=i(Ju,"PretrainedConfig"),Ju.forEach(t),Hd=i(Ys," for more information."),Ys.forEach(t),Qd=h(Lt),w(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);yr=s(Iu,"SPAN",{});var Gu=r(yr);w(wo.$$.fragment,Gu),Gu.forEach(t),Iu.forEach(t),Kd=h(Mi),br=s(Mi,"SPAN",{});var Nu=r(br);el=i(Nu,"WhisperTokenizer"),Nu.forEach(t),Mi.forEach(t),ni=h(o),z=s(o,"DIV",{class:!0});var G=r(z);w(ko.$$.fragment,G),tl=h(G),wr=s(G,"P",{});var Uu=r(wr);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 "),vs=s(zi,"A",{href:!0});var Zu=r(vs);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),ve=s(G,"DIV",{class:!0});var Os=r(ve);w(Wo.$$.fragment,Os),dl=h(Os),kr=s(Os,"P",{});var Xu=r(kr);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(Os),w(at.$$.fragment,Os),Os.forEach(t),pl=h(G),it=s(G,"DIV",{class:!0});var ji=r(it);w(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);w($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),vl=i(Ci," method."),Ci.forEach(t),Ei.forEach(t),yl=h(G),ye=s(G,"DIV",{class:!0});var Ds=r(ye);w(Mo.$$.fragment,Ds),bl=h(Ds),ys=s(Ds,"P",{});var bu=r(ys);wl=i(bu,"Create the token type IDs corresponding to the sequences passed. "),bs=s(bu,"A",{href:!0});var Vu=r(bs);kl=i(Vu,`What are token type
IDs?`),Vu.forEach(t),bu.forEach(t),Tl=h(Ds),xr=s(Ds,"P",{});var Pu=r(xr);Wl=i(Pu,"Should be overridden in a subclass if the model has a special way of building those."),Pu.forEach(t),Ds.forEach(t),xl=h(G),ws=s(G,"DIV",{class:!0});var Su=r(ws);w(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);w(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);w(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 Ou=r(Mr);jl=i(Ou,"tokenizers"),Ou.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 "),ks=s(Ii,"A",{href:!0});var Du=r(ks);Jl=i(Du,"PreTrainedTokenizerFast"),Du.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),be=s(N,"DIV",{class:!0});var Hs=r(be);w(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),w(ct.$$.fragment,Hs),Hs.forEach(t),Xl=h(N),pt=s(N,"DIV",{class:!0});var Gi=r(pt);w(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),Vl=h(N),ht=s(N,"DIV",{class:!0});var Ni=r(ht);w(Go.$$.fragment,Ni),Pl=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),we=s(N,"DIV",{class:!0});var Qs=r(we);w(Uo.$$.fragment,Qs),Ol=h(Qs),Ts=s(Qs,"P",{});var wu=r(Ts);Dl=i(wu,"Create the token type IDs corresponding to the sequences passed. "),Ws=s(wu,"A",{href:!0});var ef=r(Ws);Hl=i(ef,`What are token type
IDs?`),ef.forEach(t),wu.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);w(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);w(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);w(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);w(Vo.$$.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);w(Po.$$.fragment,mf),mf.forEach(t),hf.forEach(t),vc=h(Ri),Xr=s(Ri,"SPAN",{});var uf=r(Xr);yc=i(uf,"WhisperProcessor"),uf.forEach(t),Ri.forEach(t),li=h(o),E=s(o,"DIV",{class:!0});var U=r(E);w(So.$$.fragment,U),bc=h(U),Ar=s(U,"P",{});var ff=r(Ar);wc=i(ff,`Constructs a Whisper processor which wraps a Whisper feature extractor and a Whisper tokenizer into a single
processor.`),ff.forEach(t),kc=h(U),V=s(U,"P",{});var me=r(V);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 vf=r(zs);Fc=i(vf,"WhisperTokenizer"),vf.forEach(t),Mc=i(me,`. See
the `),Bo=s(me,"A",{href:!0});var ku=r(Bo);Rr=s(ku,"STRONG",{});var yf=r(Rr);zc=i(yf,"call"),yf.forEach(t),jc=i(ku,"()"),ku.forEach(t),Ec=i(me," and "),js=s(me,"A",{href:!0});var bf=r(js);Cc=i(bf,"decode()"),bf.forEach(t),qc=i(me," for more information."),me.forEach(t),Jc=h(U),_t=s(U,"DIV",{class:!0});var Vi=r(_t);w(Lo.$$.fragment,Vi),Ic=h(Vi),S=s(Vi,"P",{});var xe=r(S);Gc=i(xe,"Forwards the "),Vr=s(xe,"CODE",{});var wf=r(Vr);Nc=i(wf,"audio"),wf.forEach(t),Uc=i(xe," argument to WhisperFeatureExtractor\u2019s "),Yo=s(xe,"A",{href:!0});var Tu=r(Yo);Pr=s(Tu,"STRONG",{});var kf=r(Pr);Zc=i(kf,"call"),kf.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),Vc=i(xe,`
argument to `),Oo=s(xe,"A",{href:!0});var Wu=r(Oo);Br=s(Wu,"STRONG",{});var Wf=r(Br);Pc=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),Vi.forEach(t),Lc=h(U),ke=s(U,"DIV",{class:!0});var er=r(ke);w(Do.$$.fragment,er),Yc=h(er),Lr=s(er,"P",{});var xf=r(Lr);Oc=i(xf,"Instantiate a processor associated with a pretrained model."),xf.forEach(t),Dc=h(er),w(gt.$$.fragment,er),er.forEach(t),Hc=h(U),Te=s(U,"DIV",{class:!0});var tr=r(Te);w(Ho.$$.fragment,tr),Qc=h(tr),Qo=s(tr,"P",{});var Pi=r(Qo);Kc=i(Pi,`Saves the attributes of this processor (feature extractor, tokenizer\u2026) in the specified directory so that it
can be reloaded using the `),Es=s(Pi,"A",{href:!0});var $f=r(Es);ep=i($f,"from_pretrained()"),$f.forEach(t),tp=i(Pi," method."),Pi.forEach(t),op=h(tr),w(vt.$$.fragment,tr),tr.forEach(t),np=h(U),yt=s(U,"DIV",{class:!0});var Si=r(yt);w(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),bt=s(U,"DIV",{class:!0});var Li=r(bt);w(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 Oi=r(Ge);wt=s(Oi,"A",{id:!0,class:!0,href:!0});var zf=r(wt);Yr=s(zf,"SPAN",{});var jf=r(Yr);w(nn.$$.fragment,jf),jf.forEach(t),zf.forEach(t),mp=h(Oi),Or=s(Oi,"SPAN",{});var Ef=r(Or);up=i(Ef,"WhisperModel"),Ef.forEach(t),Oi.forEach(t),pi=h(o),A=s(o,"DIV",{class:!0});var $e=r(A);w(sn.$$.fragment,$e),fp=h($e),rn=s($e,"P",{});var Di=r(rn);_p=i(Di,`The bare Whisper Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Js=s(Di,"A",{href:!0});var Cf=r(Js);gp=i(Cf,"PreTrainedModel"),Cf.forEach(t),vp=i(Di,`. 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.)`),Di.forEach(t),yp=h($e),an=s($e,"P",{});var Hi=r(an);bp=i(Hi,"This model is also a PyTorch "),dn=s(Hi,"A",{href:!0,rel:!0});var qf=r(dn);wp=i(qf,"torch.nn.Module"),qf.forEach(t),kp=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);w(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 "),Dr=s(or,"CODE",{});var If=r(Dr);Mp=i(If,"__call__"),If.forEach(t),zp=i(or," special method."),or.forEach(t),jp=h(Yt),w(kt.$$.fragment,Yt),Ep=h(Yt),w(Tt.$$.fragment,Yt),Yt.forEach(t),Cp=h($e),Wt=s($e,"DIV",{class:!0});var Qi=r(Wt);w(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);w(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 Ot=r(B);w(un.$$.fragment,Ot),Zp=h(Ot),fn=s(Ot,"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),Vp=h(Ot),_n=s(Ot,"P",{});var od=r(_n);Pp=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(Ot),te=s(Ot,"DIV",{class:!0});var Dt=r(te);w(vn.$$.fragment,Dt),Yp=h(Dt),Ze=s(Dt,"P",{});var nr=r(Ze);Op=i(nr,"The "),Ns=s(nr,"A",{href:!0});var Rf=r(Ns);Dp=i(Rf,"WhisperForConditionalGeneration"),Rf.forEach(t),Hp=i(nr," forward method, overrides the "),Kr=s(nr,"CODE",{});var Vf=r(Kr);Qp=i(Vf,"__call__"),Vf.forEach(t),Kp=i(nr," special method."),nr.forEach(t),eh=h(Dt),w($t.$$.fragment,Dt),th=h(Dt),w(Ft.$$.fragment,Dt),Dt.forEach(t),Ot.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 Pf=r(Mt);ea=s(Pf,"SPAN",{});var Sf=r(ea);w(yn.$$.fragment,Sf),Sf.forEach(t),Pf.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);w(bn.$$.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);w(wn.$$.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 Of=r(na);ph=i(Of,"__call__"),Of.forEach(t),hh=i(rr," special method."),rr.forEach(t),mh=h(Ht),w(zt.$$.fragment,Ht),uh=h(Ht),w(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 Df=r(Et);sa=s(Df,"SPAN",{});var Hf=r(sa);w(kn.$$.fragment,Hf),Hf.forEach(t),Df.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);w(Tn.$$.fragment,Qt),gh=h(Qt),Wn=s(Qt,"P",{});var rd=r(Wn);vh=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);yh=i(Kf,"TFPreTrainedModel"),Kf.forEach(t),bh=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),wh=h(Qt),xn=s(Qt,"P",{});var ad=r(xn);kh=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);w(Fn.$$.fragment,Kt),$h=h(Kt),Ve=s(Kt,"P",{});var ar=r(Ve);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),w(Ct.$$.fragment,Kt),qh=h(Kt),w(qt.$$.fragment,Kt),Kt.forEach(t),Qt.forEach(t),vi=h(o),Pe=s(o,"H2",{class:!0});var id=r(Pe);Jt=s(id,"A",{id:!0,class:!0,href:!0});var n_=r(Jt);ia=s(n_,"SPAN",{});var s_=r(ia);w(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),yi=h(o),Y=s(o,"DIV",{class:!0});var eo=r(Y);w(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),Vh=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),Ph=h(eo),se=s(eo,"DIV",{class:!0});var to=r(se);w(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);Oh=i(l_,"__call__"),l_.forEach(t),Dh=i(ir," special method."),ir.forEach(t),Hh=h(to),w(It.$$.fragment,to),Qh=h(to),w(Gt.$$.fragment,to),to.forEach(t),eo.forEach(t),bi=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);w(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),wi=h(o),O=s(o,"DIV",{class:!0});var oo=r(O);w(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 `),Vs=s(dr,"A",{href:!0});var m_=r(Vs);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 v_=r(Un);cm=i(v_,"Automatic Differentiation"),v_.forEach(t),g_.forEach(t),pm=h(no),ua=s(no,"LI",{});var y_=r(ua);Zn=s(y_,"A",{href:!0,rel:!0});var b_=r(Zn);hm=i(b_,"Vectorization"),b_.forEach(t),y_.forEach(t),mm=h(no),fa=s(no,"LI",{});var w_=r(fa);Xn=s(w_,"A",{href:!0,rel:!0});var k_=r(Xn);um=i(k_,"Parallelization"),k_.forEach(t),w_.forEach(t),no.forEach(t),fm=h(oo),re=s(oo,"DIV",{class:!0});var so=r(re);w(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);vm=i(T_,"FlaxWhisperPreTrainedModel"),T_.forEach(t),ym=i(lr," forward method, overrides the "),ga=s(lr,"CODE",{});var W_=r(ga);bm=i(W_,"__call__"),W_.forEach(t),wm=i(lr," special method."),lr.forEach(t),km=h(so),w(Ut.$$.fragment,so),Tm=h(so),w(Zt.$$.fragment,so),so.forEach(t),oo.forEach(t),ki=h(o),Oe=s(o,"H2",{class:!0});var pd=r(Oe);Xt=s(pd,"A",{id:!0,class:!0,href:!0});var x_=r(Xt);va=s(x_,"SPAN",{});var $_=r(va);w(Rn.$$.fragment,$_),$_.forEach(t),x_.forEach(t),Wm=h(pd),ya=s(pd,"SPAN",{});var F_=r(ya);xm=i(F_,"FlaxWhisperForConditionalGeneration"),F_.forEach(t),pd.forEach(t),Ti=h(o),D=s(o,"DIV",{class:!0});var ro=r(D);w(Vn.$$.fragment,ro),$m=h(ro),De=s(ro,"P",{});var cr=r(De);Fm=i(cr,`The Whisper Model with a language modeling head.
This model inherits from `),Ps=s(cr,"A",{href:!0});var M_=r(Ps);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
`),Pn=s(cr,"A",{href:!0,rel:!0});var z_=r(Pn);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);ba=s(ao,"LI",{});var j_=r(ba);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),wa=s(ao,"LI",{});var C_=r(wa);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),ka=s(ao,"LI",{});var J_=r(ka);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);w(On.$$.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);Vm=i(U_,"FlaxWhisperPreTrainedModel"),U_.forEach(t),Pm=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),w(At.$$.fragment,io),Ym=h(io),w(Rt.$$.fragment,io),io.forEach(t),ro.forEach(t),Wi=h(o),Qe=s(o,"H2",{class:!0});var hd=r(Qe);Vt=s(hd,"A",{id:!0,class:!0,href:!0});var X_=r(Vt);$a=s(X_,"SPAN",{});var A_=r($a);w(Dn.$$.fragment,A_),A_.forEach(t),X_.forEach(t),Om=h(hd),Fa=s(hd,"SPAN",{});var R_=r(Fa);Dm=i(R_,"FlaxWhisperForAudioClassification"),R_.forEach(t),hd.forEach(t),xi=h(o),H=s(o,"DIV",{class:!0});var lo=r(H);w(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 V_=r(Ss);Km=i(V_,"FlaxPreTrainedModel"),V_.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 P_=r(Qn);tu=i(P_,"flax.nn.Module"),P_.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 O_=r(ja);ts=s(O_,"A",{href:!0,rel:!0});var D_=r(ts);du=i(D_,"Vectorization"),D_.forEach(t),O_.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);w(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),vu=h(po),w(Pt.$$.fragment,po),yu=h(po),w(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/v4.31.0/en/main_classes/text_generation#transformers.GenerationMixin.generate"),l(us,"href","/docs/transformers/v4.31.0/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/v4.31.0/en/model_doc/whisper#transformers.WhisperModel"),l(bo,"href","https://huggingface.co/openai/whisper-tiny"),l(bo,"rel","nofollow"),l(_s,"href","/docs/transformers/v4.31.0/en/main_classes/configuration#transformers.PretrainedConfig"),l(gs,"href","/docs/transformers/v4.31.0/en/main_classes/configuration#transformers.PretrainedConfig"),l(P,"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(vs,"href","/docs/transformers/v4.31.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),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(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(bs,"href","../glossary#token-type-ids"),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(ws,"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(ks,"href","/docs/transformers/v4.31.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),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(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(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(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/v4.31.0/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/v4.31.0/en/model_doc/whisper#transformers.WhisperProcessor"),l(Ms,"href","/docs/transformers/v4.31.0/en/model_doc/whisper#transformers.WhisperFeatureExtractor"),l(zs,"href","/docs/transformers/v4.31.0/en/model_doc/whisper#transformers.WhisperTokenizer"),l(Bo,"href","/docs/transformers/v4.31.0/en/model_doc/whisper#transformers.WhisperProcessor.__call__"),l(js,"href","/docs/transformers/v4.31.0/en/model_doc/whisper#transformers.WhisperProcessor.decode"),l(Yo,"href","/docs/transformers/v4.31.0/en/model_doc/whisper#transformers.WhisperFeatureExtractor.__call__"),l(Oo,"href","/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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(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(Es,"href","/docs/transformers/v4.31.0/en/model_doc/trocr#transformers.TrOCRProcessor.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/v4.31.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.batch_decode"),l(yt,"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/v4.31.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.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(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(wt,"id","transformers.WhisperModel"),l(wt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(wt,"href","#transformers.WhisperModel"),l(Ge,"class","relative group"),l(Js,"href","/docs/transformers/v4.31.0/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/v4.31.0/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/v4.31.0/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/v4.31.0/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/v4.31.0/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/v4.31.0/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/v4.31.0/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(Pe,"class","relative group"),l(As,"href","/docs/transformers/v4.31.0/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/v4.31.0/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(Vs,"href","/docs/transformers/v4.31.0/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(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(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(Oe,"class","relative group"),l(Ps,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),l(Pn,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),l(Pn,"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(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(Vt,"id","transformers.FlaxWhisperForAudioClassification"),l(Vt,"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(Vt,"href","#transformers.FlaxWhisperForAudioClassification"),l(Qe,"class","relative group"),l(Ss,"href","/docs/transformers/v4.31.0/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/v4.31.0/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),v(o,y,_),v(o,f,_),e(f,u),e(u,g),k(d,g,null),e(f,m),e(f,M),e(M,Z),v(o,C,_),v(o,J,_),e(J,q),e(q,I),k(ge,I,null),e(J,ls),e(J,tt),e(tt,md),v(o,Ya,_),v(o,ot,_),e(ot,ud),e(ot,ho),e(ho,fd),e(ot,_d),v(o,Oa,_),v(o,cs,_),e(cs,gd),v(o,Da,_),v(o,ps,_),e(ps,ur),e(ur,vd),v(o,Ha,_),v(o,hs,_),e(hs,yd),v(o,Qa,_),v(o,Q,_),e(Q,fr),e(fr,bd),e(Q,wd),e(Q,mo),e(mo,kd),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),v(o,Ka,_),v(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),v(o,ei,_),v(o,Me,_),e(Me,nt),e(nt,gr),k(vo,gr,null),e(Me,Ud),e(Me,vr),e(vr,Zd),v(o,ti,_),v(o,P,_),k(yo,P,null),e(P,Xd),e(P,ze),e(ze,Ad),e(ze,fs),e(fs,Rd),e(ze,Vd),e(ze,bo),e(bo,Pd),e(ze,Sd),e(P,Bd),e(P,je),e(je,Ld),e(je,_s),e(_s,Yd),e(je,Od),e(je,gs),e(gs,Dd),e(je,Hd),e(P,Qd),k(st,P,null),v(o,oi,_),v(o,Ee,_),e(Ee,rt),e(rt,yr),k(wo,yr,null),e(Ee,Kd),e(Ee,br),e(br,el),v(o,ni,_),v(o,z,_),k(ko,z,null),e(z,tl),e(z,wr),e(wr,ol),e(z,nl),e(z,To),e(To,sl),e(To,vs),e(vs,rl),e(To,al),e(z,il),e(z,ve),k(Wo,ve,null),e(ve,dl),e(ve,kr),e(kr,ll),e(ve,cl),k(at,ve,null),e(z,pl),e(z,it),k(xo,it,null),e(it,hl),e(it,Tr),e(Tr,ml),e(z,ul),e(z,dt),k($o,dt,null),e(dt,fl),e(dt,Fo),e(Fo,_l),e(Fo,Wr),e(Wr,gl),e(Fo,vl),e(z,yl),e(z,ye),k(Mo,ye,null),e(ye,bl),e(ye,ys),e(ys,wl),e(ys,bs),e(bs,kl),e(ye,Tl),e(ye,xr),e(xr,Wl),e(z,xl),e(z,ws),k(zo,ws,null),v(o,si,_),v(o,Ce,_),e(Ce,lt),e(lt,$r),k(jo,$r,null),e(Ce,$l),e(Ce,Fr),e(Fr,Fl),v(o,ri,_),v(o,j,_),k(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,ks),e(ks,Jl),e(qo,Il),e(j,Gl),e(j,be),k(Jo,be,null),e(be,Nl),e(be,zr),e(zr,Ul),e(be,Zl),k(ct,be,null),e(j,Xl),e(j,pt),k(Io,pt,null),e(pt,Al),e(pt,jr),e(jr,Rl),e(j,Vl),e(j,ht),k(Go,ht,null),e(ht,Pl),e(ht,No),e(No,Sl),e(No,Er),e(Er,Bl),e(No,Ll),e(j,Yl),e(j,we),k(Uo,we,null),e(we,Ol),e(we,Ts),e(Ts,Dl),e(Ts,Ws),e(Ws,Hl),e(we,Ql),e(we,Cr),e(Cr,Kl),e(j,ec),e(j,xs),k(Zo,xs,null),v(o,ai,_),v(o,qe,_),e(qe,mt),e(mt,qr),k(Xo,qr,null),e(qe,tc),e(qe,Jr),e(Jr,oc),v(o,ii,_),v(o,X,_),k(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),k(Vo,ut,null),e(ut,_c),e(ut,Ur),e(Ur,gc),v(o,di,_),v(o,Ie,_),e(Ie,ft),e(ft,Zr),k(Po,Zr,null),e(Ie,vc),e(Ie,Xr),e(Xr,yc),v(o,li,_),v(o,E,_),k(So,E,null),e(E,bc),e(E,Ar),e(Ar,wc),e(E,kc),e(E,V),e(V,Fs),e(Fs,Tc),e(V,Wc),e(V,Ms),e(Ms,xc),e(V,$c),e(V,zs),e(zs,Fc),e(V,Mc),e(V,Bo),e(Bo,Rr),e(Rr,zc),e(Bo,jc),e(V,Ec),e(V,js),e(js,Cc),e(V,qc),e(E,Jc),e(E,_t),k(Lo,_t,null),e(_t,Ic),e(_t,S),e(S,Gc),e(S,Vr),e(Vr,Nc),e(S,Uc),e(S,Yo),e(Yo,Pr),e(Pr,Zc),e(Yo,Xc),e(S,Ac),e(S,Sr),e(Sr,Rc),e(S,Vc),e(S,Oo),e(Oo,Br),e(Br,Pc),e(Oo,Sc),e(S,Bc),e(E,Lc),e(E,ke),k(Do,ke,null),e(ke,Yc),e(ke,Lr),e(Lr,Oc),e(ke,Dc),k(gt,ke,null),e(E,Hc),e(E,Te),k(Ho,Te,null),e(Te,Qc),e(Te,Qo),e(Qo,Kc),e(Qo,Es),e(Es,ep),e(Qo,tp),e(Te,op),k(vt,Te,null),e(E,np),e(E,yt),k(Ko,yt,null),e(yt,sp),e(yt,en),e(en,rp),e(en,Cs),e(Cs,ap),e(en,ip),e(E,dp),e(E,bt),k(tn,bt,null),e(bt,lp),e(bt,on),e(on,cp),e(on,qs),e(qs,pp),e(on,hp),v(o,ci,_),v(o,Ge,_),e(Ge,wt),e(wt,Yr),k(nn,Yr,null),e(Ge,mp),e(Ge,Or),e(Or,up),v(o,pi,_),v(o,A,_),k(sn,A,null),e(A,fp),e(A,rn),e(rn,_p),e(rn,Js),e(Js,gp),e(rn,vp),e(A,yp),e(A,an),e(an,bp),e(an,dn),e(dn,wp),e(an,kp),e(A,Tp),e(A,ee),k(ln,ee,null),e(ee,Wp),e(ee,Ne),e(Ne,xp),e(Ne,Is),e(Is,$p),e(Ne,Fp),e(Ne,Dr),e(Dr,Mp),e(Ne,zp),e(ee,jp),k(kt,ee,null),e(ee,Ep),k(Tt,ee,null),e(A,Cp),e(A,Wt),k(cn,Wt,null),e(Wt,qp),e(Wt,pn),e(pn,Jp),e(pn,hn),e(hn,Ip),e(pn,Gp),v(o,hi,_),v(o,Ue,_),e(Ue,xt),e(xt,Hr),k(mn,Hr,null),e(Ue,Np),e(Ue,Qr),e(Qr,Up),v(o,mi,_),v(o,B,_),k(un,B,null),e(B,Zp),e(B,fn),e(fn,Xp),e(fn,Gs),e(Gs,Ap),e(fn,Rp),e(B,Vp),e(B,_n),e(_n,Pp),e(_n,gn),e(gn,Sp),e(_n,Bp),e(B,Lp),e(B,te),k(vn,te,null),e(te,Yp),e(te,Ze),e(Ze,Op),e(Ze,Ns),e(Ns,Dp),e(Ze,Hp),e(Ze,Kr),e(Kr,Qp),e(Ze,Kp),e(te,eh),k($t,te,null),e(te,th),k(Ft,te,null),v(o,ui,_),v(o,Xe,_),e(Xe,Mt),e(Mt,ea),k(yn,ea,null),e(Xe,oh),e(Xe,ta),e(ta,nh),v(o,fi,_),v(o,de,_),k(bn,de,null),e(de,sh),e(de,oa),e(oa,rh),e(de,ah),e(de,oe),k(wn,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),k(zt,oe,null),e(oe,uh),k(jt,oe,null),v(o,_i,_),v(o,Re,_),e(Re,Et),e(Et,sa),k(kn,sa,null),e(Re,fh),e(Re,ra),e(ra,_h),v(o,gi,_),v(o,L,_),k(Tn,L,null),e(L,gh),e(L,Wn),e(Wn,vh),e(Wn,Zs),e(Zs,yh),e(Wn,bh),e(L,wh),e(L,xn),e(xn,kh),e(xn,$n),e($n,Th),e(xn,Wh),e(L,xh),e(L,ne),k(Fn,ne,null),e(ne,$h),e(ne,Ve),e(Ve,Fh),e(Ve,Xs),e(Xs,Mh),e(Ve,zh),e(Ve,aa),e(aa,jh),e(Ve,Eh),e(ne,Ch),k(Ct,ne,null),e(ne,qh),k(qt,ne,null),v(o,vi,_),v(o,Pe,_),e(Pe,Jt),e(Jt,ia),k(Mn,ia,null),e(Pe,Jh),e(Pe,da),e(da,Ih),v(o,yi,_),v(o,Y,_),k(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,Vh),e(Y,Ph),e(Y,se),k(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,Oh),e(Se,Dh),e(se,Hh),k(It,se,null),e(se,Qh),k(Gt,se,null),v(o,bi,_),v(o,Be,_),e(Be,Nt),e(Nt,ca),k(Jn,ca,null),e(Be,Kh),e(Be,pa),e(pa,em),v(o,wi,_),v(o,O,_),k(In,O,null),e(O,tm),e(O,Le),e(Le,om),e(Le,Vs),e(Vs,nm),e(Le,sm),e(Le,Gn),e(Gn,rm),e(Le,am),e(O,im),e(O,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(O,fm),e(O,re),k(An,re,null),e(re,_m),e(re,Ye),e(Ye,gm),e(Ye,_a),e(_a,vm),e(Ye,ym),e(Ye,ga),e(ga,bm),e(Ye,wm),e(re,km),k(Ut,re,null),e(re,Tm),k(Zt,re,null),v(o,ki,_),v(o,Oe,_),e(Oe,Xt),e(Xt,va),k(Rn,va,null),e(Oe,Wm),e(Oe,ya),e(ya,xm),v(o,Ti,_),v(o,D,_),k(Vn,D,null),e(D,$m),e(D,De),e(De,Fm),e(De,Ps),e(Ps,Mm),e(De,zm),e(De,Pn),e(Pn,jm),e(De,Em),e(D,Cm),e(D,ce),e(ce,ba),e(ba,Sn),e(Sn,qm),e(ce,Jm),e(ce,wa),e(wa,Bn),e(Bn,Im),e(ce,Gm),e(ce,ka),e(ka,Ln),e(Ln,Nm),e(ce,Um),e(ce,Ta),e(Ta,Yn),e(Yn,Zm),e(D,Xm),e(D,ae),k(On,ae,null),e(ae,Am),e(ae,He),e(He,Rm),e(He,Wa),e(Wa,Vm),e(He,Pm),e(He,xa),e(xa,Sm),e(He,Bm),e(ae,Lm),k(At,ae,null),e(ae,Ym),k(Rt,ae,null),v(o,Wi,_),v(o,Qe,_),e(Qe,Vt),e(Vt,$a),k(Dn,$a,null),e(Qe,Om),e(Qe,Fa),e(Fa,Dm),v(o,xi,_),v(o,H,_),k(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),k(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,vu),k(Pt,ie,null),e(ie,yu),k(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}),vt.$set(rs);const Ga={};_&2&&(Ga.$$scope={dirty:_,ctx:o}),kt.$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 Va={};_&2&&(Va.$$scope={dirty:_,ctx:o}),It.$set(Va);const he={};_&2&&(he.$$scope={dirty:_,ctx:o}),Gt.$set(he);const Pa={};_&2&&(Pa.$$scope={dirty:_,ctx:o}),Ut.$set(Pa);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}),Pt.$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(vo.$$.fragment,o),T(yo.$$.fragment,o),T(st.$$.fragment,o),T(wo.$$.fragment,o),T(ko.$$.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(Vo.$$.fragment,o),T(Po.$$.fragment,o),T(So.$$.fragment,o),T(Lo.$$.fragment,o),T(Do.$$.fragment,o),T(gt.$$.fragment,o),T(Ho.$$.fragment,o),T(vt.$$.fragment,o),T(Ko.$$.fragment,o),T(tn.$$.fragment,o),T(nn.$$.fragment,o),T(sn.$$.fragment,o),T(ln.$$.fragment,o),T(kt.$$.fragment,o),T(Tt.$$.fragment,o),T(cn.$$.fragment,o),T(mn.$$.fragment,o),T(un.$$.fragment,o),T(vn.$$.fragment,o),T($t.$$.fragment,o),T(Ft.$$.fragment,o),T(yn.$$.fragment,o),T(bn.$$.fragment,o),T(wn.$$.fragment,o),T(zt.$$.fragment,o),T(jt.$$.fragment,o),T(kn.$$.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(Vn.$$.fragment,o),T(On.$$.fragment,o),T(At.$$.fragment,o),T(Rt.$$.fragment,o),T(Dn.$$.fragment,o),T(Hn.$$.fragment,o),T(ns.$$.fragment,o),T(Pt.$$.fragment,o),T(St.$$.fragment,o),$i=!0)},o(o){W(d.$$.fragment,o),W(ge.$$.fragment,o),W(vo.$$.fragment,o),W(yo.$$.fragment,o),W(st.$$.fragment,o),W(wo.$$.fragment,o),W(ko.$$.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(Vo.$$.fragment,o),W(Po.$$.fragment,o),W(So.$$.fragment,o),W(Lo.$$.fragment,o),W(Do.$$.fragment,o),W(gt.$$.fragment,o),W(Ho.$$.fragment,o),W(vt.$$.fragment,o),W(Ko.$$.fragment,o),W(tn.$$.fragment,o),W(nn.$$.fragment,o),W(sn.$$.fragment,o),W(ln.$$.fragment,o),W(kt.$$.fragment,o),W(Tt.$$.fragment,o),W(cn.$$.fragment,o),W(mn.$$.fragment,o),W(un.$$.fragment,o),W(vn.$$.fragment,o),W($t.$$.fragment,o),W(Ft.$$.fragment,o),W(yn.$$.fragment,o),W(bn.$$.fragment,o),W(wn.$$.fragment,o),W(zt.$$.fragment,o),W(jt.$$.fragment,o),W(kn.$$.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(Vn.$$.fragment,o),W(On.$$.fragment,o),W(At.$$.fragment,o),W(Rt.$$.fragment,o),W(Dn.$$.fragment,o),W(Hn.$$.fragment,o),W(ns.$$.fragment,o),W(Pt.$$.fragment,o),W(St.$$.fragment,o),$i=!1},d(o){t(c),o&&t(y),o&&t(f),x(d),o&&t(C),o&&t(J),x(ge),o&&t(Ya),o&&t(ot),o&&t(Oa),o&&t(cs),o&&t(Da),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(vo),o&&t(ti),o&&t(P),x(yo),x(st),o&&t(oi),o&&t(Ee),x(wo),o&&t(ni),o&&t(z),x(ko),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(Vo),o&&t(di),o&&t(Ie),x(Po),o&&t(li),o&&t(E),x(So),x(Lo),x(Do),x(gt),x(Ho),x(vt),x(Ko),x(tn),o&&t(ci),o&&t(Ge),x(nn),o&&t(pi),o&&t(A),x(sn),x(ln),x(kt),x(Tt),x(cn),o&&t(hi),o&&t(Ue),x(mn),o&&t(mi),o&&t(B),x(un),x(vn),x($t),x(Ft),o&&t(ui),o&&t(Xe),x(yn),o&&t(fi),o&&t(de),x(bn),x(wn),x(zt),x(jt),o&&t(_i),o&&t(Re),x(kn),o&&t(gi),o&&t(L),x(Tn),x(Fn),x(Ct),x(qt),o&&t(vi),o&&t(Pe),x(Mn),o&&t(yi),o&&t(Y),x(zn),x(qn),x(It),x(Gt),o&&t(bi),o&&t(Be),x(Jn),o&&t(wi),o&&t(O),x(In),x(An),x(Ut),x(Zt),o&&t(ki),o&&t(Oe),x(Rn),o&&t(Ti),o&&t(D),x(Vn),x(On),x(At),x(Rt),o&&t(Wi),o&&t(Qe),x(Dn),o&&t(xi),o&&t(H),x(Hn),x(ns),x(Pt),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};
