import{s as ft,o as _t,n as Ae}from"../chunks/scheduler.9bc65507.js";import{S as bt,i as vt,g as d,s as a,r as h,A as yt,h as i,f as o,c as s,j as z,u as g,x as u,k as U,y as n,a as l,v as f,d as _,t as b,w as v}from"../chunks/index.707bf1b6.js";import{T as wt}from"../chunks/Tip.c2ecdbf4.js";import{D as oe}from"../chunks/Docstring.17db21ae.js";import{C as Oe}from"../chunks/CodeBlock.54a9f38d.js";import{E as gt}from"../chunks/ExampleCodeBlock.4f515aa9.js";import{H as _e}from"../chunks/Heading.342b1fa6.js";function Mt(W){let c,T="Example:",p,m,y;return m=new Oe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEVuY29kZWNNb2RlbCUyQyUyMEVuY29kZWNDb25maWclMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwJTIyZmFjZWJvb2slMkZlbmNvZGVjXzI0a2h6JTIyJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMEVuY29kZWNDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtb2RlbCUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwJTIyZmFjZWJvb2slMkZlbmNvZGVjXzI0a2h6JTIyJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBFbmNvZGVjTW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> EncodecModel, EncodecConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a &quot;facebook/encodec_24khz&quot; style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = EncodecConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the &quot;facebook/encodec_24khz&quot; style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = EncodecModel(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(){c=d("p"),c.textContent=T,p=a(),h(m.$$.fragment)},l(r){c=i(r,"P",{"data-svelte-h":!0}),u(c)!=="svelte-11lpom8"&&(c.textContent=T),p=s(r),g(m.$$.fragment,r)},m(r,M){l(r,c,M),l(r,p,M),f(m,r,M),y=!0},p:Ae,i(r){y||(_(m.$$.fragment,r),y=!0)},o(r){b(m.$$.fragment,r),y=!1},d(r){r&&(o(c),o(p)),v(m,r)}}}function kt(W){let c,T=`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(){c=d("p"),c.innerHTML=T},l(p){c=i(p,"P",{"data-svelte-h":!0}),u(c)!=="svelte-fincs2"&&(c.innerHTML=T)},m(p,m){l(p,c,m)},p:Ae,d(p){p&&o(c)}}}function Tt(W){let c,T="Examples:",p,m,y;return m=new Oe({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMkMlMjBFbmNvZGVjTW9kZWwlMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmFzaHJhcSUyRmVzYzUwJTIyKSUwQWF1ZGlvX3NhbXBsZSUyMCUzRCUyMGRhdGFzZXQlNUIlMjJ0cmFpbiUyMiU1RCU1QiUyMmF1ZGlvJTIyJTVEJTVCMCU1RCU1QiUyMmFycmF5JTIyJTVEJTBBJTBBbW9kZWxfaWQlMjAlM0QlMjAlMjJmYWNlYm9vayUyRmVuY29kZWNfMjRraHolMjIlMEFtb2RlbCUyMCUzRCUyMEVuY29kZWNNb2RlbC5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWQpJTBBcHJvY2Vzc29yJTIwJTNEJTIwQXV0b1Byb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWQpJTBBJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKHJhd19hdWRpbyUzRGF1ZGlvX3NhbXBsZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQWF1ZGlvX2NvZGVzJTIwJTNEJTIwb3V0cHV0cy5hdWRpb19jb2RlcyUwQWF1ZGlvX3ZhbHVlcyUyMCUzRCUyMG91dHB1dHMuYXVkaW9fdmFsdWVz",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, EncodecModel

<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_id = <span class="hljs-string">&quot;facebook/encodec_24khz&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = EncodecModel.from_pretrained(model_id)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(model_id)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(raw_audio=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_codes = outputs.audio_codes
<span class="hljs-meta">&gt;&gt;&gt; </span>audio_values = outputs.audio_values`,wrap:!1}}),{c(){c=d("p"),c.textContent=T,p=a(),h(m.$$.fragment)},l(r){c=i(r,"P",{"data-svelte-h":!0}),u(c)!=="svelte-kvfsh7"&&(c.textContent=T),p=s(r),g(m.$$.fragment,r)},m(r,M){l(r,c,M),l(r,p,M),f(m,r,M),y=!0},p:Ae,i(r){y||(_(m.$$.fragment,r),y=!0)},o(r){b(m.$$.fragment,r),y=!1},d(r){r&&(o(c),o(p)),v(m,r)}}}function Et(W){let c,T,p,m,y,r,M,be,q,Ke='The EnCodec neural codec model was proposed in <a href="https://arxiv.org/abs/2210.13438" rel="nofollow">High Fidelity Neural Audio Compression</a> by Alexandre Défossez, Jade Copet, Gabriel Synnaeve, Yossi Adi.',ve,B,et="The abstract from the paper is the following:",ye,X,tt="<em>We introduce a state-of-the-art real-time, high-fidelity, audio codec leveraging neural networks. It consists in a streaming encoder-decoder architecture with quantized latent space trained in an end-to-end fashion. We simplify and speed-up the training by using a single multiscale spectrogram adversary that efficiently reduces artifacts and produce high-quality samples. We introduce a novel loss balancer mechanism to stabilize training: the weight of a loss now defines the fraction of the overall gradient it should represent, thus decoupling the choice of this hyper-parameter from the typical scale of the loss. Finally, we study how lightweight Transformer models can be used to further compress the obtained representation by up to 40%, while staying faster than real time. We provide a detailed description of the key design choices of the proposed model including: training objective, architectural changes and a study of various perceptual loss functions. We present an extensive subjective evaluation (MUSHRA tests) together with an ablation study for a range of bandwidths and audio domains, including speech, noisy-reverberant speech, and music. Our approach is superior to the baselines methods across all evaluated settings, considering both 24 kHz monophonic and 48 kHz stereophonic audio.</em>",we,G,ot=`This model was contributed by <a href="https://huggingface.co/Matthijs" rel="nofollow">Matthijs</a>, <a href="https://huggingface.co/patrickvonplaten" rel="nofollow">Patrick Von Platen</a> and <a href="https://huggingface.co/ArthurZ" rel="nofollow">Arthur Zucker</a>.
The original code can be found <a href="https://github.com/facebookresearch/encodec" rel="nofollow">here</a>.
Here is a quick example of how to encode and decode an audio using this model:`,Me,H,ke,Y,Te,E,P,Ue,ne,nt=`This is the configuration class to store the configuration of an <a href="/docs/transformers/main/en/model_doc/encodec#transformers.EncodecModel">EncodecModel</a>. It is used to instantiate a
Encodec 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
<a href="https://huggingface.co/facebook/encodec_24khz" rel="nofollow">facebook/encodec_24khz</a> architecture.`,We,ae,at=`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.`,Ze,Z,Ee,L,xe,k,Q,Ne,se,st="Constructs an EnCodec feature extractor.",Ie,re,rt=`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.`,Fe,ce,ct=`Instantiating a feature extractor with the defaults will yield a similar configuration to that of the
<a href="https://huggingface.co/facebook/encodec_24khz" rel="nofollow">facebook/encodec_24khz</a> architecture.`,Re,N,S,Ve,de,dt="Main method to featurize and prepare for the model one or several sequence(s).",$e,D,je,w,A,qe,ie,it=`The EnCodec neural audio codec model.
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.)`,Be,le,lt=`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.`,Xe,J,O,Ge,me,mt="Decodes the given frames into an output audio waveform.",He,pe,pt=`Note that the output might be a bit bigger than the input. In that case, any extra steps at the end can be
trimmed.`,Ye,I,K,Pe,ue,ut="Encodes the input audio waveform into discrete codes.",Le,$,ee,Qe,he,ht='The <a href="/docs/transformers/main/en/model_doc/encodec#transformers.EncodecModel">EncodecModel</a> forward method, overrides the <code>__call__</code> special method.',Se,F,De,R,Ce,fe,Je;return y=new _e({props:{title:"EnCodec",local:"encodec",headingTag:"h1"}}),M=new _e({props:{title:"Overview",local:"overview",headingTag:"h2"}}),H=new Oe({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTJDJTIwQXVkaW8lMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwRW5jb2RlY01vZGVsJTJDJTIwQXV0b1Byb2Nlc3NvciUwQWxpYnJpc3BlZWNoX2R1bW15JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmhmLWludGVybmFsLXRlc3RpbmclMkZsaWJyaXNwZWVjaF9hc3JfZHVtbXklMjIlMkMlMjAlMjJjbGVhbiUyMiUyQyUyMHNwbGl0JTNEJTIydmFsaWRhdGlvbiUyMiklMEElMEFtb2RlbCUyMCUzRCUyMEVuY29kZWNNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZlbmNvZGVjXzI0a2h6JTIyKSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGZW5jb2RlY18yNGtoeiUyMiklMEFsaWJyaXNwZWVjaF9kdW1teSUyMCUzRCUyMGxpYnJpc3BlZWNoX2R1bW15LmNhc3RfY29sdW1uKCUyMmF1ZGlvJTIyJTJDJTIwQXVkaW8oc2FtcGxpbmdfcmF0ZSUzRHByb2Nlc3Nvci5zYW1wbGluZ19yYXRlKSklMEFhdWRpb19zYW1wbGUlMjAlM0QlMjBsaWJyaXNwZWVjaF9kdW1teSU1Qi0xJTVEJTVCJTIyYXVkaW8lMjIlNUQlNUIlMjJhcnJheSUyMiU1RCUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3NvcihyYXdfYXVkaW8lM0RhdWRpb19zYW1wbGUlMkMlMjBzYW1wbGluZ19yYXRlJTNEcHJvY2Vzc29yLnNhbXBsaW5nX3JhdGUlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQWVuY29kZXJfb3V0cHV0cyUyMCUzRCUyMG1vZGVsLmVuY29kZShpbnB1dHMlNUIlMjJpbnB1dF92YWx1ZXMlMjIlNUQlMkMlMjBpbnB1dHMlNUIlMjJwYWRkaW5nX21hc2slMjIlNUQpJTBBYXVkaW9fdmFsdWVzJTIwJTNEJTIwbW9kZWwuZGVjb2RlKGVuY29kZXJfb3V0cHV0cy5hdWRpb19jb2RlcyUyQyUyMGVuY29kZXJfb3V0cHV0cy5hdWRpb19zY2FsZXMlMkMlMjBpbnB1dHMlNUIlMjJwYWRkaW5nX21hc2slMjIlNUQpJTVCMCU1RCUwQSUyMyUyMG9yJTIwdGhlJTIwZXF1aXZhbGVudCUyMHdpdGglMjBhJTIwZm9yd2FyZCUyMHBhc3MlMEFhdWRpb192YWx1ZXMlMjAlM0QlMjBtb2RlbChpbnB1dHMlNUIlMjJpbnB1dF92YWx1ZXMlMjIlNUQlMkMlMjBpbnB1dHMlNUIlMjJwYWRkaW5nX21hc2slMjIlNUQpLmF1ZGlvX3ZhbHVlcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset, Audio
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> EncodecModel, AutoProcessor
<span class="hljs-meta">&gt;&gt;&gt; </span>librispeech_dummy = load_dataset(<span class="hljs-string">&quot;hf-internal-testing/librispeech_asr_dummy&quot;</span>, <span class="hljs-string">&quot;clean&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>model = EncodecModel.from_pretrained(<span class="hljs-string">&quot;facebook/encodec_24khz&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;facebook/encodec_24khz&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>librispeech_dummy = librispeech_dummy.cast_column(<span class="hljs-string">&quot;audio&quot;</span>, Audio(sampling_rate=processor.sampling_rate))
<span class="hljs-meta">&gt;&gt;&gt; </span>audio_sample = librispeech_dummy[-<span class="hljs-number">1</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(raw_audio=audio_sample, sampling_rate=processor.sampling_rate, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>encoder_outputs = model.encode(inputs[<span class="hljs-string">&quot;input_values&quot;</span>], inputs[<span class="hljs-string">&quot;padding_mask&quot;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>audio_values = model.decode(encoder_outputs.audio_codes, encoder_outputs.audio_scales, inputs[<span class="hljs-string">&quot;padding_mask&quot;</span>])[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># or the equivalent with a forward pass</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>audio_values = model(inputs[<span class="hljs-string">&quot;input_values&quot;</span>], inputs[<span class="hljs-string">&quot;padding_mask&quot;</span>]).audio_values`,wrap:!1}}),Y=new _e({props:{title:"EncodecConfig",local:"transformers.EncodecConfig",headingTag:"h2"}}),P=new oe({props:{name:"class transformers.EncodecConfig",anchor:"transformers.EncodecConfig",parameters:[{name:"target_bandwidths",val:" = [1.5, 3.0, 6.0, 12.0, 24.0]"},{name:"sampling_rate",val:" = 24000"},{name:"audio_channels",val:" = 1"},{name:"normalize",val:" = False"},{name:"chunk_length_s",val:" = None"},{name:"overlap",val:" = None"},{name:"hidden_size",val:" = 128"},{name:"num_filters",val:" = 32"},{name:"num_residual_layers",val:" = 1"},{name:"upsampling_ratios",val:" = [8, 5, 4, 2]"},{name:"norm_type",val:" = 'weight_norm'"},{name:"kernel_size",val:" = 7"},{name:"last_kernel_size",val:" = 7"},{name:"residual_kernel_size",val:" = 3"},{name:"dilation_growth_rate",val:" = 2"},{name:"use_causal_conv",val:" = True"},{name:"pad_mode",val:" = 'reflect'"},{name:"compress",val:" = 2"},{name:"num_lstm_layers",val:" = 2"},{name:"trim_right_ratio",val:" = 1.0"},{name:"codebook_size",val:" = 1024"},{name:"codebook_dim",val:" = None"},{name:"use_conv_shortcut",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.EncodecConfig.target_bandwidths",description:`<strong>target_bandwidths</strong> (<code>List[float]</code>, <em>optional</em>, defaults to <code>[1.5, 3.0, 6.0, 12.0, 24.0]</code>) &#x2014;
The range of diffent bandwiths the model can encode audio with.`,name:"target_bandwidths"},{anchor:"transformers.EncodecConfig.sampling_rate",description:`<strong>sampling_rate</strong> (<code>int</code>, <em>optional</em>, defaults to 24000) &#x2014;
The sampling rate at which the audio waveform should be digitalized expressed in hertz (Hz).`,name:"sampling_rate"},{anchor:"transformers.EncodecConfig.audio_channels",description:`<strong>audio_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Number of channels in the audio data. Either 1 for mono or 2 for stereo.`,name:"audio_channels"},{anchor:"transformers.EncodecConfig.normalize",description:`<strong>normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the audio shall be normalized when passed.`,name:"normalize"},{anchor:"transformers.EncodecConfig.chunk_length_s",description:`<strong>chunk_length_s</strong> (<code>float</code>, <em>optional</em>) &#x2014;
If defined the audio is pre-processed into chunks of lengths <code>chunk_length_s</code> and then encoded.`,name:"chunk_length_s"},{anchor:"transformers.EncodecConfig.overlap",description:`<strong>overlap</strong> (<code>float</code>, <em>optional</em>) &#x2014;
Defines the overlap between each chunk. It is used to compute the <code>chunk_stride</code> using the following
formulae : <code>int((1.0 - self.overlap) * self.chunk_length)</code>.`,name:"overlap"},{anchor:"transformers.EncodecConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 128) &#x2014;
Intermediate representation dimension.`,name:"hidden_size"},{anchor:"transformers.EncodecConfig.num_filters",description:`<strong>num_filters</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
Number of convolution kernels of first <code>EncodecConv1d</code> down sampling layer.`,name:"num_filters"},{anchor:"transformers.EncodecConfig.num_residual_layers",description:`<strong>num_residual_layers</strong> (<code>int</code>,  <em>optional</em>, defaults to 1) &#x2014;
Number of residual layers.`,name:"num_residual_layers"},{anchor:"transformers.EncodecConfig.upsampling_ratios",description:`<strong>upsampling_ratios</strong> (<code>Sequence[int]</code> , <em>optional</em>, defaults to <code>[8, 5, 4, 2]</code>) &#x2014;
Kernel size and stride ratios. The encoder uses downsampling ratios instead of upsampling ratios, hence it
will use the ratios in the reverse order to the ones specified here that must match the decoder order.`,name:"upsampling_ratios"},{anchor:"transformers.EncodecConfig.norm_type",description:`<strong>norm_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;weight_norm&quot;</code>) &#x2014;
Normalization method. Should be in <code>[&quot;weight_norm&quot;, &quot;time_group_norm&quot;]</code>`,name:"norm_type"},{anchor:"transformers.EncodecConfig.kernel_size",description:`<strong>kernel_size</strong> (<code>int</code>, <em>optional</em>, defaults to 7) &#x2014;
Kernel size for the initial convolution.`,name:"kernel_size"},{anchor:"transformers.EncodecConfig.last_kernel_size",description:`<strong>last_kernel_size</strong> (<code>int</code>, <em>optional</em>, defaults to 7) &#x2014;
Kernel size for the last convolution layer.`,name:"last_kernel_size"},{anchor:"transformers.EncodecConfig.residual_kernel_size",description:`<strong>residual_kernel_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
Kernel size for the residual layers.`,name:"residual_kernel_size"},{anchor:"transformers.EncodecConfig.dilation_growth_rate",description:`<strong>dilation_growth_rate</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
How much to increase the dilation with each layer.`,name:"dilation_growth_rate"},{anchor:"transformers.EncodecConfig.use_causal_conv",description:`<strong>use_causal_conv</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use fully causal convolution.`,name:"use_causal_conv"},{anchor:"transformers.EncodecConfig.pad_mode",description:`<strong>pad_mode</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;reflect&quot;</code>) &#x2014;
Padding mode for the convolutions.`,name:"pad_mode"},{anchor:"transformers.EncodecConfig.compress",description:`<strong>compress</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
Reduced dimensionality in residual branches (from Demucs v3).`,name:"compress"},{anchor:"transformers.EncodecConfig.num_lstm_layers",description:`<strong>num_lstm_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
Number of LSTM layers at the end of the encoder.`,name:"num_lstm_layers"},{anchor:"transformers.EncodecConfig.trim_right_ratio",description:`<strong>trim_right_ratio</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
Ratio for trimming at the right of the transposed convolution under the <code>use_causal_conv = True</code> setup. If
equal to 1.0, it means that all the trimming is done at the right.`,name:"trim_right_ratio"},{anchor:"transformers.EncodecConfig.codebook_size",description:`<strong>codebook_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
Number of discret codes that make up VQVAE.`,name:"codebook_size"},{anchor:"transformers.EncodecConfig.codebook_dim",description:`<strong>codebook_dim</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Dimension of the codebook vectors. If not defined, uses <code>hidden_size</code>.`,name:"codebook_dim"},{anchor:"transformers.EncodecConfig.use_conv_shortcut",description:`<strong>use_conv_shortcut</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use a convolutional layer as the &#x2018;skip&#x2019; connection in the <code>EncodecResnetBlock</code> block. If False,
an identity function will be used, giving a generic residual connection.`,name:"use_conv_shortcut"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/encodec/configuration_encodec.py#L35"}}),Z=new gt({props:{anchor:"transformers.EncodecConfig.example",$$slots:{default:[Mt]},$$scope:{ctx:W}}}),L=new _e({props:{title:"EncodecFeatureExtractor",local:"transformers.EncodecFeatureExtractor",headingTag:"h2"}}),Q=new oe({props:{name:"class transformers.EncodecFeatureExtractor",anchor:"transformers.EncodecFeatureExtractor",parameters:[{name:"feature_size",val:": int = 1"},{name:"sampling_rate",val:": int = 24000"},{name:"padding_value",val:": float = 0.0"},{name:"chunk_length_s",val:": float = None"},{name:"overlap",val:": float = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.EncodecFeatureExtractor.feature_size",description:`<strong>feature_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The feature dimension of the extracted features. Use 1 for mono, 2 for stereo.`,name:"feature_size"},{anchor:"transformers.EncodecFeatureExtractor.sampling_rate",description:`<strong>sampling_rate</strong> (<code>int</code>, <em>optional</em>, defaults to 24000) &#x2014;
The sampling rate at which the audio waveform should be digitalized expressed in hertz (Hz).`,name:"sampling_rate"},{anchor:"transformers.EncodecFeatureExtractor.padding_value",description:`<strong>padding_value</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The value that is used to fill the padding values.`,name:"padding_value"},{anchor:"transformers.EncodecFeatureExtractor.chunk_length_s",description:`<strong>chunk_length_s</strong> (<code>float</code>, <em>optional</em>) &#x2014;
If defined the audio is pre-processed into chunks of lengths <code>chunk_length_s</code> and then encoded.`,name:"chunk_length_s"},{anchor:"transformers.EncodecFeatureExtractor.overlap",description:`<strong>overlap</strong> (<code>float</code>, <em>optional</em>) &#x2014;
Defines the overlap between each chunk. It is used to compute the <code>chunk_stride</code> using the following
formulae : <code>int((1.0 - self.overlap) * self.chunk_length)</code>.`,name:"overlap"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/encodec/feature_extraction_encodec.py#L29"}}),S=new oe({props:{name:"__call__",anchor:"transformers.EncodecFeatureExtractor.__call__",parameters:[{name:"raw_audio",val:": typing.Union[numpy.ndarray, typing.List[float], typing.List[numpy.ndarray], typing.List[typing.List[float]]]"},{name:"padding",val:": typing.Union[bool, str, transformers.utils.generic.PaddingStrategy, NoneType] = None"},{name:"truncation",val:": typing.Optional[bool] = False"},{name:"max_length",val:": typing.Optional[int] = None"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"sampling_rate",val:": typing.Optional[int] = None"}],parametersDescription:[{anchor:"transformers.EncodecFeatureExtractor.__call__.raw_audio",description:`<strong>raw_audio</strong> (<code>np.ndarray</code>, <code>List[float]</code>, <code>List[np.ndarray]</code>, <code>List[List[float]]</code>) &#x2014;
The sequence or batch of sequences to be processed. Each sequence can be a numpy array, a list of float
values, a list of numpy arrays or a list of list of float values. The numpy array must be of shape
<code>(num_samples,)</code> for mono audio (<code>feature_size = 1</code>), or <code>(2, num_samples)</code> for stereo audio
(<code>feature_size = 2</code>).`,name:"raw_audio"},{anchor:"transformers.EncodecFeatureExtractor.__call__.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/main/en/internal/file_utils#transformers.utils.PaddingStrategy">PaddingStrategy</a>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Select a strategy to pad the returned sequences (according to the model&#x2019;s padding side and padding
index) among:</p>
<ul>
<li><code>True</code> or <code>&apos;longest&apos;</code>: Pad to the longest sequence in the batch (or no padding if only a single
sequence if provided).</li>
<li><code>&apos;max_length&apos;</code>: Pad to a maximum length specified with the argument <code>max_length</code> or to the maximum
acceptable input length for the model if that argument is not provided.</li>
<li><code>False</code> or <code>&apos;do_not_pad&apos;</code> (default): No padding (i.e., can output a batch with sequences of different
lengths).</li>
</ul>`,name:"padding"},{anchor:"transformers.EncodecFeatureExtractor.__call__.truncation",description:`<strong>truncation</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates truncation to cut input sequences longer than <code>max_length</code> to <code>max_length</code>.`,name:"truncation"},{anchor:"transformers.EncodecFeatureExtractor.__call__.max_length",description:`<strong>max_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Maximum length of the returned list and optionally padding length (see above).`,name:"max_length"},{anchor:"transformers.EncodecFeatureExtractor.__call__.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <a href="/docs/transformers/main/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>) &#x2014;
If set, will return tensors instead of list of python integers. Acceptable values are:</p>
<ul>
<li><code>&apos;tf&apos;</code>: Return TensorFlow <code>tf.constant</code> objects.</li>
<li><code>&apos;pt&apos;</code>: Return PyTorch <code>torch.Tensor</code> objects.</li>
<li><code>&apos;np&apos;</code>: Return Numpy <code>np.ndarray</code> objects.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.EncodecFeatureExtractor.__call__.sampling_rate",description:`<strong>sampling_rate</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The sampling rate at which the <code>audio</code> input was sampled. It is strongly recommended to pass
<code>sampling_rate</code> at the forward call to prevent silent errors.`,name:"sampling_rate"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/encodec/feature_extraction_encodec.py#L84"}}),D=new _e({props:{title:"EncodecModel",local:"transformers.EncodecModel",headingTag:"h2"}}),A=new oe({props:{name:"class transformers.EncodecModel",anchor:"transformers.EncodecModel",parameters:[{name:"config",val:": EncodecConfig"}],parametersDescription:[{anchor:"transformers.EncodecModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/encodec#transformers.EncodecConfig">EncodecConfig</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/encodec/modeling_encodec.py#L535"}}),O=new oe({props:{name:"decode",anchor:"transformers.EncodecModel.decode",parameters:[{name:"audio_codes",val:": Tensor"},{name:"audio_scales",val:": Tensor"},{name:"padding_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.EncodecModel.decode.audio_codes",description:`<strong>audio_codes</strong> (<code>torch.FloatTensor</code>  of shape <code>(batch_size, nb_chunks, chunk_length)</code>, <em>optional</em>) &#x2014;
Discret code embeddings computed using <code>model.encode</code>.`,name:"audio_codes"},{anchor:"transformers.EncodecModel.decode.audio_scales",description:`<strong>audio_scales</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, nb_chunks)</code>, <em>optional</em>) &#x2014;
Scaling factor for each <code>audio_codes</code> input.`,name:"audio_scales"},{anchor:"transformers.EncodecModel.decode.padding_mask",description:`<strong>padding_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, channels, sequence_length)</code>) &#x2014;
Padding mask used to pad the <code>input_values</code>.`,name:"padding_mask"},{anchor:"transformers.EncodecModel.decode.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/encodec/modeling_encodec.py#L712"}}),K=new oe({props:{name:"encode",anchor:"transformers.EncodecModel.encode",parameters:[{name:"input_values",val:": Tensor"},{name:"padding_mask",val:": Tensor = None"},{name:"bandwidth",val:": typing.Optional[float] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.EncodecModel.encode.input_values",description:`<strong>input_values</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, channels, sequence_length)</code>) &#x2014;
Float values of the input audio waveform.`,name:"input_values"},{anchor:"transformers.EncodecModel.encode.padding_mask",description:`<strong>padding_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, channels, sequence_length)</code>) &#x2014;
Padding mask used to pad the <code>input_values</code>.`,name:"padding_mask"},{anchor:"transformers.EncodecModel.encode.bandwidth",description:`<strong>bandwidth</strong> (<code>float</code>, <em>optional</em>) &#x2014;
The target bandwidth. Must be one of <code>config.target_bandwidths</code>. If <code>None</code>, uses the smallest possible
bandwidth. bandwidth is represented as a thousandth of what it is, e.g. 6kbps bandwidth is represented
as bandwidth == 6.0`,name:"bandwidth"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/encodec/modeling_encodec.py#L584",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A list of frames containing the discrete encoded codes for the input audio waveform, along with rescaling
factors for each chunk when <code>normalize</code> is True. Each frames is a tuple <code>(codebook, scale)</code>, with
<code>codebook</code> of shape <code>[batch_size, num_codebooks, frames]</code>.</p>
`}}),ee=new oe({props:{name:"forward",anchor:"transformers.EncodecModel.forward",parameters:[{name:"input_values",val:": Tensor"},{name:"padding_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"bandwidth",val:": typing.Optional[float] = None"},{name:"audio_codes",val:": typing.Optional[torch.Tensor] = None"},{name:"audio_scales",val:": typing.Optional[torch.Tensor] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.EncodecModel.forward.input_values",description:`<strong>input_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, channels, sequence_length)</code>, <em>optional</em>) &#x2014;
Raw audio input converted to Float and padded to the approriate length in order to be encoded using chunks
of length self.chunk_length and a stride of <code>config.chunk_stride</code>.`,name:"input_values"},{anchor:"transformers.EncodecModel.forward.padding_mask",description:`<strong>padding_mask</strong> (<code>torch.BoolTensor</code> of shape <code>(batch_size, channels, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid computing scaling factors on padding token indices (can we avoid computing conv on these+).
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>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p><code>padding_mask</code> should always be passed, unless the input was truncated or not padded. This is because in
order to process tensors effectively, the input audio should be padded so that <code>input_length % stride = step</code> with <code>step = chunk_length-stride</code>. This ensures that all chunks are of the same shape</p>

					</div>`,name:"padding_mask"},{anchor:"transformers.EncodecModel.forward.bandwidth",description:`<strong>bandwidth</strong> (<code>float</code>, <em>optional</em>) &#x2014;
The target bandwidth. Must be one of <code>config.target_bandwidths</code>. If <code>None</code>, uses the smallest possible
bandwidth. bandwidth is represented as a thousandth of what it is, e.g. 6kbps bandwidth is represented as
<code>bandwidth == 6.0</code>`,name:"bandwidth"},{anchor:"transformers.EncodecModel.forward.audio_codes",description:`<strong>audio_codes</strong> (<code>torch.FloatTensor</code>  of shape <code>(batch_size, nb_chunks, chunk_length)</code>, <em>optional</em>) &#x2014;
Discret code embeddings computed using <code>model.encode</code>.`,name:"audio_codes"},{anchor:"transformers.EncodecModel.forward.audio_scales",description:`<strong>audio_scales</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, nb_chunks)</code>, <em>optional</em>) &#x2014;
Scaling factor for each <code>audio_codes</code> input.`,name:"audio_scales"},{anchor:"transformers.EncodecModel.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/encodec/modeling_encodec.py#L760",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.encodec.modeling_encodec.EncodecOutput</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 (<a
  href="/docs/transformers/main/en/model_doc/encodec#transformers.EncodecConfig"
>EncodecConfig</a>) and inputs.</p>
<ul>
<li><strong>audio_codes</strong> (<code>torch.FloatTensor</code>  of shape <code>(batch_size, nb_chunks, chunk_length)</code>, <em>optional</em>) — Discret code embeddings computed using <code>model.encode</code>.</li>
<li><strong>audio_values</strong> (<code>torch.FlaotTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>)
Decoded audio values, obtained using the decoder part of Encodec.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.encodec.modeling_encodec.EncodecOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),F=new wt({props:{$$slots:{default:[kt]},$$scope:{ctx:W}}}),R=new gt({props:{anchor:"transformers.EncodecModel.forward.example",$$slots:{default:[Tt]},$$scope:{ctx:W}}}),{c(){c=d("meta"),T=a(),p=d("p"),m=a(),h(y.$$.fragment),r=a(),h(M.$$.fragment),be=a(),q=d("p"),q.innerHTML=Ke,ve=a(),B=d("p"),B.textContent=et,ye=a(),X=d("p"),X.innerHTML=tt,we=a(),G=d("p"),G.innerHTML=ot,Me=a(),h(H.$$.fragment),ke=a(),h(Y.$$.fragment),Te=a(),E=d("div"),h(P.$$.fragment),Ue=a(),ne=d("p"),ne.innerHTML=nt,We=a(),ae=d("p"),ae.innerHTML=at,Ze=a(),h(Z.$$.fragment),Ee=a(),h(L.$$.fragment),xe=a(),k=d("div"),h(Q.$$.fragment),Ne=a(),se=d("p"),se.textContent=st,Ie=a(),re=d("p"),re.innerHTML=rt,Fe=a(),ce=d("p"),ce.innerHTML=ct,Re=a(),N=d("div"),h(S.$$.fragment),Ve=a(),de=d("p"),de.textContent=dt,$e=a(),h(D.$$.fragment),je=a(),w=d("div"),h(A.$$.fragment),qe=a(),ie=d("p"),ie.innerHTML=it,Be=a(),le=d("p"),le.innerHTML=lt,Xe=a(),J=d("div"),h(O.$$.fragment),Ge=a(),me=d("p"),me.textContent=mt,He=a(),pe=d("p"),pe.textContent=pt,Ye=a(),I=d("div"),h(K.$$.fragment),Pe=a(),ue=d("p"),ue.textContent=ut,Le=a(),$=d("div"),h(ee.$$.fragment),Qe=a(),he=d("p"),he.innerHTML=ht,Se=a(),h(F.$$.fragment),De=a(),h(R.$$.fragment),Ce=a(),fe=d("p"),this.h()},l(e){const t=yt("svelte-u9bgzb",document.head);c=i(t,"META",{name:!0,content:!0}),t.forEach(o),T=s(e),p=i(e,"P",{}),z(p).forEach(o),m=s(e),g(y.$$.fragment,e),r=s(e),g(M.$$.fragment,e),be=s(e),q=i(e,"P",{"data-svelte-h":!0}),u(q)!=="svelte-12eaz08"&&(q.innerHTML=Ke),ve=s(e),B=i(e,"P",{"data-svelte-h":!0}),u(B)!=="svelte-vfdo9a"&&(B.textContent=et),ye=s(e),X=i(e,"P",{"data-svelte-h":!0}),u(X)!=="svelte-1hdoj6v"&&(X.innerHTML=tt),we=s(e),G=i(e,"P",{"data-svelte-h":!0}),u(G)!=="svelte-cjw93l"&&(G.innerHTML=ot),Me=s(e),g(H.$$.fragment,e),ke=s(e),g(Y.$$.fragment,e),Te=s(e),E=i(e,"DIV",{class:!0});var C=z(E);g(P.$$.fragment,C),Ue=s(C),ne=i(C,"P",{"data-svelte-h":!0}),u(ne)!=="svelte-r5mojf"&&(ne.innerHTML=nt),We=s(C),ae=i(C,"P",{"data-svelte-h":!0}),u(ae)!=="svelte-o55m63"&&(ae.innerHTML=at),Ze=s(C),g(Z.$$.fragment,C),C.forEach(o),Ee=s(e),g(L.$$.fragment,e),xe=s(e),k=i(e,"DIV",{class:!0});var x=z(k);g(Q.$$.fragment,x),Ne=s(x),se=i(x,"P",{"data-svelte-h":!0}),u(se)!=="svelte-5n3zz2"&&(se.textContent=st),Ie=s(x),re=i(x,"P",{"data-svelte-h":!0}),u(re)!=="svelte-3gz575"&&(re.innerHTML=rt),Fe=s(x),ce=i(x,"P",{"data-svelte-h":!0}),u(ce)!=="svelte-7r1z10"&&(ce.innerHTML=ct),Re=s(x),N=i(x,"DIV",{class:!0});var te=z(N);g(S.$$.fragment,te),Ve=s(te),de=i(te,"P",{"data-svelte-h":!0}),u(de)!=="svelte-1a6wgfx"&&(de.textContent=dt),te.forEach(o),x.forEach(o),$e=s(e),g(D.$$.fragment,e),je=s(e),w=i(e,"DIV",{class:!0});var j=z(w);g(A.$$.fragment,j),qe=s(j),ie=i(j,"P",{"data-svelte-h":!0}),u(ie)!=="svelte-172v7wq"&&(ie.innerHTML=it),Be=s(j),le=i(j,"P",{"data-svelte-h":!0}),u(le)!=="svelte-hswkmf"&&(le.innerHTML=lt),Xe=s(j),J=i(j,"DIV",{class:!0});var ge=z(J);g(O.$$.fragment,ge),Ge=s(ge),me=i(ge,"P",{"data-svelte-h":!0}),u(me)!=="svelte-18b2f30"&&(me.textContent=mt),He=s(ge),pe=i(ge,"P",{"data-svelte-h":!0}),u(pe)!=="svelte-12sn3fy"&&(pe.textContent=pt),ge.forEach(o),Ye=s(j),I=i(j,"DIV",{class:!0});var ze=z(I);g(K.$$.fragment,ze),Pe=s(ze),ue=i(ze,"P",{"data-svelte-h":!0}),u(ue)!=="svelte-1mhlb4g"&&(ue.textContent=ut),ze.forEach(o),Le=s(j),$=i(j,"DIV",{class:!0});var V=z($);g(ee.$$.fragment,V),Qe=s(V),he=i(V,"P",{"data-svelte-h":!0}),u(he)!=="svelte-91m5tw"&&(he.innerHTML=ht),Se=s(V),g(F.$$.fragment,V),De=s(V),g(R.$$.fragment,V),V.forEach(o),j.forEach(o),Ce=s(e),fe=i(e,"P",{}),z(fe).forEach(o),this.h()},h(){U(c,"name","hf:doc:metadata"),U(c,"content",xt),U(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),U(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),U(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(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),U(I,"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"),U(w,"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,t){n(document.head,c),l(e,T,t),l(e,p,t),l(e,m,t),f(y,e,t),l(e,r,t),f(M,e,t),l(e,be,t),l(e,q,t),l(e,ve,t),l(e,B,t),l(e,ye,t),l(e,X,t),l(e,we,t),l(e,G,t),l(e,Me,t),f(H,e,t),l(e,ke,t),f(Y,e,t),l(e,Te,t),l(e,E,t),f(P,E,null),n(E,Ue),n(E,ne),n(E,We),n(E,ae),n(E,Ze),f(Z,E,null),l(e,Ee,t),f(L,e,t),l(e,xe,t),l(e,k,t),f(Q,k,null),n(k,Ne),n(k,se),n(k,Ie),n(k,re),n(k,Fe),n(k,ce),n(k,Re),n(k,N),f(S,N,null),n(N,Ve),n(N,de),l(e,$e,t),f(D,e,t),l(e,je,t),l(e,w,t),f(A,w,null),n(w,qe),n(w,ie),n(w,Be),n(w,le),n(w,Xe),n(w,J),f(O,J,null),n(J,Ge),n(J,me),n(J,He),n(J,pe),n(w,Ye),n(w,I),f(K,I,null),n(I,Pe),n(I,ue),n(w,Le),n(w,$),f(ee,$,null),n($,Qe),n($,he),n($,Se),f(F,$,null),n($,De),f(R,$,null),l(e,Ce,t),l(e,fe,t),Je=!0},p(e,[t]){const C={};t&2&&(C.$$scope={dirty:t,ctx:e}),Z.$set(C);const x={};t&2&&(x.$$scope={dirty:t,ctx:e}),F.$set(x);const te={};t&2&&(te.$$scope={dirty:t,ctx:e}),R.$set(te)},i(e){Je||(_(y.$$.fragment,e),_(M.$$.fragment,e),_(H.$$.fragment,e),_(Y.$$.fragment,e),_(P.$$.fragment,e),_(Z.$$.fragment,e),_(L.$$.fragment,e),_(Q.$$.fragment,e),_(S.$$.fragment,e),_(D.$$.fragment,e),_(A.$$.fragment,e),_(O.$$.fragment,e),_(K.$$.fragment,e),_(ee.$$.fragment,e),_(F.$$.fragment,e),_(R.$$.fragment,e),Je=!0)},o(e){b(y.$$.fragment,e),b(M.$$.fragment,e),b(H.$$.fragment,e),b(Y.$$.fragment,e),b(P.$$.fragment,e),b(Z.$$.fragment,e),b(L.$$.fragment,e),b(Q.$$.fragment,e),b(S.$$.fragment,e),b(D.$$.fragment,e),b(A.$$.fragment,e),b(O.$$.fragment,e),b(K.$$.fragment,e),b(ee.$$.fragment,e),b(F.$$.fragment,e),b(R.$$.fragment,e),Je=!1},d(e){e&&(o(T),o(p),o(m),o(r),o(be),o(q),o(ve),o(B),o(ye),o(X),o(we),o(G),o(Me),o(ke),o(Te),o(E),o(Ee),o(xe),o(k),o($e),o(je),o(w),o(Ce),o(fe)),o(c),v(y,e),v(M,e),v(H,e),v(Y,e),v(P),v(Z),v(L,e),v(Q),v(S),v(D,e),v(A),v(O),v(K),v(ee),v(F),v(R)}}}const xt='{"title":"EnCodec","local":"encodec","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"EncodecConfig","local":"transformers.EncodecConfig","sections":[],"depth":2},{"title":"EncodecFeatureExtractor","local":"transformers.EncodecFeatureExtractor","sections":[],"depth":2},{"title":"EncodecModel","local":"transformers.EncodecModel","sections":[],"depth":2}],"depth":1}';function $t(W){return _t(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Nt extends bt{constructor(c){super(),vt(this,c,$t,Et,ft,{})}}export{Nt as component};
