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 k,h as i,b as l,G as e,g as v,y as w,q as T,o as x,B as $,v as rg,L as fe}from"../../chunks/vendor-hf-doc-builder.js";import{T as We}from"../../chunks/Tip-hf-doc-builder.js";import{D as W}from"../../chunks/Docstring-hf-doc-builder.js";import{C as _e}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as G}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as me}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function ag(F){let c,y,f,m,g;return m=new _e({props:{code:`from transformers import WhisperConfig, WhisperModel

# Initializing a Whisper tiny style configuration
configuration = WhisperConfig()

# Initializing a model (with random weights) from the tiny style configuration
model = WhisperModel(configuration)

# Accessing the model configuration
configuration = model.config`,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(m.$$.fragment)},l(d){c=s(d,"P",{});var u=r(c);y=i(u,"Example:"),u.forEach(t),f=h(d),k(m.$$.fragment,d)},m(d,u){v(d,c,u),e(c,y),v(d,f,u),w(m,d,u),g=!0},p:fe,i(d){g||(T(m.$$.fragment,d),g=!0)},o(d){x(m.$$.fragment,d),g=!1},d(d){d&&t(c),d&&t(f),$(m,d)}}}function ig(F){let c,y,f,m,g;return m=new _e({props:{code:`# instantiate the tokenizer and set the prefix token to Spanish
tokenizer = WhisperTokenizer.from_pretrained("openai/whisper-tiny", language="spanish")
# now switch the prefix token from Spanish to French
tokenizer.set_prefix_tokens(language="french")`,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(m.$$.fragment)},l(d){c=s(d,"P",{});var u=r(c);y=i(u,"update the prefix tokens as required when fine-tuning. Example:"),u.forEach(t),f=h(d),k(m.$$.fragment,d)},m(d,u){v(d,c,u),e(c,y),v(d,f,u),w(m,d,u),g=!0},p:fe,i(d){g||(T(m.$$.fragment,d),g=!0)},o(d){x(m.$$.fragment,d),g=!1},d(d){d&&t(c),d&&t(f),$(m,d)}}}function dg(F){let c,y,f,m,g;return m=new _e({props:{code:`# instantiate the tokenizer and set the prefix token to Spanish
tokenizer = WhisperTokenizerFast.from_pretrained("openai/whisper-tiny", language="spanish")
# now switch the prefix token from Spanish to French
tokenizer.set_prefix_tokens(language="french")`,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(m.$$.fragment)},l(d){c=s(d,"P",{});var u=r(c);y=i(u,"update the prefix tokens as required when fine-tuning. Example:"),u.forEach(t),f=h(d),k(m.$$.fragment,d)},m(d,u){v(d,c,u),e(c,y),v(d,f,u),w(m,d,u),g=!0},p:fe,i(d){g||(T(m.$$.fragment,d),g=!0)},o(d){x(m.$$.fragment,d),g=!1},d(d){d&&t(c),d&&t(f),$(m,d)}}}function lg(F){let c,y,f,m,g,d,u,z,O,C,P;return{c(){c=n("p"),y=a(`This class method is simply calling the feature extractor
`),f=n("a"),m=a("from_pretrained()"),g=a(`, image processor
`),d=n("a"),u=a("ImageProcessingMixin"),z=a(` and the tokenizer
`),O=n("code"),C=a("~tokenization_utils_base.PreTrainedTokenizer.from_pretrained"),P=a(` methods. Please refer to the docstrings of the
methods above for more information.`),this.h()},l(M){c=s(M,"P",{});var A=r(c);y=i(A,`This class method is simply calling the feature extractor
`),f=s(A,"A",{href:!0});var ge=r(f);m=i(ge,"from_pretrained()"),ge.forEach(t),g=i(A,`, image processor
`),d=s(A,"A",{href:!0});var ls=r(d);u=i(ls,"ImageProcessingMixin"),ls.forEach(t),z=i(A,` and the tokenizer
`),O=s(A,"CODE",{});var tt=r(O);C=i(tt,"~tokenization_utils_base.PreTrainedTokenizer.from_pretrained"),tt.forEach(t),P=i(A,` methods. Please refer to the docstrings of the
methods above for more information.`),A.forEach(t),this.h()},h(){l(f,"href","/docs/transformers/v4.29.0/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.from_pretrained"),l(d,"href","/docs/transformers/v4.29.0/en/main_classes/image_processor#transformers.ImageProcessingMixin")},m(M,A){v(M,c,A),e(c,y),e(c,f),e(f,m),e(c,g),e(c,d),e(d,u),e(c,z),e(c,O),e(O,C),e(c,P)},d(M){M&&t(c)}}}function cg(F){let c,y,f,m,g,d,u,z;return{c(){c=n("p"),y=a("This class method is simply calling "),f=n("a"),m=a("save_pretrained()"),g=a(` and
`),d=n("a"),u=a("save_pretrained()"),z=a(`. Please refer to the docstrings of the
methods above for more information.`),this.h()},l(O){c=s(O,"P",{});var C=r(c);y=i(C,"This class method is simply calling "),f=s(C,"A",{href:!0});var P=r(f);m=i(P,"save_pretrained()"),P.forEach(t),g=i(C,` and
`),d=s(C,"A",{href:!0});var M=r(d);u=i(M,"save_pretrained()"),M.forEach(t),z=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.29.0/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.save_pretrained"),l(d,"href","/docs/transformers/v4.29.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.save_pretrained")},m(O,C){v(O,c,C),e(c,y),e(c,f),e(f,m),e(c,g),e(c,d),e(d,u),e(c,z)},d(O){O&&t(c)}}}function pg(F){let c,y,f,m,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"),m=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 u=r(c);y=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var z=r(f);m=i(z,"Module"),z.forEach(t),g=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(d,u){v(d,c,u),e(c,y),e(c,f),e(f,m),e(c,g)},d(d){d&&t(c)}}}function hg(F){let c,y,f,m,g;return m=new _e({props:{code:`import torch
from transformers import AutoFeatureExtractor, WhisperModel
from datasets import load_dataset

model = WhisperModel.from_pretrained("openai/whisper-base")
feature_extractor = AutoFeatureExtractor.from_pretrained("openai/whisper-base")
ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
inputs = feature_extractor(ds[0]["audio"]["array"], return_tensors="pt")
input_features = inputs.input_features
decoder_input_ids = torch.tensor([[1, 1]]) * model.config.decoder_start_token_id
last_hidden_state = model(input_features, decoder_input_ids=decoder_input_ids).last_hidden_state
list(last_hidden_state.shape)`,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(m.$$.fragment)},l(d){c=s(d,"P",{});var u=r(c);y=i(u,"Example:"),u.forEach(t),f=h(d),k(m.$$.fragment,d)},m(d,u){v(d,c,u),e(c,y),v(d,f,u),w(m,d,u),g=!0},p:fe,i(d){g||(T(m.$$.fragment,d),g=!0)},o(d){x(m.$$.fragment,d),g=!1},d(d){d&&t(c),d&&t(f),$(m,d)}}}function ug(F){let c,y,f,m,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"),m=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 u=r(c);y=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var z=r(f);m=i(z,"Module"),z.forEach(t),g=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(d,u){v(d,c,u),e(c,y),e(c,f),e(f,m),e(c,g)},d(d){d&&t(c)}}}function mg(F){let c,y,f,m,g;return m=new _e({props:{code:`import torch
from transformers import AutoProcessor, WhisperForConditionalGeneration
from datasets import load_dataset

processor = AutoProcessor.from_pretrained("openai/whisper-tiny.en")
model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-tiny.en")

ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")

inputs = processor(ds[0]["audio"]["array"], return_tensors="pt")
input_features = inputs.input_features

generated_ids = model.generate(inputs=input_features)

transcription = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
transcription`,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(m.$$.fragment)},l(d){c=s(d,"P",{});var u=r(c);y=i(u,"Example:"),u.forEach(t),f=h(d),k(m.$$.fragment,d)},m(d,u){v(d,c,u),e(c,y),v(d,f,u),w(m,d,u),g=!0},p:fe,i(d){g||(T(m.$$.fragment,d),g=!0)},o(d){x(m.$$.fragment,d),g=!1},d(d){d&&t(c),d&&t(f),$(m,d)}}}function fg(F){let c,y,f,m,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"),m=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 u=r(c);y=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var z=r(f);m=i(z,"Module"),z.forEach(t),g=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(d,u){v(d,c,u),e(c,y),e(c,f),e(f,m),e(c,g)},d(d){d&&t(c)}}}function _g(F){let c,y,f,m,g;return m=new _e({props:{code:`import torch
from transformers import AutoFeatureExtractor, WhisperForAudioClassification
from datasets import load_dataset

feature_extractor = AutoFeatureExtractor.from_pretrained("sanchit-gandhi/whisper-medium-fleurs-lang-id")
model = WhisperForAudioClassification.from_pretrained("sanchit-gandhi/whisper-medium-fleurs-lang-id")

ds = load_dataset("google/fleurs", "all", split="validation", streaming=True)
sample = next(iter(ds))

inputs = feature_extractor(
    sample["audio"]["array"], sampling_rate=sample["audio"]["sampling_rate"], return_tensors="pt"
)
input_features = inputs.input_features

with torch.no_grad():
    logits = model(input_features).logits

predicted_class_ids = torch.argmax(logits).item()
predicted_label = model.config.id2label[predicted_class_ids]
predicted_label`,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;af_za&#x27;</span>`}}),{c(){c=n("p"),y=a("Example:"),f=p(),b(m.$$.fragment)},l(d){c=s(d,"P",{});var u=r(c);y=i(u,"Example:"),u.forEach(t),f=h(d),k(m.$$.fragment,d)},m(d,u){v(d,c,u),e(c,y),v(d,f,u),w(m,d,u),g=!0},p:fe,i(d){g||(T(m.$$.fragment,d),g=!0)},o(d){x(m.$$.fragment,d),g=!1},d(d){d&&t(c),d&&t(f),$(m,d)}}}function gg(F){let c,y,f,m,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"),m=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 u=r(c);y=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var z=r(f);m=i(z,"Module"),z.forEach(t),g=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(d,u){v(d,c,u),e(c,y),e(c,f),e(f,m),e(c,g)},d(d){d&&t(c)}}}function vg(F){let c,y,f,m,g;return m=new _e({props:{code:`import tensorflow as tf
from transformers import TFWhisperModel, AutoFeatureExtractor
from datasets import load_dataset

model = TFWhisperModel.from_pretrained("openai/whisper-base")
feature_extractor = AutoFeatureExtractor.from_pretrained("openai/whisper-base")
ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
inputs = feature_extractor(ds[0]["audio"]["array"], return_tensors="tf")
input_features = inputs.input_features
decoder_input_ids = tf.convert_to_tensor([[1, 1]]) * model.config.decoder_start_token_id
last_hidden_state = model(input_features, decoder_input_ids=decoder_input_ids).last_hidden_state
list(last_hidden_state.shape)`,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(m.$$.fragment)},l(d){c=s(d,"P",{});var u=r(c);y=i(u,"Example:"),u.forEach(t),f=h(d),k(m.$$.fragment,d)},m(d,u){v(d,c,u),e(c,y),v(d,f,u),w(m,d,u),g=!0},p:fe,i(d){g||(T(m.$$.fragment,d),g=!0)},o(d){x(m.$$.fragment,d),g=!1},d(d){d&&t(c),d&&t(f),$(m,d)}}}function yg(F){let c,y,f,m,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"),m=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 u=r(c);y=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var z=r(f);m=i(z,"Module"),z.forEach(t),g=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(d,u){v(d,c,u),e(c,y),e(c,f),e(f,m),e(c,g)},d(d){d&&t(c)}}}function bg(F){let c,y,f,m,g;return m=new _e({props:{code:`import tensorflow as tf
from transformers import AutoProcessor, TFWhisperForConditionalGeneration
from datasets import load_dataset

processor = AutoProcessor.from_pretrained("openai/whisper-tiny.en")
model = TFWhisperForConditionalGeneration.from_pretrained("openai/whisper-tiny.en")

ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")

inputs = processor(ds[0]["audio"]["array"], return_tensors="tf")
input_features = inputs.input_features

generated_ids = model.generate(input_features=input_features)

transcription = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
transcription`,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(m.$$.fragment)},l(d){c=s(d,"P",{});var u=r(c);y=i(u,"Example:"),u.forEach(t),f=h(d),k(m.$$.fragment,d)},m(d,u){v(d,c,u),e(c,y),v(d,f,u),w(m,d,u),g=!0},p:fe,i(d){g||(T(m.$$.fragment,d),g=!0)},o(d){x(m.$$.fragment,d),g=!1},d(d){d&&t(c),d&&t(f),$(m,d)}}}function kg(F){let c,y,f,m,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"),m=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 u=r(c);y=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var z=r(f);m=i(z,"Module"),z.forEach(t),g=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(d,u){v(d,c,u),e(c,y),e(c,f),e(f,m),e(c,g)},d(d){d&&t(c)}}}function wg(F){let c,y,f,m,g;return m=new _e({props:{code:`from transformers import AutoTokenizer, FlaxWhisperModel

tokenizer = AutoTokenizer.from_pretrained("openai/whisper-tiny")
model = FlaxWhisperModel.from_pretrained("openai/whisper-tiny")

inputs = tokenizer("Hello, my dog is cute", return_tensors="jax")
outputs = model(**inputs)

last_hidden_states = outputs.last_hidden_state`,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(m.$$.fragment)},l(d){c=s(d,"P",{});var u=r(c);y=i(u,"Example:"),u.forEach(t),f=h(d),k(m.$$.fragment,d)},m(d,u){v(d,c,u),e(c,y),v(d,f,u),w(m,d,u),g=!0},p:fe,i(d){g||(T(m.$$.fragment,d),g=!0)},o(d){x(m.$$.fragment,d),g=!1},d(d){d&&t(c),d&&t(f),$(m,d)}}}function Tg(F){let c,y,f,m,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"),m=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 u=r(c);y=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var z=r(f);m=i(z,"Module"),z.forEach(t),g=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(d,u){v(d,c,u),e(c,y),e(c,f),e(f,m),e(c,g)},d(d){d&&t(c)}}}function xg(F){let c,y,f,m,g;return m=new _e({props:{code:`from transformers import WhisperProcessor, FlaxWhisperForConditionalGeneration
from datasets import load_dataset

processor = WhisperProcessor.from_pretrained("openai/whisper-tiny.en")
model = FlaxWhisperForConditionalGeneration.from_pretrained("openai/whisper-tiny.en", from_pt=True)
ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
inputs = processor(ds[0]["audio"]["array"], return_tensors="np")
input_features = inputs.input_features
generated_ids = model.generate(input_ids=input_features)
transcription = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
transcription`,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(m.$$.fragment)},l(d){c=s(d,"P",{});var u=r(c);y=i(u,"Transcription example:"),u.forEach(t),f=h(d),k(m.$$.fragment,d)},m(d,u){v(d,c,u),e(c,y),v(d,f,u),w(m,d,u),g=!0},p:fe,i(d){g||(T(m.$$.fragment,d),g=!0)},o(d){x(m.$$.fragment,d),g=!1},d(d){d&&t(c),d&&t(f),$(m,d)}}}function $g(F){let c,y,f,m,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"),m=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 u=r(c);y=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var z=r(f);m=i(z,"Module"),z.forEach(t),g=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(d,u){v(d,c,u),e(c,y),e(c,f),e(f,m),e(c,g)},d(d){d&&t(c)}}}function Fg(F){let c,y,f,m,g;return m=new _e({props:{code:`import jax.numpy as jnp
from transformers import AutoFeatureExtractor, FlaxWhisperForAudioClassification
from datasets import load_dataset

feature_extractor = AutoFeatureExtractor.from_pretrained("sanchit-gandhi/whisper-medium-fleurs-lang-id")
model = FlaxWhisperForAudioClassification.from_pretrained(
    "sanchit-gandhi/whisper-medium-fleurs-lang-id", from_pt=True
)
ds = load_dataset("google/fleurs", "all", split="validation", streaming=True)

sample = next(iter(ds))

inputs = feature_extractor(
    sample["audio"]["array"], sampling_rate=sample["audio"]["sampling_rate"], return_tensors="np"
)
input_features = inputs.input_features

logits = model(input_features).logits

predicted_class_ids = jnp.argmax(logits).item()
predicted_label = model.config.id2label[predicted_class_ids]
predicted_label`,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(m.$$.fragment)},l(d){c=s(d,"P",{});var u=r(c);y=i(u,"Transcription example:"),u.forEach(t),f=h(d),k(m.$$.fragment,d)},m(d,u){v(d,c,u),e(c,y),v(d,f,u),w(m,d,u),g=!0},p:fe,i(d){g||(T(m.$$.fragment,d),g=!0)},o(d){x(m.$$.fragment,d),g=!1},d(d){d&&t(c),d&&t(f),$(m,d)}}}function Wg(F){let c,y,f,m,g,d,u,z,O,C,P,M,A,ge,ls,tt,ud,Ba,ot,md,ho,fd,_d,Ka,cs,gd,Xa,ps,mr,vd,Qa,hs,yd,Za,Z,fr,bd,kd,uo,wd,us,Td,xd,$d,_r,Fd,Wd,mo,zd,ms,qd,Ed,Ya,Y,jd,fo,Cd,Md,_o,Pd,Ad,go,Sd,Nd,ei,ze,nt,gr,vo,Id,vr,Od,ti,V,yo,Ld,qe,Dd,fs,Gd,Ud,bo,Vd,Hd,Rd,Ee,Jd,_s,Bd,Kd,gs,Xd,Qd,Zd,st,oi,je,rt,yr,ko,Yd,br,el,ni,q,wo,tl,kr,ol,nl,To,sl,vs,rl,al,il,ve,xo,dl,wr,ll,cl,at,pl,it,$o,hl,Tr,ul,ml,dt,Fo,fl,Wo,_l,xr,gl,vl,yl,ye,zo,bl,ys,kl,bs,wl,Tl,$r,xl,$l,ks,qo,si,Ce,lt,Fr,Eo,Fl,Wr,Wl,ri,E,jo,zl,Co,ql,zr,El,jl,Cl,Mo,Ml,ws,Pl,Al,Sl,be,Po,Nl,qr,Il,Ol,ct,Ll,pt,Ao,Dl,Er,Gl,Ul,ht,So,Vl,No,Hl,jr,Rl,Jl,Bl,ke,Io,Kl,Ts,Xl,xs,Ql,Zl,Cr,Yl,ec,$s,Oo,ai,Me,ut,Mr,Lo,tc,Pr,oc,ii,L,Do,nc,Ar,sc,rc,Go,ac,Fs,ic,dc,lc,Pe,cc,Sr,pc,hc,Nr,uc,mc,fc,mt,Uo,_c,Ir,gc,di,Ae,ft,Or,Vo,vc,Lr,yc,li,j,Ho,bc,Dr,kc,wc,U,Ws,Tc,xc,zs,$c,Fc,qs,Wc,zc,Ro,Gr,qc,Ec,jc,Es,Cc,Mc,Pc,_t,Jo,Ac,H,Sc,Ur,Nc,Ic,Bo,Vr,Oc,Lc,Dc,Hr,Gc,Uc,Ko,Rr,Vc,Hc,Rc,Jc,we,Xo,Bc,Jr,Kc,Xc,gt,Qc,Te,Qo,Zc,Zo,Yc,js,ep,tp,op,vt,np,yt,Yo,sp,en,rp,Cs,ap,ip,dp,bt,tn,lp,on,cp,Ms,pp,hp,ci,Se,kt,Br,nn,up,Kr,mp,pi,D,sn,fp,rn,_p,Ps,gp,vp,yp,an,bp,dn,kp,wp,Tp,ee,ln,xp,Ne,$p,As,Fp,Wp,Xr,zp,qp,Ep,wt,jp,Tt,Cp,xt,cn,Mp,pn,Pp,hn,Ap,Sp,hi,Ie,$t,Qr,un,Np,Zr,Ip,ui,R,mn,Op,fn,Lp,Ss,Dp,Gp,Up,_n,Vp,gn,Hp,Rp,Jp,te,vn,Bp,Oe,Kp,Ns,Xp,Qp,Yr,Zp,Yp,eh,Ft,th,Wt,mi,Le,zt,ea,yn,oh,ta,nh,fi,de,bn,sh,oa,rh,ah,oe,kn,ih,De,dh,Is,lh,ch,na,ph,hh,uh,qt,mh,Et,_i,Ge,jt,sa,wn,fh,ra,_h,gi,J,Tn,gh,xn,vh,Os,yh,bh,kh,$n,wh,Fn,Th,xh,$h,ne,Wn,Fh,Ue,Wh,Ls,zh,qh,aa,Eh,jh,Ch,Ct,Mh,Mt,vi,Ve,Pt,ia,zn,Ph,da,Ah,yi,B,qn,Sh,En,Nh,Ds,Ih,Oh,Lh,jn,Dh,Cn,Gh,Uh,Vh,se,Mn,Hh,He,Rh,Gs,Jh,Bh,la,Kh,Xh,Qh,At,Zh,St,bi,Re,Nt,ca,Pn,Yh,pa,eu,ki,K,An,tu,Je,ou,Us,nu,su,Sn,ru,au,iu,le,ha,Nn,du,lu,ua,In,cu,pu,ma,On,hu,uu,fa,Ln,mu,fu,re,Dn,_u,Be,gu,_a,vu,yu,ga,bu,ku,wu,It,Tu,Ot,wi,Ke,Lt,va,Gn,xu,ya,$u,Ti,X,Un,Fu,Xe,Wu,Vs,zu,qu,Vn,Eu,ju,Cu,ce,ba,Hn,Mu,Pu,ka,Rn,Au,Su,wa,Jn,Nu,Iu,Ta,Bn,Ou,Lu,ae,Kn,Du,Qe,Gu,xa,Uu,Vu,$a,Hu,Ru,Ju,Dt,Bu,Gt,xi,Ze,Ut,Fa,Xn,Ku,Wa,Xu,$i,Q,Qn,Qu,Ye,Zu,Hs,Yu,em,Zn,tm,om,nm,pe,za,Yn,sm,rm,qa,es,am,im,Ea,ts,dm,lm,ja,os,cm,pm,ie,ns,hm,et,um,Rs,mm,fm,Ca,_m,gm,vm,Vt,ym,Ht,Fi;return d=new G({}),ge=new G({}),vo=new G({}),yo=new W({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:" = 50257"},{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:"**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.29.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 50257) &#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.29.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.29.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"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/whisper/configuration_whisper.py#L62"}}),st=new me({props:{anchor:"transformers.WhisperConfig.example",$$slots:{default:[ag]},$$scope:{ctx:F}}}),ko=new G({}),wo=new W({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:" = '<|startoftranscript|>'"},{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;|startoftranscript|&gt;&quot;</code>) &#x2014;
The beginning of sequence token.`,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.29.0/src/transformers/models/whisper/tokenization_whisper.py#L214"}}),xo=new W({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.29.0/src/transformers/models/whisper/tokenization_whisper.py#L365"}}),at=new me({props:{anchor:"transformers.WhisperTokenizer.set_prefix_tokens.example",$$slots:{default:[ig]},$$scope:{ctx:F}}}),$o=new W({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.29.0/src/transformers/models/whisper/tokenization_whisper.py#L425"}}),Fo=new W({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.29.0/src/transformers/models/whisper/tokenization_whisper.py#L433",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>
`}}),zo=new W({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.29.0/src/transformers/tokenization_utils_base.py#L3047",returnDescription:`
<p>The token type ids.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),qo=new W({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.29.0/src/transformers/models/whisper/tokenization_whisper.py#L644"}}),Eo=new G({}),jo=new W({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:" = '<|startoftranscript|>'"},{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>&lt;|startoftranscript|&gt;</code>) &#x2014;
The beginning of sequence token.`,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.29.0/src/transformers/models/whisper/tokenization_whisper_fast.py#L88"}}),Po=new W({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.29.0/src/transformers/models/whisper/tokenization_whisper_fast.py#L347"}}),ct=new me({props:{anchor:"transformers.WhisperTokenizerFast.set_prefix_tokens.example",$$slots:{default:[dg]},$$scope:{ctx:F}}}),Ao=new W({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.29.0/src/transformers/models/whisper/tokenization_whisper_fast.py#L422"}}),So=new W({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.29.0/src/transformers/models/whisper/tokenization_whisper_fast.py#L430",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>
`}}),Io=new W({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.29.0/src/transformers/tokenization_utils_base.py#L3047",returnDescription:`
<p>The token type ids.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Oo=new W({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.29.0/src/transformers/models/whisper/tokenization_whisper_fast.py#L332"}}),Lo=new G({}),Do=new W({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.29.0/src/transformers/models/whisper/feature_extraction_whisper.py#L32"}}),Uo=new W({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.`,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.29.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.29.0/src/transformers/models/whisper/feature_extraction_whisper.py#L136"}}),Vo=new G({}),Ho=new W({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.29.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.29.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.29.0/src/transformers/models/whisper/processing_whisper.py#L22"}}),Jo=new W({props:{name:"__call__",anchor:"transformers.WhisperProcessor.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/whisper/processing_whisper.py#L47"}}),Xo=new W({props:{name:"from_pretrained",anchor:"transformers.WhisperProcessor.from_pretrained",parameters:[{name:"pretrained_model_name_or_path",val:""},{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.29.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.29.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.29.0/src/transformers/processing_utils.py#L153"}}),gt=new We({props:{$$slots:{default:[lg]},$$scope:{ctx:F}}}),Qo=new W({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).
kwargs &#x2014;
Additional key word arguments passed along to the <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.push_to_hub">push_to_hub()</a> method.`,name:"push_to_hub"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/processing_utils.py#L91"}}),vt=new We({props:{$$slots:{default:[cg]},$$scope:{ctx:F}}}),Yo=new W({props:{name:"batch_decode",anchor:"transformers.WhisperProcessor.batch_decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/whisper/processing_whisper.py#L81"}}),tn=new W({props:{name:"decode",anchor:"transformers.WhisperProcessor.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/whisper/processing_whisper.py#L88"}}),nn=new G({}),sn=new W({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.29.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.29.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.29.0/src/transformers/models/whisper/modeling_whisper.py#L1142"}}),ln=new W({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.29.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.29.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.29.0/en/model_doc/whisper#transformers.WhisperTokenizer">WhisperTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.29.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.29.0/src/transformers/models/whisper/modeling_whisper.py#L1215",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.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.29.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.29.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqModelOutput"
>transformers.modeling_outputs.Seq2SeqModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),wt=new We({props:{$$slots:{default:[pg]},$$scope:{ctx:F}}}),Tt=new me({props:{anchor:"transformers.WhisperModel.forward.example",$$slots:{default:[hg]},$$scope:{ctx:F}}}),cn=new W({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.29.0/src/transformers/models/whisper/modeling_whisper.py#L1172"}}),un=new G({}),mn=new W({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.29.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.29.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.29.0/src/transformers/models/whisper/modeling_whisper.py#L1312"}}),vn=new W({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.29.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.29.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.29.0/en/model_doc/whisper#transformers.WhisperTokenizer">WhisperTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.29.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.29.0/src/transformers/models/whisper/modeling_whisper.py#L1357",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.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.29.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.29.0/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ft=new We({props:{$$slots:{default:[ug]},$$scope:{ctx:F}}}),Wt=new me({props:{anchor:"transformers.WhisperForConditionalGeneration.forward.example",$$slots:{default:[mg]},$$scope:{ctx:F}}}),yn=new G({}),bn=new W({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.29.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.29.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.29.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.29.0/src/transformers/models/whisper/modeling_whisper.py#L1664"}}),kn=new W({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.29.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.29.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.29.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.29.0/src/transformers/models/whisper/modeling_whisper.py#L1691",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.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.29.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.29.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),qt=new We({props:{$$slots:{default:[fg]},$$scope:{ctx:F}}}),Et=new me({props:{anchor:"transformers.WhisperForAudioClassification.forward.example",$$slots:{default:[_g]},$$scope:{ctx:F}}}),wn=new G({}),Tn=new W({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.29.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.29.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.29.0/src/transformers/models/whisper/modeling_tf_whisper.py#L1102"}}),Wn=new W({props:{name:"call",anchor:"transformers.TFWhisperModel.call",parameters:[{name:"input_features",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"decoder_input_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"decoder_attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"decoder_position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"decoder_head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"cross_attn_head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"encoder_outputs",val:": typing.Union[typing.Tuple[typing.Tuple[typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor]]], NoneType] = None"},{name:"past_key_values",val:": typing.Union[typing.Tuple[typing.Tuple[typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor]]], NoneType] = None"},{name:"decoder_inputs_embeds",val:": typing.Union[typing.Tuple[typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor]], NoneType] = 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"},{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.29.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.29.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.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.29.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.29.0/src/transformers/models/whisper/modeling_tf_whisper.py#L1126",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.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.29.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.29.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 We({props:{$$slots:{default:[gg]},$$scope:{ctx:F}}}),Mt=new me({props:{anchor:"transformers.TFWhisperModel.call.example",$$slots:{default:[vg]},$$scope:{ctx:F}}}),zn=new G({}),qn=new W({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.29.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.29.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.29.0/src/transformers/models/whisper/modeling_tf_whisper.py#L1210"}}),Mn=new W({props:{name:"call",anchor:"transformers.TFWhisperForConditionalGeneration.call",parameters:[{name:"input_features",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"decoder_input_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"decoder_attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"decoder_position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"decoder_head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"cross_attn_head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"encoder_outputs",val:": typing.Union[typing.Tuple[typing.Tuple[typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor]]], NoneType] = None"},{name:"past_key_values",val:": typing.Union[typing.Tuple[typing.Tuple[typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor]]], NoneType] = None"},{name:"decoder_inputs_embeds",val:": typing.Union[typing.Tuple[typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor]], NoneType] = None"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = 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"},{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.29.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.29.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.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.29.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.29.0/src/transformers/models/whisper/modeling_tf_whisper.py#L1241",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.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.29.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.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqLMOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),At=new We({props:{$$slots:{default:[yg]},$$scope:{ctx:F}}}),St=new me({props:{anchor:"transformers.TFWhisperForConditionalGeneration.call.example",$$slots:{default:[bg]},$$scope:{ctx:F}}}),Pn=new G({}),An=new W({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.29.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.29.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.29.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a>
and <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/whisper/modeling_flax_whisper.py#L1164"}}),Dn=new W({props:{name:"__call__",anchor:"transformers.FlaxWhisperModel.__call__",parameters:[{name:"input_features",val:": ndarray"},{name:"decoder_input_ids",val:": ndarray"},{name:"attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = 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.29.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.29.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.29.0/en/model_doc/whisper#transformers.WhisperTokenizer">WhisperTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.29.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.29.0/src/transformers/models/whisper/modeling_flax_whisper.py#L1109",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.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.29.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.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),It=new We({props:{$$slots:{default:[kg]},$$scope:{ctx:F}}}),Ot=new me({props:{anchor:"transformers.FlaxWhisperModel.__call__.example",$$slots:{default:[wg]},$$scope:{ctx:F}}}),Gn=new G({}),Un=new W({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.29.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.29.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.29.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a>
and <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/whisper/modeling_flax_whisper.py#L1243"}}),Kn=new W({props:{name:"__call__",anchor:"transformers.FlaxWhisperForConditionalGeneration.__call__",parameters:[{name:"input_features",val:": ndarray"},{name:"decoder_input_ids",val:": ndarray"},{name:"attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = 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.29.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.29.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.29.0/en/model_doc/whisper#transformers.WhisperTokenizer">WhisperTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.29.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.29.0/src/transformers/models/whisper/modeling_flax_whisper.py#L1109",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.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.29.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.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Dt=new We({props:{$$slots:{default:[Tg]},$$scope:{ctx:F}}}),Gt=new me({props:{anchor:"transformers.FlaxWhisperForConditionalGeneration.__call__.example",$$slots:{default:[xg]},$$scope:{ctx:F}}}),Xn=new G({}),Qn=new W({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.29.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.29.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.29.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a>
and <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/whisper/modeling_flax_whisper.py#L1571"}}),ns=new W({props:{name:"__call__",anchor:"transformers.FlaxWhisperForAudioClassification.__call__",parameters:[{name:"input_features",val:": ndarray"},{name:"attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = 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.29.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.29.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.29.0/en/model_doc/whisper#transformers.WhisperTokenizer">WhisperTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.29.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.29.0/src/transformers/models/whisper/modeling_flax_whisper.py#L1598",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.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.29.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.29.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Vt=new We({props:{$$slots:{default:[$g]},$$scope:{ctx:F}}}),Ht=new me({props:{anchor:"transformers.FlaxWhisperForAudioClassification.__call__.example",$$slots:{default:[Fg]},$$scope:{ctx:F}}}),{c(){c=n("meta"),y=p(),f=n("h1"),m=n("a"),g=n("span"),b(d.$$.fragment),u=p(),z=n("span"),O=a("Whisper"),C=p(),P=n("h2"),M=n("a"),A=n("span"),b(ge.$$.fragment),ls=p(),tt=n("span"),ud=a("Overview"),Ba=p(),ot=n("p"),md=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."),Ka=p(),cs=n("p"),gd=a("The abstract from the paper is the following:"),Xa=p(),ps=n("p"),mr=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."),Qa=p(),hs=n("p"),yd=a("Tips:"),Za=p(),Z=n("ul"),fr=n("li"),bd=a("The model usually performs well without requiring any finetuning."),kd=p(),uo=n("li"),wd=a("The architecture follows a classic encoder-decoder architecture, which means that it relies on the "),us=n("a"),Td=a("generate()"),xd=a(" function for inference."),$d=p(),_r=n("li"),Fd=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."),Wd=p(),mo=n("li"),zd=a("One can use "),ms=n("a"),qd=a("WhisperProcessor"),Ed=a(" to prepare audio for the model, and decode the predicted ID\u2019s back into text."),Ya=p(),Y=n("p"),jd=a("This model was contributed by "),fo=n("a"),Cd=a("Arthur Zucker"),Md=a(". The Tensorflow version of this model was contributed by "),_o=n("a"),Pd=a("amyeroberts"),Ad=a(`.
The original code can be found `),go=n("a"),Sd=a("here"),Nd=a("."),ei=p(),ze=n("h2"),nt=n("a"),gr=n("span"),b(vo.$$.fragment),Id=p(),vr=n("span"),Od=a("WhisperConfig"),ti=p(),V=n("div"),b(yo.$$.fragment),Ld=p(),qe=n("p"),Dd=a("This is the configuration class to store the configuration of a "),fs=n("a"),Gd=a("WhisperModel"),Ud=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"),Vd=a("openai/whisper-tiny"),Hd=a(" architecture."),Rd=p(),Ee=n("p"),Jd=a("Configuration objects inherit from "),_s=n("a"),Bd=a("PretrainedConfig"),Kd=a(` and can be used to control the model outputs. Read the
documentation from `),gs=n("a"),Xd=a("PretrainedConfig"),Qd=a(" for more information."),Zd=p(),b(st.$$.fragment),oi=p(),je=n("h2"),rt=n("a"),yr=n("span"),b(ko.$$.fragment),Yd=p(),br=n("span"),el=a("WhisperTokenizer"),ni=p(),q=n("div"),b(wo.$$.fragment),tl=p(),kr=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(xo.$$.fragment),dl=p(),wr=n("p"),ll=a("Override the prefix tokens appended to the start of the label sequence. This method can be used standalone to"),cl=p(),b(at.$$.fragment),pl=p(),it=n("div"),b($o.$$.fragment),hl=p(),Tr=n("p"),ul=a("Build model inputs from a sequence by appending eos_token_id."),ml=p(),dt=n("div"),b(Fo.$$.fragment),fl=p(),Wo=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 `),xr=n("code"),gl=a("prepare_for_model"),vl=a(" method."),yl=p(),ye=n("div"),b(zo.$$.fragment),bl=p(),ys=n("p"),kl=a("Create the token type IDs corresponding to the sequences passed. "),bs=n("a"),wl=a(`What are token type
IDs?`),Tl=p(),$r=n("p"),xl=a("Should be overridden in a subclass if the model has a special way of building those."),$l=p(),ks=n("div"),b(qo.$$.fragment),si=p(),Ce=n("h2"),lt=n("a"),Fr=n("span"),b(Eo.$$.fragment),Fl=p(),Wr=n("span"),Wl=a("WhisperTokenizerFast"),ri=p(),E=n("div"),b(jo.$$.fragment),zl=p(),Co=n("p"),ql=a("Construct a \u201Cfast\u201D Whisper tokenizer (backed by HuggingFace\u2019s "),zr=n("em"),El=a("tokenizers"),jl=a(" library)."),Cl=p(),Mo=n("p"),Ml=a("This tokenizer inherits from "),ws=n("a"),Pl=a("PreTrainedTokenizerFast"),Al=a(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Sl=p(),be=n("div"),b(Po.$$.fragment),Nl=p(),qr=n("p"),Il=a("Override the prefix tokens appended to the start of the label sequence. This method can be used standalone to"),Ol=p(),b(ct.$$.fragment),Ll=p(),pt=n("div"),b(Ao.$$.fragment),Dl=p(),Er=n("p"),Gl=a("Build model inputs from a sequence by appending eos_token_id."),Ul=p(),ht=n("div"),b(So.$$.fragment),Vl=p(),No=n("p"),Hl=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 `),jr=n("code"),Rl=a("prepare_for_model"),Jl=a(" method."),Bl=p(),ke=n("div"),b(Io.$$.fragment),Kl=p(),Ts=n("p"),Xl=a("Create the token type IDs corresponding to the sequences passed. "),xs=n("a"),Ql=a(`What are token type
IDs?`),Zl=p(),Cr=n("p"),Yl=a("Should be overridden in a subclass if the model has a special way of building those."),ec=p(),$s=n("div"),b(Oo.$$.fragment),ai=p(),Me=n("h2"),ut=n("a"),Mr=n("span"),b(Lo.$$.fragment),tc=p(),Pr=n("span"),oc=a("WhisperFeatureExtractor"),ii=p(),L=n("div"),b(Do.$$.fragment),nc=p(),Ar=n("p"),sc=a("Constructs a Whisper feature extractor."),rc=p(),Go=n("p"),ac=a("This feature extractor inherits from "),Fs=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(),Pe=n("p"),cc=a("This class extracts mel-filter bank features from raw speech using a custom numpy implementation of the "),Sr=n("code"),pc=a("Short Time Fourier Transform"),hc=a(" which should match pytorch\u2019s "),Nr=n("code"),uc=a("torch.stft"),mc=a(" equivalent."),fc=p(),mt=n("div"),b(Uo.$$.fragment),_c=p(),Ir=n("p"),gc=a("Main method to featurize and prepare for the model one or several sequence(s)."),di=p(),Ae=n("h2"),ft=n("a"),Or=n("span"),b(Vo.$$.fragment),vc=p(),Lr=n("span"),yc=a("WhisperProcessor"),li=p(),j=n("div"),b(Ho.$$.fragment),bc=p(),Dr=n("p"),kc=a(`Constructs a Whisper processor which wraps a Whisper feature extractor and a Whisper tokenizer into a single
processor.`),wc=p(),U=n("p"),Ws=n("a"),Tc=a("WhisperProcessor"),xc=a(" offers all the functionalities of "),zs=n("a"),$c=a("WhisperFeatureExtractor"),Fc=a(" and "),qs=n("a"),Wc=a("WhisperTokenizer"),zc=a(`. See
the `),Ro=n("a"),Gr=n("strong"),qc=a("call"),Ec=a("()"),jc=a(" and "),Es=n("a"),Cc=a("decode()"),Mc=a(" for more information."),Pc=p(),_t=n("div"),b(Jo.$$.fragment),Ac=p(),H=n("p"),Sc=a("Forwards the "),Ur=n("code"),Nc=a("audio"),Ic=a(" argument to WhisperFeatureExtractor\u2019s "),Bo=n("a"),Vr=n("strong"),Oc=a("call"),Lc=a("()"),Dc=a(" and the "),Hr=n("code"),Gc=a("text"),Uc=a(`
argument to `),Ko=n("a"),Rr=n("strong"),Vc=a("call"),Hc=a("()"),Rc=a(`. Please refer to the doctsring of the above two methods for more
information.`),Jc=p(),we=n("div"),b(Xo.$$.fragment),Bc=p(),Jr=n("p"),Kc=a("Instantiate a processor associated with a pretrained model."),Xc=p(),b(gt.$$.fragment),Qc=p(),Te=n("div"),b(Qo.$$.fragment),Zc=p(),Zo=n("p"),Yc=a(`Saves the attributes of this processor (feature extractor, tokenizer\u2026) in the specified directory so that it
can be reloaded using the `),js=n("a"),ep=a("from_pretrained()"),tp=a(" method."),op=p(),b(vt.$$.fragment),np=p(),yt=n("div"),b(Yo.$$.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 "),Ms=n("a"),pp=a("decode()"),hp=a(`. Please refer to
the docstring of this method for more information.`),ci=p(),Se=n("h2"),kt=n("a"),Br=n("span"),b(nn.$$.fragment),up=p(),Kr=n("span"),mp=a("WhisperModel"),pi=p(),D=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 `),Ps=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"),kp=a("torch.nn.Module"),wp=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Tp=p(),ee=n("div"),b(ln.$$.fragment),xp=p(),Ne=n("p"),$p=a("The "),As=n("a"),Fp=a("WhisperModel"),Wp=a(" forward method, overrides the "),Xr=n("code"),zp=a("__call__"),qp=a(" special method."),Ep=p(),b(wt.$$.fragment),jp=p(),b(Tt.$$.fragment),Cp=p(),xt=n("div"),b(cn.$$.fragment),Mp=p(),pn=n("p"),Pp=a(`Masks extracted features along time axis and/or along feature axis according to
`),hn=n("a"),Ap=a("SpecAugment"),Sp=a("."),hi=p(),Ie=n("h2"),$t=n("a"),Qr=n("span"),b(un.$$.fragment),Np=p(),Zr=n("span"),Ip=a("WhisperForConditionalGeneration"),ui=p(),R=n("div"),b(mn.$$.fragment),Op=p(),fn=n("p"),Lp=a(`The Whisper Model with a language modeling head. Can be used for automatic speech recognition.
This model inherits from `),Ss=n("a"),Dp=a("PreTrainedModel"),Gp=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.)`),Up=p(),_n=n("p"),Vp=a("This model is also a PyTorch "),gn=n("a"),Hp=a("torch.nn.Module"),Rp=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Jp=p(),te=n("div"),b(vn.$$.fragment),Bp=p(),Oe=n("p"),Kp=a("The "),Ns=n("a"),Xp=a("WhisperForConditionalGeneration"),Qp=a(" forward method, overrides the "),Yr=n("code"),Zp=a("__call__"),Yp=a(" special method."),eh=p(),b(Ft.$$.fragment),th=p(),b(Wt.$$.fragment),mi=p(),Le=n("h2"),zt=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(kn.$$.fragment),ih=p(),De=n("p"),dh=a("The "),Is=n("a"),lh=a("WhisperForAudioClassification"),ch=a(" forward method, overrides the "),na=n("code"),ph=a("__call__"),hh=a(" special method."),uh=p(),b(qt.$$.fragment),mh=p(),b(Et.$$.fragment),_i=p(),Ge=n("h2"),jt=n("a"),sa=n("span"),b(wn.$$.fragment),fh=p(),ra=n("span"),_h=a("TFWhisperModel"),gi=p(),J=n("div"),b(Tn.$$.fragment),gh=p(),xn=n("p"),vh=a(`The bare Whisper Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Os=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.)`),kh=p(),$n=n("p"),wh=a("This model is also a "),Fn=n("a"),Th=a("tf.keras.Model"),xh=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.`),$h=p(),ne=n("div"),b(Wn.$$.fragment),Fh=p(),Ue=n("p"),Wh=a("The "),Ls=n("a"),zh=a("TFWhisperModel"),qh=a(" forward method, overrides the "),aa=n("code"),Eh=a("__call__"),jh=a(" special method."),Ch=p(),b(Ct.$$.fragment),Mh=p(),b(Mt.$$.fragment),vi=p(),Ve=n("h2"),Pt=n("a"),ia=n("span"),b(zn.$$.fragment),Ph=p(),da=n("span"),Ah=a("TFWhisperForConditionalGeneration"),yi=p(),B=n("div"),b(qn.$$.fragment),Sh=p(),En=n("p"),Nh=a(`The Whisper Model with a language modeling head. Can be used for automatic speech recognition.
This model inherits from `),Ds=n("a"),Ih=a("TFPreTrainedModel"),Oh=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.)`),Lh=p(),jn=n("p"),Dh=a("This model is also a "),Cn=n("a"),Gh=a("tf.keras.Model"),Uh=a(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Vh=p(),se=n("div"),b(Mn.$$.fragment),Hh=p(),He=n("p"),Rh=a("The "),Gs=n("a"),Jh=a("TFWhisperForConditionalGeneration"),Bh=a(" forward method, overrides the "),la=n("code"),Kh=a("__call__"),Xh=a(" special method."),Qh=p(),b(At.$$.fragment),Zh=p(),b(St.$$.fragment),bi=p(),Re=n("h2"),Nt=n("a"),ca=n("span"),b(Pn.$$.fragment),Yh=p(),pa=n("span"),eu=a("FlaxWhisperModel"),ki=p(),K=n("div"),b(An.$$.fragment),tu=p(),Je=n("p"),ou=a(`The bare Whisper Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),Us=n("a"),nu=a("FlaxPreTrainedModel"),su=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
`),Sn=n("a"),ru=a("flax.nn.Module"),au=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:`),iu=p(),le=n("ul"),ha=n("li"),Nn=n("a"),du=a("Just-In-Time (JIT) compilation"),lu=p(),ua=n("li"),In=n("a"),cu=a("Automatic Differentiation"),pu=p(),ma=n("li"),On=n("a"),hu=a("Vectorization"),uu=p(),fa=n("li"),Ln=n("a"),mu=a("Parallelization"),fu=p(),re=n("div"),b(Dn.$$.fragment),_u=p(),Be=n("p"),gu=a("The "),_a=n("code"),vu=a("FlaxWhisperPreTrainedModel"),yu=a(" forward method, overrides the "),ga=n("code"),bu=a("__call__"),ku=a(" special method."),wu=p(),b(It.$$.fragment),Tu=p(),b(Ot.$$.fragment),wi=p(),Ke=n("h2"),Lt=n("a"),va=n("span"),b(Gn.$$.fragment),xu=p(),ya=n("span"),$u=a("FlaxWhisperForConditionalGeneration"),Ti=p(),X=n("div"),b(Un.$$.fragment),Fu=p(),Xe=n("p"),Wu=a(`The Whisper Model with a language modeling head.
This model inherits from `),Vs=n("a"),zu=a("FlaxPreTrainedModel"),qu=a(`. Check the superclass documentation for the generic methods the
library implements for all its models (such as downloading or saving, resizing the input embeddings, pruning heads
etc.) This model is also a Flax Linen
`),Vn=n("a"),Eu=a("flax.nn.Module"),ju=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:`),Cu=p(),ce=n("ul"),ba=n("li"),Hn=n("a"),Mu=a("Just-In-Time (JIT) compilation"),Pu=p(),ka=n("li"),Rn=n("a"),Au=a("Automatic Differentiation"),Su=p(),wa=n("li"),Jn=n("a"),Nu=a("Vectorization"),Iu=p(),Ta=n("li"),Bn=n("a"),Ou=a("Parallelization"),Lu=p(),ae=n("div"),b(Kn.$$.fragment),Du=p(),Qe=n("p"),Gu=a("The "),xa=n("code"),Uu=a("FlaxWhisperPreTrainedModel"),Vu=a(" forward method, overrides the "),$a=n("code"),Hu=a("__call__"),Ru=a(" special method."),Ju=p(),b(Dt.$$.fragment),Bu=p(),b(Gt.$$.fragment),xi=p(),Ze=n("h2"),Ut=n("a"),Fa=n("span"),b(Xn.$$.fragment),Ku=p(),Wa=n("span"),Xu=a("FlaxWhisperForAudioClassification"),$i=p(),Q=n("div"),b(Qn.$$.fragment),Qu=p(),Ye=n("p"),Zu=a(`The Whisper Model with an audio classification head on top.
This model inherits from `),Hs=n("a"),Yu=a("FlaxPreTrainedModel"),em=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
`),Zn=n("a"),tm=a("flax.nn.Module"),om=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:`),nm=p(),pe=n("ul"),za=n("li"),Yn=n("a"),sm=a("Just-In-Time (JIT) compilation"),rm=p(),qa=n("li"),es=n("a"),am=a("Automatic Differentiation"),im=p(),Ea=n("li"),ts=n("a"),dm=a("Vectorization"),lm=p(),ja=n("li"),os=n("a"),cm=a("Parallelization"),pm=p(),ie=n("div"),b(ns.$$.fragment),hm=p(),et=n("p"),um=a("The "),Rs=n("a"),mm=a("FlaxWhisperForAudioClassification"),fm=a(" forward method, overrides the "),Ca=n("code"),_m=a("__call__"),gm=a(" special method."),vm=p(),b(Vt.$$.fragment),ym=p(),b(Ht.$$.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);m=s(ss,"A",{id:!0,class:!0,href:!0});var Ma=r(m);g=s(Ma,"SPAN",{});var Pa=r(g);k(d.$$.fragment,Pa),Pa.forEach(t),Ma.forEach(t),u=h(ss),z=s(ss,"SPAN",{});var Aa=r(z);O=i(Aa,"Whisper"),Aa.forEach(t),ss.forEach(t),C=h(o),P=s(o,"H2",{class:!0});var rs=r(P);M=s(rs,"A",{id:!0,class:!0,href:!0});var Sa=r(M);A=s(Sa,"SPAN",{});var Na=r(A);k(ge.$$.fragment,Na),Na.forEach(t),Sa.forEach(t),ls=h(rs),tt=s(rs,"SPAN",{});var Ia=r(tt);ud=i(Ia,"Overview"),Ia.forEach(t),rs.forEach(t),Ba=h(o),ot=s(o,"P",{});var as=r(ot);md=i(as,"The Whisper model was proposed in "),ho=s(as,"A",{href:!0,rel:!0});var Oa=r(ho);fd=i(Oa,"Robust Speech Recognition via Large-Scale Weak Supervision"),Oa.forEach(t),_d=i(as," by Alec Radford, Jong Wook Kim, Tao Xu, Greg Brockman, Christine McLeavey, Ilya Sutskever."),as.forEach(t),Ka=h(o),cs=s(o,"P",{});var La=r(cs);gd=i(La,"The abstract from the paper is the following:"),La.forEach(t),Xa=h(o),ps=s(o,"P",{});var Da=r(ps);mr=s(Da,"EM",{});var Ga=r(mr);vd=i(Ga,"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."),Ga.forEach(t),Da.forEach(t),Qa=h(o),hs=s(o,"P",{});var Ua=r(hs);yd=i(Ua,"Tips:"),Ua.forEach(t),Za=h(o),Z=s(o,"UL",{});var he=r(Z);fr=s(he,"LI",{});var Va=r(fr);bd=i(Va,"The model usually performs well without requiring any finetuning."),Va.forEach(t),kd=h(he),uo=s(he,"LI",{});var is=r(uo);wd=i(is,"The architecture follows a classic encoder-decoder architecture, which means that it relies on the "),us=s(is,"A",{href:!0});var Ha=r(us);Td=i(Ha,"generate()"),Ha.forEach(t),xd=i(is," function for inference."),is.forEach(t),$d=h(he),_r=s(he,"LI",{});var Ra=r(_r);Fd=i(Ra,"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."),Ra.forEach(t),Wd=h(he),mo=s(he,"LI",{});var ds=r(mo);zd=i(ds,"One can use "),ms=s(ds,"A",{href:!0});var Ja=r(ms);qd=i(Ja,"WhisperProcessor"),Ja.forEach(t),Ed=i(ds," to prepare audio for the model, and decode the predicted ID\u2019s back into text."),ds.forEach(t),he.forEach(t),Ya=h(o),Y=s(o,"P",{});var Rt=r(Y);jd=i(Rt,"This model was contributed by "),fo=s(Rt,"A",{href:!0,rel:!0});var $m=r(fo);Cd=i($m,"Arthur Zucker"),$m.forEach(t),Md=i(Rt,". The Tensorflow version of this model was contributed by "),_o=s(Rt,"A",{href:!0,rel:!0});var Fm=r(_o);Pd=i(Fm,"amyeroberts"),Fm.forEach(t),Ad=i(Rt,`.
The original code can be found `),go=s(Rt,"A",{href:!0,rel:!0});var Wm=r(go);Sd=i(Wm,"here"),Wm.forEach(t),Nd=i(Rt,"."),Rt.forEach(t),ei=h(o),ze=s(o,"H2",{class:!0});var Wi=r(ze);nt=s(Wi,"A",{id:!0,class:!0,href:!0});var zm=r(nt);gr=s(zm,"SPAN",{});var qm=r(gr);k(vo.$$.fragment,qm),qm.forEach(t),zm.forEach(t),Id=h(Wi),vr=s(Wi,"SPAN",{});var Em=r(vr);Od=i(Em,"WhisperConfig"),Em.forEach(t),Wi.forEach(t),ti=h(o),V=s(o,"DIV",{class:!0});var Jt=r(V);k(yo.$$.fragment,Jt),Ld=h(Jt),qe=s(Jt,"P",{});var Js=r(qe);Dd=i(Js,"This is the configuration class to store the configuration of a "),fs=s(Js,"A",{href:!0});var jm=r(fs);Gd=i(jm,"WhisperModel"),jm.forEach(t),Ud=i(Js,`. 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(Js,"A",{href:!0,rel:!0});var Cm=r(bo);Vd=i(Cm,"openai/whisper-tiny"),Cm.forEach(t),Hd=i(Js," architecture."),Js.forEach(t),Rd=h(Jt),Ee=s(Jt,"P",{});var Bs=r(Ee);Jd=i(Bs,"Configuration objects inherit from "),_s=s(Bs,"A",{href:!0});var Mm=r(_s);Bd=i(Mm,"PretrainedConfig"),Mm.forEach(t),Kd=i(Bs,` and can be used to control the model outputs. Read the
documentation from `),gs=s(Bs,"A",{href:!0});var Pm=r(gs);Xd=i(Pm,"PretrainedConfig"),Pm.forEach(t),Qd=i(Bs," for more information."),Bs.forEach(t),Zd=h(Jt),k(st.$$.fragment,Jt),Jt.forEach(t),oi=h(o),je=s(o,"H2",{class:!0});var zi=r(je);rt=s(zi,"A",{id:!0,class:!0,href:!0});var Am=r(rt);yr=s(Am,"SPAN",{});var Sm=r(yr);k(ko.$$.fragment,Sm),Sm.forEach(t),Am.forEach(t),Yd=h(zi),br=s(zi,"SPAN",{});var Nm=r(br);el=i(Nm,"WhisperTokenizer"),Nm.forEach(t),zi.forEach(t),ni=h(o),q=s(o,"DIV",{class:!0});var S=r(q);k(wo.$$.fragment,S),tl=h(S),kr=s(S,"P",{});var Im=r(kr);ol=i(Im,"Construct a Whisper tokenizer."),Im.forEach(t),nl=h(S),To=s(S,"P",{});var qi=r(To);sl=i(qi,"This tokenizer inherits from "),vs=s(qi,"A",{href:!0});var Om=r(vs);rl=i(Om,"PreTrainedTokenizer"),Om.forEach(t),al=i(qi,` which contains some of the main methods. Users should refer to
the superclass for more information regarding such methods.`),qi.forEach(t),il=h(S),ve=s(S,"DIV",{class:!0});var Ks=r(ve);k(xo.$$.fragment,Ks),dl=h(Ks),wr=s(Ks,"P",{});var Lm=r(wr);ll=i(Lm,"Override the prefix tokens appended to the start of the label sequence. This method can be used standalone to"),Lm.forEach(t),cl=h(Ks),k(at.$$.fragment,Ks),Ks.forEach(t),pl=h(S),it=s(S,"DIV",{class:!0});var Ei=r(it);k($o.$$.fragment,Ei),hl=h(Ei),Tr=s(Ei,"P",{});var Dm=r(Tr);ul=i(Dm,"Build model inputs from a sequence by appending eos_token_id."),Dm.forEach(t),Ei.forEach(t),ml=h(S),dt=s(S,"DIV",{class:!0});var ji=r(dt);k(Fo.$$.fragment,ji),fl=h(ji),Wo=s(ji,"P",{});var Ci=r(Wo);_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 `),xr=s(Ci,"CODE",{});var Gm=r(xr);gl=i(Gm,"prepare_for_model"),Gm.forEach(t),vl=i(Ci," method."),Ci.forEach(t),ji.forEach(t),yl=h(S),ye=s(S,"DIV",{class:!0});var Xs=r(ye);k(zo.$$.fragment,Xs),bl=h(Xs),ys=s(Xs,"P",{});var bm=r(ys);kl=i(bm,"Create the token type IDs corresponding to the sequences passed. "),bs=s(bm,"A",{href:!0});var Um=r(bs);wl=i(Um,`What are token type
IDs?`),Um.forEach(t),bm.forEach(t),Tl=h(Xs),$r=s(Xs,"P",{});var Vm=r($r);xl=i(Vm,"Should be overridden in a subclass if the model has a special way of building those."),Vm.forEach(t),Xs.forEach(t),$l=h(S),ks=s(S,"DIV",{class:!0});var Hm=r(ks);k(qo.$$.fragment,Hm),Hm.forEach(t),S.forEach(t),si=h(o),Ce=s(o,"H2",{class:!0});var Mi=r(Ce);lt=s(Mi,"A",{id:!0,class:!0,href:!0});var Rm=r(lt);Fr=s(Rm,"SPAN",{});var Jm=r(Fr);k(Eo.$$.fragment,Jm),Jm.forEach(t),Rm.forEach(t),Fl=h(Mi),Wr=s(Mi,"SPAN",{});var Bm=r(Wr);Wl=i(Bm,"WhisperTokenizerFast"),Bm.forEach(t),Mi.forEach(t),ri=h(o),E=s(o,"DIV",{class:!0});var N=r(E);k(jo.$$.fragment,N),zl=h(N),Co=s(N,"P",{});var Pi=r(Co);ql=i(Pi,"Construct a \u201Cfast\u201D Whisper tokenizer (backed by HuggingFace\u2019s "),zr=s(Pi,"EM",{});var Km=r(zr);El=i(Km,"tokenizers"),Km.forEach(t),jl=i(Pi," library)."),Pi.forEach(t),Cl=h(N),Mo=s(N,"P",{});var Ai=r(Mo);Ml=i(Ai,"This tokenizer inherits from "),ws=s(Ai,"A",{href:!0});var Xm=r(ws);Pl=i(Xm,"PreTrainedTokenizerFast"),Xm.forEach(t),Al=i(Ai,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Ai.forEach(t),Sl=h(N),be=s(N,"DIV",{class:!0});var Qs=r(be);k(Po.$$.fragment,Qs),Nl=h(Qs),qr=s(Qs,"P",{});var Qm=r(qr);Il=i(Qm,"Override the prefix tokens appended to the start of the label sequence. This method can be used standalone to"),Qm.forEach(t),Ol=h(Qs),k(ct.$$.fragment,Qs),Qs.forEach(t),Ll=h(N),pt=s(N,"DIV",{class:!0});var Si=r(pt);k(Ao.$$.fragment,Si),Dl=h(Si),Er=s(Si,"P",{});var Zm=r(Er);Gl=i(Zm,"Build model inputs from a sequence by appending eos_token_id."),Zm.forEach(t),Si.forEach(t),Ul=h(N),ht=s(N,"DIV",{class:!0});var Ni=r(ht);k(So.$$.fragment,Ni),Vl=h(Ni),No=s(Ni,"P",{});var Ii=r(No);Hl=i(Ii,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),jr=s(Ii,"CODE",{});var Ym=r(jr);Rl=i(Ym,"prepare_for_model"),Ym.forEach(t),Jl=i(Ii," method."),Ii.forEach(t),Ni.forEach(t),Bl=h(N),ke=s(N,"DIV",{class:!0});var Zs=r(ke);k(Io.$$.fragment,Zs),Kl=h(Zs),Ts=s(Zs,"P",{});var km=r(Ts);Xl=i(km,"Create the token type IDs corresponding to the sequences passed. "),xs=s(km,"A",{href:!0});var ef=r(xs);Ql=i(ef,`What are token type
IDs?`),ef.forEach(t),km.forEach(t),Zl=h(Zs),Cr=s(Zs,"P",{});var tf=r(Cr);Yl=i(tf,"Should be overridden in a subclass if the model has a special way of building those."),tf.forEach(t),Zs.forEach(t),ec=h(N),$s=s(N,"DIV",{class:!0});var of=r($s);k(Oo.$$.fragment,of),of.forEach(t),N.forEach(t),ai=h(o),Me=s(o,"H2",{class:!0});var Oi=r(Me);ut=s(Oi,"A",{id:!0,class:!0,href:!0});var nf=r(ut);Mr=s(nf,"SPAN",{});var sf=r(Mr);k(Lo.$$.fragment,sf),sf.forEach(t),nf.forEach(t),tc=h(Oi),Pr=s(Oi,"SPAN",{});var rf=r(Pr);oc=i(rf,"WhisperFeatureExtractor"),rf.forEach(t),Oi.forEach(t),ii=h(o),L=s(o,"DIV",{class:!0});var xe=r(L);k(Do.$$.fragment,xe),nc=h(xe),Ar=s(xe,"P",{});var af=r(Ar);sc=i(af,"Constructs a Whisper feature extractor."),af.forEach(t),rc=h(xe),Go=s(xe,"P",{});var Li=r(Go);ac=i(Li,"This feature extractor inherits from "),Fs=s(Li,"A",{href:!0});var df=r(Fs);ic=i(df,"SequenceFeatureExtractor"),df.forEach(t),dc=i(Li,` which contains
most of the main methods. Users should refer to this superclass for more information regarding those methods.`),Li.forEach(t),lc=h(xe),Pe=s(xe,"P",{});var Ys=r(Pe);cc=i(Ys,"This class extracts mel-filter bank features from raw speech using a custom numpy implementation of the "),Sr=s(Ys,"CODE",{});var lf=r(Sr);pc=i(lf,"Short Time Fourier Transform"),lf.forEach(t),hc=i(Ys," which should match pytorch\u2019s "),Nr=s(Ys,"CODE",{});var cf=r(Nr);uc=i(cf,"torch.stft"),cf.forEach(t),mc=i(Ys," equivalent."),Ys.forEach(t),fc=h(xe),mt=s(xe,"DIV",{class:!0});var Di=r(mt);k(Uo.$$.fragment,Di),_c=h(Di),Ir=s(Di,"P",{});var pf=r(Ir);gc=i(pf,"Main method to featurize and prepare for the model one or several sequence(s)."),pf.forEach(t),Di.forEach(t),xe.forEach(t),di=h(o),Ae=s(o,"H2",{class:!0});var Gi=r(Ae);ft=s(Gi,"A",{id:!0,class:!0,href:!0});var hf=r(ft);Or=s(hf,"SPAN",{});var uf=r(Or);k(Vo.$$.fragment,uf),uf.forEach(t),hf.forEach(t),vc=h(Gi),Lr=s(Gi,"SPAN",{});var mf=r(Lr);yc=i(mf,"WhisperProcessor"),mf.forEach(t),Gi.forEach(t),li=h(o),j=s(o,"DIV",{class:!0});var I=r(j);k(Ho.$$.fragment,I),bc=h(I),Dr=s(I,"P",{});var ff=r(Dr);kc=i(ff,`Constructs a Whisper processor which wraps a Whisper feature extractor and a Whisper tokenizer into a single
processor.`),ff.forEach(t),wc=h(I),U=s(I,"P",{});var ue=r(U);Ws=s(ue,"A",{href:!0});var _f=r(Ws);Tc=i(_f,"WhisperProcessor"),_f.forEach(t),xc=i(ue," offers all the functionalities of "),zs=s(ue,"A",{href:!0});var gf=r(zs);$c=i(gf,"WhisperFeatureExtractor"),gf.forEach(t),Fc=i(ue," and "),qs=s(ue,"A",{href:!0});var vf=r(qs);Wc=i(vf,"WhisperTokenizer"),vf.forEach(t),zc=i(ue,`. See
the `),Ro=s(ue,"A",{href:!0});var wm=r(Ro);Gr=s(wm,"STRONG",{});var yf=r(Gr);qc=i(yf,"call"),yf.forEach(t),Ec=i(wm,"()"),wm.forEach(t),jc=i(ue," and "),Es=s(ue,"A",{href:!0});var bf=r(Es);Cc=i(bf,"decode()"),bf.forEach(t),Mc=i(ue," for more information."),ue.forEach(t),Pc=h(I),_t=s(I,"DIV",{class:!0});var Ui=r(_t);k(Jo.$$.fragment,Ui),Ac=h(Ui),H=s(Ui,"P",{});var $e=r(H);Sc=i($e,"Forwards the "),Ur=s($e,"CODE",{});var kf=r(Ur);Nc=i(kf,"audio"),kf.forEach(t),Ic=i($e," argument to WhisperFeatureExtractor\u2019s "),Bo=s($e,"A",{href:!0});var Tm=r(Bo);Vr=s(Tm,"STRONG",{});var wf=r(Vr);Oc=i(wf,"call"),wf.forEach(t),Lc=i(Tm,"()"),Tm.forEach(t),Dc=i($e," and the "),Hr=s($e,"CODE",{});var Tf=r(Hr);Gc=i(Tf,"text"),Tf.forEach(t),Uc=i($e,`
argument to `),Ko=s($e,"A",{href:!0});var xm=r(Ko);Rr=s(xm,"STRONG",{});var xf=r(Rr);Vc=i(xf,"call"),xf.forEach(t),Hc=i(xm,"()"),xm.forEach(t),Rc=i($e,`. Please refer to the doctsring of the above two methods for more
information.`),$e.forEach(t),Ui.forEach(t),Jc=h(I),we=s(I,"DIV",{class:!0});var er=r(we);k(Xo.$$.fragment,er),Bc=h(er),Jr=s(er,"P",{});var $f=r(Jr);Kc=i($f,"Instantiate a processor associated with a pretrained model."),$f.forEach(t),Xc=h(er),k(gt.$$.fragment,er),er.forEach(t),Qc=h(I),Te=s(I,"DIV",{class:!0});var tr=r(Te);k(Qo.$$.fragment,tr),Zc=h(tr),Zo=s(tr,"P",{});var Vi=r(Zo);Yc=i(Vi,`Saves the attributes of this processor (feature extractor, tokenizer\u2026) in the specified directory so that it
can be reloaded using the `),js=s(Vi,"A",{href:!0});var Ff=r(js);ep=i(Ff,"from_pretrained()"),Ff.forEach(t),tp=i(Vi," method."),Vi.forEach(t),op=h(tr),k(vt.$$.fragment,tr),tr.forEach(t),np=h(I),yt=s(I,"DIV",{class:!0});var Hi=r(yt);k(Yo.$$.fragment,Hi),sp=h(Hi),en=s(Hi,"P",{});var Ri=r(en);rp=i(Ri,"This method forwards all its arguments to WhisperTokenizer\u2019s "),Cs=s(Ri,"A",{href:!0});var Wf=r(Cs);ap=i(Wf,"batch_decode()"),Wf.forEach(t),ip=i(Ri,`. Please
refer to the docstring of this method for more information.`),Ri.forEach(t),Hi.forEach(t),dp=h(I),bt=s(I,"DIV",{class:!0});var Ji=r(bt);k(tn.$$.fragment,Ji),lp=h(Ji),on=s(Ji,"P",{});var Bi=r(on);cp=i(Bi,"This method forwards all its arguments to WhisperTokenizer\u2019s "),Ms=s(Bi,"A",{href:!0});var zf=r(Ms);pp=i(zf,"decode()"),zf.forEach(t),hp=i(Bi,`. Please refer to
the docstring of this method for more information.`),Bi.forEach(t),Ji.forEach(t),I.forEach(t),ci=h(o),Se=s(o,"H2",{class:!0});var Ki=r(Se);kt=s(Ki,"A",{id:!0,class:!0,href:!0});var qf=r(kt);Br=s(qf,"SPAN",{});var Ef=r(Br);k(nn.$$.fragment,Ef),Ef.forEach(t),qf.forEach(t),up=h(Ki),Kr=s(Ki,"SPAN",{});var jf=r(Kr);mp=i(jf,"WhisperModel"),jf.forEach(t),Ki.forEach(t),pi=h(o),D=s(o,"DIV",{class:!0});var Fe=r(D);k(sn.$$.fragment,Fe),fp=h(Fe),rn=s(Fe,"P",{});var Xi=r(rn);_p=i(Xi,`The bare Whisper Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Ps=s(Xi,"A",{href:!0});var Cf=r(Ps);gp=i(Cf,"PreTrainedModel"),Cf.forEach(t),vp=i(Xi,`. 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.)`),Xi.forEach(t),yp=h(Fe),an=s(Fe,"P",{});var Qi=r(an);bp=i(Qi,"This model is also a PyTorch "),dn=s(Qi,"A",{href:!0,rel:!0});var Mf=r(dn);kp=i(Mf,"torch.nn.Module"),Mf.forEach(t),wp=i(Qi,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Qi.forEach(t),Tp=h(Fe),ee=s(Fe,"DIV",{class:!0});var Bt=r(ee);k(ln.$$.fragment,Bt),xp=h(Bt),Ne=s(Bt,"P",{});var or=r(Ne);$p=i(or,"The "),As=s(or,"A",{href:!0});var Pf=r(As);Fp=i(Pf,"WhisperModel"),Pf.forEach(t),Wp=i(or," forward method, overrides the "),Xr=s(or,"CODE",{});var Af=r(Xr);zp=i(Af,"__call__"),Af.forEach(t),qp=i(or," special method."),or.forEach(t),Ep=h(Bt),k(wt.$$.fragment,Bt),jp=h(Bt),k(Tt.$$.fragment,Bt),Bt.forEach(t),Cp=h(Fe),xt=s(Fe,"DIV",{class:!0});var Zi=r(xt);k(cn.$$.fragment,Zi),Mp=h(Zi),pn=s(Zi,"P",{});var Yi=r(pn);Pp=i(Yi,`Masks extracted features along time axis and/or along feature axis according to
`),hn=s(Yi,"A",{href:!0,rel:!0});var Sf=r(hn);Ap=i(Sf,"SpecAugment"),Sf.forEach(t),Sp=i(Yi,"."),Yi.forEach(t),Zi.forEach(t),Fe.forEach(t),hi=h(o),Ie=s(o,"H2",{class:!0});var ed=r(Ie);$t=s(ed,"A",{id:!0,class:!0,href:!0});var Nf=r($t);Qr=s(Nf,"SPAN",{});var If=r(Qr);k(un.$$.fragment,If),If.forEach(t),Nf.forEach(t),Np=h(ed),Zr=s(ed,"SPAN",{});var Of=r(Zr);Ip=i(Of,"WhisperForConditionalGeneration"),Of.forEach(t),ed.forEach(t),ui=h(o),R=s(o,"DIV",{class:!0});var Kt=r(R);k(mn.$$.fragment,Kt),Op=h(Kt),fn=s(Kt,"P",{});var td=r(fn);Lp=i(td,`The Whisper Model with a language modeling head. Can be used for automatic speech recognition.
This model inherits from `),Ss=s(td,"A",{href:!0});var Lf=r(Ss);Dp=i(Lf,"PreTrainedModel"),Lf.forEach(t),Gp=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),Up=h(Kt),_n=s(Kt,"P",{});var od=r(_n);Vp=i(od,"This model is also a PyTorch "),gn=s(od,"A",{href:!0,rel:!0});var Df=r(gn);Hp=i(Df,"torch.nn.Module"),Df.forEach(t),Rp=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),Jp=h(Kt),te=s(Kt,"DIV",{class:!0});var Xt=r(te);k(vn.$$.fragment,Xt),Bp=h(Xt),Oe=s(Xt,"P",{});var nr=r(Oe);Kp=i(nr,"The "),Ns=s(nr,"A",{href:!0});var Gf=r(Ns);Xp=i(Gf,"WhisperForConditionalGeneration"),Gf.forEach(t),Qp=i(nr," forward method, overrides the "),Yr=s(nr,"CODE",{});var Uf=r(Yr);Zp=i(Uf,"__call__"),Uf.forEach(t),Yp=i(nr," special method."),nr.forEach(t),eh=h(Xt),k(Ft.$$.fragment,Xt),th=h(Xt),k(Wt.$$.fragment,Xt),Xt.forEach(t),Kt.forEach(t),mi=h(o),Le=s(o,"H2",{class:!0});var nd=r(Le);zt=s(nd,"A",{id:!0,class:!0,href:!0});var Vf=r(zt);ea=s(Vf,"SPAN",{});var Hf=r(ea);k(yn.$$.fragment,Hf),Hf.forEach(t),Vf.forEach(t),oh=h(nd),ta=s(nd,"SPAN",{});var Rf=r(ta);nh=i(Rf,"WhisperForAudioClassification"),Rf.forEach(t),nd.forEach(t),fi=h(o),de=s(o,"DIV",{class:!0});var sr=r(de);k(bn.$$.fragment,sr),sh=h(sr),oa=s(sr,"P",{});var Jf=r(oa);rh=i(Jf,`Whisper Encoder Model with a sequence classification head on top (a linear layer over the pooled output) for tasks
like SUPERB Keyword Spotting.`),Jf.forEach(t),ah=h(sr),oe=s(sr,"DIV",{class:!0});var Qt=r(oe);k(kn.$$.fragment,Qt),ih=h(Qt),De=s(Qt,"P",{});var rr=r(De);dh=i(rr,"The "),Is=s(rr,"A",{href:!0});var Bf=r(Is);lh=i(Bf,"WhisperForAudioClassification"),Bf.forEach(t),ch=i(rr," forward method, overrides the "),na=s(rr,"CODE",{});var Kf=r(na);ph=i(Kf,"__call__"),Kf.forEach(t),hh=i(rr," special method."),rr.forEach(t),uh=h(Qt),k(qt.$$.fragment,Qt),mh=h(Qt),k(Et.$$.fragment,Qt),Qt.forEach(t),sr.forEach(t),_i=h(o),Ge=s(o,"H2",{class:!0});var sd=r(Ge);jt=s(sd,"A",{id:!0,class:!0,href:!0});var Xf=r(jt);sa=s(Xf,"SPAN",{});var Qf=r(sa);k(wn.$$.fragment,Qf),Qf.forEach(t),Xf.forEach(t),fh=h(sd),ra=s(sd,"SPAN",{});var Zf=r(ra);_h=i(Zf,"TFWhisperModel"),Zf.forEach(t),sd.forEach(t),gi=h(o),J=s(o,"DIV",{class:!0});var Zt=r(J);k(Tn.$$.fragment,Zt),gh=h(Zt),xn=s(Zt,"P",{});var rd=r(xn);vh=i(rd,`The bare Whisper Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Os=s(rd,"A",{href:!0});var Yf=r(Os);yh=i(Yf,"TFPreTrainedModel"),Yf.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),kh=h(Zt),$n=s(Zt,"P",{});var ad=r($n);wh=i(ad,"This model is also a "),Fn=s(ad,"A",{href:!0,rel:!0});var e_=r(Fn);Th=i(e_,"tf.keras.Model"),e_.forEach(t),xh=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),$h=h(Zt),ne=s(Zt,"DIV",{class:!0});var Yt=r(ne);k(Wn.$$.fragment,Yt),Fh=h(Yt),Ue=s(Yt,"P",{});var ar=r(Ue);Wh=i(ar,"The "),Ls=s(ar,"A",{href:!0});var t_=r(Ls);zh=i(t_,"TFWhisperModel"),t_.forEach(t),qh=i(ar," forward method, overrides the "),aa=s(ar,"CODE",{});var o_=r(aa);Eh=i(o_,"__call__"),o_.forEach(t),jh=i(ar," special method."),ar.forEach(t),Ch=h(Yt),k(Ct.$$.fragment,Yt),Mh=h(Yt),k(Mt.$$.fragment,Yt),Yt.forEach(t),Zt.forEach(t),vi=h(o),Ve=s(o,"H2",{class:!0});var id=r(Ve);Pt=s(id,"A",{id:!0,class:!0,href:!0});var n_=r(Pt);ia=s(n_,"SPAN",{});var s_=r(ia);k(zn.$$.fragment,s_),s_.forEach(t),n_.forEach(t),Ph=h(id),da=s(id,"SPAN",{});var r_=r(da);Ah=i(r_,"TFWhisperForConditionalGeneration"),r_.forEach(t),id.forEach(t),yi=h(o),B=s(o,"DIV",{class:!0});var eo=r(B);k(qn.$$.fragment,eo),Sh=h(eo),En=s(eo,"P",{});var dd=r(En);Nh=i(dd,`The Whisper Model with a language modeling head. Can be used for automatic speech recognition.
This model inherits from `),Ds=s(dd,"A",{href:!0});var a_=r(Ds);Ih=i(a_,"TFPreTrainedModel"),a_.forEach(t),Oh=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),Lh=h(eo),jn=s(eo,"P",{});var ld=r(jn);Dh=i(ld,"This model is also a "),Cn=s(ld,"A",{href:!0,rel:!0});var i_=r(Cn);Gh=i(i_,"tf.keras.Model"),i_.forEach(t),Uh=i(ld,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),ld.forEach(t),Vh=h(eo),se=s(eo,"DIV",{class:!0});var to=r(se);k(Mn.$$.fragment,to),Hh=h(to),He=s(to,"P",{});var ir=r(He);Rh=i(ir,"The "),Gs=s(ir,"A",{href:!0});var d_=r(Gs);Jh=i(d_,"TFWhisperForConditionalGeneration"),d_.forEach(t),Bh=i(ir," forward method, overrides the "),la=s(ir,"CODE",{});var l_=r(la);Kh=i(l_,"__call__"),l_.forEach(t),Xh=i(ir," special method."),ir.forEach(t),Qh=h(to),k(At.$$.fragment,to),Zh=h(to),k(St.$$.fragment,to),to.forEach(t),eo.forEach(t),bi=h(o),Re=s(o,"H2",{class:!0});var cd=r(Re);Nt=s(cd,"A",{id:!0,class:!0,href:!0});var c_=r(Nt);ca=s(c_,"SPAN",{});var p_=r(ca);k(Pn.$$.fragment,p_),p_.forEach(t),c_.forEach(t),Yh=h(cd),pa=s(cd,"SPAN",{});var h_=r(pa);eu=i(h_,"FlaxWhisperModel"),h_.forEach(t),cd.forEach(t),ki=h(o),K=s(o,"DIV",{class:!0});var oo=r(K);k(An.$$.fragment,oo),tu=h(oo),Je=s(oo,"P",{});var dr=r(Je);ou=i(dr,`The bare Whisper Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),Us=s(dr,"A",{href:!0});var u_=r(Us);nu=i(u_,"FlaxPreTrainedModel"),u_.forEach(t),su=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
`),Sn=s(dr,"A",{href:!0,rel:!0});var m_=r(Sn);ru=i(m_,"flax.nn.Module"),m_.forEach(t),au=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),iu=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);du=i(__,"Just-In-Time (JIT) compilation"),__.forEach(t),f_.forEach(t),lu=h(no),ua=s(no,"LI",{});var g_=r(ua);In=s(g_,"A",{href:!0,rel:!0});var v_=r(In);cu=i(v_,"Automatic Differentiation"),v_.forEach(t),g_.forEach(t),pu=h(no),ma=s(no,"LI",{});var y_=r(ma);On=s(y_,"A",{href:!0,rel:!0});var b_=r(On);hu=i(b_,"Vectorization"),b_.forEach(t),y_.forEach(t),uu=h(no),fa=s(no,"LI",{});var k_=r(fa);Ln=s(k_,"A",{href:!0,rel:!0});var w_=r(Ln);mu=i(w_,"Parallelization"),w_.forEach(t),k_.forEach(t),no.forEach(t),fu=h(oo),re=s(oo,"DIV",{class:!0});var so=r(re);k(Dn.$$.fragment,so),_u=h(so),Be=s(so,"P",{});var lr=r(Be);gu=i(lr,"The "),_a=s(lr,"CODE",{});var T_=r(_a);vu=i(T_,"FlaxWhisperPreTrainedModel"),T_.forEach(t),yu=i(lr," forward method, overrides the "),ga=s(lr,"CODE",{});var x_=r(ga);bu=i(x_,"__call__"),x_.forEach(t),ku=i(lr," special method."),lr.forEach(t),wu=h(so),k(It.$$.fragment,so),Tu=h(so),k(Ot.$$.fragment,so),so.forEach(t),oo.forEach(t),wi=h(o),Ke=s(o,"H2",{class:!0});var pd=r(Ke);Lt=s(pd,"A",{id:!0,class:!0,href:!0});var $_=r(Lt);va=s($_,"SPAN",{});var F_=r(va);k(Gn.$$.fragment,F_),F_.forEach(t),$_.forEach(t),xu=h(pd),ya=s(pd,"SPAN",{});var W_=r(ya);$u=i(W_,"FlaxWhisperForConditionalGeneration"),W_.forEach(t),pd.forEach(t),Ti=h(o),X=s(o,"DIV",{class:!0});var ro=r(X);k(Un.$$.fragment,ro),Fu=h(ro),Xe=s(ro,"P",{});var cr=r(Xe);Wu=i(cr,`The Whisper Model with a language modeling head.
This model inherits from `),Vs=s(cr,"A",{href:!0});var z_=r(Vs);zu=i(z_,"FlaxPreTrainedModel"),z_.forEach(t),qu=i(cr,`. Check the superclass documentation for the generic methods the
library implements for all its models (such as downloading or saving, resizing the input embeddings, pruning heads
etc.) This model is also a Flax Linen
`),Vn=s(cr,"A",{href:!0,rel:!0});var q_=r(Vn);Eu=i(q_,"flax.nn.Module"),q_.forEach(t),ju=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),Cu=h(ro),ce=s(ro,"UL",{});var ao=r(ce);ba=s(ao,"LI",{});var E_=r(ba);Hn=s(E_,"A",{href:!0,rel:!0});var j_=r(Hn);Mu=i(j_,"Just-In-Time (JIT) compilation"),j_.forEach(t),E_.forEach(t),Pu=h(ao),ka=s(ao,"LI",{});var C_=r(ka);Rn=s(C_,"A",{href:!0,rel:!0});var M_=r(Rn);Au=i(M_,"Automatic Differentiation"),M_.forEach(t),C_.forEach(t),Su=h(ao),wa=s(ao,"LI",{});var P_=r(wa);Jn=s(P_,"A",{href:!0,rel:!0});var A_=r(Jn);Nu=i(A_,"Vectorization"),A_.forEach(t),P_.forEach(t),Iu=h(ao),Ta=s(ao,"LI",{});var S_=r(Ta);Bn=s(S_,"A",{href:!0,rel:!0});var N_=r(Bn);Ou=i(N_,"Parallelization"),N_.forEach(t),S_.forEach(t),ao.forEach(t),Lu=h(ro),ae=s(ro,"DIV",{class:!0});var io=r(ae);k(Kn.$$.fragment,io),Du=h(io),Qe=s(io,"P",{});var pr=r(Qe);Gu=i(pr,"The "),xa=s(pr,"CODE",{});var I_=r(xa);Uu=i(I_,"FlaxWhisperPreTrainedModel"),I_.forEach(t),Vu=i(pr," forward method, overrides the "),$a=s(pr,"CODE",{});var O_=r($a);Hu=i(O_,"__call__"),O_.forEach(t),Ru=i(pr," special method."),pr.forEach(t),Ju=h(io),k(Dt.$$.fragment,io),Bu=h(io),k(Gt.$$.fragment,io),io.forEach(t),ro.forEach(t),xi=h(o),Ze=s(o,"H2",{class:!0});var hd=r(Ze);Ut=s(hd,"A",{id:!0,class:!0,href:!0});var L_=r(Ut);Fa=s(L_,"SPAN",{});var D_=r(Fa);k(Xn.$$.fragment,D_),D_.forEach(t),L_.forEach(t),Ku=h(hd),Wa=s(hd,"SPAN",{});var G_=r(Wa);Xu=i(G_,"FlaxWhisperForAudioClassification"),G_.forEach(t),hd.forEach(t),$i=h(o),Q=s(o,"DIV",{class:!0});var lo=r(Q);k(Qn.$$.fragment,lo),Qu=h(lo),Ye=s(lo,"P",{});var hr=r(Ye);Zu=i(hr,`The Whisper Model with an audio classification head on top.
This model inherits from `),Hs=s(hr,"A",{href:!0});var U_=r(Hs);Yu=i(U_,"FlaxPreTrainedModel"),U_.forEach(t),em=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
`),Zn=s(hr,"A",{href:!0,rel:!0});var V_=r(Zn);tm=i(V_,"flax.nn.Module"),V_.forEach(t),om=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),nm=h(lo),pe=s(lo,"UL",{});var co=r(pe);za=s(co,"LI",{});var H_=r(za);Yn=s(H_,"A",{href:!0,rel:!0});var R_=r(Yn);sm=i(R_,"Just-In-Time (JIT) compilation"),R_.forEach(t),H_.forEach(t),rm=h(co),qa=s(co,"LI",{});var J_=r(qa);es=s(J_,"A",{href:!0,rel:!0});var B_=r(es);am=i(B_,"Automatic Differentiation"),B_.forEach(t),J_.forEach(t),im=h(co),Ea=s(co,"LI",{});var K_=r(Ea);ts=s(K_,"A",{href:!0,rel:!0});var X_=r(ts);dm=i(X_,"Vectorization"),X_.forEach(t),K_.forEach(t),lm=h(co),ja=s(co,"LI",{});var Q_=r(ja);os=s(Q_,"A",{href:!0,rel:!0});var Z_=r(os);cm=i(Z_,"Parallelization"),Z_.forEach(t),Q_.forEach(t),co.forEach(t),pm=h(lo),ie=s(lo,"DIV",{class:!0});var po=r(ie);k(ns.$$.fragment,po),hm=h(po),et=s(po,"P",{});var ur=r(et);um=i(ur,"The "),Rs=s(ur,"A",{href:!0});var Y_=r(Rs);mm=i(Y_,"FlaxWhisperForAudioClassification"),Y_.forEach(t),fm=i(ur," forward method, overrides the "),Ca=s(ur,"CODE",{});var eg=r(Ca);_m=i(eg,"__call__"),eg.forEach(t),gm=i(ur," special method."),ur.forEach(t),vm=h(po),k(Vt.$$.fragment,po),ym=h(po),k(Ht.$$.fragment,po),po.forEach(t),lo.forEach(t),this.h()},h(){l(c,"name","hf:doc:metadata"),l(c,"content",JSON.stringify(zg)),l(m,"id","whisper"),l(m,"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(m,"href","#whisper"),l(f,"class","relative group"),l(M,"id","overview"),l(M,"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(M,"href","#overview"),l(P,"class","relative group"),l(ho,"href","https://cdn.openai.com/papers/whisper.pdf"),l(ho,"rel","nofollow"),l(us,"href","/docs/transformers/v4.29.0/en/main_classes/text_generation#transformers.GenerationMixin.generate"),l(ms,"href","/docs/transformers/v4.29.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(ze,"class","relative group"),l(fs,"href","/docs/transformers/v4.29.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.29.0/en/main_classes/configuration#transformers.PretrainedConfig"),l(gs,"href","/docs/transformers/v4.29.0/en/main_classes/configuration#transformers.PretrainedConfig"),l(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(rt,"id","transformers.WhisperTokenizer"),l(rt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(rt,"href","#transformers.WhisperTokenizer"),l(je,"class","relative group"),l(vs,"href","/docs/transformers/v4.29.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(ks,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(lt,"id","transformers.WhisperTokenizerFast"),l(lt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(lt,"href","#transformers.WhisperTokenizerFast"),l(Ce,"class","relative group"),l(ws,"href","/docs/transformers/v4.29.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(xs,"href","../glossary#token-type-ids"),l(ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l($s,"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(ut,"id","transformers.WhisperFeatureExtractor"),l(ut,"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(ut,"href","#transformers.WhisperFeatureExtractor"),l(Me,"class","relative group"),l(Fs,"href","/docs/transformers/v4.29.0/en/main_classes/feature_extractor#transformers.SequenceFeatureExtractor"),l(mt,"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(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(Ae,"class","relative group"),l(Ws,"href","/docs/transformers/v4.29.0/en/model_doc/whisper#transformers.WhisperProcessor"),l(zs,"href","/docs/transformers/v4.29.0/en/model_doc/whisper#transformers.WhisperFeatureExtractor"),l(qs,"href","/docs/transformers/v4.29.0/en/model_doc/whisper#transformers.WhisperTokenizer"),l(Ro,"href","/docs/transformers/v4.29.0/en/model_doc/whisper#transformers.WhisperProcessor.__call__"),l(Es,"href","/docs/transformers/v4.29.0/en/model_doc/whisper#transformers.WhisperProcessor.decode"),l(Bo,"href","/docs/transformers/v4.29.0/en/model_doc/whisper#transformers.WhisperFeatureExtractor.__call__"),l(Ko,"href","/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__"),l(_t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(we,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(js,"href","/docs/transformers/v4.29.0/en/main_classes/processors#transformers.ProcessorMixin.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.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.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(Ms,"href","/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.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(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(kt,"id","transformers.WhisperModel"),l(kt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(kt,"href","#transformers.WhisperModel"),l(Se,"class","relative group"),l(Ps,"href","/docs/transformers/v4.29.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(As,"href","/docs/transformers/v4.29.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(xt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(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($t,"id","transformers.WhisperForConditionalGeneration"),l($t,"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($t,"href","#transformers.WhisperForConditionalGeneration"),l(Ie,"class","relative group"),l(Ss,"href","/docs/transformers/v4.29.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.29.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(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(zt,"id","transformers.WhisperForAudioClassification"),l(zt,"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(zt,"href","#transformers.WhisperForAudioClassification"),l(Le,"class","relative group"),l(Is,"href","/docs/transformers/v4.29.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(jt,"id","transformers.TFWhisperModel"),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.TFWhisperModel"),l(Ge,"class","relative group"),l(Os,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel"),l(Fn,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),l(Fn,"rel","nofollow"),l(Ls,"href","/docs/transformers/v4.29.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(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(Pt,"id","transformers.TFWhisperForConditionalGeneration"),l(Pt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(Pt,"href","#transformers.TFWhisperForConditionalGeneration"),l(Ve,"class","relative group"),l(Ds,"href","/docs/transformers/v4.29.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(Gs,"href","/docs/transformers/v4.29.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(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(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(Re,"class","relative group"),l(Us,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),l(Sn,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),l(Sn,"rel","nofollow"),l(Nn,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),l(Nn,"rel","nofollow"),l(In,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),l(In,"rel","nofollow"),l(On,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),l(On,"rel","nofollow"),l(Ln,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),l(Ln,"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(K,"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.FlaxWhisperForConditionalGeneration"),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.FlaxWhisperForConditionalGeneration"),l(Ke,"class","relative group"),l(Vs,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),l(Vn,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),l(Vn,"rel","nofollow"),l(Hn,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),l(Hn,"rel","nofollow"),l(Rn,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),l(Rn,"rel","nofollow"),l(Jn,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),l(Jn,"rel","nofollow"),l(Bn,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),l(Bn,"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(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(Ut,"id","transformers.FlaxWhisperForAudioClassification"),l(Ut,"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(Ut,"href","#transformers.FlaxWhisperForAudioClassification"),l(Ze,"class","relative group"),l(Hs,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),l(Zn,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),l(Zn,"rel","nofollow"),l(Yn,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),l(Yn,"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(Rs,"href","/docs/transformers/v4.29.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(Q,"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,m),e(m,g),w(d,g,null),e(f,u),e(f,z),e(z,O),v(o,C,_),v(o,P,_),e(P,M),e(M,A),w(ge,A,null),e(P,ls),e(P,tt),e(tt,ud),v(o,Ba,_),v(o,ot,_),e(ot,md),e(ot,ho),e(ho,fd),e(ot,_d),v(o,Ka,_),v(o,cs,_),e(cs,gd),v(o,Xa,_),v(o,ps,_),e(ps,mr),e(mr,vd),v(o,Qa,_),v(o,hs,_),e(hs,yd),v(o,Za,_),v(o,Z,_),e(Z,fr),e(fr,bd),e(Z,kd),e(Z,uo),e(uo,wd),e(uo,us),e(us,Td),e(uo,xd),e(Z,$d),e(Z,_r),e(_r,Fd),e(Z,Wd),e(Z,mo),e(mo,zd),e(mo,ms),e(ms,qd),e(mo,Ed),v(o,Ya,_),v(o,Y,_),e(Y,jd),e(Y,fo),e(fo,Cd),e(Y,Md),e(Y,_o),e(_o,Pd),e(Y,Ad),e(Y,go),e(go,Sd),e(Y,Nd),v(o,ei,_),v(o,ze,_),e(ze,nt),e(nt,gr),w(vo,gr,null),e(ze,Id),e(ze,vr),e(vr,Od),v(o,ti,_),v(o,V,_),w(yo,V,null),e(V,Ld),e(V,qe),e(qe,Dd),e(qe,fs),e(fs,Gd),e(qe,Ud),e(qe,bo),e(bo,Vd),e(qe,Hd),e(V,Rd),e(V,Ee),e(Ee,Jd),e(Ee,_s),e(_s,Bd),e(Ee,Kd),e(Ee,gs),e(gs,Xd),e(Ee,Qd),e(V,Zd),w(st,V,null),v(o,oi,_),v(o,je,_),e(je,rt),e(rt,yr),w(ko,yr,null),e(je,Yd),e(je,br),e(br,el),v(o,ni,_),v(o,q,_),w(wo,q,null),e(q,tl),e(q,kr),e(kr,ol),e(q,nl),e(q,To),e(To,sl),e(To,vs),e(vs,rl),e(To,al),e(q,il),e(q,ve),w(xo,ve,null),e(ve,dl),e(ve,wr),e(wr,ll),e(ve,cl),w(at,ve,null),e(q,pl),e(q,it),w($o,it,null),e(it,hl),e(it,Tr),e(Tr,ul),e(q,ml),e(q,dt),w(Fo,dt,null),e(dt,fl),e(dt,Wo),e(Wo,_l),e(Wo,xr),e(xr,gl),e(Wo,vl),e(q,yl),e(q,ye),w(zo,ye,null),e(ye,bl),e(ye,ys),e(ys,kl),e(ys,bs),e(bs,wl),e(ye,Tl),e(ye,$r),e($r,xl),e(q,$l),e(q,ks),w(qo,ks,null),v(o,si,_),v(o,Ce,_),e(Ce,lt),e(lt,Fr),w(Eo,Fr,null),e(Ce,Fl),e(Ce,Wr),e(Wr,Wl),v(o,ri,_),v(o,E,_),w(jo,E,null),e(E,zl),e(E,Co),e(Co,ql),e(Co,zr),e(zr,El),e(Co,jl),e(E,Cl),e(E,Mo),e(Mo,Ml),e(Mo,ws),e(ws,Pl),e(Mo,Al),e(E,Sl),e(E,be),w(Po,be,null),e(be,Nl),e(be,qr),e(qr,Il),e(be,Ol),w(ct,be,null),e(E,Ll),e(E,pt),w(Ao,pt,null),e(pt,Dl),e(pt,Er),e(Er,Gl),e(E,Ul),e(E,ht),w(So,ht,null),e(ht,Vl),e(ht,No),e(No,Hl),e(No,jr),e(jr,Rl),e(No,Jl),e(E,Bl),e(E,ke),w(Io,ke,null),e(ke,Kl),e(ke,Ts),e(Ts,Xl),e(Ts,xs),e(xs,Ql),e(ke,Zl),e(ke,Cr),e(Cr,Yl),e(E,ec),e(E,$s),w(Oo,$s,null),v(o,ai,_),v(o,Me,_),e(Me,ut),e(ut,Mr),w(Lo,Mr,null),e(Me,tc),e(Me,Pr),e(Pr,oc),v(o,ii,_),v(o,L,_),w(Do,L,null),e(L,nc),e(L,Ar),e(Ar,sc),e(L,rc),e(L,Go),e(Go,ac),e(Go,Fs),e(Fs,ic),e(Go,dc),e(L,lc),e(L,Pe),e(Pe,cc),e(Pe,Sr),e(Sr,pc),e(Pe,hc),e(Pe,Nr),e(Nr,uc),e(Pe,mc),e(L,fc),e(L,mt),w(Uo,mt,null),e(mt,_c),e(mt,Ir),e(Ir,gc),v(o,di,_),v(o,Ae,_),e(Ae,ft),e(ft,Or),w(Vo,Or,null),e(Ae,vc),e(Ae,Lr),e(Lr,yc),v(o,li,_),v(o,j,_),w(Ho,j,null),e(j,bc),e(j,Dr),e(Dr,kc),e(j,wc),e(j,U),e(U,Ws),e(Ws,Tc),e(U,xc),e(U,zs),e(zs,$c),e(U,Fc),e(U,qs),e(qs,Wc),e(U,zc),e(U,Ro),e(Ro,Gr),e(Gr,qc),e(Ro,Ec),e(U,jc),e(U,Es),e(Es,Cc),e(U,Mc),e(j,Pc),e(j,_t),w(Jo,_t,null),e(_t,Ac),e(_t,H),e(H,Sc),e(H,Ur),e(Ur,Nc),e(H,Ic),e(H,Bo),e(Bo,Vr),e(Vr,Oc),e(Bo,Lc),e(H,Dc),e(H,Hr),e(Hr,Gc),e(H,Uc),e(H,Ko),e(Ko,Rr),e(Rr,Vc),e(Ko,Hc),e(H,Rc),e(j,Jc),e(j,we),w(Xo,we,null),e(we,Bc),e(we,Jr),e(Jr,Kc),e(we,Xc),w(gt,we,null),e(j,Qc),e(j,Te),w(Qo,Te,null),e(Te,Zc),e(Te,Zo),e(Zo,Yc),e(Zo,js),e(js,ep),e(Zo,tp),e(Te,op),w(vt,Te,null),e(j,np),e(j,yt),w(Yo,yt,null),e(yt,sp),e(yt,en),e(en,rp),e(en,Cs),e(Cs,ap),e(en,ip),e(j,dp),e(j,bt),w(tn,bt,null),e(bt,lp),e(bt,on),e(on,cp),e(on,Ms),e(Ms,pp),e(on,hp),v(o,ci,_),v(o,Se,_),e(Se,kt),e(kt,Br),w(nn,Br,null),e(Se,up),e(Se,Kr),e(Kr,mp),v(o,pi,_),v(o,D,_),w(sn,D,null),e(D,fp),e(D,rn),e(rn,_p),e(rn,Ps),e(Ps,gp),e(rn,vp),e(D,yp),e(D,an),e(an,bp),e(an,dn),e(dn,kp),e(an,wp),e(D,Tp),e(D,ee),w(ln,ee,null),e(ee,xp),e(ee,Ne),e(Ne,$p),e(Ne,As),e(As,Fp),e(Ne,Wp),e(Ne,Xr),e(Xr,zp),e(Ne,qp),e(ee,Ep),w(wt,ee,null),e(ee,jp),w(Tt,ee,null),e(D,Cp),e(D,xt),w(cn,xt,null),e(xt,Mp),e(xt,pn),e(pn,Pp),e(pn,hn),e(hn,Ap),e(pn,Sp),v(o,hi,_),v(o,Ie,_),e(Ie,$t),e($t,Qr),w(un,Qr,null),e(Ie,Np),e(Ie,Zr),e(Zr,Ip),v(o,ui,_),v(o,R,_),w(mn,R,null),e(R,Op),e(R,fn),e(fn,Lp),e(fn,Ss),e(Ss,Dp),e(fn,Gp),e(R,Up),e(R,_n),e(_n,Vp),e(_n,gn),e(gn,Hp),e(_n,Rp),e(R,Jp),e(R,te),w(vn,te,null),e(te,Bp),e(te,Oe),e(Oe,Kp),e(Oe,Ns),e(Ns,Xp),e(Oe,Qp),e(Oe,Yr),e(Yr,Zp),e(Oe,Yp),e(te,eh),w(Ft,te,null),e(te,th),w(Wt,te,null),v(o,mi,_),v(o,Le,_),e(Le,zt),e(zt,ea),w(yn,ea,null),e(Le,oh),e(Le,ta),e(ta,nh),v(o,fi,_),v(o,de,_),w(bn,de,null),e(de,sh),e(de,oa),e(oa,rh),e(de,ah),e(de,oe),w(kn,oe,null),e(oe,ih),e(oe,De),e(De,dh),e(De,Is),e(Is,lh),e(De,ch),e(De,na),e(na,ph),e(De,hh),e(oe,uh),w(qt,oe,null),e(oe,mh),w(Et,oe,null),v(o,_i,_),v(o,Ge,_),e(Ge,jt),e(jt,sa),w(wn,sa,null),e(Ge,fh),e(Ge,ra),e(ra,_h),v(o,gi,_),v(o,J,_),w(Tn,J,null),e(J,gh),e(J,xn),e(xn,vh),e(xn,Os),e(Os,yh),e(xn,bh),e(J,kh),e(J,$n),e($n,wh),e($n,Fn),e(Fn,Th),e($n,xh),e(J,$h),e(J,ne),w(Wn,ne,null),e(ne,Fh),e(ne,Ue),e(Ue,Wh),e(Ue,Ls),e(Ls,zh),e(Ue,qh),e(Ue,aa),e(aa,Eh),e(Ue,jh),e(ne,Ch),w(Ct,ne,null),e(ne,Mh),w(Mt,ne,null),v(o,vi,_),v(o,Ve,_),e(Ve,Pt),e(Pt,ia),w(zn,ia,null),e(Ve,Ph),e(Ve,da),e(da,Ah),v(o,yi,_),v(o,B,_),w(qn,B,null),e(B,Sh),e(B,En),e(En,Nh),e(En,Ds),e(Ds,Ih),e(En,Oh),e(B,Lh),e(B,jn),e(jn,Dh),e(jn,Cn),e(Cn,Gh),e(jn,Uh),e(B,Vh),e(B,se),w(Mn,se,null),e(se,Hh),e(se,He),e(He,Rh),e(He,Gs),e(Gs,Jh),e(He,Bh),e(He,la),e(la,Kh),e(He,Xh),e(se,Qh),w(At,se,null),e(se,Zh),w(St,se,null),v(o,bi,_),v(o,Re,_),e(Re,Nt),e(Nt,ca),w(Pn,ca,null),e(Re,Yh),e(Re,pa),e(pa,eu),v(o,ki,_),v(o,K,_),w(An,K,null),e(K,tu),e(K,Je),e(Je,ou),e(Je,Us),e(Us,nu),e(Je,su),e(Je,Sn),e(Sn,ru),e(Je,au),e(K,iu),e(K,le),e(le,ha),e(ha,Nn),e(Nn,du),e(le,lu),e(le,ua),e(ua,In),e(In,cu),e(le,pu),e(le,ma),e(ma,On),e(On,hu),e(le,uu),e(le,fa),e(fa,Ln),e(Ln,mu),e(K,fu),e(K,re),w(Dn,re,null),e(re,_u),e(re,Be),e(Be,gu),e(Be,_a),e(_a,vu),e(Be,yu),e(Be,ga),e(ga,bu),e(Be,ku),e(re,wu),w(It,re,null),e(re,Tu),w(Ot,re,null),v(o,wi,_),v(o,Ke,_),e(Ke,Lt),e(Lt,va),w(Gn,va,null),e(Ke,xu),e(Ke,ya),e(ya,$u),v(o,Ti,_),v(o,X,_),w(Un,X,null),e(X,Fu),e(X,Xe),e(Xe,Wu),e(Xe,Vs),e(Vs,zu),e(Xe,qu),e(Xe,Vn),e(Vn,Eu),e(Xe,ju),e(X,Cu),e(X,ce),e(ce,ba),e(ba,Hn),e(Hn,Mu),e(ce,Pu),e(ce,ka),e(ka,Rn),e(Rn,Au),e(ce,Su),e(ce,wa),e(wa,Jn),e(Jn,Nu),e(ce,Iu),e(ce,Ta),e(Ta,Bn),e(Bn,Ou),e(X,Lu),e(X,ae),w(Kn,ae,null),e(ae,Du),e(ae,Qe),e(Qe,Gu),e(Qe,xa),e(xa,Uu),e(Qe,Vu),e(Qe,$a),e($a,Hu),e(Qe,Ru),e(ae,Ju),w(Dt,ae,null),e(ae,Bu),w(Gt,ae,null),v(o,xi,_),v(o,Ze,_),e(Ze,Ut),e(Ut,Fa),w(Xn,Fa,null),e(Ze,Ku),e(Ze,Wa),e(Wa,Xu),v(o,$i,_),v(o,Q,_),w(Qn,Q,null),e(Q,Qu),e(Q,Ye),e(Ye,Zu),e(Ye,Hs),e(Hs,Yu),e(Ye,em),e(Ye,Zn),e(Zn,tm),e(Ye,om),e(Q,nm),e(Q,pe),e(pe,za),e(za,Yn),e(Yn,sm),e(pe,rm),e(pe,qa),e(qa,es),e(es,am),e(pe,im),e(pe,Ea),e(Ea,ts),e(ts,dm),e(pe,lm),e(pe,ja),e(ja,os),e(os,cm),e(Q,pm),e(Q,ie),w(ns,ie,null),e(ie,hm),e(ie,et),e(et,um),e(et,Rs),e(Rs,mm),e(et,fm),e(et,Ca),e(Ca,_m),e(et,gm),e(ie,vm),w(Vt,ie,null),e(ie,ym),w(Ht,ie,null),Fi=!0},p(o,[_]){const ss={};_&2&&(ss.$$scope={dirty:_,ctx:o}),st.$set(ss);const Ma={};_&2&&(Ma.$$scope={dirty:_,ctx:o}),at.$set(Ma);const Pa={};_&2&&(Pa.$$scope={dirty:_,ctx:o}),ct.$set(Pa);const Aa={};_&2&&(Aa.$$scope={dirty:_,ctx:o}),gt.$set(Aa);const rs={};_&2&&(rs.$$scope={dirty:_,ctx:o}),vt.$set(rs);const Sa={};_&2&&(Sa.$$scope={dirty:_,ctx:o}),wt.$set(Sa);const Na={};_&2&&(Na.$$scope={dirty:_,ctx:o}),Tt.$set(Na);const Ia={};_&2&&(Ia.$$scope={dirty:_,ctx:o}),Ft.$set(Ia);const as={};_&2&&(as.$$scope={dirty:_,ctx:o}),Wt.$set(as);const Oa={};_&2&&(Oa.$$scope={dirty:_,ctx:o}),qt.$set(Oa);const La={};_&2&&(La.$$scope={dirty:_,ctx:o}),Et.$set(La);const Da={};_&2&&(Da.$$scope={dirty:_,ctx:o}),Ct.$set(Da);const Ga={};_&2&&(Ga.$$scope={dirty:_,ctx:o}),Mt.$set(Ga);const Ua={};_&2&&(Ua.$$scope={dirty:_,ctx:o}),At.$set(Ua);const he={};_&2&&(he.$$scope={dirty:_,ctx:o}),St.$set(he);const Va={};_&2&&(Va.$$scope={dirty:_,ctx:o}),It.$set(Va);const is={};_&2&&(is.$$scope={dirty:_,ctx:o}),Ot.$set(is);const Ha={};_&2&&(Ha.$$scope={dirty:_,ctx:o}),Dt.$set(Ha);const Ra={};_&2&&(Ra.$$scope={dirty:_,ctx:o}),Gt.$set(Ra);const ds={};_&2&&(ds.$$scope={dirty:_,ctx:o}),Vt.$set(ds);const Ja={};_&2&&(Ja.$$scope={dirty:_,ctx:o}),Ht.$set(Ja)},i(o){Fi||(T(d.$$.fragment,o),T(ge.$$.fragment,o),T(vo.$$.fragment,o),T(yo.$$.fragment,o),T(st.$$.fragment,o),T(ko.$$.fragment,o),T(wo.$$.fragment,o),T(xo.$$.fragment,o),T(at.$$.fragment,o),T($o.$$.fragment,o),T(Fo.$$.fragment,o),T(zo.$$.fragment,o),T(qo.$$.fragment,o),T(Eo.$$.fragment,o),T(jo.$$.fragment,o),T(Po.$$.fragment,o),T(ct.$$.fragment,o),T(Ao.$$.fragment,o),T(So.$$.fragment,o),T(Io.$$.fragment,o),T(Oo.$$.fragment,o),T(Lo.$$.fragment,o),T(Do.$$.fragment,o),T(Uo.$$.fragment,o),T(Vo.$$.fragment,o),T(Ho.$$.fragment,o),T(Jo.$$.fragment,o),T(Xo.$$.fragment,o),T(gt.$$.fragment,o),T(Qo.$$.fragment,o),T(vt.$$.fragment,o),T(Yo.$$.fragment,o),T(tn.$$.fragment,o),T(nn.$$.fragment,o),T(sn.$$.fragment,o),T(ln.$$.fragment,o),T(wt.$$.fragment,o),T(Tt.$$.fragment,o),T(cn.$$.fragment,o),T(un.$$.fragment,o),T(mn.$$.fragment,o),T(vn.$$.fragment,o),T(Ft.$$.fragment,o),T(Wt.$$.fragment,o),T(yn.$$.fragment,o),T(bn.$$.fragment,o),T(kn.$$.fragment,o),T(qt.$$.fragment,o),T(Et.$$.fragment,o),T(wn.$$.fragment,o),T(Tn.$$.fragment,o),T(Wn.$$.fragment,o),T(Ct.$$.fragment,o),T(Mt.$$.fragment,o),T(zn.$$.fragment,o),T(qn.$$.fragment,o),T(Mn.$$.fragment,o),T(At.$$.fragment,o),T(St.$$.fragment,o),T(Pn.$$.fragment,o),T(An.$$.fragment,o),T(Dn.$$.fragment,o),T(It.$$.fragment,o),T(Ot.$$.fragment,o),T(Gn.$$.fragment,o),T(Un.$$.fragment,o),T(Kn.$$.fragment,o),T(Dt.$$.fragment,o),T(Gt.$$.fragment,o),T(Xn.$$.fragment,o),T(Qn.$$.fragment,o),T(ns.$$.fragment,o),T(Vt.$$.fragment,o),T(Ht.$$.fragment,o),Fi=!0)},o(o){x(d.$$.fragment,o),x(ge.$$.fragment,o),x(vo.$$.fragment,o),x(yo.$$.fragment,o),x(st.$$.fragment,o),x(ko.$$.fragment,o),x(wo.$$.fragment,o),x(xo.$$.fragment,o),x(at.$$.fragment,o),x($o.$$.fragment,o),x(Fo.$$.fragment,o),x(zo.$$.fragment,o),x(qo.$$.fragment,o),x(Eo.$$.fragment,o),x(jo.$$.fragment,o),x(Po.$$.fragment,o),x(ct.$$.fragment,o),x(Ao.$$.fragment,o),x(So.$$.fragment,o),x(Io.$$.fragment,o),x(Oo.$$.fragment,o),x(Lo.$$.fragment,o),x(Do.$$.fragment,o),x(Uo.$$.fragment,o),x(Vo.$$.fragment,o),x(Ho.$$.fragment,o),x(Jo.$$.fragment,o),x(Xo.$$.fragment,o),x(gt.$$.fragment,o),x(Qo.$$.fragment,o),x(vt.$$.fragment,o),x(Yo.$$.fragment,o),x(tn.$$.fragment,o),x(nn.$$.fragment,o),x(sn.$$.fragment,o),x(ln.$$.fragment,o),x(wt.$$.fragment,o),x(Tt.$$.fragment,o),x(cn.$$.fragment,o),x(un.$$.fragment,o),x(mn.$$.fragment,o),x(vn.$$.fragment,o),x(Ft.$$.fragment,o),x(Wt.$$.fragment,o),x(yn.$$.fragment,o),x(bn.$$.fragment,o),x(kn.$$.fragment,o),x(qt.$$.fragment,o),x(Et.$$.fragment,o),x(wn.$$.fragment,o),x(Tn.$$.fragment,o),x(Wn.$$.fragment,o),x(Ct.$$.fragment,o),x(Mt.$$.fragment,o),x(zn.$$.fragment,o),x(qn.$$.fragment,o),x(Mn.$$.fragment,o),x(At.$$.fragment,o),x(St.$$.fragment,o),x(Pn.$$.fragment,o),x(An.$$.fragment,o),x(Dn.$$.fragment,o),x(It.$$.fragment,o),x(Ot.$$.fragment,o),x(Gn.$$.fragment,o),x(Un.$$.fragment,o),x(Kn.$$.fragment,o),x(Dt.$$.fragment,o),x(Gt.$$.fragment,o),x(Xn.$$.fragment,o),x(Qn.$$.fragment,o),x(ns.$$.fragment,o),x(Vt.$$.fragment,o),x(Ht.$$.fragment,o),Fi=!1},d(o){t(c),o&&t(y),o&&t(f),$(d),o&&t(C),o&&t(P),$(ge),o&&t(Ba),o&&t(ot),o&&t(Ka),o&&t(cs),o&&t(Xa),o&&t(ps),o&&t(Qa),o&&t(hs),o&&t(Za),o&&t(Z),o&&t(Ya),o&&t(Y),o&&t(ei),o&&t(ze),$(vo),o&&t(ti),o&&t(V),$(yo),$(st),o&&t(oi),o&&t(je),$(ko),o&&t(ni),o&&t(q),$(wo),$(xo),$(at),$($o),$(Fo),$(zo),$(qo),o&&t(si),o&&t(Ce),$(Eo),o&&t(ri),o&&t(E),$(jo),$(Po),$(ct),$(Ao),$(So),$(Io),$(Oo),o&&t(ai),o&&t(Me),$(Lo),o&&t(ii),o&&t(L),$(Do),$(Uo),o&&t(di),o&&t(Ae),$(Vo),o&&t(li),o&&t(j),$(Ho),$(Jo),$(Xo),$(gt),$(Qo),$(vt),$(Yo),$(tn),o&&t(ci),o&&t(Se),$(nn),o&&t(pi),o&&t(D),$(sn),$(ln),$(wt),$(Tt),$(cn),o&&t(hi),o&&t(Ie),$(un),o&&t(ui),o&&t(R),$(mn),$(vn),$(Ft),$(Wt),o&&t(mi),o&&t(Le),$(yn),o&&t(fi),o&&t(de),$(bn),$(kn),$(qt),$(Et),o&&t(_i),o&&t(Ge),$(wn),o&&t(gi),o&&t(J),$(Tn),$(Wn),$(Ct),$(Mt),o&&t(vi),o&&t(Ve),$(zn),o&&t(yi),o&&t(B),$(qn),$(Mn),$(At),$(St),o&&t(bi),o&&t(Re),$(Pn),o&&t(ki),o&&t(K),$(An),$(Dn),$(It),$(Ot),o&&t(wi),o&&t(Ke),$(Gn),o&&t(Ti),o&&t(X),$(Un),$(Kn),$(Dt),$(Gt),o&&t(xi),o&&t(Ze),$(Xn),o&&t($i),o&&t(Q),$(Qn),$(ns),$(Vt),$(Ht)}}}const zg={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 qg(F){return rg(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Sg extends tg{constructor(c){super();og(this,c,qg,Wg,ng,{})}}export{Sg as default,zg as metadata};
