import{s as Ca,o as Ma,n as E}from"../chunks/scheduler.9bc65507.js";import{S as va,i as wa,g as c,s as a,r as u,A as $a,h as p,f as s,c as r,j as w,u as f,x as T,k as $,y as n,a as m,v as h,d as g,t as _,w as b}from"../chunks/index.707bf1b6.js";import{T as St}from"../chunks/Tip.c2ecdbf4.js";import{D as x}from"../chunks/Docstring.17db21ae.js";import{C as se}from"../chunks/CodeBlock.54a9f38d.js";import{E as re}from"../chunks/ExampleCodeBlock.4f515aa9.js";import{H as Q}from"../chunks/Heading.342b1fa6.js";function xa(v){let o,C="Example:",d,l,y;return l=new se({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENsYXBDb25maWclMkMlMjBDbGFwTW9kZWwlMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwQ2xhcENvbmZpZyUyMHdpdGglMjBsYWlvbi1haSUyRmJhc2UlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwQ2xhcENvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMENsYXBNb2RlbCUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwbGFpb24tYWklMkZiYXNlJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBDbGFwTW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmlnJTBBJTBBJTIzJTIwV2UlMjBjYW4lMjBhbHNvJTIwaW5pdGlhbGl6ZSUyMGElMjBDbGFwQ29uZmlnJTIwZnJvbSUyMGElMjBDbGFwVGV4dENvbmZpZyUyMGFuZCUyMGElMjBDbGFwQXVkaW9Db25maWclMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQ2xhcFRleHRDb25maWclMkMlMjBDbGFwQXVkaW9Db25maWclMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwQ2xhcFRleHQlMjBhbmQlMjBDbGFwQXVkaW9Db25maWclMjBjb25maWd1cmF0aW9uJTBBY29uZmlnX3RleHQlMjAlM0QlMjBDbGFwVGV4dENvbmZpZygpJTBBY29uZmlnX2F1ZGlvJTIwJTNEJTIwQ2xhcEF1ZGlvQ29uZmlnKCklMEElMEFjb25maWclMjAlM0QlMjBDbGFwQ29uZmlnLmZyb21fdGV4dF9hdWRpb19jb25maWdzKGNvbmZpZ190ZXh0JTJDJTIwY29uZmlnX2F1ZGlvKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> ClapConfig, ClapModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a ClapConfig with laion-ai/base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = ClapConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a ClapModel (with random weights) from the laion-ai/base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ClapModel(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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># We can also initialize a ClapConfig from a ClapTextConfig and a ClapAudioConfig</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> ClapTextConfig, ClapAudioConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a ClapText and ClapAudioConfig configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>config_text = ClapTextConfig()
<span class="hljs-meta">&gt;&gt;&gt; </span>config_audio = ClapAudioConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span>config = ClapConfig.from_text_audio_configs(config_text, config_audio)`,wrap:!1}}),{c(){o=c("p"),o.textContent=C,d=a(),u(l.$$.fragment)},l(t){o=p(t,"P",{"data-svelte-h":!0}),T(o)!=="svelte-11lpom8"&&(o.textContent=C),d=r(t),f(l.$$.fragment,t)},m(t,M){m(t,o,M),m(t,d,M),h(l,t,M),y=!0},p:E,i(t){y||(g(l.$$.fragment,t),y=!0)},o(t){_(l.$$.fragment,t),y=!1},d(t){t&&(s(o),s(d)),b(l,t)}}}function ja(v){let o,C="Examples:",d,l,y;return l=new se({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENsYXBUZXh0Q29uZmlnJTJDJTIwQ2xhcFRleHRNb2RlbCUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBDTEFQJTIwdGV4dCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwQ2xhcFRleHRDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtb2RlbCUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwQ2xhcFRleHRNb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> ClapTextConfig, ClapTextModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a CLAP text configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = ClapTextConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ClapTextModel(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`,wrap:!1}}),{c(){o=c("p"),o.textContent=C,d=a(),u(l.$$.fragment)},l(t){o=p(t,"P",{"data-svelte-h":!0}),T(o)!=="svelte-kvfsh7"&&(o.textContent=C),d=r(t),f(l.$$.fragment,t)},m(t,M){m(t,o,M),m(t,d,M),h(l,t,M),y=!0},p:E,i(t){y||(g(l.$$.fragment,t),y=!0)},o(t){_(l.$$.fragment,t),y=!1},d(t){t&&(s(o),s(d)),b(l,t)}}}function ka(v){let o,C="Example:",d,l,y;return l=new se({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENsYXBBdWRpb0NvbmZpZyUyQyUyMENsYXBBdWRpb01vZGVsJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMENsYXBBdWRpb0NvbmZpZyUyMHdpdGglMjBsYWlvbiUyRmNsYXAtaHRzYXQtZnVzZWQlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwQ2xhcEF1ZGlvQ29uZmlnKCklMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwQ2xhcEF1ZGlvTW9kZWwlMjAod2l0aCUyMHJhbmRvbSUyMHdlaWdodHMpJTIwZnJvbSUyMHRoZSUyMGxhaW9uJTJGY2xhcC1odHNhdC1mdXNlZCUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwQ2xhcEF1ZGlvTW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> ClapAudioConfig, ClapAudioModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a ClapAudioConfig with laion/clap-htsat-fused style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = ClapAudioConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a ClapAudioModel (with random weights) from the laion/clap-htsat-fused style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ClapAudioModel(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`,wrap:!1}}),{c(){o=c("p"),o.textContent=C,d=a(),u(l.$$.fragment)},l(t){o=p(t,"P",{"data-svelte-h":!0}),T(o)!=="svelte-11lpom8"&&(o.textContent=C),d=r(t),f(l.$$.fragment,t)},m(t,M){m(t,o,M),m(t,d,M),h(l,t,M),y=!0},p:E,i(t){y||(g(l.$$.fragment,t),y=!0)},o(t){_(l.$$.fragment,t),y=!1},d(t){t&&(s(o),s(d)),b(l,t)}}}function Ja(v){let o,C=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=c("p"),o.innerHTML=C},l(d){o=p(d,"P",{"data-svelte-h":!0}),T(o)!=="svelte-fincs2"&&(o.innerHTML=C)},m(d,l){m(d,o,l)},p:E,d(d){d&&s(o)}}}function Wa(v){let o,C="Examples:",d,l,y;return l=new se({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMkMlMjBDbGFwTW9kZWwlMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmFzaHJhcSUyRmVzYzUwJTIyKSUwQWF1ZGlvX3NhbXBsZSUyMCUzRCUyMGRhdGFzZXQlNUIlMjJ0cmFpbiUyMiU1RCU1QiUyMmF1ZGlvJTIyJTVEJTVCMCU1RCU1QiUyMmFycmF5JTIyJTVEJTBBJTBBbW9kZWwlMjAlM0QlMjBDbGFwTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmxhaW9uJTJGY2xhcC1odHNhdC11bmZ1c2VkJTIyKSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmxhaW9uJTJGY2xhcC1odHNhdC11bmZ1c2VkJTIyKSUwQSUwQWlucHV0X3RleHQlMjAlM0QlMjAlNUIlMjJTb3VuZCUyMG9mJTIwYSUyMGRvZyUyMiUyQyUyMCUyMlNvdW5kJTIwb2YlMjB2YWNjdW0lMjBjbGVhbmVyJTIyJTVEJTBBJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKHRleHQlM0RpbnB1dF90ZXh0JTJDJTIwYXVkaW9zJTNEYXVkaW9fc2FtcGxlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiUyQyUyMHBhZGRpbmclM0RUcnVlKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsb2dpdHNfcGVyX2F1ZGlvJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHNfcGVyX2F1ZGlvJTIwJTIwJTIzJTIwdGhpcyUyMGlzJTIwdGhlJTIwYXVkaW8tdGV4dCUyMHNpbWlsYXJpdHklMjBzY29yZSUwQXByb2JzJTIwJTNEJTIwbG9naXRzX3Blcl9hdWRpby5zb2Z0bWF4KGRpbSUzRC0xKSUyMCUyMCUyMyUyMHdlJTIwY2FuJTIwdGFrZSUyMHRoZSUyMHNvZnRtYXglMjB0byUyMGdldCUyMHRoZSUyMGxhYmVsJTIwcHJvYmFiaWxpdGllcw==",highlighted:`<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><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, ClapModel

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;ashraq/esc50&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>audio_sample = dataset[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-number">0</span>][<span class="hljs-string">&quot;array&quot;</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>model = ClapModel.from_pretrained(<span class="hljs-string">&quot;laion/clap-htsat-unfused&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;laion/clap-htsat-unfused&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>input_text = [<span class="hljs-string">&quot;Sound of a dog&quot;</span>, <span class="hljs-string">&quot;Sound of vaccum cleaner&quot;</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(text=input_text, audios=audio_sample, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>, padding=<span class="hljs-literal">True</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits_per_audio = outputs.logits_per_audio  <span class="hljs-comment"># this is the audio-text similarity score</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>probs = logits_per_audio.softmax(dim=-<span class="hljs-number">1</span>)  <span class="hljs-comment"># we can take the softmax to get the label probabilities</span>`,wrap:!1}}),{c(){o=c("p"),o.textContent=C,d=a(),u(l.$$.fragment)},l(t){o=p(t,"P",{"data-svelte-h":!0}),T(o)!=="svelte-kvfsh7"&&(o.textContent=C),d=r(t),f(l.$$.fragment,t)},m(t,M){m(t,o,M),m(t,d,M),h(l,t,M),y=!0},p:E,i(t){y||(g(l.$$.fragment,t),y=!0)},o(t){_(l.$$.fragment,t),y=!1},d(t){t&&(s(o),s(d)),b(l,t)}}}function za(v){let o,C=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=c("p"),o.innerHTML=C},l(d){o=p(d,"P",{"data-svelte-h":!0}),T(o)!=="svelte-fincs2"&&(o.innerHTML=C)},m(d,l){m(d,o,l)},p:E,d(d){d&&s(o)}}}function Fa(v){let o,C="Examples:",d,l,y;return l=new se({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBDbGFwTW9kZWwlMEElMEFtb2RlbCUyMCUzRCUyMENsYXBNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIybGFpb24lMkZjbGFwLWh0c2F0LXVuZnVzZWQlMjIpJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIybGFpb24lMkZjbGFwLWh0c2F0LXVuZnVzZWQlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCU1QiUyMnRoZSUyMHNvdW5kJTIwb2YlMjBhJTIwY2F0JTIyJTJDJTIwJTIydGhlJTIwc291bmQlMjBvZiUyMGElMjBkb2clMjIlNUQlMkMlMjBwYWRkaW5nJTNEVHJ1ZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBdGV4dF9mZWF0dXJlcyUyMCUzRCUyMG1vZGVsLmdldF90ZXh0X2ZlYXR1cmVzKCoqaW5wdXRzKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, ClapModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = ClapModel.from_pretrained(<span class="hljs-string">&quot;laion/clap-htsat-unfused&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;laion/clap-htsat-unfused&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer([<span class="hljs-string">&quot;the sound of a cat&quot;</span>, <span class="hljs-string">&quot;the sound of a dog&quot;</span>], padding=<span class="hljs-literal">True</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>text_features = model.get_text_features(**inputs)`,wrap:!1}}),{c(){o=c("p"),o.textContent=C,d=a(),u(l.$$.fragment)},l(t){o=p(t,"P",{"data-svelte-h":!0}),T(o)!=="svelte-kvfsh7"&&(o.textContent=C),d=r(t),f(l.$$.fragment,t)},m(t,M){m(t,o,M),m(t,d,M),h(l,t,M),y=!0},p:E,i(t){y||(g(l.$$.fragment,t),y=!0)},o(t){_(l.$$.fragment,t),y=!1},d(t){t&&(s(o),s(d)),b(l,t)}}}function Za(v){let o,C=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=c("p"),o.innerHTML=C},l(d){o=p(d,"P",{"data-svelte-h":!0}),T(o)!=="svelte-fincs2"&&(o.innerHTML=C)},m(d,l){m(d,o,l)},p:E,d(d){d&&s(o)}}}function Ia(v){let o,C="Examples:",d,l,y;return l=new se({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9GZWF0dXJlRXh0cmFjdG9yJTJDJTIwQ2xhcE1vZGVsJTBBaW1wb3J0JTIwdG9yY2glMEElMEFtb2RlbCUyMCUzRCUyMENsYXBNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIybGFpb24lMkZjbGFwLWh0c2F0LXVuZnVzZWQlMjIpJTBBZmVhdHVyZV9leHRyYWN0b3IlMjAlM0QlMjBBdXRvRmVhdHVyZUV4dHJhY3Rvci5mcm9tX3ByZXRyYWluZWQoJTIybGFpb24lMkZjbGFwLWh0c2F0LXVuZnVzZWQlMjIpJTBBcmFuZG9tX2F1ZGlvJTIwJTNEJTIwdG9yY2gucmFuZCgoMTZfMDAwKSklMEFpbnB1dHMlMjAlM0QlMjBmZWF0dXJlX2V4dHJhY3RvcihyYW5kb21fYXVkaW8lMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQWF1ZGlvX2ZlYXR1cmVzJTIwJTNEJTIwbW9kZWwuZ2V0X2F1ZGlvX2ZlYXR1cmVzKCoqaW5wdXRzKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor, ClapModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>model = ClapModel.from_pretrained(<span class="hljs-string">&quot;laion/clap-htsat-unfused&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;laion/clap-htsat-unfused&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>random_audio = torch.rand((<span class="hljs-number">16_000</span>))
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = feature_extractor(random_audio, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>audio_features = model.get_audio_features(**inputs)`,wrap:!1}}),{c(){o=c("p"),o.textContent=C,d=a(),u(l.$$.fragment)},l(t){o=p(t,"P",{"data-svelte-h":!0}),T(o)!=="svelte-kvfsh7"&&(o.textContent=C),d=r(t),f(l.$$.fragment,t)},m(t,M){m(t,o,M),m(t,d,M),h(l,t,M),y=!0},p:E,i(t){y||(g(l.$$.fragment,t),y=!0)},o(t){_(l.$$.fragment,t),y=!1},d(t){t&&(s(o),s(d)),b(l,t)}}}function Ea(v){let o,C=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=c("p"),o.innerHTML=C},l(d){o=p(d,"P",{"data-svelte-h":!0}),T(o)!=="svelte-fincs2"&&(o.innerHTML=C)},m(d,l){m(d,o,l)},p:E,d(d){d&&s(o)}}}function Ua(v){let o,C="Examples:",d,l,y;return l=new se({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBDbGFwVGV4dE1vZGVsV2l0aFByb2plY3Rpb24lMEElMEFtb2RlbCUyMCUzRCUyMENsYXBUZXh0TW9kZWxXaXRoUHJvamVjdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIybGFpb24lMkZjbGFwLWh0c2F0LXVuZnVzZWQlMjIpJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIybGFpb24lMkZjbGFwLWh0c2F0LXVuZnVzZWQlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCU1QiUyMmElMjBzb3VuZCUyMG9mJTIwYSUyMGNhdCUyMiUyQyUyMCUyMmElMjBzb3VuZCUyMG9mJTIwYSUyMGRvZyUyMiU1RCUyQyUyMHBhZGRpbmclM0RUcnVlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBdGV4dF9lbWJlZHMlMjAlM0QlMjBvdXRwdXRzLnRleHRfZW1iZWRz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, ClapTextModelWithProjection

<span class="hljs-meta">&gt;&gt;&gt; </span>model = ClapTextModelWithProjection.from_pretrained(<span class="hljs-string">&quot;laion/clap-htsat-unfused&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;laion/clap-htsat-unfused&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer([<span class="hljs-string">&quot;a sound of a cat&quot;</span>, <span class="hljs-string">&quot;a sound of a dog&quot;</span>], padding=<span class="hljs-literal">True</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>text_embeds = outputs.text_embeds`,wrap:!1}}),{c(){o=c("p"),o.textContent=C,d=a(),u(l.$$.fragment)},l(t){o=p(t,"P",{"data-svelte-h":!0}),T(o)!=="svelte-kvfsh7"&&(o.textContent=C),d=r(t),f(l.$$.fragment,t)},m(t,M){m(t,o,M),m(t,d,M),h(l,t,M),y=!0},p:E,i(t){y||(g(l.$$.fragment,t),y=!0)},o(t){_(l.$$.fragment,t),y=!1},d(t){t&&(s(o),s(d)),b(l,t)}}}function qa(v){let o,C=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=c("p"),o.innerHTML=C},l(d){o=p(d,"P",{"data-svelte-h":!0}),T(o)!=="svelte-fincs2"&&(o.innerHTML=C)},m(d,l){m(d,o,l)},p:E,d(d){d&&s(o)}}}function Aa(v){let o,C="Examples:",d,l,y;return l=new se({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMkMlMjBDbGFwQXVkaW9Nb2RlbCUwQSUwQWRhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyYXNocmFxJTJGZXNjNTAlMjIpJTBBYXVkaW9fc2FtcGxlJTIwJTNEJTIwZGF0YXNldCU1QiUyMnRyYWluJTIyJTVEJTVCJTIyYXVkaW8lMjIlNUQlNUIwJTVEJTVCJTIyYXJyYXklMjIlNUQlMEElMEFtb2RlbCUyMCUzRCUyMENsYXBBdWRpb01vZGVsLmZyb21fcHJldHJhaW5lZCglMjJsYWlvbiUyRmNsYXAtaHRzYXQtZnVzZWQlMjIpJTBBcHJvY2Vzc29yJTIwJTNEJTIwQXV0b1Byb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIybGFpb24lMkZjbGFwLWh0c2F0LWZ1c2VkJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3NvcihhdWRpb3MlM0RhdWRpb19zYW1wbGUlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsYXN0X2hpZGRlbl9zdGF0ZSUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",highlighted:`<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><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, ClapAudioModel

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;ashraq/esc50&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>audio_sample = dataset[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-number">0</span>][<span class="hljs-string">&quot;array&quot;</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>model = ClapAudioModel.from_pretrained(<span class="hljs-string">&quot;laion/clap-htsat-fused&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;laion/clap-htsat-fused&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(audios=audio_sample, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_state = outputs.last_hidden_state`,wrap:!1}}),{c(){o=c("p"),o.textContent=C,d=a(),u(l.$$.fragment)},l(t){o=p(t,"P",{"data-svelte-h":!0}),T(o)!=="svelte-kvfsh7"&&(o.textContent=C),d=r(t),f(l.$$.fragment,t)},m(t,M){m(t,o,M),m(t,d,M),h(l,t,M),y=!0},p:E,i(t){y||(g(l.$$.fragment,t),y=!0)},o(t){_(l.$$.fragment,t),y=!1},d(t){t&&(s(o),s(d)),b(l,t)}}}function Pa(v){let o,C=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=c("p"),o.innerHTML=C},l(d){o=p(d,"P",{"data-svelte-h":!0}),T(o)!=="svelte-fincs2"&&(o.innerHTML=C)},m(d,l){m(d,o,l)},p:E,d(d){d&&s(o)}}}function Ba(v){let o,C="Examples:",d,l,y;return l=new se({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENsYXBBdWRpb01vZGVsV2l0aFByb2plY3Rpb24lMkMlMjBDbGFwUHJvY2Vzc29yJTBBJTBBbW9kZWwlMjAlM0QlMjBDbGFwQXVkaW9Nb2RlbFdpdGhQcm9qZWN0aW9uLmZyb21fcHJldHJhaW5lZCglMjJsYWlvbiUyRmNsYXAtaHRzYXQtZnVzZWQlMjIpJTBBcHJvY2Vzc29yJTIwJTNEJTIwQ2xhcFByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIybGFpb24lMkZjbGFwLWh0c2F0LWZ1c2VkJTIyKSUwQSUwQWRhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyYXNocmFxJTJGZXNjNTAlMjIpJTBBYXVkaW9fc2FtcGxlJTIwJTNEJTIwZGF0YXNldCU1QiUyMnRyYWluJTIyJTVEJTVCJTIyYXVkaW8lMjIlNUQlNUIwJTVEJTVCJTIyYXJyYXklMjIlNUQlMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoYXVkaW9zJTNEYXVkaW9fc2FtcGxlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBYXVkaW9fZW1iZWRzJTIwJTNEJTIwb3V0cHV0cy5hdWRpb19lbWJlZHM=",highlighted:`<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><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> ClapAudioModelWithProjection, ClapProcessor

<span class="hljs-meta">&gt;&gt;&gt; </span>model = ClapAudioModelWithProjection.from_pretrained(<span class="hljs-string">&quot;laion/clap-htsat-fused&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = ClapProcessor.from_pretrained(<span class="hljs-string">&quot;laion/clap-htsat-fused&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;ashraq/esc50&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>audio_sample = dataset[<span class="hljs-string">&quot;train&quot;</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-number">0</span>][<span class="hljs-string">&quot;array&quot;</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(audios=audio_sample, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>audio_embeds = outputs.audio_embeds`,wrap:!1}}),{c(){o=c("p"),o.textContent=C,d=a(),u(l.$$.fragment)},l(t){o=p(t,"P",{"data-svelte-h":!0}),T(o)!=="svelte-kvfsh7"&&(o.textContent=C),d=r(t),f(l.$$.fragment,t)},m(t,M){m(t,o,M),m(t,d,M),h(l,t,M),y=!0},p:E,i(t){y||(g(l.$$.fragment,t),y=!0)},o(t){_(l.$$.fragment,t),y=!1},d(t){t&&(s(o),s(d)),b(l,t)}}}function Ga(v){let o,C,d,l,y,t,M,Ot,Je,En=`The CLAP model was proposed in <a href="https://arxiv.org/pdf/2211.06687.pdf" rel="nofollow">Large Scale Contrastive Language-Audio pretraining with
feature fusion and keyword-to-caption augmentation</a> by Yusong Wu, Ke Chen, Tianyu Zhang, Yuchen Hui, Taylor Berg-Kirkpatrick, Shlomo Dubnov.`,Kt,We,Un="CLAP (Contrastive Language-Audio Pretraining) is a neural network trained on a variety of (audio, text) pairs. It can be instructed in to predict the most relevant text snippet, given an audio, without directly optimizing for the task. The CLAP model uses a SWINTransformer to get audio features from a log-Mel spectrogram input, and a RoBERTa model to get text features. Both the text and audio features are then projected to a latent space with identical dimension. The dot product between the projected audio and text features is then used as a similar score.",eo,ze,qn="The abstract from the paper is the following:",to,Fe,An="<em>Contrastive learning has shown remarkable success in the field of multimodal representation learning. In this paper, we propose a pipeline of contrastive language-audio pretraining to develop an audio representation by combining audio data with natural language descriptions. To accomplish this target, we first release LAION-Audio-630K, a large collection of 633,526 audio-text pairs from different data sources. Second, we construct a contrastive language-audio pretraining model by considering different audio encoders and text encoders. We incorporate the feature fusion mechanism and keyword-to-caption augmentation into the model design to further enable the model to process audio inputs of variable lengths and enhance the performance. Third, we perform comprehensive experiments to evaluate our model across three tasks: text-to-audio retrieval, zero-shot audio classification, and supervised audio classification. The results demonstrate that our model achieves superior performance in text-to-audio retrieval task. In audio classification tasks, the model achieves state-of-the-art performance in the zeroshot setting and is able to obtain performance comparable to models’ results in the non-zero-shot setting. LAION-Audio-6</em>",oo,Ze,Pn=`This model was contributed by <a href="https://huggingface.co/ybelkada" rel="nofollow">Younes Belkada</a> and <a href="https://huggingface.co/ArthurZ" rel="nofollow">Arthur Zucker</a> .
The original code can be found <a href="https://github.com/LAION-AI/Clap" rel="nofollow">here</a>.`,no,Ie,ao,k,Ee,jo,ht,Bn=`<a href="/docs/transformers/main/en/model_doc/clap#transformers.ClapConfig">ClapConfig</a> is the configuration class to store the configuration of a <a href="/docs/transformers/main/en/model_doc/clap#transformers.ClapModel">ClapModel</a>. It is used to instantiate
a CLAP model according to the specified arguments, defining the text model and audio model configs. Instantiating a
configuration with the defaults will yield a similar configuration to that of the CLAP
<a href="https://huggingface.co/laion/clap-htsat-fused" rel="nofollow">laion/clap-htsat-fused</a> architecture.`,ko,gt,Gn=`Configuration objects inherit from <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Jo,ie,Wo,le,Ue,zo,_t,Nn=`Instantiate a <a href="/docs/transformers/main/en/model_doc/clap#transformers.ClapConfig">ClapConfig</a> (or a derived class) from clap text model configuration and clap audio model
configuration.`,ro,qe,so,U,Ae,Fo,bt,Rn=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/en/model_doc/clap#transformers.ClapTextModel">ClapTextModel</a>. It is used to instantiate a CLAP
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 CLAP
<a href="https://huggingface.co/laion/clap-hsat-fused" rel="nofollow">calp-hsat-fused</a> architecture.`,Zo,Tt,Hn=`Configuration objects inherit from <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Io,de,io,Pe,lo,q,Be,Eo,yt,Vn=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/en/model_doc/clap#transformers.ClapAudioModel">ClapAudioModel</a>. It is used to instantiate a
CLAP audio encoder according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the audio encoder of the CLAP
<a href="https://huggingface.co/laion/clap-htsat-fused" rel="nofollow">laion/clap-htsat-fused</a> architecture.`,Uo,Ct,Xn=`Configuration objects inherit from <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,qo,ce,co,Ge,po,J,Ne,Ao,Mt,Ln="Constructs a CLAP feature extractor.",Po,vt,Yn=`This feature extractor inherits from <a href="/docs/transformers/main/en/main_classes/feature_extractor#transformers.SequenceFeatureExtractor">SequenceFeatureExtractor</a> which contains
most of the main methods. Users should refer to this superclass for more information regarding those methods.`,Bo,wt,Qn=`This class extracts mel-filter bank features from raw speech using a custom numpy implementation of the <em>Short Time
Fourier Transform</em> (STFT) which should match pytorch’s <code>torch.stft</code> equivalent.`,Go,pe,Re,No,$t,Sn="Serializes this instance to a Python dictionary.",mo,He,uo,W,Ve,Ro,xt,Dn="Constructs a CLAP processor which wraps a CLAP feature extractor and a RoBerta tokenizer into a single processor.",Ho,jt,On=`<a href="/docs/transformers/main/en/model_doc/clap#transformers.ClapProcessor">ClapProcessor</a> offers all the functionalities of <a href="/docs/transformers/main/en/model_doc/clap#transformers.ClapFeatureExtractor">ClapFeatureExtractor</a> and <a href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaTokenizerFast">RobertaTokenizerFast</a>. See the
<code>__call__()</code> and <a href="/docs/transformers/main/en/model_doc/clap#transformers.ClapProcessor.decode">decode()</a> for more information.`,Vo,me,Xe,Xo,kt,Kn=`This method forwards all its arguments to RobertaTokenizerFast’s <a href="/docs/transformers/main/en/model_doc/speech_to_text_2#transformers.Speech2Text2Tokenizer.batch_decode">batch_decode()</a>. Please
refer to the docstring of this method for more information.`,Lo,ue,Le,Yo,Jt,ea=`This method forwards all its arguments to RobertaTokenizerFast’s <a href="/docs/transformers/main/en/model_doc/speech_to_text_2#transformers.Speech2Text2Tokenizer.decode">decode()</a>. Please refer
to the docstring of this method for more information.`,fo,Ye,ho,j,Qe,Qo,Wt,ta=`This model inherits from <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</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.)`,So,zt,oa=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,Do,N,Se,Oo,Ft,na='The <a href="/docs/transformers/main/en/model_doc/clap#transformers.ClapModel">ClapModel</a> forward method, overrides the <code>__call__</code> special method.',Ko,fe,en,he,tn,R,De,on,Zt,aa='The <a href="/docs/transformers/main/en/model_doc/clap#transformers.ClapModel">ClapModel</a> forward method, overrides the <code>__call__</code> special method.',nn,ge,an,_e,rn,H,Oe,sn,It,ra='The <a href="/docs/transformers/main/en/model_doc/clap#transformers.ClapModel">ClapModel</a> forward method, overrides the <code>__call__</code> special method.',ln,be,dn,Te,go,Ke,_o,z,et,cn,Et,sa=`The model can behave as an encoder (with only self-attention) as well as a decoder, in which case a layer of
cross-attention is added between the self-attention layers, following the architecture described in <em>Attention is
all you need</em>_ by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz
Kaiser and Illia Polosukhin.`,pn,Ut,ia=`To behave as an decoder the model needs to be initialized with the <code>is_decoder</code> argument of the configuration set
to <code>True</code>. To be used in a Seq2Seq model, the model needs to initialized with both <code>is_decoder</code> argument and
<code>add_cross_attention</code> set to <code>True</code>; an <code>encoder_hidden_states</code> is then expected as an input to the forward pass.`,mn,qt,la='.. _<em>Attention is all you need</em>: <a href="https://arxiv.org/abs/1706.03762" rel="nofollow">https://arxiv.org/abs/1706.03762</a>',un,V,tt,fn,At,da=`encoder_hidden_states  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>):
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.
encoder_attention_mask (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>):
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:`,hn,Pt,ca=`<li>1 for tokens that are <strong>not masked</strong>,</li> <li>0 for tokens that are <strong>masked</strong>.
past_key_values (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>):
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.</li>`,gn,Bt,pa=`If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don’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>.
use_cache (<code>bool</code>, <em>optional</em>):
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>).`,bo,ot,To,F,nt,_n,Gt,ma="CLAP Text Model with a projection layer on top (a linear layer on top of the pooled output).",bn,Nt,ua=`This model inherits from <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</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.)`,Tn,Rt,fa=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,yn,X,at,Cn,Ht,ha='The <a href="/docs/transformers/main/en/model_doc/clap#transformers.ClapTextModelWithProjection">ClapTextModelWithProjection</a> forward method, overrides the <code>__call__</code> special method.',Mn,ye,vn,Ce,yo,rt,Co,ae,st,wn,L,it,$n,Vt,ga='The <a href="/docs/transformers/main/en/model_doc/clap#transformers.ClapAudioModel">ClapAudioModel</a> forward method, overrides the <code>__call__</code> special method.',xn,Me,jn,ve,Mo,lt,vo,Z,dt,kn,Xt,_a="CLAP Audio Model with a projection layer on top (a linear layer on top of the pooled output).",Jn,Lt,ba=`This model inherits from <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</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.)`,Wn,Yt,Ta=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,zn,Y,ct,Fn,Qt,ya='The <a href="/docs/transformers/main/en/model_doc/clap#transformers.ClapAudioModelWithProjection">ClapAudioModelWithProjection</a> forward method, overrides the <code>__call__</code> special method.',Zn,we,In,$e,wo,Dt,$o;return y=new Q({props:{title:"CLAP",local:"clap",headingTag:"h1"}}),M=new Q({props:{title:"Overview",local:"overview",headingTag:"h2"}}),Ie=new Q({props:{title:"ClapConfig",local:"transformers.ClapConfig",headingTag:"h2"}}),Ee=new x({props:{name:"class transformers.ClapConfig",anchor:"transformers.ClapConfig",parameters:[{name:"text_config",val:" = None"},{name:"audio_config",val:" = None"},{name:"logit_scale_init_value",val:" = 14.285714285714285"},{name:"projection_dim",val:" = 512"},{name:"projection_hidden_act",val:" = 'relu'"},{name:"initializer_factor",val:" = 1.0"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ClapConfig.text_config",description:`<strong>text_config</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Dictionary of configuration options used to initialize <a href="/docs/transformers/main/en/model_doc/clap#transformers.ClapTextConfig">ClapTextConfig</a>.`,name:"text_config"},{anchor:"transformers.ClapConfig.audio_config",description:`<strong>audio_config</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Dictionary of configuration options used to initialize <a href="/docs/transformers/main/en/model_doc/clap#transformers.ClapAudioConfig">ClapAudioConfig</a>.`,name:"audio_config"},{anchor:"transformers.ClapConfig.logit_scale_init_value",description:`<strong>logit_scale_init_value</strong> (<code>float</code>, <em>optional</em>, defaults to 14.29) &#x2014;
The inital value of the <em>logit_scale</em> paramter. Default is used as per the original CLAP implementation.`,name:"logit_scale_init_value"},{anchor:"transformers.ClapConfig.projection_dim",description:`<strong>projection_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Dimentionality of text and audio projection layers.`,name:"projection_dim"},{anchor:"transformers.ClapConfig.projection_hidden_act",description:`<strong>projection_hidden_act</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;relu&quot;</code>) &#x2014;
Activation function for the projection layers.`,name:"projection_hidden_act"},{anchor:"transformers.ClapConfig.initializer_factor",description:`<strong>initializer_factor</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
Factor to scale the initialization of the model weights.`,name:"initializer_factor"},{anchor:"transformers.ClapConfig.kwargs",description:`<strong>kwargs</strong> (<em>optional</em>) &#x2014;
Dictionary of keyword arguments.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clap/configuration_clap.py#L334"}}),ie=new re({props:{anchor:"transformers.ClapConfig.example",$$slots:{default:[xa]},$$scope:{ctx:v}}}),Ue=new x({props:{name:"from_text_audio_configs",anchor:"transformers.ClapConfig.from_text_audio_configs",parameters:[{name:"text_config",val:": ClapTextConfig"},{name:"audio_config",val:": ClapAudioConfig"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clap/configuration_clap.py#L422",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>An instance of a configuration object</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/en/model_doc/clap#transformers.ClapConfig"
>ClapConfig</a></p>
`}}),qe=new Q({props:{title:"ClapTextConfig",local:"transformers.ClapTextConfig",headingTag:"h2"}}),Ae=new x({props:{name:"class transformers.ClapTextConfig",anchor:"transformers.ClapTextConfig",parameters:[{name:"vocab_size",val:" = 50265"},{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"intermediate_size",val:" = 3072"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout_prob",val:" = 0.1"},{name:"attention_probs_dropout_prob",val:" = 0.1"},{name:"max_position_embeddings",val:" = 514"},{name:"type_vocab_size",val:" = 1"},{name:"initializer_factor",val:" = 1.0"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"projection_dim",val:" = 512"},{name:"pad_token_id",val:" = 1"},{name:"bos_token_id",val:" = 0"},{name:"eos_token_id",val:" = 2"},{name:"position_embedding_type",val:" = 'absolute'"},{name:"use_cache",val:" = True"},{name:"projection_hidden_act",val:" = 'relu'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ClapTextConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 30522) &#x2014;
Vocabulary size of the CLAP model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/clap#transformers.ClapTextModel">ClapTextModel</a>.`,name:"vocab_size"},{anchor:"transformers.ClapTextConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.ClapTextConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.ClapTextConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.ClapTextConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.ClapTextConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>Callable</code>, <em>optional</em>, defaults to <code>&quot;relu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;relu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;silu&quot;</code> and <code>&quot;relu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.ClapTextConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</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:"hidden_dropout_prob"},{anchor:"transformers.ClapTextConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.ClapTextConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#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_position_embeddings"},{anchor:"transformers.ClapTextConfig.type_vocab_size",description:`<strong>type_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The vocabulary size of the <code>token_type_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/clap#transformers.ClapTextModel">ClapTextModel</a>.`,name:"type_vocab_size"},{anchor:"transformers.ClapTextConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.ClapTextConfig.position_embedding_type",description:`<strong>position_embedding_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;absolute&quot;</code>) &#x2014;
Type of position embedding. Choose one of <code>&quot;absolute&quot;</code>, <code>&quot;relative_key&quot;</code>, <code>&quot;relative_key_query&quot;</code>. For
positional embeddings use <code>&quot;absolute&quot;</code>. For more information on <code>&quot;relative_key&quot;</code>, please refer to
<a href="https://arxiv.org/abs/1803.02155" rel="nofollow">Self-Attention with Relative Position Representations (Shaw et al.)</a>.
For more information on <code>&quot;relative_key_query&quot;</code>, please refer to <em>Method 4</em> in <a href="https://arxiv.org/abs/2009.13658" rel="nofollow">Improve Transformer Models
with Better Relative Position Embeddings (Huang et al.)</a>.`,name:"position_embedding_type"},{anchor:"transformers.ClapTextConfig.is_decoder",description:`<strong>is_decoder</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the model is used as a decoder or not. If <code>False</code>, the model is used as an encoder.`,name:"is_decoder"},{anchor:"transformers.ClapTextConfig.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). Only
relevant if <code>config.is_decoder=True</code>.`,name:"use_cache"},{anchor:"transformers.ClapTextConfig.projection_hidden_act",description:`<strong>projection_hidden_act</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;relu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the projection layer. 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:"projection_hidden_act"},{anchor:"transformers.ClapTextConfig.projection_dim",description:`<strong>projection_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Dimension of the projection head of the <code>ClapTextModelWithProjection</code>.`,name:"projection_dim"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clap/configuration_clap.py#L32"}}),de=new re({props:{anchor:"transformers.ClapTextConfig.example",$$slots:{default:[ja]},$$scope:{ctx:v}}}),Pe=new Q({props:{title:"ClapAudioConfig",local:"transformers.ClapAudioConfig",headingTag:"h2"}}),Be=new x({props:{name:"class transformers.ClapAudioConfig",anchor:"transformers.ClapAudioConfig",parameters:[{name:"window_size",val:" = 8"},{name:"num_mel_bins",val:" = 64"},{name:"spec_size",val:" = 256"},{name:"hidden_act",val:" = 'gelu'"},{name:"patch_size",val:" = 4"},{name:"patch_stride",val:" = [4, 4]"},{name:"num_classes",val:" = 527"},{name:"hidden_size",val:" = 768"},{name:"projection_dim",val:" = 512"},{name:"depths",val:" = [2, 2, 6, 2]"},{name:"num_attention_heads",val:" = [4, 8, 16, 32]"},{name:"enable_fusion",val:" = False"},{name:"hidden_dropout_prob",val:" = 0.1"},{name:"fusion_type",val:" = None"},{name:"patch_embed_input_channels",val:" = 1"},{name:"flatten_patch_embeds",val:" = True"},{name:"patch_embeds_hidden_size",val:" = 96"},{name:"enable_patch_layer_norm",val:" = True"},{name:"drop_path_rate",val:" = 0.0"},{name:"attention_probs_dropout_prob",val:" = 0.0"},{name:"qkv_bias",val:" = True"},{name:"mlp_ratio",val:" = 4.0"},{name:"aff_block_r",val:" = 4"},{name:"num_hidden_layers",val:" = 4"},{name:"projection_hidden_act",val:" = 'relu'"},{name:"layer_norm_eps",val:" = 1e-05"},{name:"initializer_factor",val:" = 1.0"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ClapAudioConfig.window_size",description:`<strong>window_size</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
Image size of the spectrogram`,name:"window_size"},{anchor:"transformers.ClapAudioConfig.num_mel_bins",description:`<strong>num_mel_bins</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014;
Number of mel features used per frames. Should correspond to the value used in the <code>ClapProcessor</code> class.`,name:"num_mel_bins"},{anchor:"transformers.ClapAudioConfig.spec_size",description:`<strong>spec_size</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Desired input size of the spectrogram that the model supports. It can be different from the output of the
<code>ClapFeatureExtractor</code>, in which case the input features will be resized. Corresponds to the <code>image_size</code>
of the audio models.`,name:"spec_size"},{anchor:"transformers.ClapAudioConfig.hidden_act",description:`<strong>hidden_act</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:"hidden_act"},{anchor:"transformers.ClapAudioConfig.patch_size",description:`<strong>patch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
Patch size for the audio spectrogram`,name:"patch_size"},{anchor:"transformers.ClapAudioConfig.patch_stride",description:`<strong>patch_stride</strong> (<code>list</code>, <em>optional</em>, defaults to <code>[4, 4]</code>) &#x2014;
Patch stride for the audio spectrogram`,name:"patch_stride"},{anchor:"transformers.ClapAudioConfig.num_classes",description:`<strong>num_classes</strong> (<code>int</code>, <em>optional</em>, defaults to 527) &#x2014;
Number of classes used for the head training`,name:"num_classes"},{anchor:"transformers.ClapAudioConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Hidden size of the output of the audio encoder. Correspond to the dimension of the penultimate layer&#x2019;s
output,which is sent to the projection MLP layer.`,name:"hidden_size"},{anchor:"transformers.ClapAudioConfig.projection_dim",description:`<strong>projection_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Hidden size of the projection layer.`,name:"projection_dim"},{anchor:"transformers.ClapAudioConfig.depths",description:`<strong>depths</strong> (<code>list</code>, <em>optional</em>, defaults to <code>[2, 2, 6, 2]</code>) &#x2014;
Depths used for the Swin Layers of the audio model`,name:"depths"},{anchor:"transformers.ClapAudioConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>list</code>, <em>optional</em>, defaults to <code>[4, 8, 16, 32]</code>) &#x2014;
Number of attention heads used for the Swin Layers of the audio model`,name:"num_attention_heads"},{anchor:"transformers.ClapAudioConfig.enable_fusion",description:`<strong>enable_fusion</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to enable patch fusion. This is the main contribution of the authors, and should give the
best results.`,name:"enable_fusion"},{anchor:"transformers.ClapAudioConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probabilitiy for all fully connected layers in the encoder.`,name:"hidden_dropout_prob"},{anchor:"transformers.ClapAudioConfig.fusion_type",description:`<strong>fusion_type</strong> (<code>[type]</code>, <em>optional</em>) &#x2014;
Fusion type used for the patch fusion.`,name:"fusion_type"},{anchor:"transformers.ClapAudioConfig.patch_embed_input_channels",description:`<strong>patch_embed_input_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Number of channels used for the input spectrogram`,name:"patch_embed_input_channels"},{anchor:"transformers.ClapAudioConfig.flatten_patch_embeds",description:`<strong>flatten_patch_embeds</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to flatten the patch embeddings`,name:"flatten_patch_embeds"},{anchor:"transformers.ClapAudioConfig.patch_embeds_hidden_size",description:`<strong>patch_embeds_hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 96) &#x2014;
Hidden size of the patch embeddings. It is used as the number of output channels.`,name:"patch_embeds_hidden_size"},{anchor:"transformers.ClapAudioConfig.enable_patch_layer_norm",description:`<strong>enable_patch_layer_norm</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to enable layer normalization for the patch embeddings`,name:"enable_patch_layer_norm"},{anchor:"transformers.ClapAudioConfig.drop_path_rate",description:`<strong>drop_path_rate</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Drop path rate for the patch fusion`,name:"drop_path_rate"},{anchor:"transformers.ClapAudioConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.ClapAudioConfig.qkv_bias",description:`<strong>qkv_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to add a bias to the query, key, value projections.`,name:"qkv_bias"},{anchor:"transformers.ClapAudioConfig.mlp_ratio",description:`<strong>mlp_ratio</strong> (<code>float</code>, <em>optional</em>, defaults to 4.0) &#x2014;
Ratio of the mlp hidden dim to embedding dim.`,name:"mlp_ratio"},{anchor:"transformers.ClapAudioConfig.aff_block_r",description:`<strong>aff_block_r</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
downsize_ratio used in the AudioFF block`,name:"aff_block_r"},{anchor:"transformers.ClapAudioConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.ClapAudioConfig.projection_hidden_act",description:`<strong>projection_hidden_act</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;relu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the projection layer. 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:"projection_hidden_act"},{anchor:"transformers.ClapAudioConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>[type]</code>, <em>optional</em>, defaults to 1e-05) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.ClapAudioConfig.initializer_factor",description:`<strong>initializer_factor</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
A factor for initializing all weight matrices (should be kept to 1, used internally for initialization
testing).`,name:"initializer_factor"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clap/configuration_clap.py#L164"}}),ce=new re({props:{anchor:"transformers.ClapAudioConfig.example",$$slots:{default:[ka]},$$scope:{ctx:v}}}),Ge=new Q({props:{title:"ClapFeatureExtractor",local:"transformers.ClapFeatureExtractor",headingTag:"h2"}}),Ne=new x({props:{name:"class transformers.ClapFeatureExtractor",anchor:"transformers.ClapFeatureExtractor",parameters:[{name:"feature_size",val:" = 64"},{name:"sampling_rate",val:" = 48000"},{name:"hop_length",val:" = 480"},{name:"max_length_s",val:" = 10"},{name:"fft_window_size",val:" = 1024"},{name:"padding_value",val:" = 0.0"},{name:"return_attention_mask",val:" = False"},{name:"frequency_min",val:": float = 0"},{name:"frequency_max",val:": float = 14000"},{name:"top_db",val:": int = None"},{name:"truncation",val:": str = 'fusion'"},{name:"padding",val:": str = 'repeatpad'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ClapFeatureExtractor.feature_size",description:`<strong>feature_size</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014;
The feature dimension of the extracted Mel spectrograms. This corresponds to the number of mel filters
(<code>n_mels</code>).`,name:"feature_size"},{anchor:"transformers.ClapFeatureExtractor.sampling_rate",description:`<strong>sampling_rate</strong> (<code>int</code>, <em>optional</em>, defaults to 48000) &#x2014;
The sampling rate at which the audio files should be digitalized expressed in hertz (Hz). This only serves
to warn users if the audio fed to the feature extractor does not have the same sampling rate.`,name:"sampling_rate"},{anchor:"transformers.ClapFeatureExtractor.hop_length",description:`<strong>hop_length</strong> (<code>int</code>,<em>optional</em>, defaults to 480) &#x2014;
Length of the overlaping windows for the STFT used to obtain the Mel Spectrogram. The audio will be split
in smaller <code>frames</code> with a step of <code>hop_length</code> between each frame.`,name:"hop_length"},{anchor:"transformers.ClapFeatureExtractor.max_length_s",description:`<strong>max_length_s</strong> (<code>int</code>, <em>optional</em>, defaults to 10) &#x2014;
The maximum input length of the model in seconds. This is used to pad the audio.`,name:"max_length_s"},{anchor:"transformers.ClapFeatureExtractor.fft_window_size",description:`<strong>fft_window_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
Size of the window (in samples) on which the Fourier transform is applied. This controls the frequency
resolution of the spectrogram. 400 means that the fourrier transform is computed on windows of 400 samples.`,name:"fft_window_size"},{anchor:"transformers.ClapFeatureExtractor.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"},{anchor:"transformers.ClapFeatureExtractor.return_attention_mask",description:`<strong>return_attention_mask</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the model should return the attention masks coresponding to the input.`,name:"return_attention_mask"},{anchor:"transformers.ClapFeatureExtractor.frequency_min",description:`<strong>frequency_min</strong> (<code>float</code>, <em>optional</em>, defaults to 0) &#x2014;
The lowest frequency of interest. The STFT will not be computed for values below this.`,name:"frequency_min"},{anchor:"transformers.ClapFeatureExtractor.frequency_max",description:`<strong>frequency_max</strong> (<code>float</code>, <em>optional</em>, defaults to 14000) &#x2014;
The highest frequency of interest. The STFT will not be computed for values above this.`,name:"frequency_max"},{anchor:"transformers.ClapFeatureExtractor.top_db",description:`<strong>top_db</strong> (<code>float</code>, <em>optional</em>) &#x2014;
The highest decibel value used to convert the mel spectrogram to the log scale. For more details see the
<code>audio_utils.power_to_db</code> function`,name:"top_db"},{anchor:"transformers.ClapFeatureExtractor.truncation",description:`<strong>truncation</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;fusion&quot;</code>) &#x2014;
Truncation pattern for long audio inputs. Two patterns are available:<ul>
<li><code>fusion</code> will use <code>_random_mel_fusion</code>, which stacks 3 random crops from the mel spectrogram and a
downsampled version of the entire mel spectrogram.
If <code>config.fusion</code> is set to True, shorter audios also need to to return 4 mels, which will just be a copy
of the original mel obtained from the padded audio.</li>
<li><code>rand_trunc</code> will select a random crop of the mel spectrogram.</li>
</ul>`,name:"truncation"},{anchor:"transformers.ClapFeatureExtractor.padding",description:`<strong>padding</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;repeatpad&quot;</code>) &#x2014;
Padding pattern for shorter audio inputs. Three patterns were originally implemented:<ul>
<li><code>repeatpad</code>: the audio is repeated, and then padded to fit the <code>max_length</code>.</li>
<li><code>repeat</code>: the audio is repeated and then cut to fit the <code>max_length</code></li>
<li><code>pad</code>: the audio is padded.</li>
</ul>`,name:"padding"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clap/feature_extraction_clap.py#L33"}}),Re=new x({props:{name:"to_dict",anchor:"transformers.ClapFeatureExtractor.to_dict",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clap/feature_extraction_clap.py#L138",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>Dictionary of all the attributes that make up this configuration instance, excpet for the
mel filter banks, which do not need to be saved or printed as they are too long.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>Dict[str, Any]</code></p>
`}}),He=new Q({props:{title:"ClapProcessor",local:"transformers.ClapProcessor",headingTag:"h2"}}),Ve=new x({props:{name:"class transformers.ClapProcessor",anchor:"transformers.ClapProcessor",parameters:[{name:"feature_extractor",val:""},{name:"tokenizer",val:""}],parametersDescription:[{anchor:"transformers.ClapProcessor.feature_extractor",description:`<strong>feature_extractor</strong> (<a href="/docs/transformers/main/en/model_doc/clap#transformers.ClapFeatureExtractor">ClapFeatureExtractor</a>) &#x2014;
The audio processor is a required input.`,name:"feature_extractor"},{anchor:"transformers.ClapProcessor.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/main/en/model_doc/roberta#transformers.RobertaTokenizerFast">RobertaTokenizerFast</a>) &#x2014;
The tokenizer is a required input.`,name:"tokenizer"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clap/processing_clap.py#L23"}}),Xe=new x({props:{name:"batch_decode",anchor:"transformers.ClapProcessor.batch_decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clap/processing_clap.py#L99"}}),Le=new x({props:{name:"decode",anchor:"transformers.ClapProcessor.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clap/processing_clap.py#L106"}}),Ye=new Q({props:{title:"ClapModel",local:"transformers.ClapModel",headingTag:"h2"}}),Qe=new x({props:{name:"class transformers.ClapModel",anchor:"transformers.ClapModel",parameters:[{name:"config",val:": ClapConfig"}],parametersDescription:[{anchor:"transformers.ClapModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/clap#transformers.ClapConfig">ClapConfig</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/clap/modeling_clap.py#L1921"}}),Se=new x({props:{name:"forward",anchor:"transformers.ClapModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"input_features",val:": typing.Optional[torch.FloatTensor] = None"},{name:"is_longer",val:": typing.Optional[torch.BoolTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"return_loss",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.ClapModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/fastspeech2_conformer#transformers.FastSpeech2ConformerTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.ClapModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.ClapModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.ClapModel.forward.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Input audio features. This should be returnes by the <a href="/docs/transformers/main/en/model_doc/clap#transformers.ClapFeatureExtractor">ClapFeatureExtractor</a> class that you can also
retrieve from <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoFeatureExtractor">AutoFeatureExtractor</a>. See <code>ClapFeatureExtractor.__call__()</code> for details.`,name:"input_features"},{anchor:"transformers.ClapModel.forward.return_loss",description:`<strong>return_loss</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the contrastive loss.`,name:"return_loss"},{anchor:"transformers.ClapModel.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.ClapModel.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.ClapModel.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/clap/modeling_clap.py#L2050",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.clap.modeling_clap.ClapOutput</code> 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 (<code>&lt;class 'transformers.models.clap.configuration_clap.ClapConfig'&gt;</code>) and inputs.</p>
<ul>
<li><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>return_loss</code> is <code>True</code>) — Contrastive loss for audio-text similarity.</li>
<li><strong>logits_per_audio:(<code>torch.FloatTensor</code></strong> of shape <code>(audio_batch_size, text_batch_size)</code>) — The scaled dot product scores between <code>audio_embeds</code> and <code>text_embeds</code>. This represents the audio-text
similarity scores.</li>
<li><strong>logits_per_text:(<code>torch.FloatTensor</code></strong> of shape <code>(text_batch_size, audio_batch_size)</code>) — The scaled dot product scores between <code>text_embeds</code> and <code>audio_embeds</code>. This represents the text-audio
similarity scores.</li>
<li><strong>text_embeds(<code>torch.FloatTensor</code></strong> of shape <code>(batch_size, output_dim</code>) — The text embeddings obtained by applying the projection layer to the pooled output of <a
  href="/docs/transformers/main/en/model_doc/clap#transformers.ClapTextModel"
>ClapTextModel</a>.</li>
<li><strong>audio_embeds(<code>torch.FloatTensor</code></strong> of shape <code>(batch_size, output_dim</code>) — The audio embeddings obtained by applying the projection layer to the pooled output of <a
  href="/docs/transformers/main/en/model_doc/clap#transformers.ClapAudioModel"
>ClapAudioModel</a>.</li>
<li><strong>text_model_output(<code>BaseModelOutputWithPooling</code>):</strong>
The output of the <a
  href="/docs/transformers/main/en/model_doc/clap#transformers.ClapTextModel"
>ClapTextModel</a>.</li>
<li><strong>audio_model_output(<code>BaseModelOutputWithPooling</code>):</strong>
The output of the <a
  href="/docs/transformers/main/en/model_doc/clap#transformers.ClapAudioModel"
>ClapAudioModel</a>.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.clap.modeling_clap.ClapOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),fe=new St({props:{$$slots:{default:[Ja]},$$scope:{ctx:v}}}),he=new re({props:{anchor:"transformers.ClapModel.forward.example",$$slots:{default:[Wa]},$$scope:{ctx:v}}}),De=new x({props:{name:"get_text_features",anchor:"transformers.ClapModel.get_text_features",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = 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.ClapModel.get_text_features.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/fastspeech2_conformer#transformers.FastSpeech2ConformerTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.ClapModel.get_text_features.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.ClapModel.get_text_features.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.ClapModel.get_text_features.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.ClapModel.get_text_features.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.ClapModel.get_text_features.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/clap/modeling_clap.py#L1956",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The text embeddings obtained by
applying the projection layer to the pooled output of <a
  href="/docs/transformers/main/en/model_doc/clap#transformers.ClapTextModel"
>ClapTextModel</a>.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>text_features (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim</code>)</p>
`}}),ge=new St({props:{$$slots:{default:[za]},$$scope:{ctx:v}}}),_e=new re({props:{anchor:"transformers.ClapModel.get_text_features.example",$$slots:{default:[Fa]},$$scope:{ctx:v}}}),Oe=new x({props:{name:"get_audio_features",anchor:"transformers.ClapModel.get_audio_features",parameters:[{name:"input_features",val:": typing.Optional[torch.Tensor] = None"},{name:"is_longer",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = 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.ClapModel.get_audio_features.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Input audio features. This should be returnes by the <a href="/docs/transformers/main/en/model_doc/clap#transformers.ClapFeatureExtractor">ClapFeatureExtractor</a> class that you can also
retrieve from <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoFeatureExtractor">AutoFeatureExtractor</a>. See <code>ClapFeatureExtractor.__call__()</code> for details.`,name:"input_features"},{anchor:"transformers.ClapModel.get_audio_features.is_longer",description:`<strong>is_longer</strong> (<code>torch.FloatTensor</code>, of shape <code>(batch_size, 1)</code>, <em>optional</em>) &#x2014;
Whether the audio clip is longer than <code>max_length</code>. If <code>True</code>, a feature fusion will be enabled to enhance
the features.`,name:"is_longer"},{anchor:"transformers.ClapModel.get_audio_features.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.ClapModel.get_audio_features.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.ClapModel.get_audio_features.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/clap/modeling_clap.py#L2004",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The audio embeddings obtained by
applying the projection layer to the pooled output of <a
  href="/docs/transformers/main/en/model_doc/clap#transformers.ClapAudioModel"
>ClapAudioModel</a>.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>audio_features (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim</code>)</p>
`}}),be=new St({props:{$$slots:{default:[Za]},$$scope:{ctx:v}}}),Te=new re({props:{anchor:"transformers.ClapModel.get_audio_features.example",$$slots:{default:[Ia]},$$scope:{ctx:v}}}),Ke=new Q({props:{title:"ClapTextModel",local:"transformers.ClapTextModel",headingTag:"h2"}}),et=new x({props:{name:"class transformers.ClapTextModel",anchor:"transformers.ClapTextModel",parameters:[{name:"config",val:""},{name:"add_pooling_layer",val:" = True"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clap/modeling_clap.py#L1751"}}),tt=new x({props:{name:"forward",anchor:"transformers.ClapTextModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.List[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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clap/modeling_clap.py#L1789"}}),ot=new Q({props:{title:"ClapTextModelWithProjection",local:"transformers.ClapTextModelWithProjection",headingTag:"h2"}}),nt=new x({props:{name:"class transformers.ClapTextModelWithProjection",anchor:"transformers.ClapTextModelWithProjection",parameters:[{name:"config",val:": ClapTextConfig"}],parametersDescription:[{anchor:"transformers.ClapTextModelWithProjection.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/clap#transformers.ClapConfig">ClapConfig</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/clap/modeling_clap.py#L2154"}}),at=new x({props:{name:"forward",anchor:"transformers.ClapTextModelWithProjection.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = 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.ClapTextModelWithProjection.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/fastspeech2_conformer#transformers.FastSpeech2ConformerTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.ClapTextModelWithProjection.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.ClapTextModelWithProjection.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.ClapTextModelWithProjection.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.ClapTextModelWithProjection.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.ClapTextModelWithProjection.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/clap/modeling_clap.py#L2170",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.clap.modeling_clap.ClapTextModelOutput</code> 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 (<code>&lt;class 'transformers.models.clap.configuration_clap.ClapTextConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>text_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim)</code> <em>optional</em> returned when model is initialized with <code>with_projection=True</code>) — The text embeddings obtained by applying the projection layer to the pooler_output.</p>
</li>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) — Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.clap.modeling_clap.ClapTextModelOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ye=new St({props:{$$slots:{default:[Ea]},$$scope:{ctx:v}}}),Ce=new re({props:{anchor:"transformers.ClapTextModelWithProjection.forward.example",$$slots:{default:[Ua]},$$scope:{ctx:v}}}),rt=new Q({props:{title:"ClapAudioModel",local:"transformers.ClapAudioModel",headingTag:"h2"}}),st=new x({props:{name:"class transformers.ClapAudioModel",anchor:"transformers.ClapAudioModel",parameters:[{name:"config",val:": ClapAudioConfig"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/clap/modeling_clap.py#L1693"}}),it=new x({props:{name:"forward",anchor:"transformers.ClapAudioModel.forward",parameters:[{name:"input_features",val:": typing.Optional[torch.FloatTensor] = None"},{name:"is_longer",val:": typing.Optional[torch.BoolTensor] = 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.ClapAudioModel.forward.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Input audio features. This should be returnes by the <a href="/docs/transformers/main/en/model_doc/clap#transformers.ClapFeatureExtractor">ClapFeatureExtractor</a> class that you can also
retrieve from <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoFeatureExtractor">AutoFeatureExtractor</a>. See <code>ClapFeatureExtractor.__call__()</code> for details.`,name:"input_features"},{anchor:"transformers.ClapAudioModel.forward.is_longer",description:`<strong>is_longer</strong> (<code>torch.FloatTensor</code>, of shape <code>(batch_size, 1)</code>, <em>optional</em>) &#x2014;
Whether the audio clip is longer than <code>max_length</code>. If <code>True</code>, a feature fusion will be enabled to enhance
the features.`,name:"is_longer"},{anchor:"transformers.ClapAudioModel.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.ClapAudioModel.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.ClapAudioModel.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/clap/modeling_clap.py#L1706",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</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 (<code>&lt;class 'transformers.models.clap.configuration_clap.ClapAudioConfig'&gt;</code>) 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>) — Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) — Last layer hidden-state of the first token of the sequence (classification token) after further processing
through the layers used for the auxiliary pretraining task. E.g. for BERT-family of models, this returns
the classification token after processing through a linear layer and a tanh activation function. The linear
layer weights are trained from the next sentence prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Me=new St({props:{$$slots:{default:[qa]},$$scope:{ctx:v}}}),ve=new re({props:{anchor:"transformers.ClapAudioModel.forward.example",$$slots:{default:[Aa]},$$scope:{ctx:v}}}),lt=new Q({props:{title:"ClapAudioModelWithProjection",local:"transformers.ClapAudioModelWithProjection",headingTag:"h2"}}),dt=new x({props:{name:"class transformers.ClapAudioModelWithProjection",anchor:"transformers.ClapAudioModelWithProjection",parameters:[{name:"config",val:": ClapAudioConfig"}],parametersDescription:[{anchor:"transformers.ClapAudioModelWithProjection.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/clap#transformers.ClapConfig">ClapConfig</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/clap/modeling_clap.py#L2230"}}),ct=new x({props:{name:"forward",anchor:"transformers.ClapAudioModelWithProjection.forward",parameters:[{name:"input_features",val:": typing.Optional[torch.FloatTensor] = None"},{name:"is_longer",val:": typing.Optional[torch.BoolTensor] = 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.ClapAudioModelWithProjection.forward.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Input audio features. This should be returnes by the <a href="/docs/transformers/main/en/model_doc/clap#transformers.ClapFeatureExtractor">ClapFeatureExtractor</a> class that you can also
retrieve from <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoFeatureExtractor">AutoFeatureExtractor</a>. See <code>ClapFeatureExtractor.__call__()</code> for details.`,name:"input_features"},{anchor:"transformers.ClapAudioModelWithProjection.forward.is_longer",description:`<strong>is_longer</strong> (<code>torch.FloatTensor</code>, of shape <code>(batch_size, 1)</code>, <em>optional</em>) &#x2014;
Whether the audio clip is longer than <code>max_length</code>. If <code>True</code>, a feature fusion will be enabled to enhance
the features.`,name:"is_longer"},{anchor:"transformers.ClapAudioModelWithProjection.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.ClapAudioModelWithProjection.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.ClapAudioModelWithProjection.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/clap/modeling_clap.py#L2244",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.clap.modeling_clap.ClapAudioModelOutput</code> 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 (<code>&lt;class 'transformers.models.clap.configuration_clap.ClapAudioConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>audio_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) — The Audio embeddings obtained by applying the projection layer to the pooler_output.</p>
</li>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) — Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.clap.modeling_clap.ClapAudioModelOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),we=new St({props:{$$slots:{default:[Pa]},$$scope:{ctx:v}}}),$e=new re({props:{anchor:"transformers.ClapAudioModelWithProjection.forward.example",$$slots:{default:[Ba]},$$scope:{ctx:v}}}),{c(){o=c("meta"),C=a(),d=c("p"),l=a(),u(y.$$.fragment),t=a(),u(M.$$.fragment),Ot=a(),Je=c("p"),Je.innerHTML=En,Kt=a(),We=c("p"),We.textContent=Un,eo=a(),ze=c("p"),ze.textContent=qn,to=a(),Fe=c("p"),Fe.innerHTML=An,oo=a(),Ze=c("p"),Ze.innerHTML=Pn,no=a(),u(Ie.$$.fragment),ao=a(),k=c("div"),u(Ee.$$.fragment),jo=a(),ht=c("p"),ht.innerHTML=Bn,ko=a(),gt=c("p"),gt.innerHTML=Gn,Jo=a(),u(ie.$$.fragment),Wo=a(),le=c("div"),u(Ue.$$.fragment),zo=a(),_t=c("p"),_t.innerHTML=Nn,ro=a(),u(qe.$$.fragment),so=a(),U=c("div"),u(Ae.$$.fragment),Fo=a(),bt=c("p"),bt.innerHTML=Rn,Zo=a(),Tt=c("p"),Tt.innerHTML=Hn,Io=a(),u(de.$$.fragment),io=a(),u(Pe.$$.fragment),lo=a(),q=c("div"),u(Be.$$.fragment),Eo=a(),yt=c("p"),yt.innerHTML=Vn,Uo=a(),Ct=c("p"),Ct.innerHTML=Xn,qo=a(),u(ce.$$.fragment),co=a(),u(Ge.$$.fragment),po=a(),J=c("div"),u(Ne.$$.fragment),Ao=a(),Mt=c("p"),Mt.textContent=Ln,Po=a(),vt=c("p"),vt.innerHTML=Yn,Bo=a(),wt=c("p"),wt.innerHTML=Qn,Go=a(),pe=c("div"),u(Re.$$.fragment),No=a(),$t=c("p"),$t.textContent=Sn,mo=a(),u(He.$$.fragment),uo=a(),W=c("div"),u(Ve.$$.fragment),Ro=a(),xt=c("p"),xt.textContent=Dn,Ho=a(),jt=c("p"),jt.innerHTML=On,Vo=a(),me=c("div"),u(Xe.$$.fragment),Xo=a(),kt=c("p"),kt.innerHTML=Kn,Lo=a(),ue=c("div"),u(Le.$$.fragment),Yo=a(),Jt=c("p"),Jt.innerHTML=ea,fo=a(),u(Ye.$$.fragment),ho=a(),j=c("div"),u(Qe.$$.fragment),Qo=a(),Wt=c("p"),Wt.innerHTML=ta,So=a(),zt=c("p"),zt.innerHTML=oa,Do=a(),N=c("div"),u(Se.$$.fragment),Oo=a(),Ft=c("p"),Ft.innerHTML=na,Ko=a(),u(fe.$$.fragment),en=a(),u(he.$$.fragment),tn=a(),R=c("div"),u(De.$$.fragment),on=a(),Zt=c("p"),Zt.innerHTML=aa,nn=a(),u(ge.$$.fragment),an=a(),u(_e.$$.fragment),rn=a(),H=c("div"),u(Oe.$$.fragment),sn=a(),It=c("p"),It.innerHTML=ra,ln=a(),u(be.$$.fragment),dn=a(),u(Te.$$.fragment),go=a(),u(Ke.$$.fragment),_o=a(),z=c("div"),u(et.$$.fragment),cn=a(),Et=c("p"),Et.innerHTML=sa,pn=a(),Ut=c("p"),Ut.innerHTML=ia,mn=a(),qt=c("p"),qt.innerHTML=la,un=a(),V=c("div"),u(tt.$$.fragment),fn=a(),At=c("p"),At.innerHTML=da,hn=a(),Pt=c("ul"),Pt.innerHTML=ca,gn=a(),Bt=c("p"),Bt.innerHTML=pa,bo=a(),u(ot.$$.fragment),To=a(),F=c("div"),u(nt.$$.fragment),_n=a(),Gt=c("p"),Gt.textContent=ma,bn=a(),Nt=c("p"),Nt.innerHTML=ua,Tn=a(),Rt=c("p"),Rt.innerHTML=fa,yn=a(),X=c("div"),u(at.$$.fragment),Cn=a(),Ht=c("p"),Ht.innerHTML=ha,Mn=a(),u(ye.$$.fragment),vn=a(),u(Ce.$$.fragment),yo=a(),u(rt.$$.fragment),Co=a(),ae=c("div"),u(st.$$.fragment),wn=a(),L=c("div"),u(it.$$.fragment),$n=a(),Vt=c("p"),Vt.innerHTML=ga,xn=a(),u(Me.$$.fragment),jn=a(),u(ve.$$.fragment),Mo=a(),u(lt.$$.fragment),vo=a(),Z=c("div"),u(dt.$$.fragment),kn=a(),Xt=c("p"),Xt.textContent=_a,Jn=a(),Lt=c("p"),Lt.innerHTML=ba,Wn=a(),Yt=c("p"),Yt.innerHTML=Ta,zn=a(),Y=c("div"),u(ct.$$.fragment),Fn=a(),Qt=c("p"),Qt.innerHTML=ya,Zn=a(),u(we.$$.fragment),In=a(),u($e.$$.fragment),wo=a(),Dt=c("p"),this.h()},l(e){const i=$a("svelte-u9bgzb",document.head);o=p(i,"META",{name:!0,content:!0}),i.forEach(s),C=r(e),d=p(e,"P",{}),w(d).forEach(s),l=r(e),f(y.$$.fragment,e),t=r(e),f(M.$$.fragment,e),Ot=r(e),Je=p(e,"P",{"data-svelte-h":!0}),T(Je)!=="svelte-1rgr5k6"&&(Je.innerHTML=En),Kt=r(e),We=p(e,"P",{"data-svelte-h":!0}),T(We)!=="svelte-1hchyqh"&&(We.textContent=Un),eo=r(e),ze=p(e,"P",{"data-svelte-h":!0}),T(ze)!=="svelte-vfdo9a"&&(ze.textContent=qn),to=r(e),Fe=p(e,"P",{"data-svelte-h":!0}),T(Fe)!=="svelte-yqbs9j"&&(Fe.innerHTML=An),oo=r(e),Ze=p(e,"P",{"data-svelte-h":!0}),T(Ze)!=="svelte-uc7vjr"&&(Ze.innerHTML=Pn),no=r(e),f(Ie.$$.fragment,e),ao=r(e),k=p(e,"DIV",{class:!0});var A=w(k);f(Ee.$$.fragment,A),jo=r(A),ht=p(A,"P",{"data-svelte-h":!0}),T(ht)!=="svelte-oc99ph"&&(ht.innerHTML=Bn),ko=r(A),gt=p(A,"P",{"data-svelte-h":!0}),T(gt)!=="svelte-o55m63"&&(gt.innerHTML=Gn),Jo=r(A),f(ie.$$.fragment,A),Wo=r(A),le=p(A,"DIV",{class:!0});var pt=w(le);f(Ue.$$.fragment,pt),zo=r(pt),_t=p(pt,"P",{"data-svelte-h":!0}),T(_t)!=="svelte-w0c7q2"&&(_t.innerHTML=Nn),pt.forEach(s),A.forEach(s),ro=r(e),f(qe.$$.fragment,e),so=r(e),U=p(e,"DIV",{class:!0});var S=w(U);f(Ae.$$.fragment,S),Fo=r(S),bt=p(S,"P",{"data-svelte-h":!0}),T(bt)!=="svelte-1as5t3v"&&(bt.innerHTML=Rn),Zo=r(S),Tt=p(S,"P",{"data-svelte-h":!0}),T(Tt)!=="svelte-o55m63"&&(Tt.innerHTML=Hn),Io=r(S),f(de.$$.fragment,S),S.forEach(s),io=r(e),f(Pe.$$.fragment,e),lo=r(e),q=p(e,"DIV",{class:!0});var D=w(q);f(Be.$$.fragment,D),Eo=r(D),yt=p(D,"P",{"data-svelte-h":!0}),T(yt)!=="svelte-1kx47yi"&&(yt.innerHTML=Vn),Uo=r(D),Ct=p(D,"P",{"data-svelte-h":!0}),T(Ct)!=="svelte-o55m63"&&(Ct.innerHTML=Xn),qo=r(D),f(ce.$$.fragment,D),D.forEach(s),co=r(e),f(Ge.$$.fragment,e),po=r(e),J=p(e,"DIV",{class:!0});var P=w(J);f(Ne.$$.fragment,P),Ao=r(P),Mt=p(P,"P",{"data-svelte-h":!0}),T(Mt)!=="svelte-2rs2ud"&&(Mt.textContent=Ln),Po=r(P),vt=p(P,"P",{"data-svelte-h":!0}),T(vt)!=="svelte-3gz575"&&(vt.innerHTML=Yn),Bo=r(P),wt=p(P,"P",{"data-svelte-h":!0}),T(wt)!=="svelte-5gq0sj"&&(wt.innerHTML=Qn),Go=r(P),pe=p(P,"DIV",{class:!0});var mt=w(pe);f(Re.$$.fragment,mt),No=r(mt),$t=p(mt,"P",{"data-svelte-h":!0}),T($t)!=="svelte-1ww3wqq"&&($t.textContent=Sn),mt.forEach(s),P.forEach(s),mo=r(e),f(He.$$.fragment,e),uo=r(e),W=p(e,"DIV",{class:!0});var B=w(W);f(Ve.$$.fragment,B),Ro=r(B),xt=p(B,"P",{"data-svelte-h":!0}),T(xt)!=="svelte-l868x"&&(xt.textContent=Dn),Ho=r(B),jt=p(B,"P",{"data-svelte-h":!0}),T(jt)!=="svelte-sm1hpt"&&(jt.innerHTML=On),Vo=r(B),me=p(B,"DIV",{class:!0});var ut=w(me);f(Xe.$$.fragment,ut),Xo=r(ut),kt=p(ut,"P",{"data-svelte-h":!0}),T(kt)!=="svelte-1x1m993"&&(kt.innerHTML=Kn),ut.forEach(s),Lo=r(B),ue=p(B,"DIV",{class:!0});var ft=w(ue);f(Le.$$.fragment,ft),Yo=r(ft),Jt=p(ft,"P",{"data-svelte-h":!0}),T(Jt)!=="svelte-1pnyh7h"&&(Jt.innerHTML=ea),ft.forEach(s),B.forEach(s),fo=r(e),f(Ye.$$.fragment,e),ho=r(e),j=p(e,"DIV",{class:!0});var I=w(j);f(Qe.$$.fragment,I),Qo=r(I),Wt=p(I,"P",{"data-svelte-h":!0}),T(Wt)!=="svelte-6pahdo"&&(Wt.innerHTML=ta),So=r(I),zt=p(I,"P",{"data-svelte-h":!0}),T(zt)!=="svelte-hswkmf"&&(zt.innerHTML=oa),Do=r(I),N=p(I,"DIV",{class:!0});var O=w(N);f(Se.$$.fragment,O),Oo=r(O),Ft=p(O,"P",{"data-svelte-h":!0}),T(Ft)!=="svelte-1uk7jr9"&&(Ft.innerHTML=na),Ko=r(O),f(fe.$$.fragment,O),en=r(O),f(he.$$.fragment,O),O.forEach(s),tn=r(I),R=p(I,"DIV",{class:!0});var K=w(R);f(De.$$.fragment,K),on=r(K),Zt=p(K,"P",{"data-svelte-h":!0}),T(Zt)!=="svelte-1uk7jr9"&&(Zt.innerHTML=aa),nn=r(K),f(ge.$$.fragment,K),an=r(K),f(_e.$$.fragment,K),K.forEach(s),rn=r(I),H=p(I,"DIV",{class:!0});var ee=w(H);f(Oe.$$.fragment,ee),sn=r(ee),It=p(ee,"P",{"data-svelte-h":!0}),T(It)!=="svelte-1uk7jr9"&&(It.innerHTML=ra),ln=r(ee),f(be.$$.fragment,ee),dn=r(ee),f(Te.$$.fragment,ee),ee.forEach(s),I.forEach(s),go=r(e),f(Ke.$$.fragment,e),_o=r(e),z=p(e,"DIV",{class:!0});var G=w(z);f(et.$$.fragment,G),cn=r(G),Et=p(G,"P",{"data-svelte-h":!0}),T(Et)!=="svelte-rehfhh"&&(Et.innerHTML=sa),pn=r(G),Ut=p(G,"P",{"data-svelte-h":!0}),T(Ut)!=="svelte-174erte"&&(Ut.innerHTML=ia),mn=r(G),qt=p(G,"P",{"data-svelte-h":!0}),T(qt)!=="svelte-p9qvd1"&&(qt.innerHTML=la),un=r(G),V=p(G,"DIV",{class:!0});var te=w(V);f(tt.$$.fragment,te),fn=r(te),At=p(te,"P",{"data-svelte-h":!0}),T(At)!=="svelte-1h74cdd"&&(At.innerHTML=da),hn=r(te),Pt=p(te,"UL",{"data-svelte-h":!0}),T(Pt)!=="svelte-1ouiqrx"&&(Pt.innerHTML=ca),gn=r(te),Bt=p(te,"P",{"data-svelte-h":!0}),T(Bt)!=="svelte-hzr4zl"&&(Bt.innerHTML=pa),te.forEach(s),G.forEach(s),bo=r(e),f(ot.$$.fragment,e),To=r(e),F=p(e,"DIV",{class:!0});var oe=w(F);f(nt.$$.fragment,oe),_n=r(oe),Gt=p(oe,"P",{"data-svelte-h":!0}),T(Gt)!=="svelte-1kjof0d"&&(Gt.textContent=ma),bn=r(oe),Nt=p(oe,"P",{"data-svelte-h":!0}),T(Nt)!=="svelte-6pahdo"&&(Nt.innerHTML=ua),Tn=r(oe),Rt=p(oe,"P",{"data-svelte-h":!0}),T(Rt)!=="svelte-hswkmf"&&(Rt.innerHTML=fa),yn=r(oe),X=p(oe,"DIV",{class:!0});var xe=w(X);f(at.$$.fragment,xe),Cn=r(xe),Ht=p(xe,"P",{"data-svelte-h":!0}),T(Ht)!=="svelte-13etk6h"&&(Ht.innerHTML=ha),Mn=r(xe),f(ye.$$.fragment,xe),vn=r(xe),f(Ce.$$.fragment,xe),xe.forEach(s),oe.forEach(s),yo=r(e),f(rt.$$.fragment,e),Co=r(e),ae=p(e,"DIV",{class:!0});var xo=w(ae);f(st.$$.fragment,xo),wn=r(xo),L=p(xo,"DIV",{class:!0});var je=w(L);f(it.$$.fragment,je),$n=r(je),Vt=p(je,"P",{"data-svelte-h":!0}),T(Vt)!=="svelte-1t0xkbn"&&(Vt.innerHTML=ga),xn=r(je),f(Me.$$.fragment,je),jn=r(je),f(ve.$$.fragment,je),je.forEach(s),xo.forEach(s),Mo=r(e),f(lt.$$.fragment,e),vo=r(e),Z=p(e,"DIV",{class:!0});var ne=w(Z);f(dt.$$.fragment,ne),kn=r(ne),Xt=p(ne,"P",{"data-svelte-h":!0}),T(Xt)!=="svelte-vug57w"&&(Xt.textContent=_a),Jn=r(ne),Lt=p(ne,"P",{"data-svelte-h":!0}),T(Lt)!=="svelte-6pahdo"&&(Lt.innerHTML=ba),Wn=r(ne),Yt=p(ne,"P",{"data-svelte-h":!0}),T(Yt)!=="svelte-hswkmf"&&(Yt.innerHTML=Ta),zn=r(ne),Y=p(ne,"DIV",{class:!0});var ke=w(Y);f(ct.$$.fragment,ke),Fn=r(ke),Qt=p(ke,"P",{"data-svelte-h":!0}),T(Qt)!=="svelte-1lnw82x"&&(Qt.innerHTML=ya),Zn=r(ke),f(we.$$.fragment,ke),In=r(ke),f($e.$$.fragment,ke),ke.forEach(s),ne.forEach(s),wo=r(e),Dt=p(e,"P",{}),w(Dt).forEach(s),this.h()},h(){$(o,"name","hf:doc:metadata"),$(o,"content",Na),$(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,i){n(document.head,o),m(e,C,i),m(e,d,i),m(e,l,i),h(y,e,i),m(e,t,i),h(M,e,i),m(e,Ot,i),m(e,Je,i),m(e,Kt,i),m(e,We,i),m(e,eo,i),m(e,ze,i),m(e,to,i),m(e,Fe,i),m(e,oo,i),m(e,Ze,i),m(e,no,i),h(Ie,e,i),m(e,ao,i),m(e,k,i),h(Ee,k,null),n(k,jo),n(k,ht),n(k,ko),n(k,gt),n(k,Jo),h(ie,k,null),n(k,Wo),n(k,le),h(Ue,le,null),n(le,zo),n(le,_t),m(e,ro,i),h(qe,e,i),m(e,so,i),m(e,U,i),h(Ae,U,null),n(U,Fo),n(U,bt),n(U,Zo),n(U,Tt),n(U,Io),h(de,U,null),m(e,io,i),h(Pe,e,i),m(e,lo,i),m(e,q,i),h(Be,q,null),n(q,Eo),n(q,yt),n(q,Uo),n(q,Ct),n(q,qo),h(ce,q,null),m(e,co,i),h(Ge,e,i),m(e,po,i),m(e,J,i),h(Ne,J,null),n(J,Ao),n(J,Mt),n(J,Po),n(J,vt),n(J,Bo),n(J,wt),n(J,Go),n(J,pe),h(Re,pe,null),n(pe,No),n(pe,$t),m(e,mo,i),h(He,e,i),m(e,uo,i),m(e,W,i),h(Ve,W,null),n(W,Ro),n(W,xt),n(W,Ho),n(W,jt),n(W,Vo),n(W,me),h(Xe,me,null),n(me,Xo),n(me,kt),n(W,Lo),n(W,ue),h(Le,ue,null),n(ue,Yo),n(ue,Jt),m(e,fo,i),h(Ye,e,i),m(e,ho,i),m(e,j,i),h(Qe,j,null),n(j,Qo),n(j,Wt),n(j,So),n(j,zt),n(j,Do),n(j,N),h(Se,N,null),n(N,Oo),n(N,Ft),n(N,Ko),h(fe,N,null),n(N,en),h(he,N,null),n(j,tn),n(j,R),h(De,R,null),n(R,on),n(R,Zt),n(R,nn),h(ge,R,null),n(R,an),h(_e,R,null),n(j,rn),n(j,H),h(Oe,H,null),n(H,sn),n(H,It),n(H,ln),h(be,H,null),n(H,dn),h(Te,H,null),m(e,go,i),h(Ke,e,i),m(e,_o,i),m(e,z,i),h(et,z,null),n(z,cn),n(z,Et),n(z,pn),n(z,Ut),n(z,mn),n(z,qt),n(z,un),n(z,V),h(tt,V,null),n(V,fn),n(V,At),n(V,hn),n(V,Pt),n(V,gn),n(V,Bt),m(e,bo,i),h(ot,e,i),m(e,To,i),m(e,F,i),h(nt,F,null),n(F,_n),n(F,Gt),n(F,bn),n(F,Nt),n(F,Tn),n(F,Rt),n(F,yn),n(F,X),h(at,X,null),n(X,Cn),n(X,Ht),n(X,Mn),h(ye,X,null),n(X,vn),h(Ce,X,null),m(e,yo,i),h(rt,e,i),m(e,Co,i),m(e,ae,i),h(st,ae,null),n(ae,wn),n(ae,L),h(it,L,null),n(L,$n),n(L,Vt),n(L,xn),h(Me,L,null),n(L,jn),h(ve,L,null),m(e,Mo,i),h(lt,e,i),m(e,vo,i),m(e,Z,i),h(dt,Z,null),n(Z,kn),n(Z,Xt),n(Z,Jn),n(Z,Lt),n(Z,Wn),n(Z,Yt),n(Z,zn),n(Z,Y),h(ct,Y,null),n(Y,Fn),n(Y,Qt),n(Y,Zn),h(we,Y,null),n(Y,In),h($e,Y,null),m(e,wo,i),m(e,Dt,i),$o=!0},p(e,[i]){const A={};i&2&&(A.$$scope={dirty:i,ctx:e}),ie.$set(A);const pt={};i&2&&(pt.$$scope={dirty:i,ctx:e}),de.$set(pt);const S={};i&2&&(S.$$scope={dirty:i,ctx:e}),ce.$set(S);const D={};i&2&&(D.$$scope={dirty:i,ctx:e}),fe.$set(D);const P={};i&2&&(P.$$scope={dirty:i,ctx:e}),he.$set(P);const mt={};i&2&&(mt.$$scope={dirty:i,ctx:e}),ge.$set(mt);const B={};i&2&&(B.$$scope={dirty:i,ctx:e}),_e.$set(B);const ut={};i&2&&(ut.$$scope={dirty:i,ctx:e}),be.$set(ut);const ft={};i&2&&(ft.$$scope={dirty:i,ctx:e}),Te.$set(ft);const I={};i&2&&(I.$$scope={dirty:i,ctx:e}),ye.$set(I);const O={};i&2&&(O.$$scope={dirty:i,ctx:e}),Ce.$set(O);const K={};i&2&&(K.$$scope={dirty:i,ctx:e}),Me.$set(K);const ee={};i&2&&(ee.$$scope={dirty:i,ctx:e}),ve.$set(ee);const G={};i&2&&(G.$$scope={dirty:i,ctx:e}),we.$set(G);const te={};i&2&&(te.$$scope={dirty:i,ctx:e}),$e.$set(te)},i(e){$o||(g(y.$$.fragment,e),g(M.$$.fragment,e),g(Ie.$$.fragment,e),g(Ee.$$.fragment,e),g(ie.$$.fragment,e),g(Ue.$$.fragment,e),g(qe.$$.fragment,e),g(Ae.$$.fragment,e),g(de.$$.fragment,e),g(Pe.$$.fragment,e),g(Be.$$.fragment,e),g(ce.$$.fragment,e),g(Ge.$$.fragment,e),g(Ne.$$.fragment,e),g(Re.$$.fragment,e),g(He.$$.fragment,e),g(Ve.$$.fragment,e),g(Xe.$$.fragment,e),g(Le.$$.fragment,e),g(Ye.$$.fragment,e),g(Qe.$$.fragment,e),g(Se.$$.fragment,e),g(fe.$$.fragment,e),g(he.$$.fragment,e),g(De.$$.fragment,e),g(ge.$$.fragment,e),g(_e.$$.fragment,e),g(Oe.$$.fragment,e),g(be.$$.fragment,e),g(Te.$$.fragment,e),g(Ke.$$.fragment,e),g(et.$$.fragment,e),g(tt.$$.fragment,e),g(ot.$$.fragment,e),g(nt.$$.fragment,e),g(at.$$.fragment,e),g(ye.$$.fragment,e),g(Ce.$$.fragment,e),g(rt.$$.fragment,e),g(st.$$.fragment,e),g(it.$$.fragment,e),g(Me.$$.fragment,e),g(ve.$$.fragment,e),g(lt.$$.fragment,e),g(dt.$$.fragment,e),g(ct.$$.fragment,e),g(we.$$.fragment,e),g($e.$$.fragment,e),$o=!0)},o(e){_(y.$$.fragment,e),_(M.$$.fragment,e),_(Ie.$$.fragment,e),_(Ee.$$.fragment,e),_(ie.$$.fragment,e),_(Ue.$$.fragment,e),_(qe.$$.fragment,e),_(Ae.$$.fragment,e),_(de.$$.fragment,e),_(Pe.$$.fragment,e),_(Be.$$.fragment,e),_(ce.$$.fragment,e),_(Ge.$$.fragment,e),_(Ne.$$.fragment,e),_(Re.$$.fragment,e),_(He.$$.fragment,e),_(Ve.$$.fragment,e),_(Xe.$$.fragment,e),_(Le.$$.fragment,e),_(Ye.$$.fragment,e),_(Qe.$$.fragment,e),_(Se.$$.fragment,e),_(fe.$$.fragment,e),_(he.$$.fragment,e),_(De.$$.fragment,e),_(ge.$$.fragment,e),_(_e.$$.fragment,e),_(Oe.$$.fragment,e),_(be.$$.fragment,e),_(Te.$$.fragment,e),_(Ke.$$.fragment,e),_(et.$$.fragment,e),_(tt.$$.fragment,e),_(ot.$$.fragment,e),_(nt.$$.fragment,e),_(at.$$.fragment,e),_(ye.$$.fragment,e),_(Ce.$$.fragment,e),_(rt.$$.fragment,e),_(st.$$.fragment,e),_(it.$$.fragment,e),_(Me.$$.fragment,e),_(ve.$$.fragment,e),_(lt.$$.fragment,e),_(dt.$$.fragment,e),_(ct.$$.fragment,e),_(we.$$.fragment,e),_($e.$$.fragment,e),$o=!1},d(e){e&&(s(C),s(d),s(l),s(t),s(Ot),s(Je),s(Kt),s(We),s(eo),s(ze),s(to),s(Fe),s(oo),s(Ze),s(no),s(ao),s(k),s(ro),s(so),s(U),s(io),s(lo),s(q),s(co),s(po),s(J),s(mo),s(uo),s(W),s(fo),s(ho),s(j),s(go),s(_o),s(z),s(bo),s(To),s(F),s(yo),s(Co),s(ae),s(Mo),s(vo),s(Z),s(wo),s(Dt)),s(o),b(y,e),b(M,e),b(Ie,e),b(Ee),b(ie),b(Ue),b(qe,e),b(Ae),b(de),b(Pe,e),b(Be),b(ce),b(Ge,e),b(Ne),b(Re),b(He,e),b(Ve),b(Xe),b(Le),b(Ye,e),b(Qe),b(Se),b(fe),b(he),b(De),b(ge),b(_e),b(Oe),b(be),b(Te),b(Ke,e),b(et),b(tt),b(ot,e),b(nt),b(at),b(ye),b(Ce),b(rt,e),b(st),b(it),b(Me),b(ve),b(lt,e),b(dt),b(ct),b(we),b($e)}}}const Na='{"title":"CLAP","local":"clap","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"ClapConfig","local":"transformers.ClapConfig","sections":[],"depth":2},{"title":"ClapTextConfig","local":"transformers.ClapTextConfig","sections":[],"depth":2},{"title":"ClapAudioConfig","local":"transformers.ClapAudioConfig","sections":[],"depth":2},{"title":"ClapFeatureExtractor","local":"transformers.ClapFeatureExtractor","sections":[],"depth":2},{"title":"ClapProcessor","local":"transformers.ClapProcessor","sections":[],"depth":2},{"title":"ClapModel","local":"transformers.ClapModel","sections":[],"depth":2},{"title":"ClapTextModel","local":"transformers.ClapTextModel","sections":[],"depth":2},{"title":"ClapTextModelWithProjection","local":"transformers.ClapTextModelWithProjection","sections":[],"depth":2},{"title":"ClapAudioModel","local":"transformers.ClapAudioModel","sections":[],"depth":2},{"title":"ClapAudioModelWithProjection","local":"transformers.ClapAudioModelWithProjection","sections":[],"depth":2}],"depth":1}';function Ra(v){return Ma(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Da extends va{constructor(o){super(),wa(this,o,Ra,Ga,Ca,{})}}export{Da as component};
