import{S as Tc,i as $c,s as xc,e as n,k as p,w as b,t as a,M as Wc,c as r,d as o,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 Fc,L as rn}from"../../chunks/vendor-hf-doc-builder.js";import{T as on}from"../../chunks/Tip-hf-doc-builder.js";import{D as z}from"../../chunks/Docstring-hf-doc-builder.js";import{C as sn}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as ae}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as nn}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function zc(W){let c,y,f,u,v;return u=new sn({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(u.$$.fragment)},l(d){c=r(d,"P",{});var m=s(c);y=i(m,"Example:"),m.forEach(o),f=h(d),k(u.$$.fragment,d)},m(d,m){g(d,c,m),e(c,y),g(d,f,m),w(u,d,m),v=!0},p:rn,i(d){v||(T(u.$$.fragment,d),v=!0)},o(d){$(u.$$.fragment,d),v=!1},d(d){d&&o(c),d&&o(f),x(u,d)}}}function qc(W){let c,y,f,u,v;return u=new sn({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(u.$$.fragment)},l(d){c=r(d,"P",{});var m=s(c);y=i(m,"update the prefix tokens as required when fine-tuning. Example:"),m.forEach(o),f=h(d),k(u.$$.fragment,d)},m(d,m){g(d,c,m),e(c,y),g(d,f,m),w(u,d,m),v=!0},p:rn,i(d){v||(T(u.$$.fragment,d),v=!0)},o(d){$(u.$$.fragment,d),v=!1},d(d){d&&o(c),d&&o(f),x(u,d)}}}function Ec(W){let c,y,f,u,v,d,m,F,S,M,C;return{c(){c=n("p"),y=a(`This class method is simply calling the feature extractor
`),f=n("a"),u=a("from_pretrained()"),v=a(`, image processor
`),d=n("a"),m=a("ImageProcessingMixin"),F=a(` and the tokenizer
`),S=n("code"),M=a("~tokenization_utils_base.PreTrainedTokenizer.from_pretrained"),C=a(` methods. Please refer to the docstrings of the
methods above for more information.`),this.h()},l(P){c=r(P,"P",{});var j=s(c);y=i(j,`This class method is simply calling the feature extractor
`),f=r(j,"A",{href:!0});var Y=s(f);u=i(Y,"from_pretrained()"),Y.forEach(o),v=i(j,`, image processor
`),d=r(j,"A",{href:!0});var _o=s(d);m=i(_o,"ImageProcessingMixin"),_o.forEach(o),F=i(j,` and the tokenizer
`),S=r(j,"CODE",{});var we=s(S);M=i(we,"~tokenization_utils_base.PreTrainedTokenizer.from_pretrained"),we.forEach(o),C=i(j,` methods. Please refer to the docstrings of the
methods above for more information.`),j.forEach(o),this.h()},h(){l(f,"href","/docs/transformers/main/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.from_pretrained"),l(d,"href","/docs/transformers/main/en/internal/image_processing_utils#transformers.ImageProcessingMixin")},m(P,j){g(P,c,j),e(c,y),e(c,f),e(f,u),e(c,v),e(c,d),e(d,m),e(c,F),e(c,S),e(S,M),e(c,C)},d(P){P&&o(c)}}}function Mc(W){let c,y,f,u,v,d,m,F;return{c(){c=n("p"),y=a("This class method is simply calling "),f=n("a"),u=a("save_pretrained()"),v=a(` and
`),d=n("a"),m=a("save_pretrained()"),F=a(`. Please refer to the docstrings of the
methods above for more information.`),this.h()},l(S){c=r(S,"P",{});var M=s(c);y=i(M,"This class method is simply calling "),f=r(M,"A",{href:!0});var C=s(f);u=i(C,"save_pretrained()"),C.forEach(o),v=i(M,` and
`),d=r(M,"A",{href:!0});var P=s(d);m=i(P,"save_pretrained()"),P.forEach(o),F=i(M,`. Please refer to the docstrings of the
methods above for more information.`),M.forEach(o),this.h()},h(){l(f,"href","/docs/transformers/main/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.save_pretrained"),l(d,"href","/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.save_pretrained")},m(S,M){g(S,c,M),e(c,y),e(c,f),e(f,u),e(c,v),e(c,d),e(d,m),e(c,F)},d(S){S&&o(c)}}}function Pc(W){let c,y,f,u,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"),u=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 m=s(c);y=i(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(m,"CODE",{});var F=s(f);u=i(F,"Module"),F.forEach(o),v=i(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(o)},m(d,m){g(d,c,m),e(c,y),e(c,f),e(f,u),e(c,v)},d(d){d&&o(c)}}}function Cc(W){let c,y,f,u,v;return u=new sn({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(u.$$.fragment)},l(d){c=r(d,"P",{});var m=s(c);y=i(m,"Example:"),m.forEach(o),f=h(d),k(u.$$.fragment,d)},m(d,m){g(d,c,m),e(c,y),g(d,f,m),w(u,d,m),v=!0},p:rn,i(d){v||(T(u.$$.fragment,d),v=!0)},o(d){$(u.$$.fragment,d),v=!1},d(d){d&&o(c),d&&o(f),x(u,d)}}}function jc(W){let c,y,f,u,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"),u=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 m=s(c);y=i(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(m,"CODE",{});var F=s(f);u=i(F,"Module"),F.forEach(o),v=i(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(o)},m(d,m){g(d,c,m),e(c,y),e(c,f),e(f,u),e(c,v)},d(d){d&&o(c)}}}function Nc(W){let c,y,f,u,v;return u=new sn({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(u.$$.fragment)},l(d){c=r(d,"P",{});var m=s(c);y=i(m,"Example:"),m.forEach(o),f=h(d),k(u.$$.fragment,d)},m(d,m){g(d,c,m),e(c,y),g(d,f,m),w(u,d,m),v=!0},p:rn,i(d){v||(T(u.$$.fragment,d),v=!0)},o(d){$(u.$$.fragment,d),v=!1},d(d){d&&o(c),d&&o(f),x(u,d)}}}function Ac(W){let c,y,f,u,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"),u=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 m=s(c);y=i(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(m,"CODE",{});var F=s(f);u=i(F,"Module"),F.forEach(o),v=i(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(o)},m(d,m){g(d,c,m),e(c,y),e(c,f),e(f,u),e(c,v)},d(d){d&&o(c)}}}function Sc(W){let c,y,f,u,v;return u=new sn({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(u.$$.fragment)},l(d){c=r(d,"P",{});var m=s(c);y=i(m,"Example:"),m.forEach(o),f=h(d),k(u.$$.fragment,d)},m(d,m){g(d,c,m),e(c,y),g(d,f,m),w(u,d,m),v=!0},p:rn,i(d){v||(T(u.$$.fragment,d),v=!0)},o(d){$(u.$$.fragment,d),v=!1},d(d){d&&o(c),d&&o(f),x(u,d)}}}function Ic(W){let c,y,f,u,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"),u=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 m=s(c);y=i(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=r(m,"CODE",{});var F=s(f);u=i(F,"Module"),F.forEach(o),v=i(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(o)},m(d,m){g(d,c,m),e(c,y),e(c,f),e(f,u),e(c,v)},d(d){d&&o(c)}}}function Lc(W){let c,y,f,u,v;return u=new sn({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_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">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_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("Example:"),f=p(),b(u.$$.fragment)},l(d){c=r(d,"P",{});var m=s(c);y=i(m,"Example:"),m.forEach(o),f=h(d),k(u.$$.fragment,d)},m(d,m){g(d,c,m),e(c,y),g(d,f,m),w(u,d,m),v=!0},p:rn,i(d){v||(T(u.$$.fragment,d),v=!0)},o(d){$(u.$$.fragment,d),v=!1},d(d){d&&o(c),d&&o(f),x(u,d)}}}function Oc(W){let c,y,f,u,v,d,m,F,S,M,C,P,j,Y,_o,we,es,tr,Te,ts,it,os,ns,or,go,rs,nr,vo,an,ss,rr,yo,as,sr,B,dn,is,ds,dt,ls,bo,cs,ps,hs,ln,ms,us,lt,fs,ko,_s,gs,ar,H,vs,ct,ys,bs,pt,ks,ws,ht,Ts,$s,ir,ie,$e,cn,mt,xs,pn,Ws,dr,O,ut,Fs,de,zs,wo,qs,Es,ft,Ms,Ps,Cs,le,js,To,Ns,As,$o,Ss,Is,Ls,xe,lr,ce,We,hn,_t,Os,mn,Ds,cr,q,gt,Gs,un,Us,Vs,vt,Rs,xo,Bs,Hs,Ks,ee,yt,Js,fn,Zs,Qs,Fe,Xs,ze,bt,Ys,_n,ea,ta,qe,kt,oa,wt,na,gn,ra,sa,aa,te,Tt,ia,Wo,da,Fo,la,ca,vn,pa,ha,zo,$t,pr,pe,Ee,yn,xt,ma,bn,ua,hr,I,Wt,fa,kn,_a,ga,Ft,va,qo,ya,ba,ka,he,wa,wn,Ta,$a,Tn,xa,Wa,Fa,Me,zt,za,$n,qa,mr,me,Pe,xn,qt,Ea,Wn,Ma,ur,E,Et,Pa,Fn,Ca,ja,L,Eo,Na,Aa,Mo,Sa,Ia,Po,La,Oa,Mt,zn,Da,Ga,Ua,Co,Va,Ra,Ba,Ce,Pt,Ha,D,Ka,qn,Ja,Za,Ct,En,Qa,Xa,Ya,Mn,ei,ti,jt,Pn,oi,ni,ri,si,oe,Nt,ai,Cn,ii,di,je,li,ne,At,ci,St,pi,jo,hi,mi,ui,Ne,fi,Ae,It,_i,Lt,gi,No,vi,yi,bi,Se,Ot,ki,Dt,wi,Ao,Ti,$i,fr,ue,Ie,jn,Gt,xi,Nn,Wi,_r,G,Ut,Fi,Vt,zi,So,qi,Ei,Mi,Rt,Pi,Bt,Ci,ji,Ni,K,Ht,Ai,fe,Si,Io,Ii,Li,An,Oi,Di,Gi,Le,Ui,Oe,gr,_e,De,Sn,Kt,Vi,In,Ri,vr,U,Jt,Bi,Zt,Hi,Lo,Ki,Ji,Zi,Qt,Qi,Xt,Xi,Yi,ed,J,Yt,td,ge,od,Oo,nd,rd,Ln,sd,ad,id,Ge,dd,Ue,yr,ve,Ve,On,eo,ld,Dn,cd,br,V,to,pd,oo,hd,Do,md,ud,fd,no,_d,ro,gd,vd,yd,Z,so,bd,ye,kd,Go,wd,Td,Gn,$d,xd,Wd,Re,Fd,Be,kr,be,He,Un,ao,zd,Vn,qd,wr,R,io,Ed,lo,Md,Uo,Pd,Cd,jd,co,Nd,po,Ad,Sd,Id,Q,ho,Ld,ke,Od,Vo,Dd,Gd,Rn,Ud,Vd,Rd,Ke,Bd,Je,Tr;return d=new ae({}),Y=new ae({}),mt=new ae({}),ut=new z({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:"tie_word_embeddings",val:" = True"},{name:"suppress_tokens",val:" = None"},{name:"begin_suppress_tokens",val:" = [220, 50256]"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.WhisperConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 51865) &#x2014;
Vocabulary size of the Whisper model. Defines the number of different tokens that can be represented by the
<code>decoder_input_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperModel">WhisperModel</a>`,name:"vocab_size"},{anchor:"transformers.WhisperConfig.num_mel_bins",description:`<strong>num_mel_bins</strong> (<code>int</code>, <em>optional</em>, defaults to 80) &#x2014;
Number of mel features used per input features. Should correspond to the value used in the
<code>WhisperProcessor</code> class.`,name:"num_mel_bins"},{anchor:"transformers.WhisperConfig.encoder_layers",description:`<strong>encoder_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 6) &#x2014;
Number of encoder layers.`,name:"encoder_layers"},{anchor:"transformers.WhisperConfig.decoder_layers",description:`<strong>decoder_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 6) &#x2014;
Number of decoder layers.`,name:"decoder_layers"},{anchor:"transformers.WhisperConfig.encoder_attention_heads",description:`<strong>encoder_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"encoder_attention_heads"},{anchor:"transformers.WhisperConfig.decoder_attention_heads",description:`<strong>decoder_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
Number of attention heads for each attention layer in the Transformer decoder.`,name:"decoder_attention_heads"},{anchor:"transformers.WhisperConfig.encoder_ffn_dim",description:`<strong>encoder_ffn_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 1536) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in encoder.`,name:"encoder_ffn_dim"},{anchor:"transformers.WhisperConfig.decoder_ffn_dim",description:`<strong>decoder_ffn_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 1536) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in decoder.`,name:"decoder_ffn_dim"},{anchor:"transformers.WhisperConfig.encoder_layerdrop",description:`<strong>encoder_layerdrop</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The LayerDrop probability for the encoder. See the [LayerDrop paper](see <a href="https://arxiv.org/abs/1909.11556" rel="nofollow">https://arxiv.org/abs/1909.11556</a>)
for more details.`,name:"encoder_layerdrop"},{anchor:"transformers.WhisperConfig.decoder_layerdrop",description:`<strong>decoder_layerdrop</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The LayerDrop probability for the decoder. See the [LayerDrop paper](see <a href="https://arxiv.org/abs/1909.11556" rel="nofollow">https://arxiv.org/abs/1909.11556</a>)
for more details.`,name:"decoder_layerdrop"},{anchor:"transformers.WhisperConfig.decoder_start_token_id",description:`<strong>decoder_start_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 50257) &#x2014;
Corresponds to the &#x201D;&lt;|startoftranscript|&gt;&#x201D; token, which is automatically used when no <code>decoder_input_ids</code>
are provided to the <code>generate</code> function. It is used to guide the model\`s generation process depending on
the task.`,name:"decoder_start_token_id"},{anchor:"transformers.WhisperConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models).`,name:"use_cache"},{anchor:"transformers.WhisperConfig.is_encoder_decoder",description:`<strong>is_encoder_decoder</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether the model is used as an encoder/decoder or not.`,name:"is_encoder_decoder"},{anchor:"transformers.WhisperConfig.activation_function",description:`<strong>activation_function</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;silu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"activation_function"},{anchor:"transformers.WhisperConfig.d_model",description:`<strong>d_model</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Dimensionality of the layers.`,name:"d_model"},{anchor:"transformers.WhisperConfig.dropout",description:`<strong>dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"dropout"},{anchor:"transformers.WhisperConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.WhisperConfig.activation_dropout",description:`<strong>activation_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for activations inside the fully connected layer.`,name:"activation_dropout"},{anchor:"transformers.WhisperConfig.init_std",description:`<strong>init_std</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"init_std"},{anchor:"transformers.WhisperConfig.scale_embedding",description:`<strong>scale_embedding</strong> (<code>bool</code>, <em>optional</em>, defaults to False) &#x2014;
Scale embeddings by diving by sqrt(d_model).`,name:"scale_embedding"},{anchor:"transformers.WhisperConfig.max_source_positions",description:`<strong>max_source_positions</strong> (<code>int</code>, <em>optional</em>, defaults to 1500) &#x2014;
The maximum sequence length of log-mel filter-bank features that this model might ever be used with.`,name:"max_source_positions"},{anchor:"transformers.WhisperConfig.max_target_positions",description:`<strong>max_target_positions</strong> (<code>int</code>, <em>optional</em>, defaults to 448) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"max_target_positions"},{anchor:"transformers.WhisperConfig.pad_token_id",description:`<strong>pad_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 50256) &#x2014;
Padding token id.`,name:"pad_token_id"},{anchor:"transformers.WhisperConfig.bos_token_id",description:`<strong>bos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 50256) &#x2014;
Begin of stream token id.`,name:"bos_token_id"},{anchor:"transformers.WhisperConfig.eos_token_id",description:`<strong>eos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 50257) &#x2014;
End of stream token id.`,name:"eos_token_id"},{anchor:"transformers.WhisperConfig.tie_word_embeddings",description:`<strong>tie_word_embeddings</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to tie input and output embeddings.`,name:"tie_word_embeddings"},{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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/configuration_whisper.py#L62"}}),xe=new nn({props:{anchor:"transformers.WhisperConfig.example",$$slots:{default:[zc]},$$scope:{ctx:W}}}),_t=new ae({}),gt=new z({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/main/src/transformers/models/whisper/tokenization_whisper.py#L215"}}),yt=new z({props:{name:"set_prefix_tokens",anchor:"transformers.WhisperTokenizer.set_prefix_tokens",parameters:[{name:"language",val:": str = None"},{name:"task",val:": str = None"},{name:"predict_timestamps",val:": bool = None"}],parametersDescription:[{anchor:"transformers.WhisperTokenizer.set_prefix_tokens.language",description:`<strong>language</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The language of the transcription text.`,name:"language"},{anchor:"transformers.WhisperTokenizer.set_prefix_tokens.task",description:`<strong>task</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Task identifier to append at the start of sequence (if any).`,name:"task"},{anchor:"transformers.WhisperTokenizer.set_prefix_tokens.predict_timestamps",description:`<strong>predict_timestamps</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Whether to omit the <code>&lt;|notimestamps|&gt;</code> token at the start of the sequence.`,name:"predict_timestamps"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/tokenization_whisper.py#L367"}}),Fe=new nn({props:{anchor:"transformers.WhisperTokenizer.set_prefix_tokens.example",$$slots:{default:[qc]},$$scope:{ctx:W}}}),bt=new z({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.WhisperTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:""},{name:"token_ids_1",val:" = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/tokenization_whisper.py#L427"}}),kt=new z({props:{name:"get_special_tokens_mask",anchor:"transformers.WhisperTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.WhisperTokenizer.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.WhisperTokenizer.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"},{anchor:"transformers.WhisperTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/tokenization_whisper.py#L435",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>
`}}),Tt=new z({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.WhisperTokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.WhisperTokenizer.create_token_type_ids_from_sequences.token_ids_0",description:"<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014; The first tokenized sequence.",name:"token_ids_0"},{anchor:"transformers.WhisperTokenizer.create_token_type_ids_from_sequences.token_ids_1",description:"<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014; The second tokenized sequence.",name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils_base.py#L3026",returnDescription:`
<p>The token type ids.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),$t=new z({props:{name:"save_vocabulary",anchor:"transformers.WhisperTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/tokenization_whisper.py#L645"}}),xt=new ae({}),Wt=new z({props:{name:"class transformers.WhisperFeatureExtractor",anchor:"transformers.WhisperFeatureExtractor",parameters:[{name:"feature_size",val:" = 80"},{name:"sampling_rate",val:" = 16000"},{name:"hop_length",val:" = 160"},{name:"chunk_length",val:" = 30"},{name:"n_fft",val:" = 400"},{name:"padding_value",val:" = 0.0"},{name:"return_attention_mask",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.WhisperFeatureExtractor.feature_size",description:`<strong>feature_size</strong> (<code>int</code>, defaults to 80) &#x2014;
The feature dimension of the extracted features.`,name:"feature_size"},{anchor:"transformers.WhisperFeatureExtractor.sampling_rate",description:`<strong>sampling_rate</strong> (<code>int</code>, defaults to 16000) &#x2014;
The sampling rate at which the audio files should be digitalized expressed in hertz (Hz).`,name:"sampling_rate"},{anchor:"transformers.WhisperFeatureExtractor.hop_length",description:`<strong>hop_length</strong> (<code>int</code>, defaults to 160) &#x2014;
Length of the overlaping windows for the STFT used to obtain the Mel Frequency coefficients.`,name:"hop_length"},{anchor:"transformers.WhisperFeatureExtractor.chunk_length",description:`<strong>chunk_length</strong> (<code>int</code>, defaults to 30) &#x2014;
The maximum number of chuncks of <code>sampling_rate</code> samples used to trim and pad longer or shorter audio
sequences.`,name:"chunk_length"},{anchor:"transformers.WhisperFeatureExtractor.n_fft",description:`<strong>n_fft</strong> (<code>int</code>, defaults to 400) &#x2014;
Size of the Fourier transform.`,name:"n_fft"},{anchor:"transformers.WhisperFeatureExtractor.padding_value",description:`<strong>padding_value</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Padding value used to pad the audio. Should correspond to silences.`,name:"padding_value"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/feature_extraction_whisper.py#L32"}}),zt=new z({props:{name:"__call__",anchor:"transformers.WhisperFeatureExtractor.__call__",parameters:[{name:"raw_speech",val:": typing.Union[numpy.ndarray, typing.List[float], typing.List[numpy.ndarray], typing.List[typing.List[float]]]"},{name:"truncation",val:": bool = True"},{name:"pad_to_multiple_of",val:": typing.Optional[int] = None"},{name:"return_tensors",val:": typing.Union[transformers.utils.generic.TensorType, str, NoneType] = None"},{name:"return_attention_mask",val:": typing.Optional[bool] = None"},{name:"padding",val:": typing.Optional[str] = 'max_length'"},{name:"max_length",val:": typing.Optional[int] = None"},{name:"sampling_rate",val:": typing.Optional[int] = None"},{name:"**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/main/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>) &#x2014;
If set, will return tensors instead of list of python integers. Acceptable values are:</p>
<ul>
<li><code>&apos;tf&apos;</code>: Return TensorFlow <code>tf.constant</code> objects.</li>
<li><code>&apos;pt&apos;</code>: Return PyTorch <code>torch.Tensor</code> objects.</li>
<li><code>&apos;np&apos;</code>: Return Numpy <code>np.ndarray</code> objects.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.WhisperFeatureExtractor.__call__.sampling_rate",description:`<strong>sampling_rate</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The sampling rate at which the <code>raw_speech</code> input was sampled. It is strongly recommended to pass
<code>sampling_rate</code> at the forward call to prevent silent errors and allow automatic speech recognition
pipeline.`,name:"sampling_rate"},{anchor:"transformers.WhisperFeatureExtractor.__call__.padding_value",description:`<strong>padding_value</strong> (<code>float</code>, defaults to 0.0) &#x2014;
The value that is used to fill the padding values / vectors.`,name:"padding_value"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/feature_extraction_whisper.py#L218"}}),qt=new ae({}),Et=new z({props:{name:"class transformers.WhisperProcessor",anchor:"transformers.WhisperProcessor",parameters:[{name:"feature_extractor",val:""},{name:"tokenizer",val:""}],parametersDescription:[{anchor:"transformers.WhisperProcessor.feature_extractor",description:`<strong>feature_extractor</strong> (<code>WhisperFeatureExtractor</code>) &#x2014;
An instance of <a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperFeatureExtractor">WhisperFeatureExtractor</a>. The feature extractor is a required input.`,name:"feature_extractor"},{anchor:"transformers.WhisperProcessor.tokenizer",description:`<strong>tokenizer</strong> (<code>WhisperTokenizer</code>) &#x2014;
An instance of <a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperTokenizer">WhisperTokenizer</a>. The tokenizer is a required input.`,name:"tokenizer"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/processing_whisper.py#L22"}}),Pt=new z({props:{name:"__call__",anchor:"transformers.WhisperProcessor.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/processing_whisper.py#L47"}}),Nt=new z({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/main/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.save_pretrained">save_pretrained()</a> method, e.g., <code>./my_model_directory/</code>.</li>
<li>a path or url to a saved feature extractor JSON <em>file</em>, e.g.,
<code>./my_model_directory/preprocessor_config.json</code>.
**kwargs &#x2014;
Additional keyword arguments passed along to both
<a href="/docs/transformers/main/en/main_classes/feature_extractor#transformers.FeatureExtractionMixin.from_pretrained">from_pretrained()</a> and
<code>~tokenization_utils_base.PreTrainedTokenizer.from_pretrained</code>.</li>
</ul>`,name:"pretrained_model_name_or_path"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/processing_utils.py#L157"}}),je=new on({props:{$$slots:{default:[Ec]},$$scope:{ctx:W}}}),At=new z({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/main/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/main/src/transformers/processing_utils.py#L95"}}),Ne=new on({props:{$$slots:{default:[Mc]},$$scope:{ctx:W}}}),It=new z({props:{name:"batch_decode",anchor:"transformers.WhisperProcessor.batch_decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/processing_whisper.py#L81"}}),Ot=new z({props:{name:"decode",anchor:"transformers.WhisperProcessor.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/processing_whisper.py#L88"}}),Gt=new ae({}),Ut=new z({props:{name:"class transformers.WhisperModel",anchor:"transformers.WhisperModel",parameters:[{name:"config",val:": WhisperConfig"}],parametersDescription:[{anchor:"transformers.WhisperModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperConfig">WhisperConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/modeling_whisper.py#L975"}}),Ht=new z({props:{name:"forward",anchor:"transformers.WhisperModel.forward",parameters:[{name:"input_features",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_outputs",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"decoder_inputs_embeds",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.WhisperModel.forward.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, feature_size, sequence_length)</code>) &#x2014;
Float values mel features extracted from the raw speech waveform. Raw speech waveform can be obtained by
loading a <code>.flac</code> or <code>.wav</code> audio file into an array of type <code>List[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em> via
the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_features</code>, the
<a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoFeatureExtractor">AutoFeatureExtractor</a> should be used for extracting the mel features, padding and conversion into a
tensor of type <code>torch.FloatTensor</code>. See <a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperFeatureExtractor.__call__"><strong>call</strong>()</a>`,name:"input_features"},{anchor:"transformers.WhisperModel.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperTokenizer">WhisperTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>Whisper uses the <code>decoder_start_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).`,name:"decoder_input_ids"},{anchor:"transformers.WhisperModel.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.</p>
<p>If you want to change padding behavior, you should read
<code>modeling_whisper._prepare_decoder_attention_mask</code> and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the BART
paper</a> for more information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.WhisperModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.WhisperModel.forward.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.WhisperModel.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.WhisperModel.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.WhisperModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.WhisperModel.forward.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.`,name:"decoder_inputs_embeds"},{anchor:"transformers.WhisperModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.WhisperModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.WhisperModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.WhisperModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/modeling_whisper.py#L1005",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqModelOutput"
>transformers.modeling_outputs.Seq2SeqModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperConfig"
>WhisperConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the decoder of the model.</p>
<p>If <code>past_key_values</code> is used only the last hidden-state of the sequences of shape <code>(batch_size, 1, hidden_size)</code> is output.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqModelOutput"
>transformers.modeling_outputs.Seq2SeqModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Le=new on({props:{$$slots:{default:[Pc]},$$scope:{ctx:W}}}),Oe=new nn({props:{anchor:"transformers.WhisperModel.forward.example",$$slots:{default:[Cc]},$$scope:{ctx:W}}}),Kt=new ae({}),Jt=new z({props:{name:"class transformers.WhisperForConditionalGeneration",anchor:"transformers.WhisperForConditionalGeneration",parameters:[{name:"config",val:": WhisperConfig"}],parametersDescription:[{anchor:"transformers.WhisperForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperConfig">WhisperConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/modeling_whisper.py#L1099"}}),Yt=new z({props:{name:"forward",anchor:"transformers.WhisperForConditionalGeneration.forward",parameters:[{name:"input_features",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_outputs",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"decoder_inputs_embeds",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.WhisperForConditionalGeneration.forward.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, feature_size, sequence_length)</code>) &#x2014;
Float values mel features extracted from the raw speech waveform. Raw speech waveform can be obtained by
loading a <code>.flac</code> or <code>.wav</code> audio file into an array of type <code>List[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em> via
the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_features</code>, the
<a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoFeatureExtractor">AutoFeatureExtractor</a> should be used for extracting the mel features, padding and conversion into a
tensor of type <code>torch.FloatTensor</code>. See <a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperFeatureExtractor.__call__"><strong>call</strong>()</a>`,name:"input_features"},{anchor:"transformers.WhisperForConditionalGeneration.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperTokenizer">WhisperTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>Whisper uses the <code>decoder_start_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).`,name:"decoder_input_ids"},{anchor:"transformers.WhisperForConditionalGeneration.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.</p>
<p>If you want to change padding behavior, you should read
<code>modeling_whisper._prepare_decoder_attention_mask</code> and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the BART
paper</a> for more information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.WhisperForConditionalGeneration.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.WhisperForConditionalGeneration.forward.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.WhisperForConditionalGeneration.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.WhisperForConditionalGeneration.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.WhisperForConditionalGeneration.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.WhisperForConditionalGeneration.forward.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.`,name:"decoder_inputs_embeds"},{anchor:"transformers.WhisperForConditionalGeneration.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.WhisperForConditionalGeneration.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.WhisperForConditionalGeneration.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.WhisperForConditionalGeneration.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.WhisperForConditionalGeneration.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the language modeling loss. Indices should either be in <code>[0, ..., config.vocab_size]</code>
or -100 (see <code>input_ids</code> docstring). Tokens with indices set to <code>-100</code> are ignored (masked), the loss is
only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/modeling_whisper.py#L1141",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperConfig"
>WhisperConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Language modeling loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ge=new on({props:{$$slots:{default:[jc]},$$scope:{ctx:W}}}),Ue=new nn({props:{anchor:"transformers.WhisperForConditionalGeneration.forward.example",$$slots:{default:[Nc]},$$scope:{ctx:W}}}),eo=new ae({}),to=new z({props:{name:"class transformers.TFWhisperModel",anchor:"transformers.TFWhisperModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFWhisperModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperConfig">WhisperConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/modeling_tf_whisper.py#L1102"}}),so=new z({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/main/en/model_doc/auto#transformers.AutoFeatureExtractor">AutoFeatureExtractor</a> should be used for extracting the fbank features, padding and conversion into a
tensor of type <code>tf.Tensor</code>. See <a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperFeatureExtractor.__call__"><strong>call</strong>()</a>`,name:"input_features"},{anchor:"transformers.TFWhisperModel.call.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <code>SpeechToTextTokenizer</code>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>SpeechToText uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).`,name:"decoder_input_ids"},{anchor:"transformers.TFWhisperModel.call.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.</p>
<p>If you want to change padding behavior, you should read
<code>modeling_whisper._prepare_decoder_attention_mask</code> and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the
paper</a> for more information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.TFWhisperModel.call.head_mask",description:`<strong>head_mask</strong> (<code>tf.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFWhisperModel.call.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>tf.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.TFWhisperModel.call.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>tf.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.TFWhisperModel.call.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(tf.Tensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.TFWhisperModel.call.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(tf.Tensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(tf.Tensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.TFWhisperModel.call.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.`,name:"decoder_inputs_embeds"},{anchor:"transformers.TFWhisperModel.call.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.TFWhisperModel.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.TFWhisperModel.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.TFWhisperModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/modeling_tf_whisper.py#L1126",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqModelOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperConfig"
>WhisperConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the decoder of the model.</p>
<p>If <code>past_key_values</code> is used only the last hidden-state of the sequences of shape <code>(batch_size, 1, hidden_size)</code> is output.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</code>).</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) of the decoder that can be
used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqModelOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Re=new on({props:{$$slots:{default:[Ac]},$$scope:{ctx:W}}}),Be=new nn({props:{anchor:"transformers.TFWhisperModel.call.example",$$slots:{default:[Sc]},$$scope:{ctx:W}}}),ao=new ae({}),io=new z({props:{name:"class transformers.TFWhisperForConditionalGeneration",anchor:"transformers.TFWhisperForConditionalGeneration",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFWhisperForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperConfig">WhisperConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/modeling_tf_whisper.py#L1210"}}),ho=new z({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/main/en/model_doc/auto#transformers.AutoFeatureExtractor">AutoFeatureExtractor</a> should be used for extracting the fbank features, padding and conversion into a
tensor of type <code>tf.Tensor</code>. See <a href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperFeatureExtractor.__call__"><strong>call</strong>()</a>`,name:"input_features"},{anchor:"transformers.TFWhisperForConditionalGeneration.call.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <code>SpeechToTextTokenizer</code>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>SpeechToText uses the <code>eos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).`,name:"decoder_input_ids"},{anchor:"transformers.TFWhisperForConditionalGeneration.call.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.</p>
<p>If you want to change padding behavior, you should read
<code>modeling_whisper._prepare_decoder_attention_mask</code> and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the
paper</a> for more information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.TFWhisperForConditionalGeneration.call.head_mask",description:`<strong>head_mask</strong> (<code>tf.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFWhisperForConditionalGeneration.call.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>tf.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.TFWhisperForConditionalGeneration.call.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>tf.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.TFWhisperForConditionalGeneration.call.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(tf.Tensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.TFWhisperForConditionalGeneration.call.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(tf.Tensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(tf.Tensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.TFWhisperForConditionalGeneration.call.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.`,name:"decoder_inputs_embeds"},{anchor:"transformers.TFWhisperForConditionalGeneration.call.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.TFWhisperForConditionalGeneration.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.TFWhisperForConditionalGeneration.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.TFWhisperForConditionalGeneration.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.TFWhisperForConditionalGeneration.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the language modeling loss. Indices should either be in <code>[0, ..., config.vocab_size]</code>
or -100 (see <code>input_ids</code> docstring). Tokens with indices set to <code>-100</code> are ignored (masked), the loss is
only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/whisper/modeling_tf_whisper.py#L1241",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqLMOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqLMOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/whisper#transformers.WhisperConfig"
>WhisperConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of non-masked labels, returned when <code>labels</code> is provided) \u2014 Language modeling loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</code>).</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) of the decoder that can be
used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqLMOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Ke=new on({props:{$$slots:{default:[Ic]},$$scope:{ctx:W}}}),Je=new nn({props:{anchor:"transformers.TFWhisperForConditionalGeneration.call.example",$$slots:{default:[Lc]},$$scope:{ctx:W}}}),{c(){c=n("meta"),y=p(),f=n("h1"),u=n("a"),v=n("span"),b(d.$$.fragment),m=p(),F=n("span"),S=a("Whisper"),M=p(),C=n("h2"),P=n("a"),j=n("span"),b(Y.$$.fragment),_o=p(),we=n("span"),es=a("Overview"),tr=p(),Te=n("p"),ts=a("The Whisper model was proposed in "),it=n("a"),os=a("Robust Speech Recognition via Large-Scale Weak Supervision"),ns=a(" by Alec Radford, Jong Wook Kim, Tao Xu, Greg Brockman, Christine McLeavey, Ilya Sutskever."),or=p(),go=n("p"),rs=a("The abstract from the paper is the following:"),nr=p(),vo=n("p"),an=n("em"),ss=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."),rr=p(),yo=n("p"),as=a("Tips:"),sr=p(),B=n("ul"),dn=n("li"),is=a("The model usually performs well without requiring any finetuning."),ds=p(),dt=n("li"),ls=a("The architecture follows a classic encoder-decoder architecture, which means that it relies on the "),bo=n("a"),cs=a("generate()"),ps=a(" function for inference."),hs=p(),ln=n("li"),ms=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."),us=p(),lt=n("li"),fs=a("One can use "),ko=n("a"),_s=a("WhisperProcessor"),gs=a(" to prepare audio for the model, and decode the predicted ID\u2019s back into text."),ar=p(),H=n("p"),vs=a("This model was contributed by "),ct=n("a"),ys=a("Arthur Zucker"),bs=a(". The Tensorflow version of this model was contributed by "),pt=n("a"),ks=a("amyeroberts"),ws=a(`.
The original code can be found `),ht=n("a"),Ts=a("here"),$s=a("."),ir=p(),ie=n("h2"),$e=n("a"),cn=n("span"),b(mt.$$.fragment),xs=p(),pn=n("span"),Ws=a("WhisperConfig"),dr=p(),O=n("div"),b(ut.$$.fragment),Fs=p(),de=n("p"),zs=a("This is the configuration class to store the configuration of a "),wo=n("a"),qs=a("WhisperModel"),Es=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
`),ft=n("a"),Ms=a("openai/whisper-tiny"),Ps=a(" architecture."),Cs=p(),le=n("p"),js=a("Configuration objects inherit from "),To=n("a"),Ns=a("PretrainedConfig"),As=a(` and can be used to control the model outputs. Read the
documentation from `),$o=n("a"),Ss=a("PretrainedConfig"),Is=a(" for more information."),Ls=p(),b(xe.$$.fragment),lr=p(),ce=n("h2"),We=n("a"),hn=n("span"),b(_t.$$.fragment),Os=p(),mn=n("span"),Ds=a("WhisperTokenizer"),cr=p(),q=n("div"),b(gt.$$.fragment),Gs=p(),un=n("p"),Us=a("Construct a Whisper tokenizer."),Vs=p(),vt=n("p"),Rs=a("This tokenizer inherits from "),xo=n("a"),Bs=a("PreTrainedTokenizer"),Hs=a(` which contains some of the main methods. Users should refer to
the superclass for more information regarding such methods.`),Ks=p(),ee=n("div"),b(yt.$$.fragment),Js=p(),fn=n("p"),Zs=a("Override the prefix tokens appended to the start of the label sequence. This method can be used standalone to"),Qs=p(),b(Fe.$$.fragment),Xs=p(),ze=n("div"),b(bt.$$.fragment),Ys=p(),_n=n("p"),ea=a("Build model inputs from a sequence by appending eos_token_id."),ta=p(),qe=n("div"),b(kt.$$.fragment),oa=p(),wt=n("p"),na=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 `),gn=n("code"),ra=a("prepare_for_model"),sa=a(" method."),aa=p(),te=n("div"),b(Tt.$$.fragment),ia=p(),Wo=n("p"),da=a("Create the token type IDs corresponding to the sequences passed. "),Fo=n("a"),la=a(`What are token type
IDs?`),ca=p(),vn=n("p"),pa=a("Should be overridden in a subclass if the model has a special way of building those."),ha=p(),zo=n("div"),b($t.$$.fragment),pr=p(),pe=n("h2"),Ee=n("a"),yn=n("span"),b(xt.$$.fragment),ma=p(),bn=n("span"),ua=a("WhisperFeatureExtractor"),hr=p(),I=n("div"),b(Wt.$$.fragment),fa=p(),kn=n("p"),_a=a("Constructs a Whisper feature extractor."),ga=p(),Ft=n("p"),va=a("This feature extractor inherits from "),qo=n("a"),ya=a("WhisperFeatureExtractor"),ba=a(` which contains most of the main methods. Users
should refer to this superclass for more information regarding those methods.`),ka=p(),he=n("p"),wa=a("This class extracts mel-filter bank features from raw speech using a custom numpy implementation of the "),wn=n("code"),Ta=a("Short Time Fourier Transform"),$a=a(" which should match pytorch\u2019s "),Tn=n("code"),xa=a("torch.stft"),Wa=a(" equivalent."),Fa=p(),Me=n("div"),b(zt.$$.fragment),za=p(),$n=n("p"),qa=a("Main method to featurize and prepare for the model one or several sequence(s)."),mr=p(),me=n("h2"),Pe=n("a"),xn=n("span"),b(qt.$$.fragment),Ea=p(),Wn=n("span"),Ma=a("WhisperProcessor"),ur=p(),E=n("div"),b(Et.$$.fragment),Pa=p(),Fn=n("p"),Ca=a(`Constructs a Whisper processor which wraps a Whisper feature extractor and a Whisper tokenizer into a single
processor.`),ja=p(),L=n("p"),Eo=n("a"),Na=a("WhisperProcessor"),Aa=a(" offers all the functionalities of "),Mo=n("a"),Sa=a("WhisperFeatureExtractor"),Ia=a(" and "),Po=n("a"),La=a("WhisperTokenizer"),Oa=a(`. See
the `),Mt=n("a"),zn=n("strong"),Da=a("call"),Ga=a("()"),Ua=a(" and "),Co=n("a"),Va=a("decode()"),Ra=a(" for more information."),Ba=p(),Ce=n("div"),b(Pt.$$.fragment),Ha=p(),D=n("p"),Ka=a("Forwards the "),qn=n("code"),Ja=a("audio"),Za=a(" argument to WhisperFeatureExtractor\u2019s "),Ct=n("a"),En=n("strong"),Qa=a("call"),Xa=a("()"),Ya=a(" and the "),Mn=n("code"),ei=a("text"),ti=a(`
argument to `),jt=n("a"),Pn=n("strong"),oi=a("call"),ni=a("()"),ri=a(`. Please refer to the doctsring of the above two methods for more
information.`),si=p(),oe=n("div"),b(Nt.$$.fragment),ai=p(),Cn=n("p"),ii=a("Instantiate a processor associated with a pretrained model."),di=p(),b(je.$$.fragment),li=p(),ne=n("div"),b(At.$$.fragment),ci=p(),St=n("p"),pi=a(`Saves the attributes of this processor (feature extractor, tokenizer\u2026) in the specified directory so that it
can be reloaded using the `),jo=n("a"),hi=a("from_pretrained()"),mi=a(" method."),ui=p(),b(Ne.$$.fragment),fi=p(),Ae=n("div"),b(It.$$.fragment),_i=p(),Lt=n("p"),gi=a("This method forwards all its arguments to WhisperTokenizer\u2019s "),No=n("a"),vi=a("batch_decode()"),yi=a(`. Please
refer to the docstring of this method for more information.`),bi=p(),Se=n("div"),b(Ot.$$.fragment),ki=p(),Dt=n("p"),wi=a("This method forwards all its arguments to WhisperTokenizer\u2019s "),Ao=n("a"),Ti=a("decode()"),$i=a(`. Please refer to
the docstring of this method for more information.`),fr=p(),ue=n("h2"),Ie=n("a"),jn=n("span"),b(Gt.$$.fragment),xi=p(),Nn=n("span"),Wi=a("WhisperModel"),_r=p(),G=n("div"),b(Ut.$$.fragment),Fi=p(),Vt=n("p"),zi=a(`The bare Whisper Model outputting raw hidden-states without any specific head on top.
This model inherits from `),So=n("a"),qi=a("PreTrainedModel"),Ei=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.)`),Mi=p(),Rt=n("p"),Pi=a("This model is also a PyTorch "),Bt=n("a"),Ci=a("torch.nn.Module"),ji=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ni=p(),K=n("div"),b(Ht.$$.fragment),Ai=p(),fe=n("p"),Si=a("The "),Io=n("a"),Ii=a("WhisperModel"),Li=a(" forward method, overrides the "),An=n("code"),Oi=a("__call__"),Di=a(" special method."),Gi=p(),b(Le.$$.fragment),Ui=p(),b(Oe.$$.fragment),gr=p(),_e=n("h2"),De=n("a"),Sn=n("span"),b(Kt.$$.fragment),Vi=p(),In=n("span"),Ri=a("WhisperForConditionalGeneration"),vr=p(),U=n("div"),b(Jt.$$.fragment),Bi=p(),Zt=n("p"),Hi=a(`The Whisper Model with a language modeling head. Can be used for automatic speech recognition.
This model inherits from `),Lo=n("a"),Ki=a("PreTrainedModel"),Ji=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.)`),Zi=p(),Qt=n("p"),Qi=a("This model is also a PyTorch "),Xt=n("a"),Xi=a("torch.nn.Module"),Yi=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ed=p(),J=n("div"),b(Yt.$$.fragment),td=p(),ge=n("p"),od=a("The "),Oo=n("a"),nd=a("WhisperForConditionalGeneration"),rd=a(" forward method, overrides the "),Ln=n("code"),sd=a("__call__"),ad=a(" special method."),id=p(),b(Ge.$$.fragment),dd=p(),b(Ue.$$.fragment),yr=p(),ve=n("h2"),Ve=n("a"),On=n("span"),b(eo.$$.fragment),ld=p(),Dn=n("span"),cd=a("TFWhisperModel"),br=p(),V=n("div"),b(to.$$.fragment),pd=p(),oo=n("p"),hd=a(`The bare Whisper Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Do=n("a"),md=a("TFPreTrainedModel"),ud=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.)`),fd=p(),no=n("p"),_d=a("This model is also a "),ro=n("a"),gd=a("tf.keras.Model"),vd=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.`),yd=p(),Z=n("div"),b(so.$$.fragment),bd=p(),ye=n("p"),kd=a("The "),Go=n("a"),wd=a("TFWhisperModel"),Td=a(" forward method, overrides the "),Gn=n("code"),$d=a("__call__"),xd=a(" special method."),Wd=p(),b(Re.$$.fragment),Fd=p(),b(Be.$$.fragment),kr=p(),be=n("h2"),He=n("a"),Un=n("span"),b(ao.$$.fragment),zd=p(),Vn=n("span"),qd=a("TFWhisperForConditionalGeneration"),wr=p(),R=n("div"),b(io.$$.fragment),Ed=p(),lo=n("p"),Md=a(`The Whisper Model with a language modeling head. Can be used for automatic speech recognition.
This model inherits from `),Uo=n("a"),Pd=a("TFPreTrainedModel"),Cd=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.)`),jd=p(),co=n("p"),Nd=a("This model is also a "),po=n("a"),Ad=a("tf.keras.Model"),Sd=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.`),Id=p(),Q=n("div"),b(ho.$$.fragment),Ld=p(),ke=n("p"),Od=a("The "),Vo=n("a"),Dd=a("TFWhisperForConditionalGeneration"),Gd=a(" forward method, overrides the "),Rn=n("code"),Ud=a("__call__"),Vd=a(" special method."),Rd=p(),b(Ke.$$.fragment),Bd=p(),b(Je.$$.fragment),this.h()},l(t){const _=Wc('[data-svelte="svelte-1phssyn"]',document.head);c=r(_,"META",{name:!0,content:!0}),_.forEach(o),y=h(t),f=r(t,"H1",{class:!0});var mo=s(f);u=r(mo,"A",{id:!0,class:!0,href:!0});var Bn=s(u);v=r(Bn,"SPAN",{});var Hn=s(v);k(d.$$.fragment,Hn),Hn.forEach(o),Bn.forEach(o),m=h(mo),F=r(mo,"SPAN",{});var Kn=s(F);S=i(Kn,"Whisper"),Kn.forEach(o),mo.forEach(o),M=h(t),C=r(t,"H2",{class:!0});var uo=s(C);P=r(uo,"A",{id:!0,class:!0,href:!0});var Jn=s(P);j=r(Jn,"SPAN",{});var Zn=s(j);k(Y.$$.fragment,Zn),Zn.forEach(o),Jn.forEach(o),_o=h(uo),we=r(uo,"SPAN",{});var Qn=s(we);es=i(Qn,"Overview"),Qn.forEach(o),uo.forEach(o),tr=h(t),Te=r(t,"P",{});var fo=s(Te);ts=i(fo,"The Whisper model was proposed in "),it=r(fo,"A",{href:!0,rel:!0});var Xn=s(it);os=i(Xn,"Robust Speech Recognition via Large-Scale Weak Supervision"),Xn.forEach(o),ns=i(fo," by Alec Radford, Jong Wook Kim, Tao Xu, Greg Brockman, Christine McLeavey, Ilya Sutskever."),fo.forEach(o),or=h(t),go=r(t,"P",{});var Yn=s(go);rs=i(Yn,"The abstract from the paper is the following:"),Yn.forEach(o),nr=h(t),vo=r(t,"P",{});var er=s(vo);an=r(er,"EM",{});var Qd=s(an);ss=i(Qd,"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."),Qd.forEach(o),er.forEach(o),rr=h(t),yo=r(t,"P",{});var Xd=s(yo);as=i(Xd,"Tips:"),Xd.forEach(o),sr=h(t),B=r(t,"UL",{});var Ze=s(B);dn=r(Ze,"LI",{});var Yd=s(dn);is=i(Yd,"The model usually performs well without requiring any finetuning."),Yd.forEach(o),ds=h(Ze),dt=r(Ze,"LI",{});var $r=s(dt);ls=i($r,"The architecture follows a classic encoder-decoder architecture, which means that it relies on the "),bo=r($r,"A",{href:!0});var el=s(bo);cs=i(el,"generate()"),el.forEach(o),ps=i($r," function for inference."),$r.forEach(o),hs=h(Ze),ln=r(Ze,"LI",{});var tl=s(ln);ms=i(tl,"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."),tl.forEach(o),us=h(Ze),lt=r(Ze,"LI",{});var xr=s(lt);fs=i(xr,"One can use "),ko=r(xr,"A",{href:!0});var ol=s(ko);_s=i(ol,"WhisperProcessor"),ol.forEach(o),gs=i(xr," to prepare audio for the model, and decode the predicted ID\u2019s back into text."),xr.forEach(o),Ze.forEach(o),ar=h(t),H=r(t,"P",{});var Qe=s(H);vs=i(Qe,"This model was contributed by "),ct=r(Qe,"A",{href:!0,rel:!0});var nl=s(ct);ys=i(nl,"Arthur Zucker"),nl.forEach(o),bs=i(Qe,". The Tensorflow version of this model was contributed by "),pt=r(Qe,"A",{href:!0,rel:!0});var rl=s(pt);ks=i(rl,"amyeroberts"),rl.forEach(o),ws=i(Qe,`.
The original code can be found `),ht=r(Qe,"A",{href:!0,rel:!0});var sl=s(ht);Ts=i(sl,"here"),sl.forEach(o),$s=i(Qe,"."),Qe.forEach(o),ir=h(t),ie=r(t,"H2",{class:!0});var Wr=s(ie);$e=r(Wr,"A",{id:!0,class:!0,href:!0});var al=s($e);cn=r(al,"SPAN",{});var il=s(cn);k(mt.$$.fragment,il),il.forEach(o),al.forEach(o),xs=h(Wr),pn=r(Wr,"SPAN",{});var dl=s(pn);Ws=i(dl,"WhisperConfig"),dl.forEach(o),Wr.forEach(o),dr=h(t),O=r(t,"DIV",{class:!0});var Xe=s(O);k(ut.$$.fragment,Xe),Fs=h(Xe),de=r(Xe,"P",{});var Ro=s(de);zs=i(Ro,"This is the configuration class to store the configuration of a "),wo=r(Ro,"A",{href:!0});var ll=s(wo);qs=i(ll,"WhisperModel"),ll.forEach(o),Es=i(Ro,`. 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
`),ft=r(Ro,"A",{href:!0,rel:!0});var cl=s(ft);Ms=i(cl,"openai/whisper-tiny"),cl.forEach(o),Ps=i(Ro," architecture."),Ro.forEach(o),Cs=h(Xe),le=r(Xe,"P",{});var Bo=s(le);js=i(Bo,"Configuration objects inherit from "),To=r(Bo,"A",{href:!0});var pl=s(To);Ns=i(pl,"PretrainedConfig"),pl.forEach(o),As=i(Bo,` and can be used to control the model outputs. Read the
documentation from `),$o=r(Bo,"A",{href:!0});var hl=s($o);Ss=i(hl,"PretrainedConfig"),hl.forEach(o),Is=i(Bo," for more information."),Bo.forEach(o),Ls=h(Xe),k(xe.$$.fragment,Xe),Xe.forEach(o),lr=h(t),ce=r(t,"H2",{class:!0});var Fr=s(ce);We=r(Fr,"A",{id:!0,class:!0,href:!0});var ml=s(We);hn=r(ml,"SPAN",{});var ul=s(hn);k(_t.$$.fragment,ul),ul.forEach(o),ml.forEach(o),Os=h(Fr),mn=r(Fr,"SPAN",{});var fl=s(mn);Ds=i(fl,"WhisperTokenizer"),fl.forEach(o),Fr.forEach(o),cr=h(t),q=r(t,"DIV",{class:!0});var N=s(q);k(gt.$$.fragment,N),Gs=h(N),un=r(N,"P",{});var _l=s(un);Us=i(_l,"Construct a Whisper tokenizer."),_l.forEach(o),Vs=h(N),vt=r(N,"P",{});var zr=s(vt);Rs=i(zr,"This tokenizer inherits from "),xo=r(zr,"A",{href:!0});var gl=s(xo);Bs=i(gl,"PreTrainedTokenizer"),gl.forEach(o),Hs=i(zr,` which contains some of the main methods. Users should refer to
the superclass for more information regarding such methods.`),zr.forEach(o),Ks=h(N),ee=r(N,"DIV",{class:!0});var Ho=s(ee);k(yt.$$.fragment,Ho),Js=h(Ho),fn=r(Ho,"P",{});var vl=s(fn);Zs=i(vl,"Override the prefix tokens appended to the start of the label sequence. This method can be used standalone to"),vl.forEach(o),Qs=h(Ho),k(Fe.$$.fragment,Ho),Ho.forEach(o),Xs=h(N),ze=r(N,"DIV",{class:!0});var qr=s(ze);k(bt.$$.fragment,qr),Ys=h(qr),_n=r(qr,"P",{});var yl=s(_n);ea=i(yl,"Build model inputs from a sequence by appending eos_token_id."),yl.forEach(o),qr.forEach(o),ta=h(N),qe=r(N,"DIV",{class:!0});var Er=s(qe);k(kt.$$.fragment,Er),oa=h(Er),wt=r(Er,"P",{});var Mr=s(wt);na=i(Mr,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),gn=r(Mr,"CODE",{});var bl=s(gn);ra=i(bl,"prepare_for_model"),bl.forEach(o),sa=i(Mr," method."),Mr.forEach(o),Er.forEach(o),aa=h(N),te=r(N,"DIV",{class:!0});var Ko=s(te);k(Tt.$$.fragment,Ko),ia=h(Ko),Wo=r(Ko,"P",{});var Hd=s(Wo);da=i(Hd,"Create the token type IDs corresponding to the sequences passed. "),Fo=r(Hd,"A",{href:!0});var kl=s(Fo);la=i(kl,`What are token type
IDs?`),kl.forEach(o),Hd.forEach(o),ca=h(Ko),vn=r(Ko,"P",{});var wl=s(vn);pa=i(wl,"Should be overridden in a subclass if the model has a special way of building those."),wl.forEach(o),Ko.forEach(o),ha=h(N),zo=r(N,"DIV",{class:!0});var Tl=s(zo);k($t.$$.fragment,Tl),Tl.forEach(o),N.forEach(o),pr=h(t),pe=r(t,"H2",{class:!0});var Pr=s(pe);Ee=r(Pr,"A",{id:!0,class:!0,href:!0});var $l=s(Ee);yn=r($l,"SPAN",{});var xl=s(yn);k(xt.$$.fragment,xl),xl.forEach(o),$l.forEach(o),ma=h(Pr),bn=r(Pr,"SPAN",{});var Wl=s(bn);ua=i(Wl,"WhisperFeatureExtractor"),Wl.forEach(o),Pr.forEach(o),hr=h(t),I=r(t,"DIV",{class:!0});var re=s(I);k(Wt.$$.fragment,re),fa=h(re),kn=r(re,"P",{});var Fl=s(kn);_a=i(Fl,"Constructs a Whisper feature extractor."),Fl.forEach(o),ga=h(re),Ft=r(re,"P",{});var Cr=s(Ft);va=i(Cr,"This feature extractor inherits from "),qo=r(Cr,"A",{href:!0});var zl=s(qo);ya=i(zl,"WhisperFeatureExtractor"),zl.forEach(o),ba=i(Cr,` which contains most of the main methods. Users
should refer to this superclass for more information regarding those methods.`),Cr.forEach(o),ka=h(re),he=r(re,"P",{});var Jo=s(he);wa=i(Jo,"This class extracts mel-filter bank features from raw speech using a custom numpy implementation of the "),wn=r(Jo,"CODE",{});var ql=s(wn);Ta=i(ql,"Short Time Fourier Transform"),ql.forEach(o),$a=i(Jo," which should match pytorch\u2019s "),Tn=r(Jo,"CODE",{});var El=s(Tn);xa=i(El,"torch.stft"),El.forEach(o),Wa=i(Jo," equivalent."),Jo.forEach(o),Fa=h(re),Me=r(re,"DIV",{class:!0});var jr=s(Me);k(zt.$$.fragment,jr),za=h(jr),$n=r(jr,"P",{});var Ml=s($n);qa=i(Ml,"Main method to featurize and prepare for the model one or several sequence(s)."),Ml.forEach(o),jr.forEach(o),re.forEach(o),mr=h(t),me=r(t,"H2",{class:!0});var Nr=s(me);Pe=r(Nr,"A",{id:!0,class:!0,href:!0});var Pl=s(Pe);xn=r(Pl,"SPAN",{});var Cl=s(xn);k(qt.$$.fragment,Cl),Cl.forEach(o),Pl.forEach(o),Ea=h(Nr),Wn=r(Nr,"SPAN",{});var jl=s(Wn);Ma=i(jl,"WhisperProcessor"),jl.forEach(o),Nr.forEach(o),ur=h(t),E=r(t,"DIV",{class:!0});var A=s(E);k(Et.$$.fragment,A),Pa=h(A),Fn=r(A,"P",{});var Nl=s(Fn);Ca=i(Nl,`Constructs a Whisper processor which wraps a Whisper feature extractor and a Whisper tokenizer into a single
processor.`),Nl.forEach(o),ja=h(A),L=r(A,"P",{});var X=s(L);Eo=r(X,"A",{href:!0});var Al=s(Eo);Na=i(Al,"WhisperProcessor"),Al.forEach(o),Aa=i(X," offers all the functionalities of "),Mo=r(X,"A",{href:!0});var Sl=s(Mo);Sa=i(Sl,"WhisperFeatureExtractor"),Sl.forEach(o),Ia=i(X," and "),Po=r(X,"A",{href:!0});var Il=s(Po);La=i(Il,"WhisperTokenizer"),Il.forEach(o),Oa=i(X,`. See
the `),Mt=r(X,"A",{href:!0});var Kd=s(Mt);zn=r(Kd,"STRONG",{});var Ll=s(zn);Da=i(Ll,"call"),Ll.forEach(o),Ga=i(Kd,"()"),Kd.forEach(o),Ua=i(X," and "),Co=r(X,"A",{href:!0});var Ol=s(Co);Va=i(Ol,"decode()"),Ol.forEach(o),Ra=i(X," for more information."),X.forEach(o),Ba=h(A),Ce=r(A,"DIV",{class:!0});var Ar=s(Ce);k(Pt.$$.fragment,Ar),Ha=h(Ar),D=r(Ar,"P",{});var se=s(D);Ka=i(se,"Forwards the "),qn=r(se,"CODE",{});var Dl=s(qn);Ja=i(Dl,"audio"),Dl.forEach(o),Za=i(se," argument to WhisperFeatureExtractor\u2019s "),Ct=r(se,"A",{href:!0});var Jd=s(Ct);En=r(Jd,"STRONG",{});var Gl=s(En);Qa=i(Gl,"call"),Gl.forEach(o),Xa=i(Jd,"()"),Jd.forEach(o),Ya=i(se," and the "),Mn=r(se,"CODE",{});var Ul=s(Mn);ei=i(Ul,"text"),Ul.forEach(o),ti=i(se,`
argument to `),jt=r(se,"A",{href:!0});var Zd=s(jt);Pn=r(Zd,"STRONG",{});var Vl=s(Pn);oi=i(Vl,"call"),Vl.forEach(o),ni=i(Zd,"()"),Zd.forEach(o),ri=i(se,`. Please refer to the doctsring of the above two methods for more
information.`),se.forEach(o),Ar.forEach(o),si=h(A),oe=r(A,"DIV",{class:!0});var Zo=s(oe);k(Nt.$$.fragment,Zo),ai=h(Zo),Cn=r(Zo,"P",{});var Rl=s(Cn);ii=i(Rl,"Instantiate a processor associated with a pretrained model."),Rl.forEach(o),di=h(Zo),k(je.$$.fragment,Zo),Zo.forEach(o),li=h(A),ne=r(A,"DIV",{class:!0});var Qo=s(ne);k(At.$$.fragment,Qo),ci=h(Qo),St=r(Qo,"P",{});var Sr=s(St);pi=i(Sr,`Saves the attributes of this processor (feature extractor, tokenizer\u2026) in the specified directory so that it
can be reloaded using the `),jo=r(Sr,"A",{href:!0});var Bl=s(jo);hi=i(Bl,"from_pretrained()"),Bl.forEach(o),mi=i(Sr," method."),Sr.forEach(o),ui=h(Qo),k(Ne.$$.fragment,Qo),Qo.forEach(o),fi=h(A),Ae=r(A,"DIV",{class:!0});var Ir=s(Ae);k(It.$$.fragment,Ir),_i=h(Ir),Lt=r(Ir,"P",{});var Lr=s(Lt);gi=i(Lr,"This method forwards all its arguments to WhisperTokenizer\u2019s "),No=r(Lr,"A",{href:!0});var Hl=s(No);vi=i(Hl,"batch_decode()"),Hl.forEach(o),yi=i(Lr,`. Please
refer to the docstring of this method for more information.`),Lr.forEach(o),Ir.forEach(o),bi=h(A),Se=r(A,"DIV",{class:!0});var Or=s(Se);k(Ot.$$.fragment,Or),ki=h(Or),Dt=r(Or,"P",{});var Dr=s(Dt);wi=i(Dr,"This method forwards all its arguments to WhisperTokenizer\u2019s "),Ao=r(Dr,"A",{href:!0});var Kl=s(Ao);Ti=i(Kl,"decode()"),Kl.forEach(o),$i=i(Dr,`. Please refer to
the docstring of this method for more information.`),Dr.forEach(o),Or.forEach(o),A.forEach(o),fr=h(t),ue=r(t,"H2",{class:!0});var Gr=s(ue);Ie=r(Gr,"A",{id:!0,class:!0,href:!0});var Jl=s(Ie);jn=r(Jl,"SPAN",{});var Zl=s(jn);k(Gt.$$.fragment,Zl),Zl.forEach(o),Jl.forEach(o),xi=h(Gr),Nn=r(Gr,"SPAN",{});var Ql=s(Nn);Wi=i(Ql,"WhisperModel"),Ql.forEach(o),Gr.forEach(o),_r=h(t),G=r(t,"DIV",{class:!0});var Ye=s(G);k(Ut.$$.fragment,Ye),Fi=h(Ye),Vt=r(Ye,"P",{});var Ur=s(Vt);zi=i(Ur,`The bare Whisper Model outputting raw hidden-states without any specific head on top.
This model inherits from `),So=r(Ur,"A",{href:!0});var Xl=s(So);qi=i(Xl,"PreTrainedModel"),Xl.forEach(o),Ei=i(Ur,`. 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.)`),Ur.forEach(o),Mi=h(Ye),Rt=r(Ye,"P",{});var Vr=s(Rt);Pi=i(Vr,"This model is also a PyTorch "),Bt=r(Vr,"A",{href:!0,rel:!0});var Yl=s(Bt);Ci=i(Yl,"torch.nn.Module"),Yl.forEach(o),ji=i(Vr,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Vr.forEach(o),Ni=h(Ye),K=r(Ye,"DIV",{class:!0});var et=s(K);k(Ht.$$.fragment,et),Ai=h(et),fe=r(et,"P",{});var Xo=s(fe);Si=i(Xo,"The "),Io=r(Xo,"A",{href:!0});var ec=s(Io);Ii=i(ec,"WhisperModel"),ec.forEach(o),Li=i(Xo," forward method, overrides the "),An=r(Xo,"CODE",{});var tc=s(An);Oi=i(tc,"__call__"),tc.forEach(o),Di=i(Xo," special method."),Xo.forEach(o),Gi=h(et),k(Le.$$.fragment,et),Ui=h(et),k(Oe.$$.fragment,et),et.forEach(o),Ye.forEach(o),gr=h(t),_e=r(t,"H2",{class:!0});var Rr=s(_e);De=r(Rr,"A",{id:!0,class:!0,href:!0});var oc=s(De);Sn=r(oc,"SPAN",{});var nc=s(Sn);k(Kt.$$.fragment,nc),nc.forEach(o),oc.forEach(o),Vi=h(Rr),In=r(Rr,"SPAN",{});var rc=s(In);Ri=i(rc,"WhisperForConditionalGeneration"),rc.forEach(o),Rr.forEach(o),vr=h(t),U=r(t,"DIV",{class:!0});var tt=s(U);k(Jt.$$.fragment,tt),Bi=h(tt),Zt=r(tt,"P",{});var Br=s(Zt);Hi=i(Br,`The Whisper Model with a language modeling head. Can be used for automatic speech recognition.
This model inherits from `),Lo=r(Br,"A",{href:!0});var sc=s(Lo);Ki=i(sc,"PreTrainedModel"),sc.forEach(o),Ji=i(Br,`. 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.)`),Br.forEach(o),Zi=h(tt),Qt=r(tt,"P",{});var Hr=s(Qt);Qi=i(Hr,"This model is also a PyTorch "),Xt=r(Hr,"A",{href:!0,rel:!0});var ac=s(Xt);Xi=i(ac,"torch.nn.Module"),ac.forEach(o),Yi=i(Hr,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Hr.forEach(o),ed=h(tt),J=r(tt,"DIV",{class:!0});var ot=s(J);k(Yt.$$.fragment,ot),td=h(ot),ge=r(ot,"P",{});var Yo=s(ge);od=i(Yo,"The "),Oo=r(Yo,"A",{href:!0});var ic=s(Oo);nd=i(ic,"WhisperForConditionalGeneration"),ic.forEach(o),rd=i(Yo," forward method, overrides the "),Ln=r(Yo,"CODE",{});var dc=s(Ln);sd=i(dc,"__call__"),dc.forEach(o),ad=i(Yo," special method."),Yo.forEach(o),id=h(ot),k(Ge.$$.fragment,ot),dd=h(ot),k(Ue.$$.fragment,ot),ot.forEach(o),tt.forEach(o),yr=h(t),ve=r(t,"H2",{class:!0});var Kr=s(ve);Ve=r(Kr,"A",{id:!0,class:!0,href:!0});var lc=s(Ve);On=r(lc,"SPAN",{});var cc=s(On);k(eo.$$.fragment,cc),cc.forEach(o),lc.forEach(o),ld=h(Kr),Dn=r(Kr,"SPAN",{});var pc=s(Dn);cd=i(pc,"TFWhisperModel"),pc.forEach(o),Kr.forEach(o),br=h(t),V=r(t,"DIV",{class:!0});var nt=s(V);k(to.$$.fragment,nt),pd=h(nt),oo=r(nt,"P",{});var Jr=s(oo);hd=i(Jr,`The bare Whisper Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Do=r(Jr,"A",{href:!0});var hc=s(Do);md=i(hc,"TFPreTrainedModel"),hc.forEach(o),ud=i(Jr,`. 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.)`),Jr.forEach(o),fd=h(nt),no=r(nt,"P",{});var Zr=s(no);_d=i(Zr,"This model is also a "),ro=r(Zr,"A",{href:!0,rel:!0});var mc=s(ro);gd=i(mc,"tf.keras.Model"),mc.forEach(o),vd=i(Zr,` 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.`),Zr.forEach(o),yd=h(nt),Z=r(nt,"DIV",{class:!0});var rt=s(Z);k(so.$$.fragment,rt),bd=h(rt),ye=r(rt,"P",{});var en=s(ye);kd=i(en,"The "),Go=r(en,"A",{href:!0});var uc=s(Go);wd=i(uc,"TFWhisperModel"),uc.forEach(o),Td=i(en," forward method, overrides the "),Gn=r(en,"CODE",{});var fc=s(Gn);$d=i(fc,"__call__"),fc.forEach(o),xd=i(en," special method."),en.forEach(o),Wd=h(rt),k(Re.$$.fragment,rt),Fd=h(rt),k(Be.$$.fragment,rt),rt.forEach(o),nt.forEach(o),kr=h(t),be=r(t,"H2",{class:!0});var Qr=s(be);He=r(Qr,"A",{id:!0,class:!0,href:!0});var _c=s(He);Un=r(_c,"SPAN",{});var gc=s(Un);k(ao.$$.fragment,gc),gc.forEach(o),_c.forEach(o),zd=h(Qr),Vn=r(Qr,"SPAN",{});var vc=s(Vn);qd=i(vc,"TFWhisperForConditionalGeneration"),vc.forEach(o),Qr.forEach(o),wr=h(t),R=r(t,"DIV",{class:!0});var st=s(R);k(io.$$.fragment,st),Ed=h(st),lo=r(st,"P",{});var Xr=s(lo);Md=i(Xr,`The Whisper Model with a language modeling head. Can be used for automatic speech recognition.
This model inherits from `),Uo=r(Xr,"A",{href:!0});var yc=s(Uo);Pd=i(yc,"TFPreTrainedModel"),yc.forEach(o),Cd=i(Xr,`. 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.)`),Xr.forEach(o),jd=h(st),co=r(st,"P",{});var Yr=s(co);Nd=i(Yr,"This model is also a "),po=r(Yr,"A",{href:!0,rel:!0});var bc=s(po);Ad=i(bc,"tf.keras.Model"),bc.forEach(o),Sd=i(Yr,` 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.`),Yr.forEach(o),Id=h(st),Q=r(st,"DIV",{class:!0});var at=s(Q);k(ho.$$.fragment,at),Ld=h(at),ke=r(at,"P",{});var tn=s(ke);Od=i(tn,"The "),Vo=r(tn,"A",{href:!0});var kc=s(Vo);Dd=i(kc,"TFWhisperForConditionalGeneration"),kc.forEach(o),Gd=i(tn," forward method, overrides the "),Rn=r(tn,"CODE",{});var wc=s(Rn);Ud=i(wc,"__call__"),wc.forEach(o),Vd=i(tn," special method."),tn.forEach(o),Rd=h(at),k(Ke.$$.fragment,at),Bd=h(at),k(Je.$$.fragment,at),at.forEach(o),st.forEach(o),this.h()},h(){l(c,"name","hf:doc:metadata"),l(c,"content",JSON.stringify(Dc)),l(u,"id","whisper"),l(u,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(u,"href","#whisper"),l(f,"class","relative group"),l(P,"id","overview"),l(P,"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(P,"href","#overview"),l(C,"class","relative group"),l(it,"href","https://cdn.openai.com/papers/whisper.pdf"),l(it,"rel","nofollow"),l(bo,"href","/docs/transformers/main/en/main_classes/text_generation#transformers.GenerationMixin.generate"),l(ko,"href","/docs/transformers/main/en/model_doc/whisper#transformers.WhisperProcessor"),l(ct,"href","https://huggingface.co/ArthurZ"),l(ct,"rel","nofollow"),l(pt,"href","https://huggingface.co/amyeroberts"),l(pt,"rel","nofollow"),l(ht,"href","https://github.com/openai/whisper"),l(ht,"rel","nofollow"),l($e,"id","transformers.WhisperConfig"),l($e,"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($e,"href","#transformers.WhisperConfig"),l(ie,"class","relative group"),l(wo,"href","/docs/transformers/main/en/model_doc/whisper#transformers.WhisperModel"),l(ft,"href","https://huggingface.co/openai/whisper-tiny"),l(ft,"rel","nofollow"),l(To,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),l($o,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),l(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(We,"id","transformers.WhisperTokenizer"),l(We,"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(We,"href","#transformers.WhisperTokenizer"),l(ce,"class","relative group"),l(xo,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),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(ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(qe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Fo,"href","../glossary#token-type-ids"),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(zo,"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(Ee,"id","transformers.WhisperFeatureExtractor"),l(Ee,"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(Ee,"href","#transformers.WhisperFeatureExtractor"),l(pe,"class","relative group"),l(qo,"href","/docs/transformers/main/en/model_doc/whisper#transformers.WhisperFeatureExtractor"),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(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Pe,"id","transformers.WhisperProcessor"),l(Pe,"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(Pe,"href","#transformers.WhisperProcessor"),l(me,"class","relative group"),l(Eo,"href","/docs/transformers/main/en/model_doc/whisper#transformers.WhisperProcessor"),l(Mo,"href","/docs/transformers/main/en/model_doc/whisper#transformers.WhisperFeatureExtractor"),l(Po,"href","/docs/transformers/main/en/model_doc/whisper#transformers.WhisperTokenizer"),l(Mt,"href","/docs/transformers/main/en/model_doc/whisper#transformers.WhisperProcessor.__call__"),l(Co,"href","/docs/transformers/main/en/model_doc/whisper#transformers.WhisperProcessor.decode"),l(Ct,"href","/docs/transformers/main/en/model_doc/whisper#transformers.WhisperFeatureExtractor.__call__"),l(jt,"href","/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__"),l(Ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),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(jo,"href","/docs/transformers/main/en/model_doc/trocr#transformers.TrOCRProcessor.from_pretrained"),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(No,"href","/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.batch_decode"),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(Ao,"href","/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.decode"),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(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(Ie,"id","transformers.WhisperModel"),l(Ie,"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(Ie,"href","#transformers.WhisperModel"),l(ue,"class","relative group"),l(So,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),l(Bt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(Bt,"rel","nofollow"),l(Io,"href","/docs/transformers/main/en/model_doc/whisper#transformers.WhisperModel"),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(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(De,"id","transformers.WhisperForConditionalGeneration"),l(De,"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(De,"href","#transformers.WhisperForConditionalGeneration"),l(_e,"class","relative group"),l(Lo,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),l(Xt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(Xt,"rel","nofollow"),l(Oo,"href","/docs/transformers/main/en/model_doc/whisper#transformers.WhisperForConditionalGeneration"),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(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Ve,"id","transformers.TFWhisperModel"),l(Ve,"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(Ve,"href","#transformers.TFWhisperModel"),l(ve,"class","relative group"),l(Do,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),l(ro,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),l(ro,"rel","nofollow"),l(Go,"href","/docs/transformers/main/en/model_doc/whisper#transformers.TFWhisperModel"),l(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(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(He,"id","transformers.TFWhisperForConditionalGeneration"),l(He,"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(He,"href","#transformers.TFWhisperForConditionalGeneration"),l(be,"class","relative group"),l(Uo,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),l(po,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),l(po,"rel","nofollow"),l(Vo,"href","/docs/transformers/main/en/model_doc/whisper#transformers.TFWhisperForConditionalGeneration"),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(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,_){e(document.head,c),g(t,y,_),g(t,f,_),e(f,u),e(u,v),w(d,v,null),e(f,m),e(f,F),e(F,S),g(t,M,_),g(t,C,_),e(C,P),e(P,j),w(Y,j,null),e(C,_o),e(C,we),e(we,es),g(t,tr,_),g(t,Te,_),e(Te,ts),e(Te,it),e(it,os),e(Te,ns),g(t,or,_),g(t,go,_),e(go,rs),g(t,nr,_),g(t,vo,_),e(vo,an),e(an,ss),g(t,rr,_),g(t,yo,_),e(yo,as),g(t,sr,_),g(t,B,_),e(B,dn),e(dn,is),e(B,ds),e(B,dt),e(dt,ls),e(dt,bo),e(bo,cs),e(dt,ps),e(B,hs),e(B,ln),e(ln,ms),e(B,us),e(B,lt),e(lt,fs),e(lt,ko),e(ko,_s),e(lt,gs),g(t,ar,_),g(t,H,_),e(H,vs),e(H,ct),e(ct,ys),e(H,bs),e(H,pt),e(pt,ks),e(H,ws),e(H,ht),e(ht,Ts),e(H,$s),g(t,ir,_),g(t,ie,_),e(ie,$e),e($e,cn),w(mt,cn,null),e(ie,xs),e(ie,pn),e(pn,Ws),g(t,dr,_),g(t,O,_),w(ut,O,null),e(O,Fs),e(O,de),e(de,zs),e(de,wo),e(wo,qs),e(de,Es),e(de,ft),e(ft,Ms),e(de,Ps),e(O,Cs),e(O,le),e(le,js),e(le,To),e(To,Ns),e(le,As),e(le,$o),e($o,Ss),e(le,Is),e(O,Ls),w(xe,O,null),g(t,lr,_),g(t,ce,_),e(ce,We),e(We,hn),w(_t,hn,null),e(ce,Os),e(ce,mn),e(mn,Ds),g(t,cr,_),g(t,q,_),w(gt,q,null),e(q,Gs),e(q,un),e(un,Us),e(q,Vs),e(q,vt),e(vt,Rs),e(vt,xo),e(xo,Bs),e(vt,Hs),e(q,Ks),e(q,ee),w(yt,ee,null),e(ee,Js),e(ee,fn),e(fn,Zs),e(ee,Qs),w(Fe,ee,null),e(q,Xs),e(q,ze),w(bt,ze,null),e(ze,Ys),e(ze,_n),e(_n,ea),e(q,ta),e(q,qe),w(kt,qe,null),e(qe,oa),e(qe,wt),e(wt,na),e(wt,gn),e(gn,ra),e(wt,sa),e(q,aa),e(q,te),w(Tt,te,null),e(te,ia),e(te,Wo),e(Wo,da),e(Wo,Fo),e(Fo,la),e(te,ca),e(te,vn),e(vn,pa),e(q,ha),e(q,zo),w($t,zo,null),g(t,pr,_),g(t,pe,_),e(pe,Ee),e(Ee,yn),w(xt,yn,null),e(pe,ma),e(pe,bn),e(bn,ua),g(t,hr,_),g(t,I,_),w(Wt,I,null),e(I,fa),e(I,kn),e(kn,_a),e(I,ga),e(I,Ft),e(Ft,va),e(Ft,qo),e(qo,ya),e(Ft,ba),e(I,ka),e(I,he),e(he,wa),e(he,wn),e(wn,Ta),e(he,$a),e(he,Tn),e(Tn,xa),e(he,Wa),e(I,Fa),e(I,Me),w(zt,Me,null),e(Me,za),e(Me,$n),e($n,qa),g(t,mr,_),g(t,me,_),e(me,Pe),e(Pe,xn),w(qt,xn,null),e(me,Ea),e(me,Wn),e(Wn,Ma),g(t,ur,_),g(t,E,_),w(Et,E,null),e(E,Pa),e(E,Fn),e(Fn,Ca),e(E,ja),e(E,L),e(L,Eo),e(Eo,Na),e(L,Aa),e(L,Mo),e(Mo,Sa),e(L,Ia),e(L,Po),e(Po,La),e(L,Oa),e(L,Mt),e(Mt,zn),e(zn,Da),e(Mt,Ga),e(L,Ua),e(L,Co),e(Co,Va),e(L,Ra),e(E,Ba),e(E,Ce),w(Pt,Ce,null),e(Ce,Ha),e(Ce,D),e(D,Ka),e(D,qn),e(qn,Ja),e(D,Za),e(D,Ct),e(Ct,En),e(En,Qa),e(Ct,Xa),e(D,Ya),e(D,Mn),e(Mn,ei),e(D,ti),e(D,jt),e(jt,Pn),e(Pn,oi),e(jt,ni),e(D,ri),e(E,si),e(E,oe),w(Nt,oe,null),e(oe,ai),e(oe,Cn),e(Cn,ii),e(oe,di),w(je,oe,null),e(E,li),e(E,ne),w(At,ne,null),e(ne,ci),e(ne,St),e(St,pi),e(St,jo),e(jo,hi),e(St,mi),e(ne,ui),w(Ne,ne,null),e(E,fi),e(E,Ae),w(It,Ae,null),e(Ae,_i),e(Ae,Lt),e(Lt,gi),e(Lt,No),e(No,vi),e(Lt,yi),e(E,bi),e(E,Se),w(Ot,Se,null),e(Se,ki),e(Se,Dt),e(Dt,wi),e(Dt,Ao),e(Ao,Ti),e(Dt,$i),g(t,fr,_),g(t,ue,_),e(ue,Ie),e(Ie,jn),w(Gt,jn,null),e(ue,xi),e(ue,Nn),e(Nn,Wi),g(t,_r,_),g(t,G,_),w(Ut,G,null),e(G,Fi),e(G,Vt),e(Vt,zi),e(Vt,So),e(So,qi),e(Vt,Ei),e(G,Mi),e(G,Rt),e(Rt,Pi),e(Rt,Bt),e(Bt,Ci),e(Rt,ji),e(G,Ni),e(G,K),w(Ht,K,null),e(K,Ai),e(K,fe),e(fe,Si),e(fe,Io),e(Io,Ii),e(fe,Li),e(fe,An),e(An,Oi),e(fe,Di),e(K,Gi),w(Le,K,null),e(K,Ui),w(Oe,K,null),g(t,gr,_),g(t,_e,_),e(_e,De),e(De,Sn),w(Kt,Sn,null),e(_e,Vi),e(_e,In),e(In,Ri),g(t,vr,_),g(t,U,_),w(Jt,U,null),e(U,Bi),e(U,Zt),e(Zt,Hi),e(Zt,Lo),e(Lo,Ki),e(Zt,Ji),e(U,Zi),e(U,Qt),e(Qt,Qi),e(Qt,Xt),e(Xt,Xi),e(Qt,Yi),e(U,ed),e(U,J),w(Yt,J,null),e(J,td),e(J,ge),e(ge,od),e(ge,Oo),e(Oo,nd),e(ge,rd),e(ge,Ln),e(Ln,sd),e(ge,ad),e(J,id),w(Ge,J,null),e(J,dd),w(Ue,J,null),g(t,yr,_),g(t,ve,_),e(ve,Ve),e(Ve,On),w(eo,On,null),e(ve,ld),e(ve,Dn),e(Dn,cd),g(t,br,_),g(t,V,_),w(to,V,null),e(V,pd),e(V,oo),e(oo,hd),e(oo,Do),e(Do,md),e(oo,ud),e(V,fd),e(V,no),e(no,_d),e(no,ro),e(ro,gd),e(no,vd),e(V,yd),e(V,Z),w(so,Z,null),e(Z,bd),e(Z,ye),e(ye,kd),e(ye,Go),e(Go,wd),e(ye,Td),e(ye,Gn),e(Gn,$d),e(ye,xd),e(Z,Wd),w(Re,Z,null),e(Z,Fd),w(Be,Z,null),g(t,kr,_),g(t,be,_),e(be,He),e(He,Un),w(ao,Un,null),e(be,zd),e(be,Vn),e(Vn,qd),g(t,wr,_),g(t,R,_),w(io,R,null),e(R,Ed),e(R,lo),e(lo,Md),e(lo,Uo),e(Uo,Pd),e(lo,Cd),e(R,jd),e(R,co),e(co,Nd),e(co,po),e(po,Ad),e(co,Sd),e(R,Id),e(R,Q),w(ho,Q,null),e(Q,Ld),e(Q,ke),e(ke,Od),e(ke,Vo),e(Vo,Dd),e(ke,Gd),e(ke,Rn),e(Rn,Ud),e(ke,Vd),e(Q,Rd),w(Ke,Q,null),e(Q,Bd),w(Je,Q,null),Tr=!0},p(t,[_]){const mo={};_&2&&(mo.$$scope={dirty:_,ctx:t}),xe.$set(mo);const Bn={};_&2&&(Bn.$$scope={dirty:_,ctx:t}),Fe.$set(Bn);const Hn={};_&2&&(Hn.$$scope={dirty:_,ctx:t}),je.$set(Hn);const Kn={};_&2&&(Kn.$$scope={dirty:_,ctx:t}),Ne.$set(Kn);const uo={};_&2&&(uo.$$scope={dirty:_,ctx:t}),Le.$set(uo);const Jn={};_&2&&(Jn.$$scope={dirty:_,ctx:t}),Oe.$set(Jn);const Zn={};_&2&&(Zn.$$scope={dirty:_,ctx:t}),Ge.$set(Zn);const Qn={};_&2&&(Qn.$$scope={dirty:_,ctx:t}),Ue.$set(Qn);const fo={};_&2&&(fo.$$scope={dirty:_,ctx:t}),Re.$set(fo);const Xn={};_&2&&(Xn.$$scope={dirty:_,ctx:t}),Be.$set(Xn);const Yn={};_&2&&(Yn.$$scope={dirty:_,ctx:t}),Ke.$set(Yn);const er={};_&2&&(er.$$scope={dirty:_,ctx:t}),Je.$set(er)},i(t){Tr||(T(d.$$.fragment,t),T(Y.$$.fragment,t),T(mt.$$.fragment,t),T(ut.$$.fragment,t),T(xe.$$.fragment,t),T(_t.$$.fragment,t),T(gt.$$.fragment,t),T(yt.$$.fragment,t),T(Fe.$$.fragment,t),T(bt.$$.fragment,t),T(kt.$$.fragment,t),T(Tt.$$.fragment,t),T($t.$$.fragment,t),T(xt.$$.fragment,t),T(Wt.$$.fragment,t),T(zt.$$.fragment,t),T(qt.$$.fragment,t),T(Et.$$.fragment,t),T(Pt.$$.fragment,t),T(Nt.$$.fragment,t),T(je.$$.fragment,t),T(At.$$.fragment,t),T(Ne.$$.fragment,t),T(It.$$.fragment,t),T(Ot.$$.fragment,t),T(Gt.$$.fragment,t),T(Ut.$$.fragment,t),T(Ht.$$.fragment,t),T(Le.$$.fragment,t),T(Oe.$$.fragment,t),T(Kt.$$.fragment,t),T(Jt.$$.fragment,t),T(Yt.$$.fragment,t),T(Ge.$$.fragment,t),T(Ue.$$.fragment,t),T(eo.$$.fragment,t),T(to.$$.fragment,t),T(so.$$.fragment,t),T(Re.$$.fragment,t),T(Be.$$.fragment,t),T(ao.$$.fragment,t),T(io.$$.fragment,t),T(ho.$$.fragment,t),T(Ke.$$.fragment,t),T(Je.$$.fragment,t),Tr=!0)},o(t){$(d.$$.fragment,t),$(Y.$$.fragment,t),$(mt.$$.fragment,t),$(ut.$$.fragment,t),$(xe.$$.fragment,t),$(_t.$$.fragment,t),$(gt.$$.fragment,t),$(yt.$$.fragment,t),$(Fe.$$.fragment,t),$(bt.$$.fragment,t),$(kt.$$.fragment,t),$(Tt.$$.fragment,t),$($t.$$.fragment,t),$(xt.$$.fragment,t),$(Wt.$$.fragment,t),$(zt.$$.fragment,t),$(qt.$$.fragment,t),$(Et.$$.fragment,t),$(Pt.$$.fragment,t),$(Nt.$$.fragment,t),$(je.$$.fragment,t),$(At.$$.fragment,t),$(Ne.$$.fragment,t),$(It.$$.fragment,t),$(Ot.$$.fragment,t),$(Gt.$$.fragment,t),$(Ut.$$.fragment,t),$(Ht.$$.fragment,t),$(Le.$$.fragment,t),$(Oe.$$.fragment,t),$(Kt.$$.fragment,t),$(Jt.$$.fragment,t),$(Yt.$$.fragment,t),$(Ge.$$.fragment,t),$(Ue.$$.fragment,t),$(eo.$$.fragment,t),$(to.$$.fragment,t),$(so.$$.fragment,t),$(Re.$$.fragment,t),$(Be.$$.fragment,t),$(ao.$$.fragment,t),$(io.$$.fragment,t),$(ho.$$.fragment,t),$(Ke.$$.fragment,t),$(Je.$$.fragment,t),Tr=!1},d(t){o(c),t&&o(y),t&&o(f),x(d),t&&o(M),t&&o(C),x(Y),t&&o(tr),t&&o(Te),t&&o(or),t&&o(go),t&&o(nr),t&&o(vo),t&&o(rr),t&&o(yo),t&&o(sr),t&&o(B),t&&o(ar),t&&o(H),t&&o(ir),t&&o(ie),x(mt),t&&o(dr),t&&o(O),x(ut),x(xe),t&&o(lr),t&&o(ce),x(_t),t&&o(cr),t&&o(q),x(gt),x(yt),x(Fe),x(bt),x(kt),x(Tt),x($t),t&&o(pr),t&&o(pe),x(xt),t&&o(hr),t&&o(I),x(Wt),x(zt),t&&o(mr),t&&o(me),x(qt),t&&o(ur),t&&o(E),x(Et),x(Pt),x(Nt),x(je),x(At),x(Ne),x(It),x(Ot),t&&o(fr),t&&o(ue),x(Gt),t&&o(_r),t&&o(G),x(Ut),x(Ht),x(Le),x(Oe),t&&o(gr),t&&o(_e),x(Kt),t&&o(vr),t&&o(U),x(Jt),x(Yt),x(Ge),x(Ue),t&&o(yr),t&&o(ve),x(eo),t&&o(br),t&&o(V),x(to),x(so),x(Re),x(Be),t&&o(kr),t&&o(be),x(ao),t&&o(wr),t&&o(R),x(io),x(ho),x(Ke),x(Je)}}}const Dc={local:"whisper",sections:[{local:"overview",title:"Overview"},{local:"transformers.WhisperConfig",title:"WhisperConfig"},{local:"transformers.WhisperTokenizer",title:"WhisperTokenizer"},{local:"transformers.WhisperFeatureExtractor",title:"WhisperFeatureExtractor"},{local:"transformers.WhisperProcessor",title:"WhisperProcessor"},{local:"transformers.WhisperModel",title:"WhisperModel"},{local:"transformers.WhisperForConditionalGeneration",title:"WhisperForConditionalGeneration"},{local:"transformers.TFWhisperModel",title:"TFWhisperModel"},{local:"transformers.TFWhisperForConditionalGeneration",title:"TFWhisperForConditionalGeneration"}],title:"Whisper"};function Gc(W){return Fc(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Jc extends Tc{constructor(c){super();$c(this,c,Gc,Oc,xc,{})}}export{Jc as default,Dc as metadata};
