import{s as co,o as lo,n as jt}from"../chunks/scheduler.9bc65507.js";import{S as io,i as mo,g as n,s,u as _,A as po,h as a,f as t,c as r,j as p,v,y as h,k as m,o,a as l,w as b,d as y,t as w,x as M}from"../chunks/index.78c82d43.js";import{T as ho}from"../chunks/Tip.87d55b76.js";import{D as pe}from"../chunks/Docstring.4e7352e2.js";import{C as Jt}from"../chunks/CodeBlock.73e038be.js";import{I as Re}from"../chunks/IconCopyLink.bedaa44d.js";import{E as ro}from"../chunks/ExampleCodeBlock.872b014d.js";function uo(I){let i,x="Example:",f,u,g;return u=new Jt({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(){i=n("p"),i.textContent=x,f=s(),_(u.$$.fragment)},l(d){i=a(d,"P",{"data-svelte-h":!0}),h(i)!=="svelte-11lpom8"&&(i.textContent=x),f=r(d),v(u.$$.fragment,d)},m(d,T){l(d,i,T),l(d,f,T),b(u,d,T),g=!0},p:jt,i(d){g||(y(u.$$.fragment,d),g=!0)},o(d){w(u.$$.fragment,d),g=!1},d(d){d&&(t(i),t(f)),M(u,d)}}}function fo(I){let i,x=`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(){i=n("p"),i.innerHTML=x},l(f){i=a(f,"P",{"data-svelte-h":!0}),h(i)!=="svelte-fincs2"&&(i.innerHTML=x)},m(f,u){l(f,i,u)},p:jt,d(f){f&&t(i)}}}function go(I){let i,x="Examples:",f,u,g;return u=new Jt({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(){i=n("p"),i.textContent=x,f=s(),_(u.$$.fragment)},l(d){i=a(d,"P",{"data-svelte-h":!0}),h(i)!=="svelte-kvfsh7"&&(i.textContent=x),f=r(d),v(u.$$.fragment,d)},m(d,T){l(d,i,T),l(d,f,T),b(u,d,T),g=!0},p:jt,i(d){g||(y(u.$$.fragment,d),g=!0)},o(d){w(u.$$.fragment,d),g=!1},d(d){d&&(t(i),t(f)),M(u,d)}}}function _o(I){let i,x,f,u,g,d,T,L,st,he,zt="EnCodec",Ve,U,F,ze,Q,rt,ue,Ut="Overview",qe,A,Wt='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.',Be,D,Nt="The abstract from the paper is the following:",Xe,O,Zt="<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>",He,K,It=`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:`,Ge,ee,Pe,W,R,Ue,te,ct,fe,Ft="EncodecConfig",Ye,$,oe,dt,ge,Rt=`This is the configuration class to store the configuration of an <a href="/docs/transformers/v4.34.0/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.`,lt,_e,Vt=`Configuration objects inherit from <a href="/docs/transformers/v4.34.0/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/v4.34.0/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,it,V,Se,N,q,We,ne,mt,ve,qt="EncodecFeatureExtractor",Le,E,ae,pt,be,Bt="Constructs an EnCodec feature extractor.",ht,ye,Xt=`This feature extractor inherits from <a href="/docs/transformers/v4.34.0/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.`,ut,we,Ht=`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.`,ft,B,se,gt,Me,Gt="Main method to featurize and prepare for the model one or several sequence(s).",Qe,Z,X,Ne,re,_t,ke,Pt="EncodecModel",Ae,k,ce,vt,Ee,Yt=`The EnCodec neural audio codec model.
This model inherits from <a href="/docs/transformers/v4.34.0/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.)`,bt,xe,St=`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.`,yt,J,de,wt,Te,Lt="Decodes the given frames into an output audio waveform.",Mt,$e,Qt=`Note that the output might be a bit bigger than the input. In that case, any extra steps at the end can be
trimmed.`,kt,H,le,Et,Ce,At="Encodes the input audio waveform into discrete codes.",xt,C,ie,Tt,je,Dt='The <a href="/docs/transformers/v4.34.0/en/model_doc/encodec#transformers.EncodecModel">EncodecModel</a> forward method, overrides the <code>__call__</code> special method.',$t,G,Ct,P,De,Ze,Oe;return L=new Re({}),Q=new Re({}),ee=new Jt({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}}),te=new Re({}),oe=new pe({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/v4.34.0/src/transformers/models/encodec/configuration_encodec.py#L35"}}),V=new ro({props:{anchor:"transformers.EncodecConfig.example",$$slots:{default:[uo]},$$scope:{ctx:I}}}),ne=new Re({}),ae=new pe({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/v4.34.0/src/transformers/models/encodec/feature_extraction_encodec.py#L29"}}),se=new pe({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/v4.34.0/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/v4.34.0/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>) &#x2014;
If set, will return tensors instead of list of python integers. Acceptable values are:</p>
<ul>
<li><code>&apos;tf&apos;</code>: Return TensorFlow <code>tf.constant</code> objects.</li>
<li><code>&apos;pt&apos;</code>: Return PyTorch <code>torch.Tensor</code> objects.</li>
<li><code>&apos;np&apos;</code>: Return Numpy <code>np.ndarray</code> objects.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.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/v4.34.0/src/transformers/models/encodec/feature_extraction_encodec.py#L84"}}),re=new Re({}),ce=new pe({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/v4.34.0/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/v4.34.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/encodec/modeling_encodec.py#L535"}}),de=new pe({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/v4.34.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/encodec/modeling_encodec.py#L712"}}),le=new pe({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/v4.34.0/src/transformers/models/encodec/modeling_encodec.py#L584",returnDescription:`
<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>
`}}),ie=new pe({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/v4.34.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/encodec/modeling_encodec.py#L760",returnDescription:`
<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/v4.34.0/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:`
<p><code>transformers.models.encodec.modeling_encodec.EncodecOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),G=new ho({props:{$$slots:{default:[fo]},$$scope:{ctx:I}}}),P=new ro({props:{anchor:"transformers.EncodecModel.forward.example",$$slots:{default:[go]},$$scope:{ctx:I}}}),{c(){i=n("meta"),x=s(),f=n("p"),u=s(),g=n("h1"),d=n("a"),T=n("span"),_(L.$$.fragment),st=s(),he=n("span"),he.textContent=zt,Ve=s(),U=n("h2"),F=n("a"),ze=n("span"),_(Q.$$.fragment),rt=s(),ue=n("span"),ue.textContent=Ut,qe=s(),A=n("p"),A.innerHTML=Wt,Be=s(),D=n("p"),D.textContent=Nt,Xe=s(),O=n("p"),O.innerHTML=Zt,He=s(),K=n("p"),K.innerHTML=It,Ge=s(),_(ee.$$.fragment),Pe=s(),W=n("h2"),R=n("a"),Ue=n("span"),_(te.$$.fragment),ct=s(),fe=n("span"),fe.textContent=Ft,Ye=s(),$=n("div"),_(oe.$$.fragment),dt=s(),ge=n("p"),ge.innerHTML=Rt,lt=s(),_e=n("p"),_e.innerHTML=Vt,it=s(),_(V.$$.fragment),Se=s(),N=n("h2"),q=n("a"),We=n("span"),_(ne.$$.fragment),mt=s(),ve=n("span"),ve.textContent=qt,Le=s(),E=n("div"),_(ae.$$.fragment),pt=s(),be=n("p"),be.textContent=Bt,ht=s(),ye=n("p"),ye.innerHTML=Xt,ut=s(),we=n("p"),we.innerHTML=Ht,ft=s(),B=n("div"),_(se.$$.fragment),gt=s(),Me=n("p"),Me.textContent=Gt,Qe=s(),Z=n("h2"),X=n("a"),Ne=n("span"),_(re.$$.fragment),_t=s(),ke=n("span"),ke.textContent=Pt,Ae=s(),k=n("div"),_(ce.$$.fragment),vt=s(),Ee=n("p"),Ee.innerHTML=Yt,bt=s(),xe=n("p"),xe.innerHTML=St,yt=s(),J=n("div"),_(de.$$.fragment),wt=s(),Te=n("p"),Te.textContent=Lt,Mt=s(),$e=n("p"),$e.textContent=Qt,kt=s(),H=n("div"),_(le.$$.fragment),Et=s(),Ce=n("p"),Ce.textContent=At,xt=s(),C=n("div"),_(ie.$$.fragment),Tt=s(),je=n("p"),je.innerHTML=Dt,$t=s(),_(G.$$.fragment),Ct=s(),_(P.$$.fragment),De=s(),Ze=n("p"),this.h()},l(e){const c=po("svelte-1phssyn",document.head);i=a(c,"META",{name:!0,content:!0}),c.forEach(t),x=r(e),f=a(e,"P",{}),p(f).forEach(t),u=r(e),g=a(e,"H1",{class:!0});var me=p(g);d=a(me,"A",{id:!0,class:!0,href:!0});var Ie=p(d);T=a(Ie,"SPAN",{});var Fe=p(T);v(L.$$.fragment,Fe),Fe.forEach(t),Ie.forEach(t),st=r(me),he=a(me,"SPAN",{"data-svelte-h":!0}),h(he)!=="svelte-njug40"&&(he.textContent=zt),me.forEach(t),Ve=r(e),U=a(e,"H2",{class:!0});var Ke=p(U);F=a(Ke,"A",{id:!0,class:!0,href:!0});var Ot=p(F);ze=a(Ot,"SPAN",{});var Kt=p(ze);v(Q.$$.fragment,Kt),Kt.forEach(t),Ot.forEach(t),rt=r(Ke),ue=a(Ke,"SPAN",{"data-svelte-h":!0}),h(ue)!=="svelte-1jsw1pg"&&(ue.textContent=Ut),Ke.forEach(t),qe=r(e),A=a(e,"P",{"data-svelte-h":!0}),h(A)!=="svelte-12eaz08"&&(A.innerHTML=Wt),Be=r(e),D=a(e,"P",{"data-svelte-h":!0}),h(D)!=="svelte-vfdo9a"&&(D.textContent=Nt),Xe=r(e),O=a(e,"P",{"data-svelte-h":!0}),h(O)!=="svelte-1hdoj6v"&&(O.innerHTML=Zt),He=r(e),K=a(e,"P",{"data-svelte-h":!0}),h(K)!=="svelte-cjw93l"&&(K.innerHTML=It),Ge=r(e),v(ee.$$.fragment,e),Pe=r(e),W=a(e,"H2",{class:!0});var et=p(W);R=a(et,"A",{id:!0,class:!0,href:!0});var eo=p(R);Ue=a(eo,"SPAN",{});var to=p(Ue);v(te.$$.fragment,to),to.forEach(t),eo.forEach(t),ct=r(et),fe=a(et,"SPAN",{"data-svelte-h":!0}),h(fe)!=="svelte-35e0iq"&&(fe.textContent=Ft),et.forEach(t),Ye=r(e),$=a(e,"DIV",{class:!0});var Y=p($);v(oe.$$.fragment,Y),dt=r(Y),ge=a(Y,"P",{"data-svelte-h":!0}),h(ge)!=="svelte-1ycdov3"&&(ge.innerHTML=Rt),lt=r(Y),_e=a(Y,"P",{"data-svelte-h":!0}),h(_e)!=="svelte-10kqkkl"&&(_e.innerHTML=Vt),it=r(Y),v(V.$$.fragment,Y),Y.forEach(t),Se=r(e),N=a(e,"H2",{class:!0});var tt=p(N);q=a(tt,"A",{id:!0,class:!0,href:!0});var oo=p(q);We=a(oo,"SPAN",{});var no=p(We);v(ne.$$.fragment,no),no.forEach(t),oo.forEach(t),mt=r(tt),ve=a(tt,"SPAN",{"data-svelte-h":!0}),h(ve)!=="svelte-1t1guke"&&(ve.textContent=qt),tt.forEach(t),Le=r(e),E=a(e,"DIV",{class:!0});var z=p(E);v(ae.$$.fragment,z),pt=r(z),be=a(z,"P",{"data-svelte-h":!0}),h(be)!=="svelte-5n3zz2"&&(be.textContent=Bt),ht=r(z),ye=a(z,"P",{"data-svelte-h":!0}),h(ye)!=="svelte-bnr2z1"&&(ye.innerHTML=Xt),ut=r(z),we=a(z,"P",{"data-svelte-h":!0}),h(we)!=="svelte-7r1z10"&&(we.innerHTML=Ht),ft=r(z),B=a(z,"DIV",{class:!0});var ot=p(B);v(se.$$.fragment,ot),gt=r(ot),Me=a(ot,"P",{"data-svelte-h":!0}),h(Me)!=="svelte-1a6wgfx"&&(Me.textContent=Gt),ot.forEach(t),z.forEach(t),Qe=r(e),Z=a(e,"H2",{class:!0});var nt=p(Z);X=a(nt,"A",{id:!0,class:!0,href:!0});var ao=p(X);Ne=a(ao,"SPAN",{});var so=p(Ne);v(re.$$.fragment,so),so.forEach(t),ao.forEach(t),_t=r(nt),ke=a(nt,"SPAN",{"data-svelte-h":!0}),h(ke)!=="svelte-1p4tjx5"&&(ke.textContent=Pt),nt.forEach(t),Ae=r(e),k=a(e,"DIV",{class:!0});var j=p(k);v(ce.$$.fragment,j),vt=r(j),Ee=a(j,"P",{"data-svelte-h":!0}),h(Ee)!=="svelte-15vvcz2"&&(Ee.innerHTML=Yt),bt=r(j),xe=a(j,"P",{"data-svelte-h":!0}),h(xe)!=="svelte-hswkmf"&&(xe.innerHTML=St),yt=r(j),J=a(j,"DIV",{class:!0});var Je=p(J);v(de.$$.fragment,Je),wt=r(Je),Te=a(Je,"P",{"data-svelte-h":!0}),h(Te)!=="svelte-18b2f30"&&(Te.textContent=Lt),Mt=r(Je),$e=a(Je,"P",{"data-svelte-h":!0}),h($e)!=="svelte-12sn3fy"&&($e.textContent=Qt),Je.forEach(t),kt=r(j),H=a(j,"DIV",{class:!0});var at=p(H);v(le.$$.fragment,at),Et=r(at),Ce=a(at,"P",{"data-svelte-h":!0}),h(Ce)!=="svelte-1mhlb4g"&&(Ce.textContent=At),at.forEach(t),xt=r(j),C=a(j,"DIV",{class:!0});var S=p(C);v(ie.$$.fragment,S),Tt=r(S),je=a(S,"P",{"data-svelte-h":!0}),h(je)!=="svelte-1d02wcg"&&(je.innerHTML=Dt),$t=r(S),v(G.$$.fragment,S),Ct=r(S),v(P.$$.fragment,S),S.forEach(t),j.forEach(t),De=r(e),Ze=a(e,"P",{}),p(Ze).forEach(t),this.h()},h(){m(i,"name","hf:doc:metadata"),m(i,"content",JSON.stringify(vo)),m(d,"id","encodec"),m(d,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(d,"href","#encodec"),m(g,"class","relative group"),m(F,"id","overview"),m(F,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(F,"href","#overview"),m(U,"class","relative group"),m(R,"id","transformers.EncodecConfig"),m(R,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(R,"href","#transformers.EncodecConfig"),m(W,"class","relative group"),m($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(q,"id","transformers.EncodecFeatureExtractor"),m(q,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(q,"href","#transformers.EncodecFeatureExtractor"),m(N,"class","relative group"),m(B,"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,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(X,"id","transformers.EncodecModel"),m(X,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(X,"href","#transformers.EncodecModel"),m(Z,"class","relative group"),m(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(k,"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,c){o(document.head,i),l(e,x,c),l(e,f,c),l(e,u,c),l(e,g,c),o(g,d),o(d,T),b(L,T,null),o(g,st),o(g,he),l(e,Ve,c),l(e,U,c),o(U,F),o(F,ze),b(Q,ze,null),o(U,rt),o(U,ue),l(e,qe,c),l(e,A,c),l(e,Be,c),l(e,D,c),l(e,Xe,c),l(e,O,c),l(e,He,c),l(e,K,c),l(e,Ge,c),b(ee,e,c),l(e,Pe,c),l(e,W,c),o(W,R),o(R,Ue),b(te,Ue,null),o(W,ct),o(W,fe),l(e,Ye,c),l(e,$,c),b(oe,$,null),o($,dt),o($,ge),o($,lt),o($,_e),o($,it),b(V,$,null),l(e,Se,c),l(e,N,c),o(N,q),o(q,We),b(ne,We,null),o(N,mt),o(N,ve),l(e,Le,c),l(e,E,c),b(ae,E,null),o(E,pt),o(E,be),o(E,ht),o(E,ye),o(E,ut),o(E,we),o(E,ft),o(E,B),b(se,B,null),o(B,gt),o(B,Me),l(e,Qe,c),l(e,Z,c),o(Z,X),o(X,Ne),b(re,Ne,null),o(Z,_t),o(Z,ke),l(e,Ae,c),l(e,k,c),b(ce,k,null),o(k,vt),o(k,Ee),o(k,bt),o(k,xe),o(k,yt),o(k,J),b(de,J,null),o(J,wt),o(J,Te),o(J,Mt),o(J,$e),o(k,kt),o(k,H),b(le,H,null),o(H,Et),o(H,Ce),o(k,xt),o(k,C),b(ie,C,null),o(C,Tt),o(C,je),o(C,$t),b(G,C,null),o(C,Ct),b(P,C,null),l(e,De,c),l(e,Ze,c),Oe=!0},p(e,[c]){const me={};c&2&&(me.$$scope={dirty:c,ctx:e}),V.$set(me);const Ie={};c&2&&(Ie.$$scope={dirty:c,ctx:e}),G.$set(Ie);const Fe={};c&2&&(Fe.$$scope={dirty:c,ctx:e}),P.$set(Fe)},i(e){Oe||(y(L.$$.fragment,e),y(Q.$$.fragment,e),y(ee.$$.fragment,e),y(te.$$.fragment,e),y(oe.$$.fragment,e),y(V.$$.fragment,e),y(ne.$$.fragment,e),y(ae.$$.fragment,e),y(se.$$.fragment,e),y(re.$$.fragment,e),y(ce.$$.fragment,e),y(de.$$.fragment,e),y(le.$$.fragment,e),y(ie.$$.fragment,e),y(G.$$.fragment,e),y(P.$$.fragment,e),Oe=!0)},o(e){w(L.$$.fragment,e),w(Q.$$.fragment,e),w(ee.$$.fragment,e),w(te.$$.fragment,e),w(oe.$$.fragment,e),w(V.$$.fragment,e),w(ne.$$.fragment,e),w(ae.$$.fragment,e),w(se.$$.fragment,e),w(re.$$.fragment,e),w(ce.$$.fragment,e),w(de.$$.fragment,e),w(le.$$.fragment,e),w(ie.$$.fragment,e),w(G.$$.fragment,e),w(P.$$.fragment,e),Oe=!1},d(e){e&&(t(x),t(f),t(u),t(g),t(Ve),t(U),t(qe),t(A),t(Be),t(D),t(Xe),t(O),t(He),t(K),t(Ge),t(Pe),t(W),t(Ye),t($),t(Se),t(N),t(Le),t(E),t(Qe),t(Z),t(Ae),t(k),t(De),t(Ze)),t(i),M(L),M(Q),M(ee,e),M(te),M(oe),M(V),M(ne),M(ae),M(se),M(re),M(ce),M(de),M(le),M(ie),M(G),M(P)}}}const vo={local:"encodec",sections:[{local:"overview",title:"Overview"},{local:"transformers.EncodecConfig",title:"EncodecConfig"},{local:"transformers.EncodecFeatureExtractor",title:"EncodecFeatureExtractor"},{local:"transformers.EncodecModel",title:"EncodecModel"}],title:"EnCodec"};function bo(I){return lo(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class $o extends io{constructor(i){super(),mo(this,i,bo,_o,co,{})}}export{$o as component};
