import{S as Af,i as Nf,s as Sf,e as n,k as p,w as b,t as a,M as Of,c as r,d as t,m as h,a as s,x as k,h as i,b as l,G as e,g,y as w,q as T,o as $,B as x,v as If,L as we}from"../../chunks/vendor-hf-doc-builder.js";import{T as Ke}from"../../chunks/Tip-hf-doc-builder.js";import{D as F}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Te}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as U}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as ke}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Lf(W){let c,y,f,m,v;return m=new Te({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=r(d,"P",{});var u=s(c);y=i(u,"Example:"),u.forEach(t),f=h(d),k(m.$$.fragment,d)},m(d,u){g(d,c,u),e(c,y),g(d,f,u),w(m,d,u),v=!0},p:we,i(d){v||(T(m.$$.fragment,d),v=!0)},o(d){$(m.$$.fragment,d),v=!1},d(d){d&&t(c),d&&t(f),x(m,d)}}}function Df(W){let c,y,f,m,v;return m=new Te({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=r(d,"P",{});var u=s(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){g(d,c,u),e(c,y),g(d,f,u),w(m,d,u),v=!0},p:we,i(d){v||(T(m.$$.fragment,d),v=!0)},o(d){$(m.$$.fragment,d),v=!1},d(d){d&&t(c),d&&t(f),x(m,d)}}}function Gf(W){let c,y,f,m,v;return m=new Te({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=r(d,"P",{});var u=s(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){g(d,c,u),e(c,y),g(d,f,u),w(m,d,u),v=!0},p:we,i(d){v||(T(m.$$.fragment,d),v=!0)},o(d){$(m.$$.fragment,d),v=!1},d(d){d&&t(c),d&&t(f),x(m,d)}}}function Uf(W){let c,y,f,m,v,d,u,z,I,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()"),v=a(`, image processor
`),d=n("a"),u=a("ImageProcessingMixin"),z=a(` and the tokenizer
`),I=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=r(M,"P",{});var A=s(c);y=i(A,`This class method is simply calling the feature extractor
`),f=r(A,"A",{href:!0});var pe=s(f);m=i(pe,"from_pretrained()"),pe.forEach(t),v=i(A,`, image processor
`),d=r(A,"A",{href:!0});var Gn=s(d);u=i(Gn,"ImageProcessingMixin"),Gn.forEach(t),z=i(A,` and the tokenizer
`),I=r(A,"CODE",{});var Je=s(I);C=i(Je,"~tokenization_utils_base.PreTrainedTokenizer.from_pretrained"),Je.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.27.1/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.from_pretrained"),l(d,"href","/docs/transformers/v4.27.1/en/internal/image_processing_utils#transformers.ImageProcessingMixin")},m(M,A){g(M,c,A),e(c,y),e(c,f),e(f,m),e(c,v),e(c,d),e(d,u),e(c,z),e(c,I),e(I,C),e(c,P)},d(M){M&&t(c)}}}function Vf(W){let c,y,f,m,v,d,u,z;return{c(){c=n("p"),y=a("This class method is simply calling "),f=n("a"),m=a("save_pretrained()"),v=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(I){c=r(I,"P",{});var C=s(c);y=i(C,"This class method is simply calling "),f=r(C,"A",{href:!0});var P=s(f);m=i(P,"save_pretrained()"),P.forEach(t),v=i(C,` and
`),d=r(C,"A",{href:!0});var M=s(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.27.1/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.save_pretrained"),l(d,"href","/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.save_pretrained")},m(I,C){g(I,c,C),e(c,y),e(c,f),e(f,m),e(c,v),e(c,d),e(d,u),e(c,z)},d(I){I&&t(c)}}}function Hf(W){let c,y,f,m,v;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"),v=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=r(d,"P",{});var u=s(c);y=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(u,"CODE",{});var z=s(f);m=i(z,"Module"),z.forEach(t),v=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){g(d,c,u),e(c,y),e(c,f),e(f,m),e(c,v)},d(d){d&&t(c)}}}function Bf(W){let c,y,f,m,v;return m=new Te({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=r(d,"P",{});var u=s(c);y=i(u,"Example:"),u.forEach(t),f=h(d),k(m.$$.fragment,d)},m(d,u){g(d,c,u),e(c,y),g(d,f,u),w(m,d,u),v=!0},p:we,i(d){v||(T(m.$$.fragment,d),v=!0)},o(d){$(m.$$.fragment,d),v=!1},d(d){d&&t(c),d&&t(f),x(m,d)}}}function Rf(W){let c,y,f,m,v;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"),v=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=r(d,"P",{});var u=s(c);y=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(u,"CODE",{});var z=s(f);m=i(z,"Module"),z.forEach(t),v=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){g(d,c,u),e(c,y),e(c,f),e(f,m),e(c,v)},d(d){d&&t(c)}}}function Kf(W){let c,y,f,m,v;return m=new Te({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=r(d,"P",{});var u=s(c);y=i(u,"Example:"),u.forEach(t),f=h(d),k(m.$$.fragment,d)},m(d,u){g(d,c,u),e(c,y),g(d,f,u),w(m,d,u),v=!0},p:we,i(d){v||(T(m.$$.fragment,d),v=!0)},o(d){$(m.$$.fragment,d),v=!1},d(d){d&&t(c),d&&t(f),x(m,d)}}}function Jf(W){let c,y,f,m,v;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"),v=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=r(d,"P",{});var u=s(c);y=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(u,"CODE",{});var z=s(f);m=i(z,"Module"),z.forEach(t),v=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){g(d,c,u),e(c,y),e(c,f),e(f,m),e(c,v)},d(d){d&&t(c)}}}function Xf(W){let c,y,f,m,v;return m=new Te({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=r(d,"P",{});var u=s(c);y=i(u,"Example:"),u.forEach(t),f=h(d),k(m.$$.fragment,d)},m(d,u){g(d,c,u),e(c,y),g(d,f,u),w(m,d,u),v=!0},p:we,i(d){v||(T(m.$$.fragment,d),v=!0)},o(d){$(m.$$.fragment,d),v=!1},d(d){d&&t(c),d&&t(f),x(m,d)}}}function Qf(W){let c,y,f,m,v;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"),v=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=r(d,"P",{});var u=s(c);y=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(u,"CODE",{});var z=s(f);m=i(z,"Module"),z.forEach(t),v=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){g(d,c,u),e(c,y),e(c,f),e(f,m),e(c,v)},d(d){d&&t(c)}}}function Zf(W){let c,y,f,m,v;return m=new Te({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=r(d,"P",{});var u=s(c);y=i(u,"Example:"),u.forEach(t),f=h(d),k(m.$$.fragment,d)},m(d,u){g(d,c,u),e(c,y),g(d,f,u),w(m,d,u),v=!0},p:we,i(d){v||(T(m.$$.fragment,d),v=!0)},o(d){$(m.$$.fragment,d),v=!1},d(d){d&&t(c),d&&t(f),x(m,d)}}}function Yf(W){let c,y,f,m,v;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"),v=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=r(d,"P",{});var u=s(c);y=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(u,"CODE",{});var z=s(f);m=i(z,"Module"),z.forEach(t),v=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){g(d,c,u),e(c,y),e(c,f),e(f,m),e(c,v)},d(d){d&&t(c)}}}function e_(W){let c,y,f,m,v;return m=new Te({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=r(d,"P",{});var u=s(c);y=i(u,"Example:"),u.forEach(t),f=h(d),k(m.$$.fragment,d)},m(d,u){g(d,c,u),e(c,y),g(d,f,u),w(m,d,u),v=!0},p:we,i(d){v||(T(m.$$.fragment,d),v=!0)},o(d){$(m.$$.fragment,d),v=!1},d(d){d&&t(c),d&&t(f),x(m,d)}}}function t_(W){let c,y,f,m,v;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"),v=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=r(d,"P",{});var u=s(c);y=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(u,"CODE",{});var z=s(f);m=i(z,"Module"),z.forEach(t),v=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){g(d,c,u),e(c,y),e(c,f),e(f,m),e(c,v)},d(d){d&&t(c)}}}function o_(W){let c,y,f,m,v;return m=new Te({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=r(d,"P",{});var u=s(c);y=i(u,"Example:"),u.forEach(t),f=h(d),k(m.$$.fragment,d)},m(d,u){g(d,c,u),e(c,y),g(d,f,u),w(m,d,u),v=!0},p:we,i(d){v||(T(m.$$.fragment,d),v=!0)},o(d){$(m.$$.fragment,d),v=!1},d(d){d&&t(c),d&&t(f),x(m,d)}}}function n_(W){let c,y,f,m,v;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"),v=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=r(d,"P",{});var u=s(c);y=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(u,"CODE",{});var z=s(f);m=i(z,"Module"),z.forEach(t),v=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){g(d,c,u),e(c,y),e(c,f),e(f,m),e(c,v)},d(d){d&&t(c)}}}function r_(W){let c,y,f,m,v;return m=new Te({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=r(d,"P",{});var u=s(c);y=i(u,"Transcription example:"),u.forEach(t),f=h(d),k(m.$$.fragment,d)},m(d,u){g(d,c,u),e(c,y),g(d,f,u),w(m,d,u),v=!0},p:we,i(d){v||(T(m.$$.fragment,d),v=!0)},o(d){$(m.$$.fragment,d),v=!1},d(d){d&&t(c),d&&t(f),x(m,d)}}}function s_(W){let c,y,f,m,v,d,u,z,I,C,P,M,A,pe,Gn,Je,Ci,fa,Xe,Mi,Yt,Pi,Ai,_a,Un,Ni,ga,Vn,Ur,Si,va,Hn,Oi,ya,Q,Vr,Ii,Li,eo,Di,Bn,Gi,Ui,Vi,Hr,Hi,Bi,to,Ri,Rn,Ki,Ji,ba,Z,Xi,oo,Qi,Zi,no,Yi,ed,ro,td,od,ka,$e,Qe,Br,so,nd,Rr,rd,wa,V,ao,sd,xe,ad,Kn,id,dd,io,ld,cd,pd,We,hd,Jn,ud,md,Xn,fd,_d,gd,Ze,Ta,Fe,Ye,Kr,lo,vd,Jr,yd,$a,q,co,bd,Xr,kd,wd,po,Td,Qn,$d,xd,Wd,he,ho,Fd,Qr,zd,qd,et,Ed,tt,uo,jd,Zr,Cd,Md,ot,mo,Pd,fo,Ad,Yr,Nd,Sd,Od,ue,_o,Id,Zn,Ld,Yn,Dd,Gd,es,Ud,Vd,er,go,xa,ze,nt,ts,vo,Hd,os,Bd,Wa,E,yo,Rd,bo,Kd,ns,Jd,Xd,Qd,ko,Zd,tr,Yd,el,tl,me,wo,ol,rs,nl,rl,rt,sl,st,To,al,ss,il,dl,at,$o,ll,xo,cl,as,pl,hl,ul,fe,Wo,ml,or,fl,nr,_l,gl,is,vl,yl,rr,Fo,Fa,qe,it,ds,zo,bl,ls,kl,za,L,qo,wl,cs,Tl,$l,Eo,xl,sr,Wl,Fl,zl,Ee,ql,ps,El,jl,hs,Cl,Ml,Pl,dt,jo,Al,us,Nl,qa,je,lt,ms,Co,Sl,fs,Ol,Ea,j,Mo,Il,_s,Ll,Dl,G,ar,Gl,Ul,ir,Vl,Hl,dr,Bl,Rl,Po,gs,Kl,Jl,Xl,lr,Ql,Zl,Yl,ct,Ao,ec,H,tc,vs,oc,nc,No,ys,rc,sc,ac,bs,ic,dc,So,ks,lc,cc,pc,hc,_e,Oo,uc,ws,mc,fc,pt,_c,ge,Io,gc,Lo,vc,cr,yc,bc,kc,ht,wc,ut,Do,Tc,Go,$c,pr,xc,Wc,Fc,mt,Uo,zc,Vo,qc,hr,Ec,jc,ja,Ce,ft,Ts,Ho,Cc,$s,Mc,Ca,D,Bo,Pc,Ro,Ac,ur,Nc,Sc,Oc,Ko,Ic,Jo,Lc,Dc,Gc,Y,Xo,Uc,Me,Vc,mr,Hc,Bc,xs,Rc,Kc,Jc,_t,Xc,gt,Qc,vt,Qo,Zc,Zo,Yc,Yo,ep,tp,Ma,Pe,yt,Ws,en,op,Fs,np,Pa,B,tn,rp,on,sp,fr,ap,ip,dp,nn,lp,rn,cp,pp,hp,ee,sn,up,Ae,mp,_r,fp,_p,zs,gp,vp,yp,bt,bp,kt,Aa,Ne,wt,qs,an,kp,Es,wp,Na,ae,dn,Tp,js,$p,xp,te,ln,Wp,Se,Fp,gr,zp,qp,Cs,Ep,jp,Cp,Tt,Mp,$t,Sa,Oe,xt,Ms,cn,Pp,Ps,Ap,Oa,R,pn,Np,hn,Sp,vr,Op,Ip,Lp,un,Dp,mn,Gp,Up,Vp,oe,fn,Hp,Ie,Bp,yr,Rp,Kp,As,Jp,Xp,Qp,Wt,Zp,Ft,Ia,Le,zt,Ns,_n,Yp,Ss,eh,La,K,gn,th,vn,oh,br,nh,rh,sh,yn,ah,bn,ih,dh,lh,ne,kn,ch,De,ph,kr,hh,uh,Os,mh,fh,_h,qt,gh,Et,Da,Ge,jt,Is,wn,vh,Ls,yh,Ga,J,Tn,bh,Ue,kh,wr,wh,Th,$n,$h,xh,Wh,ie,Ds,xn,Fh,zh,Gs,Wn,qh,Eh,Us,Fn,jh,Ch,Vs,zn,Mh,Ph,re,qn,Ah,Ve,Nh,Hs,Sh,Oh,Bs,Ih,Lh,Dh,Ct,Gh,Mt,Ua,He,Pt,Rs,En,Uh,Ks,Vh,Va,X,jn,Hh,Be,Bh,Tr,Rh,Kh,Cn,Jh,Xh,Qh,de,Js,Mn,Zh,Yh,Xs,Pn,eu,tu,Qs,An,ou,nu,Zs,Nn,ru,su,se,Sn,au,Re,iu,Ys,du,lu,ea,cu,pu,hu,At,uu,Nt,Ha;return d=new U({}),pe=new U({}),so=new U({}),ao=new F({props:{name:"class transformers.WhisperConfig",anchor:"transformers.WhisperConfig",parameters:[{name:"vocab_size",val:" = 51865"},{name:"num_mel_bins",val:" = 80"},{name:"encoder_layers",val:" = 6"},{name:"encoder_attention_heads",val:" = 4"},{name:"decoder_layers",val:" = 6"},{name:"decoder_attention_heads",val:" = 4"},{name:"decoder_ffn_dim",val:" = 1536"},{name:"encoder_ffn_dim",val:" = 1536"},{name:"encoder_layerdrop",val:" = 0.0"},{name:"decoder_layerdrop",val:" = 0.0"},{name:"decoder_start_token_id",val:" = 50257"},{name:"use_cache",val:" = True"},{name:"is_encoder_decoder",val:" = True"},{name:"activation_function",val:" = 'gelu'"},{name:"d_model",val:" = 256"},{name:"dropout",val:" = 0.0"},{name:"attention_dropout",val:" = 0.0"},{name:"activation_dropout",val:" = 0.0"},{name:"init_std",val:" = 0.02"},{name:"scale_embedding",val:" = False"},{name:"max_source_positions",val:" = 1500"},{name:"max_target_positions",val:" = 448"},{name:"pad_token_id",val:" = 50256"},{name:"bos_token_id",val:" = 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.27.1/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.27.1/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.27.1/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.27.1/src/transformers/models/whisper/configuration_whisper.py#L62"}}),Ze=new ke({props:{anchor:"transformers.WhisperConfig.example",$$slots:{default:[Lf]},$$scope:{ctx:W}}}),lo=new U({}),co=new F({props:{name:"class transformers.WhisperTokenizer",anchor:"transformers.WhisperTokenizer",parameters:[{name:"vocab_file",val:""},{name:"merges_file",val:""},{name:"normalizer_file",val:" = None"},{name:"errors",val:" = 'replace'"},{name:"unk_token",val:" = '<|endoftext|>'"},{name:"bos_token",val:" = '<|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.27.1/src/transformers/models/whisper/tokenization_whisper.py#L214"}}),ho=new F({props:{name:"set_prefix_tokens",anchor:"transformers.WhisperTokenizer.set_prefix_tokens",parameters:[{name:"language",val:": str = None"},{name:"task",val:": str = None"},{name:"predict_timestamps",val:": bool = None"}],parametersDescription:[{anchor:"transformers.WhisperTokenizer.set_prefix_tokens.language",description:`<strong>language</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The language of the transcription text.`,name:"language"},{anchor:"transformers.WhisperTokenizer.set_prefix_tokens.task",description:`<strong>task</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Task identifier to append at the start of sequence (if any).`,name:"task"},{anchor:"transformers.WhisperTokenizer.set_prefix_tokens.predict_timestamps",description:`<strong>predict_timestamps</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Whether to omit the <code>&lt;|notimestamps|&gt;</code> token at the start of the sequence.`,name:"predict_timestamps"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/whisper/tokenization_whisper.py#L365"}}),et=new ke({props:{anchor:"transformers.WhisperTokenizer.set_prefix_tokens.example",$$slots:{default:[Df]},$$scope:{ctx:W}}}),uo=new F({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.WhisperTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:""},{name:"token_ids_1",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/whisper/tokenization_whisper.py#L425"}}),mo=new F({props:{name:"get_special_tokens_mask",anchor:"transformers.WhisperTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.WhisperTokenizer.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.WhisperTokenizer.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"},{anchor:"transformers.WhisperTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/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>
`}}),_o=new F({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.WhisperTokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.WhisperTokenizer.create_token_type_ids_from_sequences.token_ids_0",description:"<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014; The first tokenized sequence.",name:"token_ids_0"},{anchor:"transformers.WhisperTokenizer.create_token_type_ids_from_sequences.token_ids_1",description:"<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014; The second tokenized sequence.",name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/tokenization_utils_base.py#L3029",returnDescription:`
<p>The token type ids.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),go=new F({props:{name:"save_vocabulary",anchor:"transformers.WhisperTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/whisper/tokenization_whisper.py#L643"}}),vo=new U({}),yo=new F({props:{name:"class transformers.WhisperTokenizerFast",anchor:"transformers.WhisperTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"merges_file",val:" = None"},{name:"normalizer_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"unk_token",val:" = '<|endoftext|>'"},{name:"bos_token",val:" = '<|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.27.1/src/transformers/models/whisper/tokenization_whisper_fast.py#L88"}}),wo=new F({props:{name:"set_prefix_tokens",anchor:"transformers.WhisperTokenizerFast.set_prefix_tokens",parameters:[{name:"language",val:": str = None"},{name:"task",val:": str = None"},{name:"predict_timestamps",val:": bool = None"}],parametersDescription:[{anchor:"transformers.WhisperTokenizerFast.set_prefix_tokens.language",description:`<strong>language</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The language of the transcription text.`,name:"language"},{anchor:"transformers.WhisperTokenizerFast.set_prefix_tokens.task",description:`<strong>task</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Task identifier to append at the start of sequence (if any).`,name:"task"},{anchor:"transformers.WhisperTokenizerFast.set_prefix_tokens.predict_timestamps",description:`<strong>predict_timestamps</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Whether to omit the <code>&lt;|notimestamps|&gt;</code> token at the start of the sequence.`,name:"predict_timestamps"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/whisper/tokenization_whisper_fast.py#L346"}}),rt=new ke({props:{anchor:"transformers.WhisperTokenizerFast.set_prefix_tokens.example",$$slots:{default:[Gf]},$$scope:{ctx:W}}}),To=new F({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.WhisperTokenizerFast.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:""},{name:"token_ids_1",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/whisper/tokenization_whisper_fast.py#L421"}}),$o=new F({props:{name:"get_special_tokens_mask",anchor:"transformers.WhisperTokenizerFast.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.WhisperTokenizerFast.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.WhisperTokenizerFast.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"},{anchor:"transformers.WhisperTokenizerFast.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/whisper/tokenization_whisper_fast.py#L429",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>
`}}),Wo=new F({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.WhisperTokenizerFast.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.WhisperTokenizerFast.create_token_type_ids_from_sequences.token_ids_0",description:"<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014; The first tokenized sequence.",name:"token_ids_0"},{anchor:"transformers.WhisperTokenizerFast.create_token_type_ids_from_sequences.token_ids_1",description:"<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014; The second tokenized sequence.",name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/tokenization_utils_base.py#L3029",returnDescription:`
<p>The token type ids.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Fo=new F({props:{name:"save_vocabulary",anchor:"transformers.WhisperTokenizerFast.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/whisper/tokenization_whisper_fast.py#L331"}}),zo=new U({}),qo=new F({props:{name:"class transformers.WhisperFeatureExtractor",anchor:"transformers.WhisperFeatureExtractor",parameters:[{name:"feature_size",val:" = 80"},{name:"sampling_rate",val:" = 16000"},{name:"hop_length",val:" = 160"},{name:"chunk_length",val:" = 30"},{name:"n_fft",val:" = 400"},{name:"padding_value",val:" = 0.0"},{name:"return_attention_mask",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.WhisperFeatureExtractor.feature_size",description:`<strong>feature_size</strong> (<code>int</code>, defaults to 80) &#x2014;
The feature dimension of the extracted features.`,name:"feature_size"},{anchor:"transformers.WhisperFeatureExtractor.sampling_rate",description:`<strong>sampling_rate</strong> (<code>int</code>, defaults to 16000) &#x2014;
The sampling rate at which the audio files should be digitalized expressed in hertz (Hz).`,name:"sampling_rate"},{anchor:"transformers.WhisperFeatureExtractor.hop_length",description:`<strong>hop_length</strong> (<code>int</code>, defaults to 160) &#x2014;
Length of the overlaping windows for the STFT used to obtain the Mel Frequency coefficients.`,name:"hop_length"},{anchor:"transformers.WhisperFeatureExtractor.chunk_length",description:`<strong>chunk_length</strong> (<code>int</code>, defaults to 30) &#x2014;
The maximum number of chuncks of <code>sampling_rate</code> samples used to trim and pad longer or shorter audio
sequences.`,name:"chunk_length"},{anchor:"transformers.WhisperFeatureExtractor.n_fft",description:`<strong>n_fft</strong> (<code>int</code>, defaults to 400) &#x2014;
Size of the Fourier transform.`,name:"n_fft"},{anchor:"transformers.WhisperFeatureExtractor.padding_value",description:`<strong>padding_value</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Padding value used to pad the audio. Should correspond to silences.`,name:"padding_value"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/whisper/feature_extraction_whisper.py#L32"}}),jo=new F({props:{name:"__call__",anchor:"transformers.WhisperFeatureExtractor.__call__",parameters:[{name:"raw_speech",val:": typing.Union[numpy.ndarray, typing.List[float], typing.List[numpy.ndarray], typing.List[typing.List[float]]]"},{name:"truncation",val:": bool = True"},{name:"pad_to_multiple_of",val:": typing.Optional[int] = None"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"return_attention_mask",val:": typing.Optional[bool] = None"},{name:"padding",val:": typing.Optional[str] = 'max_length'"},{name:"max_length",val:": typing.Optional[int] = None"},{name:"sampling_rate",val:": typing.Optional[int] = None"},{name:"do_normalize",val:": typing.Optional[bool] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.WhisperFeatureExtractor.__call__.raw_speech",description:`<strong>raw_speech</strong> (<code>np.ndarray</code>, <code>List[float]</code>, <code>List[np.ndarray]</code>, <code>List[List[float]]</code>) &#x2014;
The sequence or batch of sequences to be padded. Each sequence can be a numpy array, a list of float
values, a list of numpy arrays or a list of list of float values.`,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.27.1/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.27.1/src/transformers/models/whisper/feature_extraction_whisper.py#L241"}}),Co=new U({}),Mo=new F({props:{name:"class transformers.WhisperProcessor",anchor:"transformers.WhisperProcessor",parameters:[{name:"feature_extractor",val:""},{name:"tokenizer",val:""}],parametersDescription:[{anchor:"transformers.WhisperProcessor.feature_extractor",description:`<strong>feature_extractor</strong> (<code>WhisperFeatureExtractor</code>) &#x2014;
An instance of <a href="/docs/transformers/v4.27.1/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.27.1/en/model_doc/whisper#transformers.WhisperTokenizer">WhisperTokenizer</a>. The tokenizer is a required input.`,name:"tokenizer"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/whisper/processing_whisper.py#L22"}}),Ao=new F({props:{name:"__call__",anchor:"transformers.WhisperProcessor.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/whisper/processing_whisper.py#L47"}}),Oo=new F({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.27.1/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.27.1/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.27.1/src/transformers/processing_utils.py#L153"}}),pt=new Ke({props:{$$slots:{default:[Uf]},$$scope:{ctx:W}}}),Io=new F({props:{name:"save_pretrained",anchor:"transformers.WhisperProcessor.save_pretrained",parameters:[{name:"save_directory",val:""},{name:"push_to_hub",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.WhisperProcessor.save_pretrained.save_directory",description:`<strong>save_directory</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
Directory where the feature extractor JSON file and the tokenizer files will be saved (directory will
be created if it does not exist).`,name:"save_directory"},{anchor:"transformers.WhisperProcessor.save_pretrained.push_to_hub",description:`<strong>push_to_hub</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to push your model to the Hugging Face model hub after saving it. You can specify the
repository you want to push to with <code>repo_id</code> (will default to the name of <code>save_directory</code> in your
namespace).
kwargs &#x2014;
Additional key word arguments passed along to the <a href="/docs/transformers/v4.27.1/en/internal/image_processing_utils#transformers.ImageProcessingMixin.push_to_hub">push_to_hub()</a> method.`,name:"push_to_hub"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/processing_utils.py#L91"}}),ht=new Ke({props:{$$slots:{default:[Vf]},$$scope:{ctx:W}}}),Do=new F({props:{name:"batch_decode",anchor:"transformers.WhisperProcessor.batch_decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/whisper/processing_whisper.py#L81"}}),Uo=new F({props:{name:"decode",anchor:"transformers.WhisperProcessor.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/whisper/processing_whisper.py#L88"}}),Ho=new U({}),Bo=new F({props:{name:"class transformers.WhisperModel",anchor:"transformers.WhisperModel",parameters:[{name:"config",val:": WhisperConfig"}],parametersDescription:[{anchor:"transformers.WhisperModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/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.27.1/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.27.1/src/transformers/models/whisper/modeling_whisper.py#L1137"}}),Xo=new F({props:{name:"forward",anchor:"transformers.WhisperModel.forward",parameters:[{name:"input_features",val:": typing.Optional[torch.FloatTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_outputs",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"decoder_inputs_embeds",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.WhisperModel.forward.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, feature_size, sequence_length)</code>) &#x2014;
Float values mel features extracted from the raw speech waveform. Raw speech waveform can be obtained by
loading a <code>.flac</code> or <code>.wav</code> audio file into an array of type <code>List[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em> via
the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_features</code>, the
<a href="/docs/transformers/v4.27.1/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.27.1/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.27.1/en/model_doc/whisper#transformers.WhisperTokenizer">WhisperTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>Whisper uses the <code>decoder_start_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).`,name:"decoder_input_ids"},{anchor:"transformers.WhisperModel.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.</p>
<p>If you want to change padding behavior, you should read
<code>modeling_whisper._prepare_decoder_attention_mask</code> and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the BART
paper</a> for more information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.WhisperModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.WhisperModel.forward.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.WhisperModel.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.WhisperModel.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.WhisperModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.WhisperModel.forward.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.`,name:"decoder_inputs_embeds"},{anchor:"transformers.WhisperModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.WhisperModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.WhisperModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.WhisperModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/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.27.1/src/transformers/models/whisper/modeling_whisper.py#L1210",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/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.27.1/en/main_classes/output#transformers.modeling_outputs.Seq2SeqModelOutput"
>transformers.modeling_outputs.Seq2SeqModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),_t=new Ke({props:{$$slots:{default:[Hf]},$$scope:{ctx:W}}}),gt=new ke({props:{anchor:"transformers.WhisperModel.forward.example",$$slots:{default:[Bf]},$$scope:{ctx:W}}}),Qo=new F({props:{name:"_mask_input_features",anchor:"transformers.WhisperModel._mask_input_features",parameters:[{name:"input_features",val:": FloatTensor"},{name:"attention_mask",val:": typing.Optional[torch.LongTensor] = None"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/whisper/modeling_whisper.py#L1167"}}),en=new U({}),tn=new F({props:{name:"class transformers.WhisperForConditionalGeneration",anchor:"transformers.WhisperForConditionalGeneration",parameters:[{name:"config",val:": WhisperConfig"}],parametersDescription:[{anchor:"transformers.WhisperForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/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.27.1/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.27.1/src/transformers/models/whisper/modeling_whisper.py#L1307"}}),sn=new F({props:{name:"forward",anchor:"transformers.WhisperForConditionalGeneration.forward",parameters:[{name:"input_features",val:": typing.Optional[torch.FloatTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_outputs",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"decoder_inputs_embeds",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.WhisperForConditionalGeneration.forward.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, feature_size, sequence_length)</code>) &#x2014;
Float values mel features extracted from the raw speech waveform. Raw speech waveform can be obtained by
loading a <code>.flac</code> or <code>.wav</code> audio file into an array of type <code>List[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em> via
the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_features</code>, the
<a href="/docs/transformers/v4.27.1/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.27.1/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.27.1/en/model_doc/whisper#transformers.WhisperTokenizer">WhisperTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>Whisper uses the <code>decoder_start_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).`,name:"decoder_input_ids"},{anchor:"transformers.WhisperForConditionalGeneration.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.</p>
<p>If you want to change padding behavior, you should read
<code>modeling_whisper._prepare_decoder_attention_mask</code> and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the BART
paper</a> for more information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.WhisperForConditionalGeneration.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.WhisperForConditionalGeneration.forward.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.WhisperForConditionalGeneration.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.WhisperForConditionalGeneration.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.WhisperForConditionalGeneration.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.WhisperForConditionalGeneration.forward.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.`,name:"decoder_inputs_embeds"},{anchor:"transformers.WhisperForConditionalGeneration.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.WhisperForConditionalGeneration.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.WhisperForConditionalGeneration.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.WhisperForConditionalGeneration.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/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.27.1/src/transformers/models/whisper/modeling_whisper.py#L1352",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/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.27.1/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),bt=new Ke({props:{$$slots:{default:[Rf]},$$scope:{ctx:W}}}),kt=new ke({props:{anchor:"transformers.WhisperForConditionalGeneration.forward.example",$$slots:{default:[Kf]},$$scope:{ctx:W}}}),an=new U({}),dn=new F({props:{name:"class transformers.WhisperForAudioClassification",anchor:"transformers.WhisperForAudioClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.WhisperForAudioClassification.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, feature_size, sequence_length)</code>) &#x2014;
Float values mel features extracted from the raw speech waveform. Raw speech waveform can be obtained by
loading a <code>.flac</code> or <code>.wav</code> audio file into an array of type <code>List[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em> via
the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_features</code>, the
<a href="/docs/transformers/v4.27.1/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.27.1/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.27.1/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.27.1/src/transformers/models/whisper/modeling_whisper.py#L1653"}}),ln=new F({props:{name:"forward",anchor:"transformers.WhisperForAudioClassification.forward",parameters:[{name:"input_features",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_outputs",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.WhisperForAudioClassification.forward.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, feature_size, sequence_length)</code>) &#x2014;
Float values mel features extracted from the raw speech waveform. Raw speech waveform can be obtained by
loading a <code>.flac</code> or <code>.wav</code> audio file into an array of type <code>List[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em> via
the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_features</code>, the
<a href="/docs/transformers/v4.27.1/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.27.1/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.27.1/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.27.1/src/transformers/models/whisper/modeling_whisper.py#L1680",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/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.27.1/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Tt=new Ke({props:{$$slots:{default:[Jf]},$$scope:{ctx:W}}}),$t=new ke({props:{anchor:"transformers.WhisperForAudioClassification.forward.example",$$slots:{default:[Xf]},$$scope:{ctx:W}}}),cn=new U({}),pn=new F({props:{name:"class transformers.TFWhisperModel",anchor:"transformers.TFWhisperModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFWhisperModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/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.27.1/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.27.1/src/transformers/models/whisper/modeling_tf_whisper.py#L1102"}}),fn=new F({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.27.1/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.27.1/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.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>SpeechToText uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).`,name:"decoder_input_ids"},{anchor:"transformers.TFWhisperModel.call.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.</p>
<p>If you want to change padding behavior, you should read
<code>modeling_whisper._prepare_decoder_attention_mask</code> and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the
paper</a> for more information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.TFWhisperModel.call.head_mask",description:`<strong>head_mask</strong> (<code>tf.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFWhisperModel.call.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>tf.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.TFWhisperModel.call.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>tf.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.TFWhisperModel.call.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(tf.Tensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.TFWhisperModel.call.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(tf.Tensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(tf.Tensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.TFWhisperModel.call.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.`,name:"decoder_inputs_embeds"},{anchor:"transformers.TFWhisperModel.call.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.TFWhisperModel.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.TFWhisperModel.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.TFWhisperModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/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.27.1/src/transformers/models/whisper/modeling_tf_whisper.py#L1126",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/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.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqModelOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Wt=new Ke({props:{$$slots:{default:[Qf]},$$scope:{ctx:W}}}),Ft=new ke({props:{anchor:"transformers.TFWhisperModel.call.example",$$slots:{default:[Zf]},$$scope:{ctx:W}}}),_n=new U({}),gn=new F({props:{name:"class transformers.TFWhisperForConditionalGeneration",anchor:"transformers.TFWhisperForConditionalGeneration",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFWhisperForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/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.27.1/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.27.1/src/transformers/models/whisper/modeling_tf_whisper.py#L1210"}}),kn=new F({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.27.1/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.27.1/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.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>SpeechToText uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).`,name:"decoder_input_ids"},{anchor:"transformers.TFWhisperForConditionalGeneration.call.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.</p>
<p>If you want to change padding behavior, you should read
<code>modeling_whisper._prepare_decoder_attention_mask</code> and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the
paper</a> for more information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.TFWhisperForConditionalGeneration.call.head_mask",description:`<strong>head_mask</strong> (<code>tf.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFWhisperForConditionalGeneration.call.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>tf.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.TFWhisperForConditionalGeneration.call.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>tf.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.TFWhisperForConditionalGeneration.call.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(tf.Tensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.TFWhisperForConditionalGeneration.call.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(tf.Tensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(tf.Tensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.TFWhisperForConditionalGeneration.call.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.`,name:"decoder_inputs_embeds"},{anchor:"transformers.TFWhisperForConditionalGeneration.call.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.TFWhisperForConditionalGeneration.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.TFWhisperForConditionalGeneration.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.TFWhisperForConditionalGeneration.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/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.27.1/src/transformers/models/whisper/modeling_tf_whisper.py#L1241",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/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.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqLMOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),qt=new Ke({props:{$$slots:{default:[Yf]},$$scope:{ctx:W}}}),Et=new ke({props:{anchor:"transformers.TFWhisperForConditionalGeneration.call.example",$$slots:{default:[e_]},$$scope:{ctx:W}}}),wn=new U({}),Tn=new F({props:{name:"class transformers.FlaxWhisperModel",anchor:"transformers.FlaxWhisperModel",parameters:[{name:"config",val:": WhisperConfig"},{name:"input_shape",val:": typing.Tuple[int] = (1, 80, 3000)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxWhisperModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/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.27.1/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.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a>
and <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/whisper/modeling_flax_whisper.py#L1128"}}),qn=new F({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.27.1/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.27.1/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.27.1/en/model_doc/whisper#transformers.WhisperTokenizer">WhisperTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.
<a href="../glossary#decoder-input-ids">What are decoder input IDs?</a> Whisper uses the <code>decoder_start_token_id</code> as
the starting token for <code>decoder_input_ids</code> generation.`,name:"decoder_input_ids"},{anchor:"transformers.FlaxWhisperModel.__call__.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default. If you want to change padding behavior, you should modify to your needs. See diagram 1
in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.FlaxWhisperModel.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Whisper does not use <code>position_ids</code> in the encoder as <code>input_features</code> is always the same size and doesn&#x2019;t
use masking, but this argument is preserved for compatibility. By default the silence in the input log mel
spectrogram are ignored.`,name:"position_ids"},{anchor:"transformers.FlaxWhisperModel.__call__.decoder_position_ids",description:`<strong>decoder_position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each decoder input sequence tokens in the position embeddings. Selected in the
range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"decoder_position_ids"},{anchor:"transformers.FlaxWhisperModel.__call__.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FlaxWhisperModel.__call__.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FlaxWhisperModel.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/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.27.1/src/transformers/models/whisper/modeling_flax_whisper.py#L1073",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/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.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ct=new Ke({props:{$$slots:{default:[t_]},$$scope:{ctx:W}}}),Mt=new ke({props:{anchor:"transformers.FlaxWhisperModel.__call__.example",$$slots:{default:[o_]},$$scope:{ctx:W}}}),En=new U({}),jn=new F({props:{name:"class transformers.FlaxWhisperForConditionalGeneration",anchor:"transformers.FlaxWhisperForConditionalGeneration",parameters:[{name:"config",val:": WhisperConfig"},{name:"input_shape",val:": typing.Tuple[int] = (1, 80, 3000)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxWhisperForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/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.27.1/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.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a>
and <a href="/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/whisper/modeling_flax_whisper.py#L1204"}}),Sn=new F({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.27.1/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.27.1/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.27.1/en/model_doc/whisper#transformers.WhisperTokenizer">WhisperTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.
<a href="../glossary#decoder-input-ids">What are decoder input IDs?</a> Whisper uses the <code>decoder_start_token_id</code> as
the starting token for <code>decoder_input_ids</code> generation.`,name:"decoder_input_ids"},{anchor:"transformers.FlaxWhisperForConditionalGeneration.__call__.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default. If you want to change padding behavior, you should modify to your needs. See diagram 1
in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.FlaxWhisperForConditionalGeneration.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Whisper does not use <code>position_ids</code> in the encoder as <code>input_features</code> is always the same size and doesn&#x2019;t
use masking, but this argument is preserved for compatibility. By default the silence in the input log mel
spectrogram are ignored.`,name:"position_ids"},{anchor:"transformers.FlaxWhisperForConditionalGeneration.__call__.decoder_position_ids",description:`<strong>decoder_position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each decoder input sequence tokens in the position embeddings. Selected in the
range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"decoder_position_ids"},{anchor:"transformers.FlaxWhisperForConditionalGeneration.__call__.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FlaxWhisperForConditionalGeneration.__call__.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FlaxWhisperForConditionalGeneration.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/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.27.1/src/transformers/models/whisper/modeling_flax_whisper.py#L1073",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/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.27.1/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),At=new Ke({props:{$$slots:{default:[n_]},$$scope:{ctx:W}}}),Nt=new ke({props:{anchor:"transformers.FlaxWhisperForConditionalGeneration.__call__.example",$$slots:{default:[r_]},$$scope:{ctx:W}}}),{c(){c=n("meta"),y=p(),f=n("h1"),m=n("a"),v=n("span"),b(d.$$.fragment),u=p(),z=n("span"),I=a("Whisper"),C=p(),P=n("h2"),M=n("a"),A=n("span"),b(pe.$$.fragment),Gn=p(),Je=n("span"),Ci=a("Overview"),fa=p(),Xe=n("p"),Mi=a("The Whisper model was proposed in "),Yt=n("a"),Pi=a("Robust Speech Recognition via Large-Scale Weak Supervision"),Ai=a(" by Alec Radford, Jong Wook Kim, Tao Xu, Greg Brockman, Christine McLeavey, Ilya Sutskever."),_a=p(),Un=n("p"),Ni=a("The abstract from the paper is the following:"),ga=p(),Vn=n("p"),Ur=n("em"),Si=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."),va=p(),Hn=n("p"),Oi=a("Tips:"),ya=p(),Q=n("ul"),Vr=n("li"),Ii=a("The model usually performs well without requiring any finetuning."),Li=p(),eo=n("li"),Di=a("The architecture follows a classic encoder-decoder architecture, which means that it relies on the "),Bn=n("a"),Gi=a("generate()"),Ui=a(" function for inference."),Vi=p(),Hr=n("li"),Hi=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."),Bi=p(),to=n("li"),Ri=a("One can use "),Rn=n("a"),Ki=a("WhisperProcessor"),Ji=a(" to prepare audio for the model, and decode the predicted ID\u2019s back into text."),ba=p(),Z=n("p"),Xi=a("This model was contributed by "),oo=n("a"),Qi=a("Arthur Zucker"),Zi=a(". The Tensorflow version of this model was contributed by "),no=n("a"),Yi=a("amyeroberts"),ed=a(`.
The original code can be found `),ro=n("a"),td=a("here"),od=a("."),ka=p(),$e=n("h2"),Qe=n("a"),Br=n("span"),b(so.$$.fragment),nd=p(),Rr=n("span"),rd=a("WhisperConfig"),wa=p(),V=n("div"),b(ao.$$.fragment),sd=p(),xe=n("p"),ad=a("This is the configuration class to store the configuration of a "),Kn=n("a"),id=a("WhisperModel"),dd=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
`),io=n("a"),ld=a("openai/whisper-tiny"),cd=a(" architecture."),pd=p(),We=n("p"),hd=a("Configuration objects inherit from "),Jn=n("a"),ud=a("PretrainedConfig"),md=a(` and can be used to control the model outputs. Read the
documentation from `),Xn=n("a"),fd=a("PretrainedConfig"),_d=a(" for more information."),gd=p(),b(Ze.$$.fragment),Ta=p(),Fe=n("h2"),Ye=n("a"),Kr=n("span"),b(lo.$$.fragment),vd=p(),Jr=n("span"),yd=a("WhisperTokenizer"),$a=p(),q=n("div"),b(co.$$.fragment),bd=p(),Xr=n("p"),kd=a("Construct a Whisper tokenizer."),wd=p(),po=n("p"),Td=a("This tokenizer inherits from "),Qn=n("a"),$d=a("PreTrainedTokenizer"),xd=a(` which contains some of the main methods. Users should refer to
the superclass for more information regarding such methods.`),Wd=p(),he=n("div"),b(ho.$$.fragment),Fd=p(),Qr=n("p"),zd=a("Override the prefix tokens appended to the start of the label sequence. This method can be used standalone to"),qd=p(),b(et.$$.fragment),Ed=p(),tt=n("div"),b(uo.$$.fragment),jd=p(),Zr=n("p"),Cd=a("Build model inputs from a sequence by appending eos_token_id."),Md=p(),ot=n("div"),b(mo.$$.fragment),Pd=p(),fo=n("p"),Ad=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 `),Yr=n("code"),Nd=a("prepare_for_model"),Sd=a(" method."),Od=p(),ue=n("div"),b(_o.$$.fragment),Id=p(),Zn=n("p"),Ld=a("Create the token type IDs corresponding to the sequences passed. "),Yn=n("a"),Dd=a(`What are token type
IDs?`),Gd=p(),es=n("p"),Ud=a("Should be overridden in a subclass if the model has a special way of building those."),Vd=p(),er=n("div"),b(go.$$.fragment),xa=p(),ze=n("h2"),nt=n("a"),ts=n("span"),b(vo.$$.fragment),Hd=p(),os=n("span"),Bd=a("WhisperTokenizerFast"),Wa=p(),E=n("div"),b(yo.$$.fragment),Rd=p(),bo=n("p"),Kd=a("Construct a \u201Cfast\u201D Whisper tokenizer (backed by HuggingFace\u2019s "),ns=n("em"),Jd=a("tokenizers"),Xd=a(" library)."),Qd=p(),ko=n("p"),Zd=a("This tokenizer inherits from "),tr=n("a"),Yd=a("PreTrainedTokenizerFast"),el=a(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),tl=p(),me=n("div"),b(wo.$$.fragment),ol=p(),rs=n("p"),nl=a("Override the prefix tokens appended to the start of the label sequence. This method can be used standalone to"),rl=p(),b(rt.$$.fragment),sl=p(),st=n("div"),b(To.$$.fragment),al=p(),ss=n("p"),il=a("Build model inputs from a sequence by appending eos_token_id."),dl=p(),at=n("div"),b($o.$$.fragment),ll=p(),xo=n("p"),cl=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 `),as=n("code"),pl=a("prepare_for_model"),hl=a(" method."),ul=p(),fe=n("div"),b(Wo.$$.fragment),ml=p(),or=n("p"),fl=a("Create the token type IDs corresponding to the sequences passed. "),nr=n("a"),_l=a(`What are token type
IDs?`),gl=p(),is=n("p"),vl=a("Should be overridden in a subclass if the model has a special way of building those."),yl=p(),rr=n("div"),b(Fo.$$.fragment),Fa=p(),qe=n("h2"),it=n("a"),ds=n("span"),b(zo.$$.fragment),bl=p(),ls=n("span"),kl=a("WhisperFeatureExtractor"),za=p(),L=n("div"),b(qo.$$.fragment),wl=p(),cs=n("p"),Tl=a("Constructs a Whisper feature extractor."),$l=p(),Eo=n("p"),xl=a("This feature extractor inherits from "),sr=n("a"),Wl=a("WhisperFeatureExtractor"),Fl=a(` which contains most of the main methods. Users
should refer to this superclass for more information regarding those methods.`),zl=p(),Ee=n("p"),ql=a("This class extracts mel-filter bank features from raw speech using a custom numpy implementation of the "),ps=n("code"),El=a("Short Time Fourier Transform"),jl=a(" which should match pytorch\u2019s "),hs=n("code"),Cl=a("torch.stft"),Ml=a(" equivalent."),Pl=p(),dt=n("div"),b(jo.$$.fragment),Al=p(),us=n("p"),Nl=a("Main method to featurize and prepare for the model one or several sequence(s)."),qa=p(),je=n("h2"),lt=n("a"),ms=n("span"),b(Co.$$.fragment),Sl=p(),fs=n("span"),Ol=a("WhisperProcessor"),Ea=p(),j=n("div"),b(Mo.$$.fragment),Il=p(),_s=n("p"),Ll=a(`Constructs a Whisper processor which wraps a Whisper feature extractor and a Whisper tokenizer into a single
processor.`),Dl=p(),G=n("p"),ar=n("a"),Gl=a("WhisperProcessor"),Ul=a(" offers all the functionalities of "),ir=n("a"),Vl=a("WhisperFeatureExtractor"),Hl=a(" and "),dr=n("a"),Bl=a("WhisperTokenizer"),Rl=a(`. See
the `),Po=n("a"),gs=n("strong"),Kl=a("call"),Jl=a("()"),Xl=a(" and "),lr=n("a"),Ql=a("decode()"),Zl=a(" for more information."),Yl=p(),ct=n("div"),b(Ao.$$.fragment),ec=p(),H=n("p"),tc=a("Forwards the "),vs=n("code"),oc=a("audio"),nc=a(" argument to WhisperFeatureExtractor\u2019s "),No=n("a"),ys=n("strong"),rc=a("call"),sc=a("()"),ac=a(" and the "),bs=n("code"),ic=a("text"),dc=a(`
argument to `),So=n("a"),ks=n("strong"),lc=a("call"),cc=a("()"),pc=a(`. Please refer to the doctsring of the above two methods for more
information.`),hc=p(),_e=n("div"),b(Oo.$$.fragment),uc=p(),ws=n("p"),mc=a("Instantiate a processor associated with a pretrained model."),fc=p(),b(pt.$$.fragment),_c=p(),ge=n("div"),b(Io.$$.fragment),gc=p(),Lo=n("p"),vc=a(`Saves the attributes of this processor (feature extractor, tokenizer\u2026) in the specified directory so that it
can be reloaded using the `),cr=n("a"),yc=a("from_pretrained()"),bc=a(" method."),kc=p(),b(ht.$$.fragment),wc=p(),ut=n("div"),b(Do.$$.fragment),Tc=p(),Go=n("p"),$c=a("This method forwards all its arguments to WhisperTokenizer\u2019s "),pr=n("a"),xc=a("batch_decode()"),Wc=a(`. Please
refer to the docstring of this method for more information.`),Fc=p(),mt=n("div"),b(Uo.$$.fragment),zc=p(),Vo=n("p"),qc=a("This method forwards all its arguments to WhisperTokenizer\u2019s "),hr=n("a"),Ec=a("decode()"),jc=a(`. Please refer to
the docstring of this method for more information.`),ja=p(),Ce=n("h2"),ft=n("a"),Ts=n("span"),b(Ho.$$.fragment),Cc=p(),$s=n("span"),Mc=a("WhisperModel"),Ca=p(),D=n("div"),b(Bo.$$.fragment),Pc=p(),Ro=n("p"),Ac=a(`The bare Whisper Model outputting raw hidden-states without any specific head on top.
This model inherits from `),ur=n("a"),Nc=a("PreTrainedModel"),Sc=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.)`),Oc=p(),Ko=n("p"),Ic=a("This model is also a PyTorch "),Jo=n("a"),Lc=a("torch.nn.Module"),Dc=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Gc=p(),Y=n("div"),b(Xo.$$.fragment),Uc=p(),Me=n("p"),Vc=a("The "),mr=n("a"),Hc=a("WhisperModel"),Bc=a(" forward method, overrides the "),xs=n("code"),Rc=a("__call__"),Kc=a(" special method."),Jc=p(),b(_t.$$.fragment),Xc=p(),b(gt.$$.fragment),Qc=p(),vt=n("div"),b(Qo.$$.fragment),Zc=p(),Zo=n("p"),Yc=a(`Masks extracted features along time axis and/or along feature axis according to
`),Yo=n("a"),ep=a("SpecAugment"),tp=a("."),Ma=p(),Pe=n("h2"),yt=n("a"),Ws=n("span"),b(en.$$.fragment),op=p(),Fs=n("span"),np=a("WhisperForConditionalGeneration"),Pa=p(),B=n("div"),b(tn.$$.fragment),rp=p(),on=n("p"),sp=a(`The Whisper Model with a language modeling head. Can be used for automatic speech recognition.
This model inherits from `),fr=n("a"),ap=a("PreTrainedModel"),ip=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.)`),dp=p(),nn=n("p"),lp=a("This model is also a PyTorch "),rn=n("a"),cp=a("torch.nn.Module"),pp=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),hp=p(),ee=n("div"),b(sn.$$.fragment),up=p(),Ae=n("p"),mp=a("The "),_r=n("a"),fp=a("WhisperForConditionalGeneration"),_p=a(" forward method, overrides the "),zs=n("code"),gp=a("__call__"),vp=a(" special method."),yp=p(),b(bt.$$.fragment),bp=p(),b(kt.$$.fragment),Aa=p(),Ne=n("h2"),wt=n("a"),qs=n("span"),b(an.$$.fragment),kp=p(),Es=n("span"),wp=a("WhisperForAudioClassification"),Na=p(),ae=n("div"),b(dn.$$.fragment),Tp=p(),js=n("p"),$p=a(`Whisper Encoder Model with a sequence classification head on top (a linear layer over the pooled output) for tasks
like SUPERB Keyword Spotting.`),xp=p(),te=n("div"),b(ln.$$.fragment),Wp=p(),Se=n("p"),Fp=a("The "),gr=n("a"),zp=a("WhisperForAudioClassification"),qp=a(" forward method, overrides the "),Cs=n("code"),Ep=a("__call__"),jp=a(" special method."),Cp=p(),b(Tt.$$.fragment),Mp=p(),b($t.$$.fragment),Sa=p(),Oe=n("h2"),xt=n("a"),Ms=n("span"),b(cn.$$.fragment),Pp=p(),Ps=n("span"),Ap=a("TFWhisperModel"),Oa=p(),R=n("div"),b(pn.$$.fragment),Np=p(),hn=n("p"),Sp=a(`The bare Whisper Model outputting raw hidden-states without any specific head on top.
This model inherits from `),vr=n("a"),Op=a("TFPreTrainedModel"),Ip=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.)`),Lp=p(),un=n("p"),Dp=a("This model is also a "),mn=n("a"),Gp=a("tf.keras.Model"),Up=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.`),Vp=p(),oe=n("div"),b(fn.$$.fragment),Hp=p(),Ie=n("p"),Bp=a("The "),yr=n("a"),Rp=a("TFWhisperModel"),Kp=a(" forward method, overrides the "),As=n("code"),Jp=a("__call__"),Xp=a(" special method."),Qp=p(),b(Wt.$$.fragment),Zp=p(),b(Ft.$$.fragment),Ia=p(),Le=n("h2"),zt=n("a"),Ns=n("span"),b(_n.$$.fragment),Yp=p(),Ss=n("span"),eh=a("TFWhisperForConditionalGeneration"),La=p(),K=n("div"),b(gn.$$.fragment),th=p(),vn=n("p"),oh=a(`The Whisper Model with a language modeling head. Can be used for automatic speech recognition.
This model inherits from `),br=n("a"),nh=a("TFPreTrainedModel"),rh=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.)`),sh=p(),yn=n("p"),ah=a("This model is also a "),bn=n("a"),ih=a("tf.keras.Model"),dh=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.`),lh=p(),ne=n("div"),b(kn.$$.fragment),ch=p(),De=n("p"),ph=a("The "),kr=n("a"),hh=a("TFWhisperForConditionalGeneration"),uh=a(" forward method, overrides the "),Os=n("code"),mh=a("__call__"),fh=a(" special method."),_h=p(),b(qt.$$.fragment),gh=p(),b(Et.$$.fragment),Da=p(),Ge=n("h2"),jt=n("a"),Is=n("span"),b(wn.$$.fragment),vh=p(),Ls=n("span"),yh=a("FlaxWhisperModel"),Ga=p(),J=n("div"),b(Tn.$$.fragment),bh=p(),Ue=n("p"),kh=a(`The bare Whisper Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),wr=n("a"),wh=a("FlaxPreTrainedModel"),Th=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
`),$n=n("a"),$h=a("flax.nn.Module"),xh=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:`),Wh=p(),ie=n("ul"),Ds=n("li"),xn=n("a"),Fh=a("Just-In-Time (JIT) compilation"),zh=p(),Gs=n("li"),Wn=n("a"),qh=a("Automatic Differentiation"),Eh=p(),Us=n("li"),Fn=n("a"),jh=a("Vectorization"),Ch=p(),Vs=n("li"),zn=n("a"),Mh=a("Parallelization"),Ph=p(),re=n("div"),b(qn.$$.fragment),Ah=p(),Ve=n("p"),Nh=a("The "),Hs=n("code"),Sh=a("FlaxWhisperPreTrainedModel"),Oh=a(" forward method, overrides the "),Bs=n("code"),Ih=a("__call__"),Lh=a(" special method."),Dh=p(),b(Ct.$$.fragment),Gh=p(),b(Mt.$$.fragment),Ua=p(),He=n("h2"),Pt=n("a"),Rs=n("span"),b(En.$$.fragment),Uh=p(),Ks=n("span"),Vh=a("FlaxWhisperForConditionalGeneration"),Va=p(),X=n("div"),b(jn.$$.fragment),Hh=p(),Be=n("p"),Bh=a(`The Whisper Model with a language modeling head.
This model inherits from `),Tr=n("a"),Rh=a("FlaxPreTrainedModel"),Kh=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
`),Cn=n("a"),Jh=a("flax.nn.Module"),Xh=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:`),Qh=p(),de=n("ul"),Js=n("li"),Mn=n("a"),Zh=a("Just-In-Time (JIT) compilation"),Yh=p(),Xs=n("li"),Pn=n("a"),eu=a("Automatic Differentiation"),tu=p(),Qs=n("li"),An=n("a"),ou=a("Vectorization"),nu=p(),Zs=n("li"),Nn=n("a"),ru=a("Parallelization"),su=p(),se=n("div"),b(Sn.$$.fragment),au=p(),Re=n("p"),iu=a("The "),Ys=n("code"),du=a("FlaxWhisperPreTrainedModel"),lu=a(" forward method, overrides the "),ea=n("code"),cu=a("__call__"),pu=a(" special method."),hu=p(),b(At.$$.fragment),uu=p(),b(Nt.$$.fragment),this.h()},l(o){const _=Of('[data-svelte="svelte-1phssyn"]',document.head);c=r(_,"META",{name:!0,content:!0}),_.forEach(t),y=h(o),f=r(o,"H1",{class:!0});var On=s(f);m=r(On,"A",{id:!0,class:!0,href:!0});var ta=s(m);v=r(ta,"SPAN",{});var oa=s(v);k(d.$$.fragment,oa),oa.forEach(t),ta.forEach(t),u=h(On),z=r(On,"SPAN",{});var na=s(z);I=i(na,"Whisper"),na.forEach(t),On.forEach(t),C=h(o),P=r(o,"H2",{class:!0});var In=s(P);M=r(In,"A",{id:!0,class:!0,href:!0});var ra=s(M);A=r(ra,"SPAN",{});var sa=s(A);k(pe.$$.fragment,sa),sa.forEach(t),ra.forEach(t),Gn=h(In),Je=r(In,"SPAN",{});var aa=s(Je);Ci=i(aa,"Overview"),aa.forEach(t),In.forEach(t),fa=h(o),Xe=r(o,"P",{});var Ln=s(Xe);Mi=i(Ln,"The Whisper model was proposed in "),Yt=r(Ln,"A",{href:!0,rel:!0});var ia=s(Yt);Pi=i(ia,"Robust Speech Recognition via Large-Scale Weak Supervision"),ia.forEach(t),Ai=i(Ln," by Alec Radford, Jong Wook Kim, Tao Xu, Greg Brockman, Christine McLeavey, Ilya Sutskever."),Ln.forEach(t),_a=h(o),Un=r(o,"P",{});var da=s(Un);Ni=i(da,"The abstract from the paper is the following:"),da.forEach(t),ga=h(o),Vn=r(o,"P",{});var la=s(Vn);Ur=r(la,"EM",{});var ca=s(Ur);Si=i(ca,"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."),ca.forEach(t),la.forEach(t),va=h(o),Hn=r(o,"P",{});var pa=s(Hn);Oi=i(pa,"Tips:"),pa.forEach(t),ya=h(o),Q=r(o,"UL",{});var le=s(Q);Vr=r(le,"LI",{});var ha=s(Vr);Ii=i(ha,"The model usually performs well without requiring any finetuning."),ha.forEach(t),Li=h(le),eo=r(le,"LI",{});var Dn=s(eo);Di=i(Dn,"The architecture follows a classic encoder-decoder architecture, which means that it relies on the "),Bn=r(Dn,"A",{href:!0});var ua=s(Bn);Gi=i(ua,"generate()"),ua.forEach(t),Ui=i(Dn," function for inference."),Dn.forEach(t),Vi=h(le),Hr=r(le,"LI",{});var ma=s(Hr);Hi=i(ma,"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."),ma.forEach(t),Bi=h(le),to=r(le,"LI",{});var Ba=s(to);Ri=i(Ba,"One can use "),Rn=r(Ba,"A",{href:!0});var yu=s(Rn);Ki=i(yu,"WhisperProcessor"),yu.forEach(t),Ji=i(Ba," to prepare audio for the model, and decode the predicted ID\u2019s back into text."),Ba.forEach(t),le.forEach(t),ba=h(o),Z=r(o,"P",{});var St=s(Z);Xi=i(St,"This model was contributed by "),oo=r(St,"A",{href:!0,rel:!0});var bu=s(oo);Qi=i(bu,"Arthur Zucker"),bu.forEach(t),Zi=i(St,". The Tensorflow version of this model was contributed by "),no=r(St,"A",{href:!0,rel:!0});var ku=s(no);Yi=i(ku,"amyeroberts"),ku.forEach(t),ed=i(St,`.
The original code can be found `),ro=r(St,"A",{href:!0,rel:!0});var wu=s(ro);td=i(wu,"here"),wu.forEach(t),od=i(St,"."),St.forEach(t),ka=h(o),$e=r(o,"H2",{class:!0});var Ra=s($e);Qe=r(Ra,"A",{id:!0,class:!0,href:!0});var Tu=s(Qe);Br=r(Tu,"SPAN",{});var $u=s(Br);k(so.$$.fragment,$u),$u.forEach(t),Tu.forEach(t),nd=h(Ra),Rr=r(Ra,"SPAN",{});var xu=s(Rr);rd=i(xu,"WhisperConfig"),xu.forEach(t),Ra.forEach(t),wa=h(o),V=r(o,"DIV",{class:!0});var Ot=s(V);k(ao.$$.fragment,Ot),sd=h(Ot),xe=r(Ot,"P",{});var $r=s(xe);ad=i($r,"This is the configuration class to store the configuration of a "),Kn=r($r,"A",{href:!0});var Wu=s(Kn);id=i(Wu,"WhisperModel"),Wu.forEach(t),dd=i($r,`. 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
`),io=r($r,"A",{href:!0,rel:!0});var Fu=s(io);ld=i(Fu,"openai/whisper-tiny"),Fu.forEach(t),cd=i($r," architecture."),$r.forEach(t),pd=h(Ot),We=r(Ot,"P",{});var xr=s(We);hd=i(xr,"Configuration objects inherit from "),Jn=r(xr,"A",{href:!0});var zu=s(Jn);ud=i(zu,"PretrainedConfig"),zu.forEach(t),md=i(xr,` and can be used to control the model outputs. Read the
documentation from `),Xn=r(xr,"A",{href:!0});var qu=s(Xn);fd=i(qu,"PretrainedConfig"),qu.forEach(t),_d=i(xr," for more information."),xr.forEach(t),gd=h(Ot),k(Ze.$$.fragment,Ot),Ot.forEach(t),Ta=h(o),Fe=r(o,"H2",{class:!0});var Ka=s(Fe);Ye=r(Ka,"A",{id:!0,class:!0,href:!0});var Eu=s(Ye);Kr=r(Eu,"SPAN",{});var ju=s(Kr);k(lo.$$.fragment,ju),ju.forEach(t),Eu.forEach(t),vd=h(Ka),Jr=r(Ka,"SPAN",{});var Cu=s(Jr);yd=i(Cu,"WhisperTokenizer"),Cu.forEach(t),Ka.forEach(t),$a=h(o),q=r(o,"DIV",{class:!0});var N=s(q);k(co.$$.fragment,N),bd=h(N),Xr=r(N,"P",{});var Mu=s(Xr);kd=i(Mu,"Construct a Whisper tokenizer."),Mu.forEach(t),wd=h(N),po=r(N,"P",{});var Ja=s(po);Td=i(Ja,"This tokenizer inherits from "),Qn=r(Ja,"A",{href:!0});var Pu=s(Qn);$d=i(Pu,"PreTrainedTokenizer"),Pu.forEach(t),xd=i(Ja,` which contains some of the main methods. Users should refer to
the superclass for more information regarding such methods.`),Ja.forEach(t),Wd=h(N),he=r(N,"DIV",{class:!0});var Wr=s(he);k(ho.$$.fragment,Wr),Fd=h(Wr),Qr=r(Wr,"P",{});var Au=s(Qr);zd=i(Au,"Override the prefix tokens appended to the start of the label sequence. This method can be used standalone to"),Au.forEach(t),qd=h(Wr),k(et.$$.fragment,Wr),Wr.forEach(t),Ed=h(N),tt=r(N,"DIV",{class:!0});var Xa=s(tt);k(uo.$$.fragment,Xa),jd=h(Xa),Zr=r(Xa,"P",{});var Nu=s(Zr);Cd=i(Nu,"Build model inputs from a sequence by appending eos_token_id."),Nu.forEach(t),Xa.forEach(t),Md=h(N),ot=r(N,"DIV",{class:!0});var Qa=s(ot);k(mo.$$.fragment,Qa),Pd=h(Qa),fo=r(Qa,"P",{});var Za=s(fo);Ad=i(Za,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Yr=r(Za,"CODE",{});var Su=s(Yr);Nd=i(Su,"prepare_for_model"),Su.forEach(t),Sd=i(Za," method."),Za.forEach(t),Qa.forEach(t),Od=h(N),ue=r(N,"DIV",{class:!0});var Fr=s(ue);k(_o.$$.fragment,Fr),Id=h(Fr),Zn=r(Fr,"P",{});var mu=s(Zn);Ld=i(mu,"Create the token type IDs corresponding to the sequences passed. "),Yn=r(mu,"A",{href:!0});var Ou=s(Yn);Dd=i(Ou,`What are token type
IDs?`),Ou.forEach(t),mu.forEach(t),Gd=h(Fr),es=r(Fr,"P",{});var Iu=s(es);Ud=i(Iu,"Should be overridden in a subclass if the model has a special way of building those."),Iu.forEach(t),Fr.forEach(t),Vd=h(N),er=r(N,"DIV",{class:!0});var Lu=s(er);k(go.$$.fragment,Lu),Lu.forEach(t),N.forEach(t),xa=h(o),ze=r(o,"H2",{class:!0});var Ya=s(ze);nt=r(Ya,"A",{id:!0,class:!0,href:!0});var Du=s(nt);ts=r(Du,"SPAN",{});var Gu=s(ts);k(vo.$$.fragment,Gu),Gu.forEach(t),Du.forEach(t),Hd=h(Ya),os=r(Ya,"SPAN",{});var Uu=s(os);Bd=i(Uu,"WhisperTokenizerFast"),Uu.forEach(t),Ya.forEach(t),Wa=h(o),E=r(o,"DIV",{class:!0});var S=s(E);k(yo.$$.fragment,S),Rd=h(S),bo=r(S,"P",{});var ei=s(bo);Kd=i(ei,"Construct a \u201Cfast\u201D Whisper tokenizer (backed by HuggingFace\u2019s "),ns=r(ei,"EM",{});var Vu=s(ns);Jd=i(Vu,"tokenizers"),Vu.forEach(t),Xd=i(ei," library)."),ei.forEach(t),Qd=h(S),ko=r(S,"P",{});var ti=s(ko);Zd=i(ti,"This tokenizer inherits from "),tr=r(ti,"A",{href:!0});var Hu=s(tr);Yd=i(Hu,"PreTrainedTokenizerFast"),Hu.forEach(t),el=i(ti,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),ti.forEach(t),tl=h(S),me=r(S,"DIV",{class:!0});var zr=s(me);k(wo.$$.fragment,zr),ol=h(zr),rs=r(zr,"P",{});var Bu=s(rs);nl=i(Bu,"Override the prefix tokens appended to the start of the label sequence. This method can be used standalone to"),Bu.forEach(t),rl=h(zr),k(rt.$$.fragment,zr),zr.forEach(t),sl=h(S),st=r(S,"DIV",{class:!0});var oi=s(st);k(To.$$.fragment,oi),al=h(oi),ss=r(oi,"P",{});var Ru=s(ss);il=i(Ru,"Build model inputs from a sequence by appending eos_token_id."),Ru.forEach(t),oi.forEach(t),dl=h(S),at=r(S,"DIV",{class:!0});var ni=s(at);k($o.$$.fragment,ni),ll=h(ni),xo=r(ni,"P",{});var ri=s(xo);cl=i(ri,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),as=r(ri,"CODE",{});var Ku=s(as);pl=i(Ku,"prepare_for_model"),Ku.forEach(t),hl=i(ri," method."),ri.forEach(t),ni.forEach(t),ul=h(S),fe=r(S,"DIV",{class:!0});var qr=s(fe);k(Wo.$$.fragment,qr),ml=h(qr),or=r(qr,"P",{});var fu=s(or);fl=i(fu,"Create the token type IDs corresponding to the sequences passed. "),nr=r(fu,"A",{href:!0});var Ju=s(nr);_l=i(Ju,`What are token type
IDs?`),Ju.forEach(t),fu.forEach(t),gl=h(qr),is=r(qr,"P",{});var Xu=s(is);vl=i(Xu,"Should be overridden in a subclass if the model has a special way of building those."),Xu.forEach(t),qr.forEach(t),yl=h(S),rr=r(S,"DIV",{class:!0});var Qu=s(rr);k(Fo.$$.fragment,Qu),Qu.forEach(t),S.forEach(t),Fa=h(o),qe=r(o,"H2",{class:!0});var si=s(qe);it=r(si,"A",{id:!0,class:!0,href:!0});var Zu=s(it);ds=r(Zu,"SPAN",{});var Yu=s(ds);k(zo.$$.fragment,Yu),Yu.forEach(t),Zu.forEach(t),bl=h(si),ls=r(si,"SPAN",{});var em=s(ls);kl=i(em,"WhisperFeatureExtractor"),em.forEach(t),si.forEach(t),za=h(o),L=r(o,"DIV",{class:!0});var ve=s(L);k(qo.$$.fragment,ve),wl=h(ve),cs=r(ve,"P",{});var tm=s(cs);Tl=i(tm,"Constructs a Whisper feature extractor."),tm.forEach(t),$l=h(ve),Eo=r(ve,"P",{});var ai=s(Eo);xl=i(ai,"This feature extractor inherits from "),sr=r(ai,"A",{href:!0});var om=s(sr);Wl=i(om,"WhisperFeatureExtractor"),om.forEach(t),Fl=i(ai,` which contains most of the main methods. Users
should refer to this superclass for more information regarding those methods.`),ai.forEach(t),zl=h(ve),Ee=r(ve,"P",{});var Er=s(Ee);ql=i(Er,"This class extracts mel-filter bank features from raw speech using a custom numpy implementation of the "),ps=r(Er,"CODE",{});var nm=s(ps);El=i(nm,"Short Time Fourier Transform"),nm.forEach(t),jl=i(Er," which should match pytorch\u2019s "),hs=r(Er,"CODE",{});var rm=s(hs);Cl=i(rm,"torch.stft"),rm.forEach(t),Ml=i(Er," equivalent."),Er.forEach(t),Pl=h(ve),dt=r(ve,"DIV",{class:!0});var ii=s(dt);k(jo.$$.fragment,ii),Al=h(ii),us=r(ii,"P",{});var sm=s(us);Nl=i(sm,"Main method to featurize and prepare for the model one or several sequence(s)."),sm.forEach(t),ii.forEach(t),ve.forEach(t),qa=h(o),je=r(o,"H2",{class:!0});var di=s(je);lt=r(di,"A",{id:!0,class:!0,href:!0});var am=s(lt);ms=r(am,"SPAN",{});var im=s(ms);k(Co.$$.fragment,im),im.forEach(t),am.forEach(t),Sl=h(di),fs=r(di,"SPAN",{});var dm=s(fs);Ol=i(dm,"WhisperProcessor"),dm.forEach(t),di.forEach(t),Ea=h(o),j=r(o,"DIV",{class:!0});var O=s(j);k(Mo.$$.fragment,O),Il=h(O),_s=r(O,"P",{});var lm=s(_s);Ll=i(lm,`Constructs a Whisper processor which wraps a Whisper feature extractor and a Whisper tokenizer into a single
processor.`),lm.forEach(t),Dl=h(O),G=r(O,"P",{});var ce=s(G);ar=r(ce,"A",{href:!0});var cm=s(ar);Gl=i(cm,"WhisperProcessor"),cm.forEach(t),Ul=i(ce," offers all the functionalities of "),ir=r(ce,"A",{href:!0});var pm=s(ir);Vl=i(pm,"WhisperFeatureExtractor"),pm.forEach(t),Hl=i(ce," and "),dr=r(ce,"A",{href:!0});var hm=s(dr);Bl=i(hm,"WhisperTokenizer"),hm.forEach(t),Rl=i(ce,`. See
the `),Po=r(ce,"A",{href:!0});var _u=s(Po);gs=r(_u,"STRONG",{});var um=s(gs);Kl=i(um,"call"),um.forEach(t),Jl=i(_u,"()"),_u.forEach(t),Xl=i(ce," and "),lr=r(ce,"A",{href:!0});var mm=s(lr);Ql=i(mm,"decode()"),mm.forEach(t),Zl=i(ce," for more information."),ce.forEach(t),Yl=h(O),ct=r(O,"DIV",{class:!0});var li=s(ct);k(Ao.$$.fragment,li),ec=h(li),H=r(li,"P",{});var ye=s(H);tc=i(ye,"Forwards the "),vs=r(ye,"CODE",{});var fm=s(vs);oc=i(fm,"audio"),fm.forEach(t),nc=i(ye," argument to WhisperFeatureExtractor\u2019s "),No=r(ye,"A",{href:!0});var gu=s(No);ys=r(gu,"STRONG",{});var _m=s(ys);rc=i(_m,"call"),_m.forEach(t),sc=i(gu,"()"),gu.forEach(t),ac=i(ye," and the "),bs=r(ye,"CODE",{});var gm=s(bs);ic=i(gm,"text"),gm.forEach(t),dc=i(ye,`
argument to `),So=r(ye,"A",{href:!0});var vu=s(So);ks=r(vu,"STRONG",{});var vm=s(ks);lc=i(vm,"call"),vm.forEach(t),cc=i(vu,"()"),vu.forEach(t),pc=i(ye,`. Please refer to the doctsring of the above two methods for more
information.`),ye.forEach(t),li.forEach(t),hc=h(O),_e=r(O,"DIV",{class:!0});var jr=s(_e);k(Oo.$$.fragment,jr),uc=h(jr),ws=r(jr,"P",{});var ym=s(ws);mc=i(ym,"Instantiate a processor associated with a pretrained model."),ym.forEach(t),fc=h(jr),k(pt.$$.fragment,jr),jr.forEach(t),_c=h(O),ge=r(O,"DIV",{class:!0});var Cr=s(ge);k(Io.$$.fragment,Cr),gc=h(Cr),Lo=r(Cr,"P",{});var ci=s(Lo);vc=i(ci,`Saves the attributes of this processor (feature extractor, tokenizer\u2026) in the specified directory so that it
can be reloaded using the `),cr=r(ci,"A",{href:!0});var bm=s(cr);yc=i(bm,"from_pretrained()"),bm.forEach(t),bc=i(ci," method."),ci.forEach(t),kc=h(Cr),k(ht.$$.fragment,Cr),Cr.forEach(t),wc=h(O),ut=r(O,"DIV",{class:!0});var pi=s(ut);k(Do.$$.fragment,pi),Tc=h(pi),Go=r(pi,"P",{});var hi=s(Go);$c=i(hi,"This method forwards all its arguments to WhisperTokenizer\u2019s "),pr=r(hi,"A",{href:!0});var km=s(pr);xc=i(km,"batch_decode()"),km.forEach(t),Wc=i(hi,`. Please
refer to the docstring of this method for more information.`),hi.forEach(t),pi.forEach(t),Fc=h(O),mt=r(O,"DIV",{class:!0});var ui=s(mt);k(Uo.$$.fragment,ui),zc=h(ui),Vo=r(ui,"P",{});var mi=s(Vo);qc=i(mi,"This method forwards all its arguments to WhisperTokenizer\u2019s "),hr=r(mi,"A",{href:!0});var wm=s(hr);Ec=i(wm,"decode()"),wm.forEach(t),jc=i(mi,`. Please refer to
the docstring of this method for more information.`),mi.forEach(t),ui.forEach(t),O.forEach(t),ja=h(o),Ce=r(o,"H2",{class:!0});var fi=s(Ce);ft=r(fi,"A",{id:!0,class:!0,href:!0});var Tm=s(ft);Ts=r(Tm,"SPAN",{});var $m=s(Ts);k(Ho.$$.fragment,$m),$m.forEach(t),Tm.forEach(t),Cc=h(fi),$s=r(fi,"SPAN",{});var xm=s($s);Mc=i(xm,"WhisperModel"),xm.forEach(t),fi.forEach(t),Ca=h(o),D=r(o,"DIV",{class:!0});var be=s(D);k(Bo.$$.fragment,be),Pc=h(be),Ro=r(be,"P",{});var _i=s(Ro);Ac=i(_i,`The bare Whisper Model outputting raw hidden-states without any specific head on top.
This model inherits from `),ur=r(_i,"A",{href:!0});var Wm=s(ur);Nc=i(Wm,"PreTrainedModel"),Wm.forEach(t),Sc=i(_i,`. 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.)`),_i.forEach(t),Oc=h(be),Ko=r(be,"P",{});var gi=s(Ko);Ic=i(gi,"This model is also a PyTorch "),Jo=r(gi,"A",{href:!0,rel:!0});var Fm=s(Jo);Lc=i(Fm,"torch.nn.Module"),Fm.forEach(t),Dc=i(gi,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),gi.forEach(t),Gc=h(be),Y=r(be,"DIV",{class:!0});var It=s(Y);k(Xo.$$.fragment,It),Uc=h(It),Me=r(It,"P",{});var Mr=s(Me);Vc=i(Mr,"The "),mr=r(Mr,"A",{href:!0});var zm=s(mr);Hc=i(zm,"WhisperModel"),zm.forEach(t),Bc=i(Mr," forward method, overrides the "),xs=r(Mr,"CODE",{});var qm=s(xs);Rc=i(qm,"__call__"),qm.forEach(t),Kc=i(Mr," special method."),Mr.forEach(t),Jc=h(It),k(_t.$$.fragment,It),Xc=h(It),k(gt.$$.fragment,It),It.forEach(t),Qc=h(be),vt=r(be,"DIV",{class:!0});var vi=s(vt);k(Qo.$$.fragment,vi),Zc=h(vi),Zo=r(vi,"P",{});var yi=s(Zo);Yc=i(yi,`Masks extracted features along time axis and/or along feature axis according to
`),Yo=r(yi,"A",{href:!0,rel:!0});var Em=s(Yo);ep=i(Em,"SpecAugment"),Em.forEach(t),tp=i(yi,"."),yi.forEach(t),vi.forEach(t),be.forEach(t),Ma=h(o),Pe=r(o,"H2",{class:!0});var bi=s(Pe);yt=r(bi,"A",{id:!0,class:!0,href:!0});var jm=s(yt);Ws=r(jm,"SPAN",{});var Cm=s(Ws);k(en.$$.fragment,Cm),Cm.forEach(t),jm.forEach(t),op=h(bi),Fs=r(bi,"SPAN",{});var Mm=s(Fs);np=i(Mm,"WhisperForConditionalGeneration"),Mm.forEach(t),bi.forEach(t),Pa=h(o),B=r(o,"DIV",{class:!0});var Lt=s(B);k(tn.$$.fragment,Lt),rp=h(Lt),on=r(Lt,"P",{});var ki=s(on);sp=i(ki,`The Whisper Model with a language modeling head. Can be used for automatic speech recognition.
This model inherits from `),fr=r(ki,"A",{href:!0});var Pm=s(fr);ap=i(Pm,"PreTrainedModel"),Pm.forEach(t),ip=i(ki,`. 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.)`),ki.forEach(t),dp=h(Lt),nn=r(Lt,"P",{});var wi=s(nn);lp=i(wi,"This model is also a PyTorch "),rn=r(wi,"A",{href:!0,rel:!0});var Am=s(rn);cp=i(Am,"torch.nn.Module"),Am.forEach(t),pp=i(wi,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),wi.forEach(t),hp=h(Lt),ee=r(Lt,"DIV",{class:!0});var Dt=s(ee);k(sn.$$.fragment,Dt),up=h(Dt),Ae=r(Dt,"P",{});var Pr=s(Ae);mp=i(Pr,"The "),_r=r(Pr,"A",{href:!0});var Nm=s(_r);fp=i(Nm,"WhisperForConditionalGeneration"),Nm.forEach(t),_p=i(Pr," forward method, overrides the "),zs=r(Pr,"CODE",{});var Sm=s(zs);gp=i(Sm,"__call__"),Sm.forEach(t),vp=i(Pr," special method."),Pr.forEach(t),yp=h(Dt),k(bt.$$.fragment,Dt),bp=h(Dt),k(kt.$$.fragment,Dt),Dt.forEach(t),Lt.forEach(t),Aa=h(o),Ne=r(o,"H2",{class:!0});var Ti=s(Ne);wt=r(Ti,"A",{id:!0,class:!0,href:!0});var Om=s(wt);qs=r(Om,"SPAN",{});var Im=s(qs);k(an.$$.fragment,Im),Im.forEach(t),Om.forEach(t),kp=h(Ti),Es=r(Ti,"SPAN",{});var Lm=s(Es);wp=i(Lm,"WhisperForAudioClassification"),Lm.forEach(t),Ti.forEach(t),Na=h(o),ae=r(o,"DIV",{class:!0});var Ar=s(ae);k(dn.$$.fragment,Ar),Tp=h(Ar),js=r(Ar,"P",{});var Dm=s(js);$p=i(Dm,`Whisper Encoder Model with a sequence classification head on top (a linear layer over the pooled output) for tasks
like SUPERB Keyword Spotting.`),Dm.forEach(t),xp=h(Ar),te=r(Ar,"DIV",{class:!0});var Gt=s(te);k(ln.$$.fragment,Gt),Wp=h(Gt),Se=r(Gt,"P",{});var Nr=s(Se);Fp=i(Nr,"The "),gr=r(Nr,"A",{href:!0});var Gm=s(gr);zp=i(Gm,"WhisperForAudioClassification"),Gm.forEach(t),qp=i(Nr," forward method, overrides the "),Cs=r(Nr,"CODE",{});var Um=s(Cs);Ep=i(Um,"__call__"),Um.forEach(t),jp=i(Nr," special method."),Nr.forEach(t),Cp=h(Gt),k(Tt.$$.fragment,Gt),Mp=h(Gt),k($t.$$.fragment,Gt),Gt.forEach(t),Ar.forEach(t),Sa=h(o),Oe=r(o,"H2",{class:!0});var $i=s(Oe);xt=r($i,"A",{id:!0,class:!0,href:!0});var Vm=s(xt);Ms=r(Vm,"SPAN",{});var Hm=s(Ms);k(cn.$$.fragment,Hm),Hm.forEach(t),Vm.forEach(t),Pp=h($i),Ps=r($i,"SPAN",{});var Bm=s(Ps);Ap=i(Bm,"TFWhisperModel"),Bm.forEach(t),$i.forEach(t),Oa=h(o),R=r(o,"DIV",{class:!0});var Ut=s(R);k(pn.$$.fragment,Ut),Np=h(Ut),hn=r(Ut,"P",{});var xi=s(hn);Sp=i(xi,`The bare Whisper Model outputting raw hidden-states without any specific head on top.
This model inherits from `),vr=r(xi,"A",{href:!0});var Rm=s(vr);Op=i(Rm,"TFPreTrainedModel"),Rm.forEach(t),Ip=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),Lp=h(Ut),un=r(Ut,"P",{});var Wi=s(un);Dp=i(Wi,"This model is also a "),mn=r(Wi,"A",{href:!0,rel:!0});var Km=s(mn);Gp=i(Km,"tf.keras.Model"),Km.forEach(t),Up=i(Wi,` 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.`),Wi.forEach(t),Vp=h(Ut),oe=r(Ut,"DIV",{class:!0});var Vt=s(oe);k(fn.$$.fragment,Vt),Hp=h(Vt),Ie=r(Vt,"P",{});var Sr=s(Ie);Bp=i(Sr,"The "),yr=r(Sr,"A",{href:!0});var Jm=s(yr);Rp=i(Jm,"TFWhisperModel"),Jm.forEach(t),Kp=i(Sr," forward method, overrides the "),As=r(Sr,"CODE",{});var Xm=s(As);Jp=i(Xm,"__call__"),Xm.forEach(t),Xp=i(Sr," special method."),Sr.forEach(t),Qp=h(Vt),k(Wt.$$.fragment,Vt),Zp=h(Vt),k(Ft.$$.fragment,Vt),Vt.forEach(t),Ut.forEach(t),Ia=h(o),Le=r(o,"H2",{class:!0});var Fi=s(Le);zt=r(Fi,"A",{id:!0,class:!0,href:!0});var Qm=s(zt);Ns=r(Qm,"SPAN",{});var Zm=s(Ns);k(_n.$$.fragment,Zm),Zm.forEach(t),Qm.forEach(t),Yp=h(Fi),Ss=r(Fi,"SPAN",{});var Ym=s(Ss);eh=i(Ym,"TFWhisperForConditionalGeneration"),Ym.forEach(t),Fi.forEach(t),La=h(o),K=r(o,"DIV",{class:!0});var Ht=s(K);k(gn.$$.fragment,Ht),th=h(Ht),vn=r(Ht,"P",{});var zi=s(vn);oh=i(zi,`The Whisper Model with a language modeling head. Can be used for automatic speech recognition.
This model inherits from `),br=r(zi,"A",{href:!0});var ef=s(br);nh=i(ef,"TFPreTrainedModel"),ef.forEach(t),rh=i(zi,`. 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.)`),zi.forEach(t),sh=h(Ht),yn=r(Ht,"P",{});var qi=s(yn);ah=i(qi,"This model is also a "),bn=r(qi,"A",{href:!0,rel:!0});var tf=s(bn);ih=i(tf,"tf.keras.Model"),tf.forEach(t),dh=i(qi,` 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.`),qi.forEach(t),lh=h(Ht),ne=r(Ht,"DIV",{class:!0});var Bt=s(ne);k(kn.$$.fragment,Bt),ch=h(Bt),De=r(Bt,"P",{});var Or=s(De);ph=i(Or,"The "),kr=r(Or,"A",{href:!0});var of=s(kr);hh=i(of,"TFWhisperForConditionalGeneration"),of.forEach(t),uh=i(Or," forward method, overrides the "),Os=r(Or,"CODE",{});var nf=s(Os);mh=i(nf,"__call__"),nf.forEach(t),fh=i(Or," special method."),Or.forEach(t),_h=h(Bt),k(qt.$$.fragment,Bt),gh=h(Bt),k(Et.$$.fragment,Bt),Bt.forEach(t),Ht.forEach(t),Da=h(o),Ge=r(o,"H2",{class:!0});var Ei=s(Ge);jt=r(Ei,"A",{id:!0,class:!0,href:!0});var rf=s(jt);Is=r(rf,"SPAN",{});var sf=s(Is);k(wn.$$.fragment,sf),sf.forEach(t),rf.forEach(t),vh=h(Ei),Ls=r(Ei,"SPAN",{});var af=s(Ls);yh=i(af,"FlaxWhisperModel"),af.forEach(t),Ei.forEach(t),Ga=h(o),J=r(o,"DIV",{class:!0});var Rt=s(J);k(Tn.$$.fragment,Rt),bh=h(Rt),Ue=r(Rt,"P",{});var Ir=s(Ue);kh=i(Ir,`The bare Whisper Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),wr=r(Ir,"A",{href:!0});var df=s(wr);wh=i(df,"FlaxPreTrainedModel"),df.forEach(t),Th=i(Ir,`. 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
`),$n=r(Ir,"A",{href:!0,rel:!0});var lf=s($n);$h=i(lf,"flax.nn.Module"),lf.forEach(t),xh=i(Ir,` 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:`),Ir.forEach(t),Wh=h(Rt),ie=r(Rt,"UL",{});var Kt=s(ie);Ds=r(Kt,"LI",{});var cf=s(Ds);xn=r(cf,"A",{href:!0,rel:!0});var pf=s(xn);Fh=i(pf,"Just-In-Time (JIT) compilation"),pf.forEach(t),cf.forEach(t),zh=h(Kt),Gs=r(Kt,"LI",{});var hf=s(Gs);Wn=r(hf,"A",{href:!0,rel:!0});var uf=s(Wn);qh=i(uf,"Automatic Differentiation"),uf.forEach(t),hf.forEach(t),Eh=h(Kt),Us=r(Kt,"LI",{});var mf=s(Us);Fn=r(mf,"A",{href:!0,rel:!0});var ff=s(Fn);jh=i(ff,"Vectorization"),ff.forEach(t),mf.forEach(t),Ch=h(Kt),Vs=r(Kt,"LI",{});var _f=s(Vs);zn=r(_f,"A",{href:!0,rel:!0});var gf=s(zn);Mh=i(gf,"Parallelization"),gf.forEach(t),_f.forEach(t),Kt.forEach(t),Ph=h(Rt),re=r(Rt,"DIV",{class:!0});var Jt=s(re);k(qn.$$.fragment,Jt),Ah=h(Jt),Ve=r(Jt,"P",{});var Lr=s(Ve);Nh=i(Lr,"The "),Hs=r(Lr,"CODE",{});var vf=s(Hs);Sh=i(vf,"FlaxWhisperPreTrainedModel"),vf.forEach(t),Oh=i(Lr," forward method, overrides the "),Bs=r(Lr,"CODE",{});var yf=s(Bs);Ih=i(yf,"__call__"),yf.forEach(t),Lh=i(Lr," special method."),Lr.forEach(t),Dh=h(Jt),k(Ct.$$.fragment,Jt),Gh=h(Jt),k(Mt.$$.fragment,Jt),Jt.forEach(t),Rt.forEach(t),Ua=h(o),He=r(o,"H2",{class:!0});var ji=s(He);Pt=r(ji,"A",{id:!0,class:!0,href:!0});var bf=s(Pt);Rs=r(bf,"SPAN",{});var kf=s(Rs);k(En.$$.fragment,kf),kf.forEach(t),bf.forEach(t),Uh=h(ji),Ks=r(ji,"SPAN",{});var wf=s(Ks);Vh=i(wf,"FlaxWhisperForConditionalGeneration"),wf.forEach(t),ji.forEach(t),Va=h(o),X=r(o,"DIV",{class:!0});var Xt=s(X);k(jn.$$.fragment,Xt),Hh=h(Xt),Be=r(Xt,"P",{});var Dr=s(Be);Bh=i(Dr,`The Whisper Model with a language modeling head.
This model inherits from `),Tr=r(Dr,"A",{href:!0});var Tf=s(Tr);Rh=i(Tf,"FlaxPreTrainedModel"),Tf.forEach(t),Kh=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
`),Cn=r(Dr,"A",{href:!0,rel:!0});var $f=s(Cn);Jh=i($f,"flax.nn.Module"),$f.forEach(t),Xh=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),Qh=h(Xt),de=r(Xt,"UL",{});var Qt=s(de);Js=r(Qt,"LI",{});var xf=s(Js);Mn=r(xf,"A",{href:!0,rel:!0});var Wf=s(Mn);Zh=i(Wf,"Just-In-Time (JIT) compilation"),Wf.forEach(t),xf.forEach(t),Yh=h(Qt),Xs=r(Qt,"LI",{});var Ff=s(Xs);Pn=r(Ff,"A",{href:!0,rel:!0});var zf=s(Pn);eu=i(zf,"Automatic Differentiation"),zf.forEach(t),Ff.forEach(t),tu=h(Qt),Qs=r(Qt,"LI",{});var qf=s(Qs);An=r(qf,"A",{href:!0,rel:!0});var Ef=s(An);ou=i(Ef,"Vectorization"),Ef.forEach(t),qf.forEach(t),nu=h(Qt),Zs=r(Qt,"LI",{});var jf=s(Zs);Nn=r(jf,"A",{href:!0,rel:!0});var Cf=s(Nn);ru=i(Cf,"Parallelization"),Cf.forEach(t),jf.forEach(t),Qt.forEach(t),su=h(Xt),se=r(Xt,"DIV",{class:!0});var Zt=s(se);k(Sn.$$.fragment,Zt),au=h(Zt),Re=r(Zt,"P",{});var Gr=s(Re);iu=i(Gr,"The "),Ys=r(Gr,"CODE",{});var Mf=s(Ys);du=i(Mf,"FlaxWhisperPreTrainedModel"),Mf.forEach(t),lu=i(Gr," forward method, overrides the "),ea=r(Gr,"CODE",{});var Pf=s(ea);cu=i(Pf,"__call__"),Pf.forEach(t),pu=i(Gr," special method."),Gr.forEach(t),hu=h(Zt),k(At.$$.fragment,Zt),uu=h(Zt),k(Nt.$$.fragment,Zt),Zt.forEach(t),Xt.forEach(t),this.h()},h(){l(c,"name","hf:doc:metadata"),l(c,"content",JSON.stringify(a_)),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(Yt,"href","https://cdn.openai.com/papers/whisper.pdf"),l(Yt,"rel","nofollow"),l(Bn,"href","/docs/transformers/v4.27.1/en/main_classes/text_generation#transformers.GenerationMixin.generate"),l(Rn,"href","/docs/transformers/v4.27.1/en/model_doc/whisper#transformers.WhisperProcessor"),l(oo,"href","https://huggingface.co/ArthurZ"),l(oo,"rel","nofollow"),l(no,"href","https://huggingface.co/amyeroberts"),l(no,"rel","nofollow"),l(ro,"href","https://github.com/openai/whisper"),l(ro,"rel","nofollow"),l(Qe,"id","transformers.WhisperConfig"),l(Qe,"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(Qe,"href","#transformers.WhisperConfig"),l($e,"class","relative group"),l(Kn,"href","/docs/transformers/v4.27.1/en/model_doc/whisper#transformers.WhisperModel"),l(io,"href","https://huggingface.co/openai/whisper-tiny"),l(io,"rel","nofollow"),l(Jn,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),l(Xn,"href","/docs/transformers/v4.27.1/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(Ye,"id","transformers.WhisperTokenizer"),l(Ye,"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(Ye,"href","#transformers.WhisperTokenizer"),l(Fe,"class","relative group"),l(Qn,"href","/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),l(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Yn,"href","../glossary#token-type-ids"),l(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(er,"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(nt,"id","transformers.WhisperTokenizerFast"),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.WhisperTokenizerFast"),l(ze,"class","relative group"),l(tr,"href","/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),l(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(st,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(nr,"href","../glossary#token-type-ids"),l(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(rr,"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(it,"id","transformers.WhisperFeatureExtractor"),l(it,"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(it,"href","#transformers.WhisperFeatureExtractor"),l(qe,"class","relative group"),l(sr,"href","/docs/transformers/v4.27.1/en/model_doc/whisper#transformers.WhisperFeatureExtractor"),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(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(lt,"id","transformers.WhisperProcessor"),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.WhisperProcessor"),l(je,"class","relative group"),l(ar,"href","/docs/transformers/v4.27.1/en/model_doc/whisper#transformers.WhisperProcessor"),l(ir,"href","/docs/transformers/v4.27.1/en/model_doc/whisper#transformers.WhisperFeatureExtractor"),l(dr,"href","/docs/transformers/v4.27.1/en/model_doc/whisper#transformers.WhisperTokenizer"),l(Po,"href","/docs/transformers/v4.27.1/en/model_doc/whisper#transformers.WhisperProcessor.__call__"),l(lr,"href","/docs/transformers/v4.27.1/en/model_doc/whisper#transformers.WhisperProcessor.decode"),l(No,"href","/docs/transformers/v4.27.1/en/model_doc/whisper#transformers.WhisperFeatureExtractor.__call__"),l(So,"href","/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__"),l(ct,"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(cr,"href","/docs/transformers/v4.27.1/en/main_classes/processors#transformers.ProcessorMixin.from_pretrained"),l(ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(pr,"href","/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.batch_decode"),l(ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(hr,"href","/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.decode"),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(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(ft,"id","transformers.WhisperModel"),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.WhisperModel"),l(Ce,"class","relative group"),l(ur,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),l(Jo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(Jo,"rel","nofollow"),l(mr,"href","/docs/transformers/v4.27.1/en/model_doc/whisper#transformers.WhisperModel"),l(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Yo,"href","https://arxiv.org/abs/1904.08779"),l(Yo,"rel","nofollow"),l(vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(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(yt,"id","transformers.WhisperForConditionalGeneration"),l(yt,"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(yt,"href","#transformers.WhisperForConditionalGeneration"),l(Pe,"class","relative group"),l(fr,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),l(rn,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(rn,"rel","nofollow"),l(_r,"href","/docs/transformers/v4.27.1/en/model_doc/whisper#transformers.WhisperForConditionalGeneration"),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(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(wt,"id","transformers.WhisperForAudioClassification"),l(wt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(wt,"href","#transformers.WhisperForAudioClassification"),l(Ne,"class","relative group"),l(gr,"href","/docs/transformers/v4.27.1/en/model_doc/whisper#transformers.WhisperForAudioClassification"),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(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(xt,"id","transformers.TFWhisperModel"),l(xt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(xt,"href","#transformers.TFWhisperModel"),l(Oe,"class","relative group"),l(vr,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),l(mn,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),l(mn,"rel","nofollow"),l(yr,"href","/docs/transformers/v4.27.1/en/model_doc/whisper#transformers.TFWhisperModel"),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(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.TFWhisperForConditionalGeneration"),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.TFWhisperForConditionalGeneration"),l(Le,"class","relative group"),l(br,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),l(bn,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),l(bn,"rel","nofollow"),l(kr,"href","/docs/transformers/v4.27.1/en/model_doc/whisper#transformers.TFWhisperForConditionalGeneration"),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(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(jt,"id","transformers.FlaxWhisperModel"),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.FlaxWhisperModel"),l(Ge,"class","relative group"),l(wr,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel"),l($n,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),l($n,"rel","nofollow"),l(xn,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),l(xn,"rel","nofollow"),l(Wn,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),l(Wn,"rel","nofollow"),l(Fn,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),l(Fn,"rel","nofollow"),l(zn,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),l(zn,"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(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.FlaxWhisperForConditionalGeneration"),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.FlaxWhisperForConditionalGeneration"),l(He,"class","relative group"),l(Tr,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.FlaxPreTrainedModel"),l(Cn,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),l(Cn,"rel","nofollow"),l(Mn,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),l(Mn,"rel","nofollow"),l(Pn,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),l(Pn,"rel","nofollow"),l(An,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),l(An,"rel","nofollow"),l(Nn,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),l(Nn,"rel","nofollow"),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(X,"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),g(o,y,_),g(o,f,_),e(f,m),e(m,v),w(d,v,null),e(f,u),e(f,z),e(z,I),g(o,C,_),g(o,P,_),e(P,M),e(M,A),w(pe,A,null),e(P,Gn),e(P,Je),e(Je,Ci),g(o,fa,_),g(o,Xe,_),e(Xe,Mi),e(Xe,Yt),e(Yt,Pi),e(Xe,Ai),g(o,_a,_),g(o,Un,_),e(Un,Ni),g(o,ga,_),g(o,Vn,_),e(Vn,Ur),e(Ur,Si),g(o,va,_),g(o,Hn,_),e(Hn,Oi),g(o,ya,_),g(o,Q,_),e(Q,Vr),e(Vr,Ii),e(Q,Li),e(Q,eo),e(eo,Di),e(eo,Bn),e(Bn,Gi),e(eo,Ui),e(Q,Vi),e(Q,Hr),e(Hr,Hi),e(Q,Bi),e(Q,to),e(to,Ri),e(to,Rn),e(Rn,Ki),e(to,Ji),g(o,ba,_),g(o,Z,_),e(Z,Xi),e(Z,oo),e(oo,Qi),e(Z,Zi),e(Z,no),e(no,Yi),e(Z,ed),e(Z,ro),e(ro,td),e(Z,od),g(o,ka,_),g(o,$e,_),e($e,Qe),e(Qe,Br),w(so,Br,null),e($e,nd),e($e,Rr),e(Rr,rd),g(o,wa,_),g(o,V,_),w(ao,V,null),e(V,sd),e(V,xe),e(xe,ad),e(xe,Kn),e(Kn,id),e(xe,dd),e(xe,io),e(io,ld),e(xe,cd),e(V,pd),e(V,We),e(We,hd),e(We,Jn),e(Jn,ud),e(We,md),e(We,Xn),e(Xn,fd),e(We,_d),e(V,gd),w(Ze,V,null),g(o,Ta,_),g(o,Fe,_),e(Fe,Ye),e(Ye,Kr),w(lo,Kr,null),e(Fe,vd),e(Fe,Jr),e(Jr,yd),g(o,$a,_),g(o,q,_),w(co,q,null),e(q,bd),e(q,Xr),e(Xr,kd),e(q,wd),e(q,po),e(po,Td),e(po,Qn),e(Qn,$d),e(po,xd),e(q,Wd),e(q,he),w(ho,he,null),e(he,Fd),e(he,Qr),e(Qr,zd),e(he,qd),w(et,he,null),e(q,Ed),e(q,tt),w(uo,tt,null),e(tt,jd),e(tt,Zr),e(Zr,Cd),e(q,Md),e(q,ot),w(mo,ot,null),e(ot,Pd),e(ot,fo),e(fo,Ad),e(fo,Yr),e(Yr,Nd),e(fo,Sd),e(q,Od),e(q,ue),w(_o,ue,null),e(ue,Id),e(ue,Zn),e(Zn,Ld),e(Zn,Yn),e(Yn,Dd),e(ue,Gd),e(ue,es),e(es,Ud),e(q,Vd),e(q,er),w(go,er,null),g(o,xa,_),g(o,ze,_),e(ze,nt),e(nt,ts),w(vo,ts,null),e(ze,Hd),e(ze,os),e(os,Bd),g(o,Wa,_),g(o,E,_),w(yo,E,null),e(E,Rd),e(E,bo),e(bo,Kd),e(bo,ns),e(ns,Jd),e(bo,Xd),e(E,Qd),e(E,ko),e(ko,Zd),e(ko,tr),e(tr,Yd),e(ko,el),e(E,tl),e(E,me),w(wo,me,null),e(me,ol),e(me,rs),e(rs,nl),e(me,rl),w(rt,me,null),e(E,sl),e(E,st),w(To,st,null),e(st,al),e(st,ss),e(ss,il),e(E,dl),e(E,at),w($o,at,null),e(at,ll),e(at,xo),e(xo,cl),e(xo,as),e(as,pl),e(xo,hl),e(E,ul),e(E,fe),w(Wo,fe,null),e(fe,ml),e(fe,or),e(or,fl),e(or,nr),e(nr,_l),e(fe,gl),e(fe,is),e(is,vl),e(E,yl),e(E,rr),w(Fo,rr,null),g(o,Fa,_),g(o,qe,_),e(qe,it),e(it,ds),w(zo,ds,null),e(qe,bl),e(qe,ls),e(ls,kl),g(o,za,_),g(o,L,_),w(qo,L,null),e(L,wl),e(L,cs),e(cs,Tl),e(L,$l),e(L,Eo),e(Eo,xl),e(Eo,sr),e(sr,Wl),e(Eo,Fl),e(L,zl),e(L,Ee),e(Ee,ql),e(Ee,ps),e(ps,El),e(Ee,jl),e(Ee,hs),e(hs,Cl),e(Ee,Ml),e(L,Pl),e(L,dt),w(jo,dt,null),e(dt,Al),e(dt,us),e(us,Nl),g(o,qa,_),g(o,je,_),e(je,lt),e(lt,ms),w(Co,ms,null),e(je,Sl),e(je,fs),e(fs,Ol),g(o,Ea,_),g(o,j,_),w(Mo,j,null),e(j,Il),e(j,_s),e(_s,Ll),e(j,Dl),e(j,G),e(G,ar),e(ar,Gl),e(G,Ul),e(G,ir),e(ir,Vl),e(G,Hl),e(G,dr),e(dr,Bl),e(G,Rl),e(G,Po),e(Po,gs),e(gs,Kl),e(Po,Jl),e(G,Xl),e(G,lr),e(lr,Ql),e(G,Zl),e(j,Yl),e(j,ct),w(Ao,ct,null),e(ct,ec),e(ct,H),e(H,tc),e(H,vs),e(vs,oc),e(H,nc),e(H,No),e(No,ys),e(ys,rc),e(No,sc),e(H,ac),e(H,bs),e(bs,ic),e(H,dc),e(H,So),e(So,ks),e(ks,lc),e(So,cc),e(H,pc),e(j,hc),e(j,_e),w(Oo,_e,null),e(_e,uc),e(_e,ws),e(ws,mc),e(_e,fc),w(pt,_e,null),e(j,_c),e(j,ge),w(Io,ge,null),e(ge,gc),e(ge,Lo),e(Lo,vc),e(Lo,cr),e(cr,yc),e(Lo,bc),e(ge,kc),w(ht,ge,null),e(j,wc),e(j,ut),w(Do,ut,null),e(ut,Tc),e(ut,Go),e(Go,$c),e(Go,pr),e(pr,xc),e(Go,Wc),e(j,Fc),e(j,mt),w(Uo,mt,null),e(mt,zc),e(mt,Vo),e(Vo,qc),e(Vo,hr),e(hr,Ec),e(Vo,jc),g(o,ja,_),g(o,Ce,_),e(Ce,ft),e(ft,Ts),w(Ho,Ts,null),e(Ce,Cc),e(Ce,$s),e($s,Mc),g(o,Ca,_),g(o,D,_),w(Bo,D,null),e(D,Pc),e(D,Ro),e(Ro,Ac),e(Ro,ur),e(ur,Nc),e(Ro,Sc),e(D,Oc),e(D,Ko),e(Ko,Ic),e(Ko,Jo),e(Jo,Lc),e(Ko,Dc),e(D,Gc),e(D,Y),w(Xo,Y,null),e(Y,Uc),e(Y,Me),e(Me,Vc),e(Me,mr),e(mr,Hc),e(Me,Bc),e(Me,xs),e(xs,Rc),e(Me,Kc),e(Y,Jc),w(_t,Y,null),e(Y,Xc),w(gt,Y,null),e(D,Qc),e(D,vt),w(Qo,vt,null),e(vt,Zc),e(vt,Zo),e(Zo,Yc),e(Zo,Yo),e(Yo,ep),e(Zo,tp),g(o,Ma,_),g(o,Pe,_),e(Pe,yt),e(yt,Ws),w(en,Ws,null),e(Pe,op),e(Pe,Fs),e(Fs,np),g(o,Pa,_),g(o,B,_),w(tn,B,null),e(B,rp),e(B,on),e(on,sp),e(on,fr),e(fr,ap),e(on,ip),e(B,dp),e(B,nn),e(nn,lp),e(nn,rn),e(rn,cp),e(nn,pp),e(B,hp),e(B,ee),w(sn,ee,null),e(ee,up),e(ee,Ae),e(Ae,mp),e(Ae,_r),e(_r,fp),e(Ae,_p),e(Ae,zs),e(zs,gp),e(Ae,vp),e(ee,yp),w(bt,ee,null),e(ee,bp),w(kt,ee,null),g(o,Aa,_),g(o,Ne,_),e(Ne,wt),e(wt,qs),w(an,qs,null),e(Ne,kp),e(Ne,Es),e(Es,wp),g(o,Na,_),g(o,ae,_),w(dn,ae,null),e(ae,Tp),e(ae,js),e(js,$p),e(ae,xp),e(ae,te),w(ln,te,null),e(te,Wp),e(te,Se),e(Se,Fp),e(Se,gr),e(gr,zp),e(Se,qp),e(Se,Cs),e(Cs,Ep),e(Se,jp),e(te,Cp),w(Tt,te,null),e(te,Mp),w($t,te,null),g(o,Sa,_),g(o,Oe,_),e(Oe,xt),e(xt,Ms),w(cn,Ms,null),e(Oe,Pp),e(Oe,Ps),e(Ps,Ap),g(o,Oa,_),g(o,R,_),w(pn,R,null),e(R,Np),e(R,hn),e(hn,Sp),e(hn,vr),e(vr,Op),e(hn,Ip),e(R,Lp),e(R,un),e(un,Dp),e(un,mn),e(mn,Gp),e(un,Up),e(R,Vp),e(R,oe),w(fn,oe,null),e(oe,Hp),e(oe,Ie),e(Ie,Bp),e(Ie,yr),e(yr,Rp),e(Ie,Kp),e(Ie,As),e(As,Jp),e(Ie,Xp),e(oe,Qp),w(Wt,oe,null),e(oe,Zp),w(Ft,oe,null),g(o,Ia,_),g(o,Le,_),e(Le,zt),e(zt,Ns),w(_n,Ns,null),e(Le,Yp),e(Le,Ss),e(Ss,eh),g(o,La,_),g(o,K,_),w(gn,K,null),e(K,th),e(K,vn),e(vn,oh),e(vn,br),e(br,nh),e(vn,rh),e(K,sh),e(K,yn),e(yn,ah),e(yn,bn),e(bn,ih),e(yn,dh),e(K,lh),e(K,ne),w(kn,ne,null),e(ne,ch),e(ne,De),e(De,ph),e(De,kr),e(kr,hh),e(De,uh),e(De,Os),e(Os,mh),e(De,fh),e(ne,_h),w(qt,ne,null),e(ne,gh),w(Et,ne,null),g(o,Da,_),g(o,Ge,_),e(Ge,jt),e(jt,Is),w(wn,Is,null),e(Ge,vh),e(Ge,Ls),e(Ls,yh),g(o,Ga,_),g(o,J,_),w(Tn,J,null),e(J,bh),e(J,Ue),e(Ue,kh),e(Ue,wr),e(wr,wh),e(Ue,Th),e(Ue,$n),e($n,$h),e(Ue,xh),e(J,Wh),e(J,ie),e(ie,Ds),e(Ds,xn),e(xn,Fh),e(ie,zh),e(ie,Gs),e(Gs,Wn),e(Wn,qh),e(ie,Eh),e(ie,Us),e(Us,Fn),e(Fn,jh),e(ie,Ch),e(ie,Vs),e(Vs,zn),e(zn,Mh),e(J,Ph),e(J,re),w(qn,re,null),e(re,Ah),e(re,Ve),e(Ve,Nh),e(Ve,Hs),e(Hs,Sh),e(Ve,Oh),e(Ve,Bs),e(Bs,Ih),e(Ve,Lh),e(re,Dh),w(Ct,re,null),e(re,Gh),w(Mt,re,null),g(o,Ua,_),g(o,He,_),e(He,Pt),e(Pt,Rs),w(En,Rs,null),e(He,Uh),e(He,Ks),e(Ks,Vh),g(o,Va,_),g(o,X,_),w(jn,X,null),e(X,Hh),e(X,Be),e(Be,Bh),e(Be,Tr),e(Tr,Rh),e(Be,Kh),e(Be,Cn),e(Cn,Jh),e(Be,Xh),e(X,Qh),e(X,de),e(de,Js),e(Js,Mn),e(Mn,Zh),e(de,Yh),e(de,Xs),e(Xs,Pn),e(Pn,eu),e(de,tu),e(de,Qs),e(Qs,An),e(An,ou),e(de,nu),e(de,Zs),e(Zs,Nn),e(Nn,ru),e(X,su),e(X,se),w(Sn,se,null),e(se,au),e(se,Re),e(Re,iu),e(Re,Ys),e(Ys,du),e(Re,lu),e(Re,ea),e(ea,cu),e(Re,pu),e(se,hu),w(At,se,null),e(se,uu),w(Nt,se,null),Ha=!0},p(o,[_]){const On={};_&2&&(On.$$scope={dirty:_,ctx:o}),Ze.$set(On);const ta={};_&2&&(ta.$$scope={dirty:_,ctx:o}),et.$set(ta);const oa={};_&2&&(oa.$$scope={dirty:_,ctx:o}),rt.$set(oa);const na={};_&2&&(na.$$scope={dirty:_,ctx:o}),pt.$set(na);const In={};_&2&&(In.$$scope={dirty:_,ctx:o}),ht.$set(In);const ra={};_&2&&(ra.$$scope={dirty:_,ctx:o}),_t.$set(ra);const sa={};_&2&&(sa.$$scope={dirty:_,ctx:o}),gt.$set(sa);const aa={};_&2&&(aa.$$scope={dirty:_,ctx:o}),bt.$set(aa);const Ln={};_&2&&(Ln.$$scope={dirty:_,ctx:o}),kt.$set(Ln);const ia={};_&2&&(ia.$$scope={dirty:_,ctx:o}),Tt.$set(ia);const da={};_&2&&(da.$$scope={dirty:_,ctx:o}),$t.$set(da);const la={};_&2&&(la.$$scope={dirty:_,ctx:o}),Wt.$set(la);const ca={};_&2&&(ca.$$scope={dirty:_,ctx:o}),Ft.$set(ca);const pa={};_&2&&(pa.$$scope={dirty:_,ctx:o}),qt.$set(pa);const le={};_&2&&(le.$$scope={dirty:_,ctx:o}),Et.$set(le);const ha={};_&2&&(ha.$$scope={dirty:_,ctx:o}),Ct.$set(ha);const Dn={};_&2&&(Dn.$$scope={dirty:_,ctx:o}),Mt.$set(Dn);const ua={};_&2&&(ua.$$scope={dirty:_,ctx:o}),At.$set(ua);const ma={};_&2&&(ma.$$scope={dirty:_,ctx:o}),Nt.$set(ma)},i(o){Ha||(T(d.$$.fragment,o),T(pe.$$.fragment,o),T(so.$$.fragment,o),T(ao.$$.fragment,o),T(Ze.$$.fragment,o),T(lo.$$.fragment,o),T(co.$$.fragment,o),T(ho.$$.fragment,o),T(et.$$.fragment,o),T(uo.$$.fragment,o),T(mo.$$.fragment,o),T(_o.$$.fragment,o),T(go.$$.fragment,o),T(vo.$$.fragment,o),T(yo.$$.fragment,o),T(wo.$$.fragment,o),T(rt.$$.fragment,o),T(To.$$.fragment,o),T($o.$$.fragment,o),T(Wo.$$.fragment,o),T(Fo.$$.fragment,o),T(zo.$$.fragment,o),T(qo.$$.fragment,o),T(jo.$$.fragment,o),T(Co.$$.fragment,o),T(Mo.$$.fragment,o),T(Ao.$$.fragment,o),T(Oo.$$.fragment,o),T(pt.$$.fragment,o),T(Io.$$.fragment,o),T(ht.$$.fragment,o),T(Do.$$.fragment,o),T(Uo.$$.fragment,o),T(Ho.$$.fragment,o),T(Bo.$$.fragment,o),T(Xo.$$.fragment,o),T(_t.$$.fragment,o),T(gt.$$.fragment,o),T(Qo.$$.fragment,o),T(en.$$.fragment,o),T(tn.$$.fragment,o),T(sn.$$.fragment,o),T(bt.$$.fragment,o),T(kt.$$.fragment,o),T(an.$$.fragment,o),T(dn.$$.fragment,o),T(ln.$$.fragment,o),T(Tt.$$.fragment,o),T($t.$$.fragment,o),T(cn.$$.fragment,o),T(pn.$$.fragment,o),T(fn.$$.fragment,o),T(Wt.$$.fragment,o),T(Ft.$$.fragment,o),T(_n.$$.fragment,o),T(gn.$$.fragment,o),T(kn.$$.fragment,o),T(qt.$$.fragment,o),T(Et.$$.fragment,o),T(wn.$$.fragment,o),T(Tn.$$.fragment,o),T(qn.$$.fragment,o),T(Ct.$$.fragment,o),T(Mt.$$.fragment,o),T(En.$$.fragment,o),T(jn.$$.fragment,o),T(Sn.$$.fragment,o),T(At.$$.fragment,o),T(Nt.$$.fragment,o),Ha=!0)},o(o){$(d.$$.fragment,o),$(pe.$$.fragment,o),$(so.$$.fragment,o),$(ao.$$.fragment,o),$(Ze.$$.fragment,o),$(lo.$$.fragment,o),$(co.$$.fragment,o),$(ho.$$.fragment,o),$(et.$$.fragment,o),$(uo.$$.fragment,o),$(mo.$$.fragment,o),$(_o.$$.fragment,o),$(go.$$.fragment,o),$(vo.$$.fragment,o),$(yo.$$.fragment,o),$(wo.$$.fragment,o),$(rt.$$.fragment,o),$(To.$$.fragment,o),$($o.$$.fragment,o),$(Wo.$$.fragment,o),$(Fo.$$.fragment,o),$(zo.$$.fragment,o),$(qo.$$.fragment,o),$(jo.$$.fragment,o),$(Co.$$.fragment,o),$(Mo.$$.fragment,o),$(Ao.$$.fragment,o),$(Oo.$$.fragment,o),$(pt.$$.fragment,o),$(Io.$$.fragment,o),$(ht.$$.fragment,o),$(Do.$$.fragment,o),$(Uo.$$.fragment,o),$(Ho.$$.fragment,o),$(Bo.$$.fragment,o),$(Xo.$$.fragment,o),$(_t.$$.fragment,o),$(gt.$$.fragment,o),$(Qo.$$.fragment,o),$(en.$$.fragment,o),$(tn.$$.fragment,o),$(sn.$$.fragment,o),$(bt.$$.fragment,o),$(kt.$$.fragment,o),$(an.$$.fragment,o),$(dn.$$.fragment,o),$(ln.$$.fragment,o),$(Tt.$$.fragment,o),$($t.$$.fragment,o),$(cn.$$.fragment,o),$(pn.$$.fragment,o),$(fn.$$.fragment,o),$(Wt.$$.fragment,o),$(Ft.$$.fragment,o),$(_n.$$.fragment,o),$(gn.$$.fragment,o),$(kn.$$.fragment,o),$(qt.$$.fragment,o),$(Et.$$.fragment,o),$(wn.$$.fragment,o),$(Tn.$$.fragment,o),$(qn.$$.fragment,o),$(Ct.$$.fragment,o),$(Mt.$$.fragment,o),$(En.$$.fragment,o),$(jn.$$.fragment,o),$(Sn.$$.fragment,o),$(At.$$.fragment,o),$(Nt.$$.fragment,o),Ha=!1},d(o){t(c),o&&t(y),o&&t(f),x(d),o&&t(C),o&&t(P),x(pe),o&&t(fa),o&&t(Xe),o&&t(_a),o&&t(Un),o&&t(ga),o&&t(Vn),o&&t(va),o&&t(Hn),o&&t(ya),o&&t(Q),o&&t(ba),o&&t(Z),o&&t(ka),o&&t($e),x(so),o&&t(wa),o&&t(V),x(ao),x(Ze),o&&t(Ta),o&&t(Fe),x(lo),o&&t($a),o&&t(q),x(co),x(ho),x(et),x(uo),x(mo),x(_o),x(go),o&&t(xa),o&&t(ze),x(vo),o&&t(Wa),o&&t(E),x(yo),x(wo),x(rt),x(To),x($o),x(Wo),x(Fo),o&&t(Fa),o&&t(qe),x(zo),o&&t(za),o&&t(L),x(qo),x(jo),o&&t(qa),o&&t(je),x(Co),o&&t(Ea),o&&t(j),x(Mo),x(Ao),x(Oo),x(pt),x(Io),x(ht),x(Do),x(Uo),o&&t(ja),o&&t(Ce),x(Ho),o&&t(Ca),o&&t(D),x(Bo),x(Xo),x(_t),x(gt),x(Qo),o&&t(Ma),o&&t(Pe),x(en),o&&t(Pa),o&&t(B),x(tn),x(sn),x(bt),x(kt),o&&t(Aa),o&&t(Ne),x(an),o&&t(Na),o&&t(ae),x(dn),x(ln),x(Tt),x($t),o&&t(Sa),o&&t(Oe),x(cn),o&&t(Oa),o&&t(R),x(pn),x(fn),x(Wt),x(Ft),o&&t(Ia),o&&t(Le),x(_n),o&&t(La),o&&t(K),x(gn),x(kn),x(qt),x(Et),o&&t(Da),o&&t(Ge),x(wn),o&&t(Ga),o&&t(J),x(Tn),x(qn),x(Ct),x(Mt),o&&t(Ua),o&&t(He),x(En),o&&t(Va),o&&t(X),x(jn),x(Sn),x(At),x(Nt)}}}const a_={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"}],title:"Whisper"};function i_(W){return If(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class m_ extends Af{constructor(c){super();Nf(this,c,i_,s_,Sf,{})}}export{m_ as default,a_ as metadata};
