import{s as Qo,o as Yo,n as ro}from"../chunks/scheduler.9bc65507.js";import{S as Do,i as Oo,g as s,s as a,u as h,A as Ko,h as r,f as t,c as i,j as u,v as f,y as p,k as m,o as l,a as n,w as g,d as _,t as y,x as b}from"../chunks/index.78c82d43.js";import{T as en}from"../chunks/Tip.87d55b76.js";import{D as Se}from"../chunks/Docstring.4e7352e2.js";import{C as P}from"../chunks/CodeBlock.73e038be.js";import{I as Ae}from"../chunks/IconCopyLink.bedaa44d.js";import{E as Po}from"../chunks/ExampleCodeBlock.872b014d.js";function tn(W){let c,M="Example:",w,v,T;return v=new P({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFZpdHNNb2RlbCUyQyUyMFZpdHNDb25maWclMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwJTIyZmFjZWJvb2slMkZtbXMtdHRzLWVuZyUyMiUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBWaXRzQ29uZmlnKCklMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwbW9kZWwlMjAod2l0aCUyMHJhbmRvbSUyMHdlaWdodHMpJTIwZnJvbSUyMHRoZSUyMCUyMmZhY2Vib29rJTJGbW1zLXR0cy1lbmclMjIlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMFZpdHNNb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> VitsModel, VitsConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a &quot;facebook/mms-tts-eng&quot; style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = VitsConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the &quot;facebook/mms-tts-eng&quot; style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = VitsModel(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=s("p"),c.textContent=M,w=a(),h(v.$$.fragment)},l(d){c=r(d,"P",{"data-svelte-h":!0}),p(c)!=="svelte-11lpom8"&&(c.textContent=M),w=i(d),f(v.$$.fragment,d)},m(d,x){n(d,c,x),n(d,w,x),g(v,d,x),T=!0},p:ro,i(d){T||(_(v.$$.fragment,d),T=!0)},o(d){y(v.$$.fragment,d),T=!1},d(d){d&&(t(c),t(w)),b(v,d)}}}function on(W){let c,M=`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=s("p"),c.innerHTML=M},l(w){c=r(w,"P",{"data-svelte-h":!0}),p(c)!=="svelte-fincs2"&&(c.innerHTML=M)},m(w,v){n(w,c,v)},p:ro,d(w){w&&t(c)}}}function nn(W){let c,M="Example:",w,v,T;return v=new P({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFZpdHNUb2tlbml6ZXIlMkMlMjBWaXRzTW9kZWwlMkMlMjBzZXRfc2VlZCUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwVml0c1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtbXMtdHRzLWVuZyUyMiklMEFtb2RlbCUyMCUzRCUyMFZpdHNNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtbXMtdHRzLWVuZyUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIodGV4dCUzRCUyMkhlbGxvJTIwLSUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEFzZXRfc2VlZCg1NTUpJTIwJTIwJTIzJTIwbWFrZSUyMGRldGVybWluaXN0aWMlMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMG1vZGVsKGlucHV0cyU1QiUyMmlucHV0X2lkcyUyMiU1RCklMEFvdXRwdXRzLndhdmVmb3JtLnNoYXBl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> VitsTokenizer, VitsModel, set_seed
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = VitsTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mms-tts-eng&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = VitsModel.from_pretrained(<span class="hljs-string">&quot;facebook/mms-tts-eng&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(text=<span class="hljs-string">&quot;Hello - my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>set_seed(<span class="hljs-number">555</span>)  <span class="hljs-comment"># make deterministic</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    outputs = model(inputs[<span class="hljs-string">&quot;input_ids&quot;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs.waveform.shape
torch.Size([<span class="hljs-number">1</span>, <span class="hljs-number">45824</span>])`,wrap:!1}}),{c(){c=s("p"),c.textContent=M,w=a(),h(v.$$.fragment)},l(d){c=r(d,"P",{"data-svelte-h":!0}),p(c)!=="svelte-11lpom8"&&(c.textContent=M),w=i(d),f(v.$$.fragment,d)},m(d,x){n(d,c,x),n(d,w,x),g(v,d,x),T=!0},p:ro,i(d){T||(_(v.$$.fragment,d),T=!0)},o(d){y(v.$$.fragment,d),T=!1},d(d){d&&(t(c),t(w)),b(v,d)}}}function sn(W){let c,M,w,v,T,d,x,Q,qt,je,ao="VITS",tt,j,Z,Ge,Y,Ht,Ue,io="Overview",ot,D,lo='The VITS model was proposed in <a href="https://arxiv.org/abs/2106.06103" rel="nofollow">Conditional Variational Autoencoder with Adversarial Learning for End-to-End Text-to-Speech</a> by Jaehyeon Kim, Jungil Kong, Juhee Son.',nt,O,co=`VITS (<strong>V</strong>ariational <strong>I</strong>nference with adversarial learning for end-to-end <strong>T</strong>ext-to-<strong>S</strong>peech) is an end-to-end
speech synthesis model that predicts a speech waveform conditional on an input text sequence. It is a conditional variational
autoencoder (VAE) comprised of a posterior encoder, decoder, and conditional prior.`,st,K,po=`A set of spectrogram-based acoustic features are predicted by the flow-based module, which is formed of a Transformer-based
text encoder and multiple coupling layers. The spectrogram is decoded using a stack of transposed convolutional layers,
much in the same style as the HiFi-GAN vocoder. Motivated by the one-to-many nature of the TTS problem, where the same text
input can be spoken in multiple ways, the model also includes a stochastic duration predictor, which allows the model to
synthesise speech with different rhythms from the same input text.`,rt,ee,mo=`The model is trained end-to-end with a combination of losses derived from variational lower bound and adversarial training.
To improve the expressiveness of the model, normalizing flows are applied to the conditional prior distribution. During
inference, the text encodings are up-sampled based on the duration prediction module, and then mapped into the
waveform using a cascade of the flow module and HiFi-GAN decoder. Due to the stochastic nature of the duration predictor,
the model is non-deterministic, and thus requires a fixed seed to generate the same speech waveform.`,at,te,uo="The abstract from the paper is the following:",it,oe,ho="<em>Several recent end-to-end text-to-speech (TTS) models enabling single-stage training and parallel sampling have been proposed, but their sample quality does not match that of two-stage TTS systems. In this work, we present a parallel end-to-end TTS method that generates more natural sounding audio than current two-stage models. Our method adopts variational inference augmented with normalizing flows and an adversarial training process, which improves the expressive power of generative modeling. We also propose a stochastic duration predictor to synthesize speech with diverse rhythms from input text. With the uncertainty modeling over latent variables and the stochastic duration predictor, our method expresses the natural one-to-many relationship in which a text input can be spoken in multiple ways with different pitches and rhythms. A subjective human evaluation (mean opinion score, or MOS) on the LJ Speech, a single speaker dataset, shows that our method outperforms the best publicly available TTS systems and achieves a MOS comparable to ground truth.</em>",lt,ne,fo=`This model can also be used with TTS checkpoints from <a href="https://arxiv.org/abs/2305.13516" rel="nofollow">Massively Multilingual Speech (MMS)</a>
as these checkpoints use the same architecture and a slightly modified tokenizer.`,dt,se,go='This model was contributed by <a href="https://huggingface.co/Matthijs" rel="nofollow">Matthijs</a> and <a href="https://huggingface.co/sanchit-gandhi" rel="nofollow">sanchit-gandhi</a>. The original code can be found <a href="https://github.com/jaywalnut310/vits" rel="nofollow">here</a>.',ct,U,R,Pe,re,Xt,$e,_o="Model Usage",pt,ae,yo=`Both the VITS and MMS-TTS checkpoints can be used with the same API. Since the flow-based model is non-deterministic, it
is good practice to set a seed to ensure reproducibility of the outputs. For languages with a Roman alphabet,
such as English or French, the tokenizer can be used directly to pre-process the text inputs. The following code example
runs a forward pass using the MMS-TTS English checkpoint:`,mt,ie,ut,le,bo="The resulting waveform can be saved as a <code>.wav</code> file:",ht,de,ft,ce,vo="Or displayed in a Jupyter Notebook / Google Colab:",gt,pe,_t,me,wo=`For certain languages with a non-Roman alphabet, such as Arabic, Mandarin or Hindi, the <a href="https://github.com/isi-nlp/uroman" rel="nofollow"><code>uroman</code></a>
perl package is required to pre-process the text inputs to the Roman alphabet.`,yt,ue,To=`You can check whether you require the <code>uroman</code> package for your language by inspecting the <code>is_uroman</code> attribute of
the pre-trained <code>tokenizer</code>:`,bt,he,vt,fe,ko=`If required, you should apply the uroman package to your text inputs <strong>prior</strong> to passing them to the <code>VitsTokenizer</code>,
since currently the tokenizer does not support performing the pre-processing itself.`,wt,ge,Mo="To do this, first clone the uroman repository to your local machine and set the bash variable <code>UROMAN</code> to the local path:",Tt,_e,kt,ye,xo=`You can then pre-process the text input using the following code snippet. You can either rely on using the bash variable
<code>UROMAN</code> to point to the uroman repository, or you can pass the uroman directory as an argument to the <code>uromaize</code> function:`,Mt,be,xt,$,E,Qe,ve,Ft,Ie,zo="VitsConfig",zt,z,we,Bt,Ne,Vo=`This is the configuration class to store the configuration of a <a href="/docs/transformers/v4.34.0/en/model_doc/vits#transformers.VitsModel">VitsModel</a>. It is used to instantiate a VITS
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 VITS
<a href="https://huggingface.co/facebook/mms-tts-eng" rel="nofollow">facebook/mms-tts-eng</a> architecture.`,Lt,We,Jo=`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.`,St,q,Vt,I,H,Ye,Te,At,Ze,Co="VitsTokenizer",Jt,k,ke,Gt,Re,jo="Construct a VITS tokenizer. Also supports MMS-TTS.",Pt,Ee,Uo=`This tokenizer inherits from <a href="/docs/transformers/v4.34.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a> which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`,Qt,X,Me,Yt,qe,$o=`Main method to tokenize and prepare for the model one or several sequence(s) or one or several pair(s) of
sequences.`,Dt,He,xe,Ct,N,F,De,ze,Ot,Xe,Io="VitsModel",jt,V,Ve,Kt,Fe,No=`The complete VITS model, for text-to-speech synthesis.
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.)`,eo,Be,Wo=`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.`,to,J,Je,oo,Le,Zo='The <a href="/docs/transformers/v4.34.0/en/model_doc/vits#transformers.VitsModel">VitsModel</a> forward method, overrides the <code>__call__</code> special method.',no,B,so,L,Ut,Oe,$t;return Q=new Ae({}),Y=new Ae({}),re=new Ae({}),ie=new P({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwVml0c1Rva2VuaXplciUyQyUyMFZpdHNNb2RlbCUyQyUyMHNldF9zZWVkJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwVml0c1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtbXMtdHRzLWVuZyUyMiklMEFtb2RlbCUyMCUzRCUyMFZpdHNNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtbXMtdHRzLWVuZyUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIodGV4dCUzRCUyMkhlbGxvJTIwLSUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEFzZXRfc2VlZCg1NTUpJTIwJTIwJTIzJTIwbWFrZSUyMGRldGVybWluaXN0aWMlMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQXdhdmVmb3JtJTIwJTNEJTIwb3V0cHV0cy53YXZlZm9ybSU1QjAlNUQ=",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> VitsTokenizer, VitsModel, set_seed

tokenizer = VitsTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mms-tts-eng&quot;</span>)
model = VitsModel.from_pretrained(<span class="hljs-string">&quot;facebook/mms-tts-eng&quot;</span>)

inputs = tokenizer(text=<span class="hljs-string">&quot;Hello - my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

set_seed(<span class="hljs-number">555</span>)  <span class="hljs-comment"># make deterministic</span>

<span class="hljs-keyword">with</span> torch.no_grad():
   outputs = model(**inputs)

waveform = outputs.waveform[<span class="hljs-number">0</span>]`,wrap:!1}}),de=new P({props:{code:"aW1wb3J0JTIwc2NpcHklMEElMEFzY2lweS5pby53YXZmaWxlLndyaXRlKCUyMnRlY2huby53YXYlMjIlMkMlMjByYXRlJTNEbW9kZWwuY29uZmlnLnNhbXBsaW5nX3JhdGUlMkMlMjBkYXRhJTNEd2F2ZWZvcm0p",highlighted:`<span class="hljs-keyword">import</span> scipy

scipy.io.wavfile.write(<span class="hljs-string">&quot;techno.wav&quot;</span>, rate=model.config.sampling_rate, data=waveform)`,wrap:!1}}),pe=new P({props:{code:"ZnJvbSUyMElQeXRob24uZGlzcGxheSUyMGltcG9ydCUyMEF1ZGlvJTBBJTBBQXVkaW8od2F2ZWZvcm0lMkMlMjByYXRlJTNEbW9kZWwuY29uZmlnLnNhbXBsaW5nX3JhdGUp",highlighted:`<span class="hljs-keyword">from</span> IPython.display <span class="hljs-keyword">import</span> Audio

Audio(waveform, rate=model.config.sampling_rate)`,wrap:!1}}),he=new P({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFZpdHNUb2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBWaXRzVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRm1tcy10dHMtZW5nJTIyKSUwQXByaW50KHRva2VuaXplci5pc191cm9tYW4p",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> VitsTokenizer

tokenizer = VitsTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mms-tts-eng&quot;</span>)
<span class="hljs-built_in">print</span>(tokenizer.is_uroman)`,wrap:!1}}),_e=new P({props:{code:"Z2l0JTIwY2xvbmUlMjBodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZpc2ktbmxwJTJGdXJvbWFuLmdpdCUwQWNkJTIwdXJvbWFuJTBBZXhwb3J0JTIwVVJPTUFOJTNEJTI0KHB3ZCk=",highlighted:`git <span class="hljs-built_in">clone</span> https://github.com/isi-nlp/uroman.git
<span class="hljs-built_in">cd</span> uroman
<span class="hljs-built_in">export</span> UROMAN=$(<span class="hljs-built_in">pwd</span>)`,wrap:!1}}),be=new P({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwVml0c1Rva2VuaXplciUyQyUyMFZpdHNNb2RlbCUyQyUyMHNldF9zZWVkJTBBaW1wb3J0JTIwb3MlMEFpbXBvcnQlMjBzdWJwcm9jZXNzJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwVml0c1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtbXMtdHRzLWtvciUyMiklMEFtb2RlbCUyMCUzRCUyMFZpdHNNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtbXMtdHRzLWtvciUyMiklMEElMEFkZWYlMjB1cm9tYW5pemUoaW5wdXRfc3RyaW5nJTJDJTIwdXJvbWFuX3BhdGgpJTNBJTBBJTIwJTIwJTIwJTIwJTIyJTIyJTIyQ29udmVydCUyMG5vbi1Sb21hbiUyMHN0cmluZ3MlMjB0byUyMFJvbWFuJTIwdXNpbmclMjB0aGUlMjAlNjB1cm9tYW4lNjAlMjBwZXJsJTIwcGFja2FnZS4lMjIlMjIlMjIlMEElMjAlMjAlMjAlMjBzY3JpcHRfcGF0aCUyMCUzRCUyMG9zLnBhdGguam9pbih1cm9tYW5fcGF0aCUyQyUyMCUyMmJpbiUyMiUyQyUyMCUyMnVyb21hbi5wbCUyMiklMEElMEElMjAlMjAlMjAlMjBjb21tYW5kJTIwJTNEJTIwJTVCJTIycGVybCUyMiUyQyUyMHNjcmlwdF9wYXRoJTVEJTBBJTBBJTIwJTIwJTIwJTIwcHJvY2VzcyUyMCUzRCUyMHN1YnByb2Nlc3MuUG9wZW4oY29tbWFuZCUyQyUyMHN0ZGluJTNEc3VicHJvY2Vzcy5QSVBFJTJDJTIwc3Rkb3V0JTNEc3VicHJvY2Vzcy5QSVBFJTJDJTIwc3RkZXJyJTNEc3VicHJvY2Vzcy5QSVBFKSUwQSUyMCUyMCUyMCUyMCUyMyUyMEV4ZWN1dGUlMjB0aGUlMjBwZXJsJTIwY29tbWFuZCUwQSUyMCUyMCUyMCUyMHN0ZG91dCUyQyUyMHN0ZGVyciUyMCUzRCUyMHByb2Nlc3MuY29tbXVuaWNhdGUoaW5wdXQlM0RpbnB1dF9zdHJpbmcuZW5jb2RlKCkpJTBBJTBBJTIwJTIwJTIwJTIwaWYlMjBwcm9jZXNzLnJldHVybmNvZGUlMjAhJTNEJTIwMCUzQSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHJhaXNlJTIwVmFsdWVFcnJvcihmJTIyRXJyb3IlMjAlN0Jwcm9jZXNzLnJldHVybmNvZGUlN0QlM0ElMjAlN0JzdGRlcnIuZGVjb2RlKCklN0QlMjIpJTBBJTBBJTIwJTIwJTIwJTIwJTIzJTIwUmV0dXJuJTIwdGhlJTIwb3V0cHV0JTIwYXMlMjBhJTIwc3RyaW5nJTIwYW5kJTIwc2tpcCUyMHRoZSUyMG5ldy1saW5lJTIwY2hhcmFjdGVyJTIwYXQlMjB0aGUlMjBlbmQlMEElMjAlMjAlMjAlMjByZXR1cm4lMjBzdGRvdXQuZGVjb2RlKCklNUIlM0EtMSU1RCUwQSUwQXRleHQlMjAlM0QlMjAlMjIlRUMlOUQlQjQlRUIlQjQlOTAlMjAlRUIlQUMlQjQlRUMlOEElQTglMjAlRUMlOUQlQkMlRUMlOUQlQjQlRUMlOTUlQkMlMjIlMEF1cm9tYWl6ZWRfdGV4dCUyMCUzRCUyMHVyb21hbml6ZSh0ZXh0JTJDJTIwdXJvbWFuX3BhdGglM0Rvcy5lbnZpcm9uJTVCJTIyVVJPTUFOJTIyJTVEKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplcih0ZXh0JTNEdXJvbWFpemVkX3RleHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXNldF9zZWVkKDU1NSklMjAlMjAlMjMlMjBtYWtlJTIwZGV0ZXJtaW5pc3RpYyUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoaW5wdXRzJTVCJTIyaW5wdXRfaWRzJTIyJTVEKSUwQSUwQXdhdmVmb3JtJTIwJTNEJTIwb3V0cHV0cy53YXZlZm9ybSU1QjAlNUQ=",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> VitsTokenizer, VitsModel, set_seed
<span class="hljs-keyword">import</span> os
<span class="hljs-keyword">import</span> subprocess

tokenizer = VitsTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/mms-tts-kor&quot;</span>)
model = VitsModel.from_pretrained(<span class="hljs-string">&quot;facebook/mms-tts-kor&quot;</span>)

<span class="hljs-keyword">def</span> <span class="hljs-title function_">uromanize</span>(<span class="hljs-params">input_string, uroman_path</span>):
    <span class="hljs-string">&quot;&quot;&quot;Convert non-Roman strings to Roman using the \`uroman\` perl package.&quot;&quot;&quot;</span>
    script_path = os.path.join(uroman_path, <span class="hljs-string">&quot;bin&quot;</span>, <span class="hljs-string">&quot;uroman.pl&quot;</span>)

    command = [<span class="hljs-string">&quot;perl&quot;</span>, script_path]

    process = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    <span class="hljs-comment"># Execute the perl command</span>
    stdout, stderr = process.communicate(<span class="hljs-built_in">input</span>=input_string.encode())

    <span class="hljs-keyword">if</span> process.returncode != <span class="hljs-number">0</span>:
        <span class="hljs-keyword">raise</span> ValueError(<span class="hljs-string">f&quot;Error <span class="hljs-subst">{process.returncode}</span>: <span class="hljs-subst">{stderr.decode()}</span>&quot;</span>)

    <span class="hljs-comment"># Return the output as a string and skip the new-line character at the end</span>
    <span class="hljs-keyword">return</span> stdout.decode()[:-<span class="hljs-number">1</span>]

text = <span class="hljs-string">&quot;이봐 무슨 일이야&quot;</span>
uromaized_text = uromanize(text, uroman_path=os.environ[<span class="hljs-string">&quot;UROMAN&quot;</span>])

inputs = tokenizer(text=uromaized_text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

set_seed(<span class="hljs-number">555</span>)  <span class="hljs-comment"># make deterministic</span>
<span class="hljs-keyword">with</span> torch.no_grad():
   outputs = model(inputs[<span class="hljs-string">&quot;input_ids&quot;</span>])

waveform = outputs.waveform[<span class="hljs-number">0</span>]`,wrap:!1}}),ve=new Ae({}),we=new Se({props:{name:"class transformers.VitsConfig",anchor:"transformers.VitsConfig",parameters:[{name:"vocab_size",val:" = 38"},{name:"hidden_size",val:" = 192"},{name:"num_hidden_layers",val:" = 6"},{name:"num_attention_heads",val:" = 2"},{name:"window_size",val:" = 4"},{name:"use_bias",val:" = True"},{name:"ffn_dim",val:" = 768"},{name:"layerdrop",val:" = 0.1"},{name:"ffn_kernel_size",val:" = 3"},{name:"flow_size",val:" = 192"},{name:"spectrogram_bins",val:" = 513"},{name:"hidden_act",val:" = 'relu'"},{name:"hidden_dropout",val:" = 0.1"},{name:"attention_dropout",val:" = 0.1"},{name:"activation_dropout",val:" = 0.1"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-05"},{name:"use_stochastic_duration_prediction",val:" = True"},{name:"num_speakers",val:" = 1"},{name:"speaker_embedding_size",val:" = 0"},{name:"upsample_initial_channel",val:" = 512"},{name:"upsample_rates",val:" = [8, 8, 2, 2]"},{name:"upsample_kernel_sizes",val:" = [16, 16, 4, 4]"},{name:"resblock_kernel_sizes",val:" = [3, 7, 11]"},{name:"resblock_dilation_sizes",val:" = [[1, 3, 5], [1, 3, 5], [1, 3, 5]]"},{name:"leaky_relu_slope",val:" = 0.1"},{name:"depth_separable_channels",val:" = 2"},{name:"depth_separable_num_layers",val:" = 3"},{name:"duration_predictor_flow_bins",val:" = 10"},{name:"duration_predictor_tail_bound",val:" = 5.0"},{name:"duration_predictor_kernel_size",val:" = 3"},{name:"duration_predictor_dropout",val:" = 0.5"},{name:"duration_predictor_num_flows",val:" = 4"},{name:"duration_predictor_filter_channels",val:" = 256"},{name:"prior_encoder_num_flows",val:" = 4"},{name:"prior_encoder_num_wavenet_layers",val:" = 4"},{name:"posterior_encoder_num_wavenet_layers",val:" = 16"},{name:"wavenet_kernel_size",val:" = 5"},{name:"wavenet_dilation_rate",val:" = 1"},{name:"wavenet_dropout",val:" = 0.0"},{name:"speaking_rate",val:" = 1.0"},{name:"noise_scale",val:" = 0.667"},{name:"noise_scale_duration",val:" = 0.8"},{name:"sampling_rate",val:" = 16000"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.VitsConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 38) &#x2014;
Vocabulary size of the VITS model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed to the forward method of <a href="/docs/transformers/v4.34.0/en/model_doc/vits#transformers.VitsModel">VitsModel</a>.`,name:"vocab_size"},{anchor:"transformers.VitsConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 192) &#x2014;
Dimensionality of the text encoder layers.`,name:"hidden_size"},{anchor:"transformers.VitsConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 6) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.VitsConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.VitsConfig.window_size",description:`<strong>window_size</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
Window size for the relative positional embeddings in the attention layers of the Transformer encoder.`,name:"window_size"},{anchor:"transformers.VitsConfig.use_bias",description:`<strong>use_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use bias in the key, query, value projection layers in the Transformer encoder.`,name:"use_bias"},{anchor:"transformers.VitsConfig.ffn_dim",description:`<strong>ffn_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"ffn_dim"},{anchor:"transformers.VitsConfig.layerdrop",description:`<strong>layerdrop</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The LayerDrop probability for the encoder. See the [LayerDrop paper](see <a href="https://arxiv.org/abs/1909.11556" rel="nofollow">https://arxiv.org/abs/1909.11556</a>)
for more details.`,name:"layerdrop"},{anchor:"transformers.VitsConfig.ffn_kernel_size",description:`<strong>ffn_kernel_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
Kernel size of the 1D convolution layers used by the feed-forward network in the Transformer encoder.`,name:"ffn_kernel_size"},{anchor:"transformers.VitsConfig.flow_size",description:`<strong>flow_size</strong> (<code>int</code>, <em>optional</em>, defaults to 192) &#x2014;
Dimensionality of the flow layers.`,name:"flow_size"},{anchor:"transformers.VitsConfig.spectrogram_bins",description:`<strong>spectrogram_bins</strong> (<code>int</code>, <em>optional</em>, defaults to 513) &#x2014;
Number of frequency bins in the target spectrogram.`,name:"spectrogram_bins"},{anchor:"transformers.VitsConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</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;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.VitsConfig.hidden_dropout",description:`<strong>hidden_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings and encoder.`,name:"hidden_dropout"},{anchor:"transformers.VitsConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.VitsConfig.activation_dropout",description:`<strong>activation_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for activations inside the fully connected layer.`,name:"activation_dropout"},{anchor:"transformers.VitsConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.VitsConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-5) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.VitsConfig.use_stochastic_duration_prediction",description:`<strong>use_stochastic_duration_prediction</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use the stochastic duration prediction module or the regular duration predictor.`,name:"use_stochastic_duration_prediction"},{anchor:"transformers.VitsConfig.num_speakers",description:`<strong>num_speakers</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Number of speakers if this is a multi-speaker model.`,name:"num_speakers"},{anchor:"transformers.VitsConfig.speaker_embedding_size",description:`<strong>speaker_embedding_size</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
Number of channels used by the speaker embeddings. Is zero for single-speaker models.`,name:"speaker_embedding_size"},{anchor:"transformers.VitsConfig.upsample_initial_channel",description:`<strong>upsample_initial_channel</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The number of input channels into the HiFi-GAN upsampling network.`,name:"upsample_initial_channel"},{anchor:"transformers.VitsConfig.upsample_rates",description:`<strong>upsample_rates</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>[8, 8, 2, 2]</code>) &#x2014;
A tuple of integers defining the stride of each 1D convolutional layer in the HiFi-GAN upsampling network.
The length of <code>upsample_rates</code> defines the number of convolutional layers and has to match the length of
<code>upsample_kernel_sizes</code>.`,name:"upsample_rates"},{anchor:"transformers.VitsConfig.upsample_kernel_sizes",description:`<strong>upsample_kernel_sizes</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>[16, 16, 4, 4]</code>) &#x2014;
A tuple of integers defining the kernel size of each 1D convolutional layer in the HiFi-GAN upsampling
network. The length of <code>upsample_kernel_sizes</code> defines the number of convolutional layers and has to match
the length of <code>upsample_rates</code>.`,name:"upsample_kernel_sizes"},{anchor:"transformers.VitsConfig.resblock_kernel_sizes",description:`<strong>resblock_kernel_sizes</strong> (<code>Tuple[int]</code> or <code>List[int]</code>, <em>optional</em>, defaults to <code>[3, 7, 11]</code>) &#x2014;
A tuple of integers defining the kernel sizes of the 1D convolutional layers in the HiFi-GAN
multi-receptive field fusion (MRF) module.`,name:"resblock_kernel_sizes"},{anchor:"transformers.VitsConfig.resblock_dilation_sizes",description:`<strong>resblock_dilation_sizes</strong> (<code>Tuple[Tuple[int]]</code> or <code>List[List[int]]</code>, <em>optional</em>, defaults to <code>[[1, 3, 5], [1, 3, 5], [1, 3, 5]]</code>) &#x2014;
A nested tuple of integers defining the dilation rates of the dilated 1D convolutional layers in the
HiFi-GAN multi-receptive field fusion (MRF) module.`,name:"resblock_dilation_sizes"},{anchor:"transformers.VitsConfig.leaky_relu_slope",description:`<strong>leaky_relu_slope</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The angle of the negative slope used by the leaky ReLU activation.`,name:"leaky_relu_slope"},{anchor:"transformers.VitsConfig.depth_separable_channels",description:`<strong>depth_separable_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
Number of channels to use in each depth-separable block.`,name:"depth_separable_channels"},{anchor:"transformers.VitsConfig.depth_separable_num_layers",description:`<strong>depth_separable_num_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
Number of convolutional layers to use in each depth-separable block.`,name:"depth_separable_num_layers"},{anchor:"transformers.VitsConfig.duration_predictor_flow_bins",description:`<strong>duration_predictor_flow_bins</strong> (<code>int</code>, <em>optional</em>, defaults to 10) &#x2014;
Number of channels to map using the unonstrained rational spline in the duration predictor model.`,name:"duration_predictor_flow_bins"},{anchor:"transformers.VitsConfig.duration_predictor_tail_bound",description:`<strong>duration_predictor_tail_bound</strong> (<code>float</code>, <em>optional</em>, defaults to 5.0) &#x2014;
Value of the tail bin boundary when computing the unconstrained rational spline in the duration predictor
model.`,name:"duration_predictor_tail_bound"},{anchor:"transformers.VitsConfig.duration_predictor_kernel_size",description:`<strong>duration_predictor_kernel_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
Kernel size of the 1D convolution layers used in the duration predictor model.`,name:"duration_predictor_kernel_size"},{anchor:"transformers.VitsConfig.duration_predictor_dropout",description:`<strong>duration_predictor_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.5) &#x2014;
The dropout ratio for the duration predictor model.`,name:"duration_predictor_dropout"},{anchor:"transformers.VitsConfig.duration_predictor_num_flows",description:`<strong>duration_predictor_num_flows</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
Number of flow stages used by the duration predictor model.`,name:"duration_predictor_num_flows"},{anchor:"transformers.VitsConfig.duration_predictor_filter_channels",description:`<strong>duration_predictor_filter_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Number of channels for the convolution layers used in the duration predictor model.`,name:"duration_predictor_filter_channels"},{anchor:"transformers.VitsConfig.prior_encoder_num_flows",description:`<strong>prior_encoder_num_flows</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
Number of flow stages used by the prior encoder flow model.`,name:"prior_encoder_num_flows"},{anchor:"transformers.VitsConfig.prior_encoder_num_wavenet_layers",description:`<strong>prior_encoder_num_wavenet_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
Number of WaveNet layers used by the prior encoder flow model.`,name:"prior_encoder_num_wavenet_layers"},{anchor:"transformers.VitsConfig.posterior_encoder_num_wavenet_layers",description:`<strong>posterior_encoder_num_wavenet_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Number of WaveNet layers used by the posterior encoder model.`,name:"posterior_encoder_num_wavenet_layers"},{anchor:"transformers.VitsConfig.wavenet_kernel_size",description:`<strong>wavenet_kernel_size</strong> (<code>int</code>, <em>optional</em>, defaults to 5) &#x2014;
Kernel size of the 1D convolution layers used in the WaveNet model.`,name:"wavenet_kernel_size"},{anchor:"transformers.VitsConfig.wavenet_dilation_rate",description:`<strong>wavenet_dilation_rate</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Dilation rates of the dilated 1D convolutional layers used in the WaveNet model.`,name:"wavenet_dilation_rate"},{anchor:"transformers.VitsConfig.wavenet_dropout",description:`<strong>wavenet_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the WaveNet layers.`,name:"wavenet_dropout"},{anchor:"transformers.VitsConfig.speaking_rate",description:`<strong>speaking_rate</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
Speaking rate. Larger values give faster synthesised speech.`,name:"speaking_rate"},{anchor:"transformers.VitsConfig.noise_scale",description:`<strong>noise_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 0.667) &#x2014;
How random the speech prediction is. Larger values create more variation in the predicted speech.`,name:"noise_scale"},{anchor:"transformers.VitsConfig.noise_scale_duration",description:`<strong>noise_scale_duration</strong> (<code>float</code>, <em>optional</em>, defaults to 0.8) &#x2014;
How random the duration prediction is. Larger values create more variation in the predicted durations.`,name:"noise_scale_duration"},{anchor:"transformers.VitsConfig.sampling_rate",description:`<strong>sampling_rate</strong> (<code>int</code>, <em>optional</em>, defaults to 16000) &#x2014;
The sampling rate at which the output audio waveform is digitalized expressed in hertz (Hz).`,name:"sampling_rate"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/vits/configuration_vits.py#L29"}}),q=new Po({props:{anchor:"transformers.VitsConfig.example",$$slots:{default:[tn]},$$scope:{ctx:W}}}),Te=new Ae({}),ke=new Se({props:{name:"class transformers.VitsTokenizer",anchor:"transformers.VitsTokenizer",parameters:[{name:"vocab_file",val:""},{name:"pad_token",val:" = '<pad>'"},{name:"unk_token",val:" = '<unk>'"},{name:"language",val:" = None"},{name:"add_blank",val:" = True"},{name:"normalize",val:" = True"},{name:"phonemize",val:" = True"},{name:"is_uroman",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.VitsTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.VitsTokenizer.language",description:`<strong>language</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Language identifier.`,name:"language"},{anchor:"transformers.VitsTokenizer.add_blank",description:`<strong>add_blank</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to insert token id 0 in between the other tokens.`,name:"add_blank"},{anchor:"transformers.VitsTokenizer.normalize",description:`<strong>normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to normalize the input text by removing all casing and punctuation.`,name:"normalize"},{anchor:"transformers.VitsTokenizer.phonemize",description:`<strong>phonemize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to convert the input text into phonemes.`,name:"phonemize"},{anchor:"transformers.VitsTokenizer.is_uroman",description:`<strong>is_uroman</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the <code>uroman</code> Romanizer needs to be applied to the input text prior to tokenizing.`,name:"is_uroman"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/vits/tokenization_vits.py#L57"}}),Me=new Se({props:{name:"__call__",anchor:"transformers.VitsTokenizer.__call__",parameters:[{name:"text",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]]] = None"},{name:"text_pair",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]], NoneType] = None"},{name:"text_target",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]]] = None"},{name:"text_pair_target",val:": typing.Union[str, typing.List[str], typing.List[typing.List[str]], NoneType] = None"},{name:"add_special_tokens",val:": bool = True"},{name:"padding",val:": typing.Union[bool, str, transformers.utils.generic.PaddingStrategy] = False"},{name:"truncation",val:": typing.Union[bool, str, transformers.tokenization_utils_base.TruncationStrategy] = None"},{name:"max_length",val:": typing.Optional[int] = None"},{name:"stride",val:": int = 0"},{name:"is_split_into_words",val:": bool = False"},{name:"pad_to_multiple_of",val:": typing.Optional[int] = None"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"return_token_type_ids",val:": typing.Optional[bool] = None"},{name:"return_attention_mask",val:": typing.Optional[bool] = None"},{name:"return_overflowing_tokens",val:": bool = False"},{name:"return_special_tokens_mask",val:": bool = False"},{name:"return_offsets_mapping",val:": bool = False"},{name:"return_length",val:": bool = False"},{name:"verbose",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.VitsTokenizer.__call__.text",description:`<strong>text</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded. Each sequence can be a string or a list of strings
(pretokenized string). If the sequences are provided as list of strings (pretokenized), you must set
<code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text"},{anchor:"transformers.VitsTokenizer.__call__.text_pair",description:`<strong>text_pair</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded. Each sequence can be a string or a list of strings
(pretokenized string). If the sequences are provided as list of strings (pretokenized), you must set
<code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text_pair"},{anchor:"transformers.VitsTokenizer.__call__.text_target",description:`<strong>text_target</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded as target texts. Each sequence can be a string or a
list of strings (pretokenized string). If the sequences are provided as list of strings (pretokenized),
you must set <code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text_target"},{anchor:"transformers.VitsTokenizer.__call__.text_pair_target",description:`<strong>text_pair_target</strong> (<code>str</code>, <code>List[str]</code>, <code>List[List[str]]</code>, <em>optional</em>) &#x2014;
The sequence or batch of sequences to be encoded as target texts. Each sequence can be a string or a
list of strings (pretokenized string). If the sequences are provided as list of strings (pretokenized),
you must set <code>is_split_into_words=True</code> (to lift the ambiguity with a batch of sequences).`,name:"text_pair_target"},{anchor:"transformers.VitsTokenizer.__call__.add_special_tokens",description:`<strong>add_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to add special tokens when encoding the sequences. This will use the underlying
<code>PretrainedTokenizerBase.build_inputs_with_special_tokens</code> function, which defines which tokens are
automatically added to the input ids. This is usefull if you want to add <code>bos</code> or <code>eos</code> tokens
automatically.`,name:"add_special_tokens"},{anchor:"transformers.VitsTokenizer.__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>False</code>) &#x2014;
Activates and controls padding. Accepts the following values:</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.VitsTokenizer.__call__.truncation",description:`<strong>truncation</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/v4.34.0/en/internal/tokenization_utils#transformers.tokenization_utils_base.TruncationStrategy">TruncationStrategy</a>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Activates and controls truncation. Accepts the following values:</p>
<ul>
<li><code>True</code> or <code>&apos;longest_first&apos;</code>: Truncate 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. This will
truncate token by token, removing a token from the longest sequence in the pair if a pair of
sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_first&apos;</code>: Truncate 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. This will only
truncate the first sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>&apos;only_second&apos;</code>: Truncate 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. This will only
truncate the second sequence of a pair if a pair of sequences (or a batch of pairs) is provided.</li>
<li><code>False</code> or <code>&apos;do_not_truncate&apos;</code> (default): No truncation (i.e., can output batch with sequence lengths
greater than the model maximum admissible input size).</li>
</ul>`,name:"truncation"},{anchor:"transformers.VitsTokenizer.__call__.max_length",description:`<strong>max_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Controls the maximum length to use by one of the truncation/padding parameters.</p>
<p>If left unset or set to <code>None</code>, this will use the predefined model maximum length if a maximum length
is required by one of the truncation/padding parameters. If the model has no specific maximum input
length (like XLNet) truncation/padding to a maximum length will be deactivated.`,name:"max_length"},{anchor:"transformers.VitsTokenizer.__call__.stride",description:`<strong>stride</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
If set to a number along with <code>max_length</code>, the overflowing tokens returned when
<code>return_overflowing_tokens=True</code> will contain some tokens from the end of the truncated sequence
returned to provide some overlap between truncated and overflowing sequences. The value of this
argument defines the number of overlapping tokens.`,name:"stride"},{anchor:"transformers.VitsTokenizer.__call__.is_split_into_words",description:`<strong>is_split_into_words</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the input is already pre-tokenized (e.g., split into words). If set to <code>True</code>, the
tokenizer assumes the input is already split into words (for instance, by splitting it on whitespace)
which it will tokenize. This is useful for NER or token classification.`,name:"is_split_into_words"},{anchor:"transformers.VitsTokenizer.__call__.pad_to_multiple_of",description:`<strong>pad_to_multiple_of</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If set will pad the sequence to a multiple of the provided value. Requires <code>padding</code> to be activated.
This is especially useful to enable the use of Tensor Cores on NVIDIA hardware with compute capability
<code>&gt;= 7.5</code> (Volta).`,name:"pad_to_multiple_of"},{anchor:"transformers.VitsTokenizer.__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.VitsTokenizer.__call__.return_token_type_ids",description:`<strong>return_token_type_ids</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to return token type IDs. If left to the default, will return the token type IDs according to
the specific tokenizer&#x2019;s default, defined by the <code>return_outputs</code> attribute.</p>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"return_token_type_ids"},{anchor:"transformers.VitsTokenizer.__call__.return_attention_mask",description:`<strong>return_attention_mask</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to return the attention mask. If left to the default, will return the attention mask according
to the specific tokenizer&#x2019;s default, defined by the <code>return_outputs</code> attribute.</p>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"return_attention_mask"},{anchor:"transformers.VitsTokenizer.__call__.return_overflowing_tokens",description:`<strong>return_overflowing_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return overflowing token sequences. If a pair of sequences of input ids (or a batch
of pairs) is provided with <code>truncation_strategy = longest_first</code> or <code>True</code>, an error is raised instead
of returning overflowing tokens.`,name:"return_overflowing_tokens"},{anchor:"transformers.VitsTokenizer.__call__.return_special_tokens_mask",description:`<strong>return_special_tokens_mask</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return special tokens mask information.`,name:"return_special_tokens_mask"},{anchor:"transformers.VitsTokenizer.__call__.return_offsets_mapping",description:`<strong>return_offsets_mapping</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return <code>(char_start, char_end)</code> for each token.</p>
<p>This is only available on fast tokenizers inheriting from <a href="/docs/transformers/v4.34.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast">PreTrainedTokenizerFast</a>, if using
Python&#x2019;s tokenizer, this method will raise <code>NotImplementedError</code>.`,name:"return_offsets_mapping"},{anchor:"transformers.VitsTokenizer.__call__.return_length",description:`<strong>return_length</strong>  (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return the lengths of the encoded inputs.`,name:"return_length"},{anchor:"transformers.VitsTokenizer.__call__.verbose",description:`<strong>verbose</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to print more information and warnings.
**kwargs &#x2014; passed to the <code>self.tokenize()</code> method`,name:"verbose"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/tokenization_utils_base.py#L2732",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.34.0/en/main_classes/tokenizer#transformers.BatchEncoding"
>BatchEncoding</a> with the following fields:</p>
<ul>
<li>
<p><strong>input_ids</strong> — List of token ids to be fed to a model.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a></p>
</li>
<li>
<p><strong>token_type_ids</strong> — List of token type ids to be fed to a model (when <code>return_token_type_ids=True</code> or
if <em>“token_type_ids”</em> is in <code>self.model_input_names</code>).</p>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a></p>
</li>
<li>
<p><strong>attention_mask</strong> — List of indices specifying which tokens should be attended to by the model (when
<code>return_attention_mask=True</code> or if <em>“attention_mask”</em> is in <code>self.model_input_names</code>).</p>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
</li>
<li>
<p><strong>overflowing_tokens</strong> — List of overflowing tokens sequences (when a <code>max_length</code> is specified and
<code>return_overflowing_tokens=True</code>).</p>
</li>
<li>
<p><strong>num_truncated_tokens</strong> — Number of tokens truncated (when a <code>max_length</code> is specified and
<code>return_overflowing_tokens=True</code>).</p>
</li>
<li>
<p><strong>special_tokens_mask</strong> — List of 0s and 1s, with 1 specifying added special tokens and 0 specifying
regular sequence tokens (when <code>add_special_tokens=True</code> and <code>return_special_tokens_mask=True</code>).</p>
</li>
<li>
<p><strong>length</strong> — The length of the inputs (when <code>return_length=True</code>)</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.34.0/en/main_classes/tokenizer#transformers.BatchEncoding"
>BatchEncoding</a></p>
`}}),xe=new Se({props:{name:"save_vocabulary",anchor:"transformers.VitsTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/vits/tokenization_vits.py#L238"}}),ze=new Ae({}),Ve=new Se({props:{name:"class transformers.VitsModel",anchor:"transformers.VitsModel",parameters:[{name:"config",val:": VitsConfig"}],parametersDescription:[{anchor:"transformers.VitsModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.34.0/en/model_doc/vits#transformers.VitsConfig">VitsConfig</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/vits/modeling_vits.py#L1356"}}),Je=new Se({props:{name:"forward",anchor:"transformers.VitsModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"speaker_id",val:": typing.Optional[int] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Optional[torch.FloatTensor] = None"}],parametersDescription:[{anchor:"transformers.VitsModel.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/v4.34.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.34.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.34.0/en/model_doc/vits#transformers.VitsTokenizer.__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.VitsModel.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 convolution and 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.VitsModel.forward.speaker_id",description:`<strong>speaker_id</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Which speaker embedding to use. Only used for multispeaker models.`,name:"speaker_id"},{anchor:"transformers.VitsModel.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.VitsModel.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.VitsModel.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"},{anchor:"transformers.VitsModel.forward.labels",description:`<strong>labels</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.spectrogram_bins, sequence_length)</code>, <em>optional</em>) &#x2014;
Float values of target spectrogram. Timesteps set to <code>-100.0</code> are ignored (masked) for the loss
computation.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/vits/modeling_vits.py#L1386",returnDescription:`
<p>A <code>transformers.models.vits.modeling_vits.VitsModelOutput</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/vits#transformers.VitsConfig"
>VitsConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>waveform</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) — The final audio waveform predicted by the model.</p>
</li>
<li>
<p><strong>sequence_lengths</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size,)</code>) — The length in samples of each element in the <code>waveform</code> batch.</p>
</li>
<li>
<p><strong>spectrogram</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, num_bins)</code>) — The log-mel spectrogram predicted at the output of the flow model. This spectrogram is passed to the Hi-Fi
GAN decoder model to obtain the final audio waveform.</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>Attention weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><code>transformers.models.vits.modeling_vits.VitsModelOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),B=new en({props:{$$slots:{default:[on]},$$scope:{ctx:W}}}),L=new Po({props:{anchor:"transformers.VitsModel.forward.example",$$slots:{default:[nn]},$$scope:{ctx:W}}}),{c(){c=s("meta"),M=a(),w=s("p"),v=a(),T=s("h1"),d=s("a"),x=s("span"),h(Q.$$.fragment),qt=a(),je=s("span"),je.textContent=ao,tt=a(),j=s("h2"),Z=s("a"),Ge=s("span"),h(Y.$$.fragment),Ht=a(),Ue=s("span"),Ue.textContent=io,ot=a(),D=s("p"),D.innerHTML=lo,nt=a(),O=s("p"),O.innerHTML=co,st=a(),K=s("p"),K.textContent=po,rt=a(),ee=s("p"),ee.textContent=mo,at=a(),te=s("p"),te.textContent=uo,it=a(),oe=s("p"),oe.innerHTML=ho,lt=a(),ne=s("p"),ne.innerHTML=fo,dt=a(),se=s("p"),se.innerHTML=go,ct=a(),U=s("h2"),R=s("a"),Pe=s("span"),h(re.$$.fragment),Xt=a(),$e=s("span"),$e.textContent=_o,pt=a(),ae=s("p"),ae.textContent=yo,mt=a(),h(ie.$$.fragment),ut=a(),le=s("p"),le.innerHTML=bo,ht=a(),h(de.$$.fragment),ft=a(),ce=s("p"),ce.textContent=vo,gt=a(),h(pe.$$.fragment),_t=a(),me=s("p"),me.innerHTML=wo,yt=a(),ue=s("p"),ue.innerHTML=To,bt=a(),h(he.$$.fragment),vt=a(),fe=s("p"),fe.innerHTML=ko,wt=a(),ge=s("p"),ge.innerHTML=Mo,Tt=a(),h(_e.$$.fragment),kt=a(),ye=s("p"),ye.innerHTML=xo,Mt=a(),h(be.$$.fragment),xt=a(),$=s("h2"),E=s("a"),Qe=s("span"),h(ve.$$.fragment),Ft=a(),Ie=s("span"),Ie.textContent=zo,zt=a(),z=s("div"),h(we.$$.fragment),Bt=a(),Ne=s("p"),Ne.innerHTML=Vo,Lt=a(),We=s("p"),We.innerHTML=Jo,St=a(),h(q.$$.fragment),Vt=a(),I=s("h2"),H=s("a"),Ye=s("span"),h(Te.$$.fragment),At=a(),Ze=s("span"),Ze.textContent=Co,Jt=a(),k=s("div"),h(ke.$$.fragment),Gt=a(),Re=s("p"),Re.textContent=jo,Pt=a(),Ee=s("p"),Ee.innerHTML=Uo,Qt=a(),X=s("div"),h(Me.$$.fragment),Yt=a(),qe=s("p"),qe.textContent=$o,Dt=a(),He=s("div"),h(xe.$$.fragment),Ct=a(),N=s("h2"),F=s("a"),De=s("span"),h(ze.$$.fragment),Ot=a(),Xe=s("span"),Xe.textContent=Io,jt=a(),V=s("div"),h(Ve.$$.fragment),Kt=a(),Fe=s("p"),Fe.innerHTML=No,eo=a(),Be=s("p"),Be.innerHTML=Wo,to=a(),J=s("div"),h(Je.$$.fragment),oo=a(),Le=s("p"),Le.innerHTML=Zo,no=a(),h(B.$$.fragment),so=a(),h(L.$$.fragment),Ut=a(),Oe=s("p"),this.h()},l(e){const o=Ko("svelte-1phssyn",document.head);c=r(o,"META",{name:!0,content:!0}),o.forEach(t),M=i(e),w=r(e,"P",{}),u(w).forEach(t),v=i(e),T=r(e,"H1",{class:!0});var Ce=u(T);d=r(Ce,"A",{id:!0,class:!0,href:!0});var Ke=u(d);x=r(Ke,"SPAN",{});var et=u(x);f(Q.$$.fragment,et),et.forEach(t),Ke.forEach(t),qt=i(Ce),je=r(Ce,"SPAN",{"data-svelte-h":!0}),p(je)!=="svelte-2yk53d"&&(je.textContent=ao),Ce.forEach(t),tt=i(e),j=r(e,"H2",{class:!0});var It=u(j);Z=r(It,"A",{id:!0,class:!0,href:!0});var Ro=u(Z);Ge=r(Ro,"SPAN",{});var Eo=u(Ge);f(Y.$$.fragment,Eo),Eo.forEach(t),Ro.forEach(t),Ht=i(It),Ue=r(It,"SPAN",{"data-svelte-h":!0}),p(Ue)!=="svelte-1jsw1pg"&&(Ue.textContent=io),It.forEach(t),ot=i(e),D=r(e,"P",{"data-svelte-h":!0}),p(D)!=="svelte-1843zcg"&&(D.innerHTML=lo),nt=i(e),O=r(e,"P",{"data-svelte-h":!0}),p(O)!=="svelte-tb18uu"&&(O.innerHTML=co),st=i(e),K=r(e,"P",{"data-svelte-h":!0}),p(K)!=="svelte-niuxot"&&(K.textContent=po),rt=i(e),ee=r(e,"P",{"data-svelte-h":!0}),p(ee)!=="svelte-1qg7ygc"&&(ee.textContent=mo),at=i(e),te=r(e,"P",{"data-svelte-h":!0}),p(te)!=="svelte-vfdo9a"&&(te.textContent=uo),it=i(e),oe=r(e,"P",{"data-svelte-h":!0}),p(oe)!=="svelte-2k481d"&&(oe.innerHTML=ho),lt=i(e),ne=r(e,"P",{"data-svelte-h":!0}),p(ne)!=="svelte-1fq9wh5"&&(ne.innerHTML=fo),dt=i(e),se=r(e,"P",{"data-svelte-h":!0}),p(se)!=="svelte-1svcgd6"&&(se.innerHTML=go),ct=i(e),U=r(e,"H2",{class:!0});var Nt=u(U);R=r(Nt,"A",{id:!0,class:!0,href:!0});var qo=u(R);Pe=r(qo,"SPAN",{});var Ho=u(Pe);f(re.$$.fragment,Ho),Ho.forEach(t),qo.forEach(t),Xt=i(Nt),$e=r(Nt,"SPAN",{"data-svelte-h":!0}),p($e)!=="svelte-18rd3g9"&&($e.textContent=_o),Nt.forEach(t),pt=i(e),ae=r(e,"P",{"data-svelte-h":!0}),p(ae)!=="svelte-1y4n4h"&&(ae.textContent=yo),mt=i(e),f(ie.$$.fragment,e),ut=i(e),le=r(e,"P",{"data-svelte-h":!0}),p(le)!=="svelte-1wosc4r"&&(le.innerHTML=bo),ht=i(e),f(de.$$.fragment,e),ft=i(e),ce=r(e,"P",{"data-svelte-h":!0}),p(ce)!=="svelte-1es17w7"&&(ce.textContent=vo),gt=i(e),f(pe.$$.fragment,e),_t=i(e),me=r(e,"P",{"data-svelte-h":!0}),p(me)!=="svelte-yzebxy"&&(me.innerHTML=wo),yt=i(e),ue=r(e,"P",{"data-svelte-h":!0}),p(ue)!=="svelte-19haabz"&&(ue.innerHTML=To),bt=i(e),f(he.$$.fragment,e),vt=i(e),fe=r(e,"P",{"data-svelte-h":!0}),p(fe)!=="svelte-y9ddjb"&&(fe.innerHTML=ko),wt=i(e),ge=r(e,"P",{"data-svelte-h":!0}),p(ge)!=="svelte-14ycm1z"&&(ge.innerHTML=Mo),Tt=i(e),f(_e.$$.fragment,e),kt=i(e),ye=r(e,"P",{"data-svelte-h":!0}),p(ye)!=="svelte-d0ppi5"&&(ye.innerHTML=xo),Mt=i(e),f(be.$$.fragment,e),xt=i(e),$=r(e,"H2",{class:!0});var Wt=u($);E=r(Wt,"A",{id:!0,class:!0,href:!0});var Xo=u(E);Qe=r(Xo,"SPAN",{});var Fo=u(Qe);f(ve.$$.fragment,Fo),Fo.forEach(t),Xo.forEach(t),Ft=i(Wt),Ie=r(Wt,"SPAN",{"data-svelte-h":!0}),p(Ie)!=="svelte-en263j"&&(Ie.textContent=zo),Wt.forEach(t),zt=i(e),z=r(e,"DIV",{class:!0});var S=u(z);f(we.$$.fragment,S),Bt=i(S),Ne=r(S,"P",{"data-svelte-h":!0}),p(Ne)!=="svelte-33m3f9"&&(Ne.innerHTML=Vo),Lt=i(S),We=r(S,"P",{"data-svelte-h":!0}),p(We)!=="svelte-10kqkkl"&&(We.innerHTML=Jo),St=i(S),f(q.$$.fragment,S),S.forEach(t),Vt=i(e),I=r(e,"H2",{class:!0});var Zt=u(I);H=r(Zt,"A",{id:!0,class:!0,href:!0});var Bo=u(H);Ye=r(Bo,"SPAN",{});var Lo=u(Ye);f(Te.$$.fragment,Lo),Lo.forEach(t),Bo.forEach(t),At=i(Zt),Ze=r(Zt,"SPAN",{"data-svelte-h":!0}),p(Ze)!=="svelte-1ll4zhm"&&(Ze.textContent=Co),Zt.forEach(t),Jt=i(e),k=r(e,"DIV",{class:!0});var C=u(k);f(ke.$$.fragment,C),Gt=i(C),Re=r(C,"P",{"data-svelte-h":!0}),p(Re)!=="svelte-7pjy9f"&&(Re.textContent=jo),Pt=i(C),Ee=r(C,"P",{"data-svelte-h":!0}),p(Ee)!=="svelte-1b0fouy"&&(Ee.innerHTML=Uo),Qt=i(C),X=r(C,"DIV",{class:!0});var Rt=u(X);f(Me.$$.fragment,Rt),Yt=i(Rt),qe=r(Rt,"P",{"data-svelte-h":!0}),p(qe)!=="svelte-kpxj0c"&&(qe.textContent=$o),Rt.forEach(t),Dt=i(C),He=r(C,"DIV",{class:!0});var So=u(He);f(xe.$$.fragment,So),So.forEach(t),C.forEach(t),Ct=i(e),N=r(e,"H2",{class:!0});var Et=u(N);F=r(Et,"A",{id:!0,class:!0,href:!0});var Ao=u(F);De=r(Ao,"SPAN",{});var Go=u(De);f(ze.$$.fragment,Go),Go.forEach(t),Ao.forEach(t),Ot=i(Et),Xe=r(Et,"SPAN",{"data-svelte-h":!0}),p(Xe)!=="svelte-1gvma4q"&&(Xe.textContent=Io),Et.forEach(t),jt=i(e),V=r(e,"DIV",{class:!0});var A=u(V);f(Ve.$$.fragment,A),Kt=i(A),Fe=r(A,"P",{"data-svelte-h":!0}),p(Fe)!=="svelte-y0dvlg"&&(Fe.innerHTML=No),eo=i(A),Be=r(A,"P",{"data-svelte-h":!0}),p(Be)!=="svelte-hswkmf"&&(Be.innerHTML=Wo),to=i(A),J=r(A,"DIV",{class:!0});var G=u(J);f(Je.$$.fragment,G),oo=i(G),Le=r(G,"P",{"data-svelte-h":!0}),p(Le)!=="svelte-1j5yxmh"&&(Le.innerHTML=Zo),no=i(G),f(B.$$.fragment,G),so=i(G),f(L.$$.fragment,G),G.forEach(t),A.forEach(t),Ut=i(e),Oe=r(e,"P",{}),u(Oe).forEach(t),this.h()},h(){m(c,"name","hf:doc:metadata"),m(c,"content",JSON.stringify(rn)),m(d,"id","vits"),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","#vits"),m(T,"class","relative group"),m(Z,"id","overview"),m(Z,"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(Z,"href","#overview"),m(j,"class","relative group"),m(R,"id","model-usage"),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","#model-usage"),m(U,"class","relative group"),m(E,"id","transformers.VitsConfig"),m(E,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(E,"href","#transformers.VitsConfig"),m($,"class","relative group"),m(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(H,"id","transformers.VitsTokenizer"),m(H,"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(H,"href","#transformers.VitsTokenizer"),m(I,"class","relative group"),m(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(He,"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(F,"id","transformers.VitsModel"),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","#transformers.VitsModel"),m(N,"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(V,"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,o){l(document.head,c),n(e,M,o),n(e,w,o),n(e,v,o),n(e,T,o),l(T,d),l(d,x),g(Q,x,null),l(T,qt),l(T,je),n(e,tt,o),n(e,j,o),l(j,Z),l(Z,Ge),g(Y,Ge,null),l(j,Ht),l(j,Ue),n(e,ot,o),n(e,D,o),n(e,nt,o),n(e,O,o),n(e,st,o),n(e,K,o),n(e,rt,o),n(e,ee,o),n(e,at,o),n(e,te,o),n(e,it,o),n(e,oe,o),n(e,lt,o),n(e,ne,o),n(e,dt,o),n(e,se,o),n(e,ct,o),n(e,U,o),l(U,R),l(R,Pe),g(re,Pe,null),l(U,Xt),l(U,$e),n(e,pt,o),n(e,ae,o),n(e,mt,o),g(ie,e,o),n(e,ut,o),n(e,le,o),n(e,ht,o),g(de,e,o),n(e,ft,o),n(e,ce,o),n(e,gt,o),g(pe,e,o),n(e,_t,o),n(e,me,o),n(e,yt,o),n(e,ue,o),n(e,bt,o),g(he,e,o),n(e,vt,o),n(e,fe,o),n(e,wt,o),n(e,ge,o),n(e,Tt,o),g(_e,e,o),n(e,kt,o),n(e,ye,o),n(e,Mt,o),g(be,e,o),n(e,xt,o),n(e,$,o),l($,E),l(E,Qe),g(ve,Qe,null),l($,Ft),l($,Ie),n(e,zt,o),n(e,z,o),g(we,z,null),l(z,Bt),l(z,Ne),l(z,Lt),l(z,We),l(z,St),g(q,z,null),n(e,Vt,o),n(e,I,o),l(I,H),l(H,Ye),g(Te,Ye,null),l(I,At),l(I,Ze),n(e,Jt,o),n(e,k,o),g(ke,k,null),l(k,Gt),l(k,Re),l(k,Pt),l(k,Ee),l(k,Qt),l(k,X),g(Me,X,null),l(X,Yt),l(X,qe),l(k,Dt),l(k,He),g(xe,He,null),n(e,Ct,o),n(e,N,o),l(N,F),l(F,De),g(ze,De,null),l(N,Ot),l(N,Xe),n(e,jt,o),n(e,V,o),g(Ve,V,null),l(V,Kt),l(V,Fe),l(V,eo),l(V,Be),l(V,to),l(V,J),g(Je,J,null),l(J,oo),l(J,Le),l(J,no),g(B,J,null),l(J,so),g(L,J,null),n(e,Ut,o),n(e,Oe,o),$t=!0},p(e,[o]){const Ce={};o&2&&(Ce.$$scope={dirty:o,ctx:e}),q.$set(Ce);const Ke={};o&2&&(Ke.$$scope={dirty:o,ctx:e}),B.$set(Ke);const et={};o&2&&(et.$$scope={dirty:o,ctx:e}),L.$set(et)},i(e){$t||(_(Q.$$.fragment,e),_(Y.$$.fragment,e),_(re.$$.fragment,e),_(ie.$$.fragment,e),_(de.$$.fragment,e),_(pe.$$.fragment,e),_(he.$$.fragment,e),_(_e.$$.fragment,e),_(be.$$.fragment,e),_(ve.$$.fragment,e),_(we.$$.fragment,e),_(q.$$.fragment,e),_(Te.$$.fragment,e),_(ke.$$.fragment,e),_(Me.$$.fragment,e),_(xe.$$.fragment,e),_(ze.$$.fragment,e),_(Ve.$$.fragment,e),_(Je.$$.fragment,e),_(B.$$.fragment,e),_(L.$$.fragment,e),$t=!0)},o(e){y(Q.$$.fragment,e),y(Y.$$.fragment,e),y(re.$$.fragment,e),y(ie.$$.fragment,e),y(de.$$.fragment,e),y(pe.$$.fragment,e),y(he.$$.fragment,e),y(_e.$$.fragment,e),y(be.$$.fragment,e),y(ve.$$.fragment,e),y(we.$$.fragment,e),y(q.$$.fragment,e),y(Te.$$.fragment,e),y(ke.$$.fragment,e),y(Me.$$.fragment,e),y(xe.$$.fragment,e),y(ze.$$.fragment,e),y(Ve.$$.fragment,e),y(Je.$$.fragment,e),y(B.$$.fragment,e),y(L.$$.fragment,e),$t=!1},d(e){e&&(t(M),t(w),t(v),t(T),t(tt),t(j),t(ot),t(D),t(nt),t(O),t(st),t(K),t(rt),t(ee),t(at),t(te),t(it),t(oe),t(lt),t(ne),t(dt),t(se),t(ct),t(U),t(pt),t(ae),t(mt),t(ut),t(le),t(ht),t(ft),t(ce),t(gt),t(_t),t(me),t(yt),t(ue),t(bt),t(vt),t(fe),t(wt),t(ge),t(Tt),t(kt),t(ye),t(Mt),t(xt),t($),t(zt),t(z),t(Vt),t(I),t(Jt),t(k),t(Ct),t(N),t(jt),t(V),t(Ut),t(Oe)),t(c),b(Q),b(Y),b(re),b(ie,e),b(de,e),b(pe,e),b(he,e),b(_e,e),b(be,e),b(ve),b(we),b(q),b(Te),b(ke),b(Me),b(xe),b(ze),b(Ve),b(Je),b(B),b(L)}}}const rn={local:"vits",sections:[{local:"overview",title:"Overview"},{local:"model-usage",title:"Model Usage"},{local:"transformers.VitsConfig",title:"VitsConfig"},{local:"transformers.VitsTokenizer",title:"VitsTokenizer"},{local:"transformers.VitsModel",title:"VitsModel"}],title:"VITS"};function an(W){return Yo(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class fn extends Do{constructor(c){super(),Oo(this,c,an,sn,Qo,{})}}export{fn as component};
