import{s as on,o as sn,n as Ut}from"../chunks/scheduler.25b97de1.js";import{S as an,i as rn,g as r,s,r as m,A as ln,h as i,f as n,c as a,j as R,u,x as c,k as H,y as p,a as o,v as h,d as f,t as g,w as _}from"../chunks/index.d9030fc9.js";import{T as dn}from"../chunks/Tip.baa67368.js";import{D as je}from"../chunks/Docstring.ffac8efa.js";import{C as U}from"../chunks/CodeBlock.e6cd0d95.js";import{E as nn}from"../chunks/ExampleCodeBlock.22dfe688.js";import{H as $e,E as cn}from"../chunks/EditOnGithub.91d95064.js";function pn(C){let d,M="Example:",b,y,w;return y=new U({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(){d=r("p"),d.textContent=M,b=s(),m(y.$$.fragment)},l(l){d=i(l,"P",{"data-svelte-h":!0}),c(d)!=="svelte-11lpom8"&&(d.textContent=M),b=a(l),u(y.$$.fragment,l)},m(l,T){o(l,d,T),o(l,b,T),h(y,l,T),w=!0},p:Ut,i(l){w||(f(y.$$.fragment,l),w=!0)},o(l){g(y.$$.fragment,l),w=!1},d(l){l&&(n(d),n(b)),_(y,l)}}}function mn(C){let d,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(){d=r("p"),d.innerHTML=M},l(b){d=i(b,"P",{"data-svelte-h":!0}),c(d)!=="svelte-fincs2"&&(d.innerHTML=M)},m(b,y){o(b,d,y)},p:Ut,d(b){b&&n(d)}}}function un(C){let d,M="Example:",b,y,w;return y=new U({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(){d=r("p"),d.textContent=M,b=s(),m(y.$$.fragment)},l(l){d=i(l,"P",{"data-svelte-h":!0}),c(d)!=="svelte-11lpom8"&&(d.textContent=M),b=a(l),u(y.$$.fragment,l)},m(l,T){o(l,d,T),o(l,b,T),h(y,l,T),w=!0},p:Ut,i(l){w||(f(y.$$.fragment,l),w=!0)},o(l){g(y.$$.fragment,l),w=!1},d(l){l&&(n(d),n(b)),_(y,l)}}}function hn(C){let d,M,b,y,w,l,T,Ze,B,Ct='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.',We,q,jt=`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.`,Ne,E,$t=`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.`,Re,X,It=`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.`,He,F,Zt="The abstract from the paper is the following:",Be,L,Wt="<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>",qe,G,Nt=`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.`,Ee,Q,Rt='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>.',Xe,S,Fe,P,Ht=`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:`,Le,A,Ge,Y,Bt="The resulting waveform can be saved as a <code>.wav</code> file:",Qe,D,Se,O,qt="Or displayed in a Jupyter Notebook / Google Colab:",Pe,K,Ae,ee,Et=`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.`,Ye,te,Xt=`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>:`,De,ne,Oe,oe,Ft="If the is_uroman attribute is <code>True</code>, the tokenizer will automatically apply the <code>uroman</code> package to your text inputs, but you need to install uroman if not already installed using:",Ke,se,et,ae,Lt=`Note: Python version required to use <code>uroman</code> as python package should be &gt;= <code>3.10</code>.
You can use the tokenizer as usual without any additional preprocessing steps:`,tt,re,nt,ie,Gt=`If you don’t want to upgrade to python &gt;= <code>3.10</code>, then you can use the <code>uroman</code> perl package to pre-process the text inputs to the Roman alphabet.
To do this, first clone the uroman repository to your local machine and set the bash variable <code>UROMAN</code> to the local path:`,ot,le,st,de,Qt=`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>uromanize</code> function:`,at,ce,rt,pe,it,k,me,ft,ve,St=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/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.`,gt,Me,Pt=`Configuration objects inherit from <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,_t,j,lt,ue,dt,v,he,yt,ke,At="Construct a VITS tokenizer. Also supports MMS-TTS.",bt,Je,Yt=`This tokenizer inherits from <a href="/docs/transformers/main/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.`,wt,$,fe,Tt,Ve,Dt=`Main method to tokenize and prepare for the model one or several sequence(s) or one or several pair(s) of
sequences.`,vt,ze,ge,ct,_e,pt,J,ye,Mt,xe,Ot=`The complete VITS model, for text-to-speech synthesis.
This model inherits from <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,kt,Ue,Kt=`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.`,Jt,z,be,Vt,Ce,en='The <a href="/docs/transformers/main/en/model_doc/vits#transformers.VitsModel">VitsModel</a> forward method, overrides the <code>__call__</code> special method.',zt,I,xt,Z,mt,we,ut,Ie,ht;return w=new $e({props:{title:"VITS",local:"vits",headingTag:"h1"}}),T=new $e({props:{title:"Overview",local:"overview",headingTag:"h2"}}),S=new $e({props:{title:"Usage examples",local:"usage-examples",headingTag:"h2"}}),A=new U({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}}),D=new U({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}}),K=new U({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}}),ne=new U({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}}),se=new U({props:{code:"cGlwJTIwaW5zdGFsbCUyMC0tdXBncmFkZSUyMHVyb21hbg==",highlighted:'pip install <span class="hljs-comment">--upgrade uroman</span>',wrap:!1}}),re=new U({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwVml0c1Rva2VuaXplciUyQyUyMFZpdHNNb2RlbCUyQyUyMHNldF9zZWVkJTBBaW1wb3J0JTIwb3MlMEFpbXBvcnQlMjBzdWJwcm9jZXNzJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwVml0c1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtbXMtdHRzLWtvciUyMiklMEFtb2RlbCUyMCUzRCUyMFZpdHNNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtbXMtdHRzLWtvciUyMiklMEF0ZXh0JTIwJTNEJTIwJTIyJUVDJTlEJUI0JUVCJUI0JTkwJTIwJUVCJUFDJUI0JUVDJThBJUE4JTIwJUVDJTlEJUJDJUVDJTlEJUI0JUVDJTk1JUJDJTIyJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHRleHQlM0R0ZXh0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEFzZXRfc2VlZCg1NTUpJTIwJTIwJTIzJTIwbWFrZSUyMGRldGVybWluaXN0aWMlMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMG1vZGVsKGlucHV0cyU1QiUyMmlucHV0X2lkcyUyMiU1RCklMEElMEF3YXZlZm9ybSUyMCUzRCUyMG91dHB1dHMud2F2ZWZvcm0lNUIwJTVE",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>)
text = <span class="hljs-string">&quot;이봐 무슨 일이야&quot;</span>
inputs = tokenizer(text=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}}),le=new U({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}}),ce=new U({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwVml0c1Rva2VuaXplciUyQyUyMFZpdHNNb2RlbCUyQyUyMHNldF9zZWVkJTBBaW1wb3J0JTIwb3MlMEFpbXBvcnQlMjBzdWJwcm9jZXNzJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwVml0c1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtbXMtdHRzLWtvciUyMiklMEFtb2RlbCUyMCUzRCUyMFZpdHNNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtbXMtdHRzLWtvciUyMiklMEElMEFkZWYlMjB1cm9tYW5pemUoaW5wdXRfc3RyaW5nJTJDJTIwdXJvbWFuX3BhdGgpJTNBJTBBJTIwJTIwJTIwJTIwJTIyJTIyJTIyQ29udmVydCUyMG5vbi1Sb21hbiUyMHN0cmluZ3MlMjB0byUyMFJvbWFuJTIwdXNpbmclMjB0aGUlMjAlNjB1cm9tYW4lNjAlMjBwZXJsJTIwcGFja2FnZS4lMjIlMjIlMjIlMEElMjAlMjAlMjAlMjBzY3JpcHRfcGF0aCUyMCUzRCUyMG9zLnBhdGguam9pbih1cm9tYW5fcGF0aCUyQyUyMCUyMmJpbiUyMiUyQyUyMCUyMnVyb21hbi5wbCUyMiklMEElMEElMjAlMjAlMjAlMjBjb21tYW5kJTIwJTNEJTIwJTVCJTIycGVybCUyMiUyQyUyMHNjcmlwdF9wYXRoJTVEJTBBJTBBJTIwJTIwJTIwJTIwcHJvY2VzcyUyMCUzRCUyMHN1YnByb2Nlc3MuUG9wZW4oY29tbWFuZCUyQyUyMHN0ZGluJTNEc3VicHJvY2Vzcy5QSVBFJTJDJTIwc3Rkb3V0JTNEc3VicHJvY2Vzcy5QSVBFJTJDJTIwc3RkZXJyJTNEc3VicHJvY2Vzcy5QSVBFKSUwQSUyMCUyMCUyMCUyMCUyMyUyMEV4ZWN1dGUlMjB0aGUlMjBwZXJsJTIwY29tbWFuZCUwQSUyMCUyMCUyMCUyMHN0ZG91dCUyQyUyMHN0ZGVyciUyMCUzRCUyMHByb2Nlc3MuY29tbXVuaWNhdGUoaW5wdXQlM0RpbnB1dF9zdHJpbmcuZW5jb2RlKCkpJTBBJTBBJTIwJTIwJTIwJTIwaWYlMjBwcm9jZXNzLnJldHVybmNvZGUlMjAhJTNEJTIwMCUzQSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHJhaXNlJTIwVmFsdWVFcnJvcihmJTIyRXJyb3IlMjAlN0Jwcm9jZXNzLnJldHVybmNvZGUlN0QlM0ElMjAlN0JzdGRlcnIuZGVjb2RlKCklN0QlMjIpJTBBJTBBJTIwJTIwJTIwJTIwJTIzJTIwUmV0dXJuJTIwdGhlJTIwb3V0cHV0JTIwYXMlMjBhJTIwc3RyaW5nJTIwYW5kJTIwc2tpcCUyMHRoZSUyMG5ldy1saW5lJTIwY2hhcmFjdGVyJTIwYXQlMjB0aGUlMjBlbmQlMEElMjAlMjAlMjAlMjByZXR1cm4lMjBzdGRvdXQuZGVjb2RlKCklNUIlM0EtMSU1RCUwQSUwQXRleHQlMjAlM0QlMjAlMjIlRUMlOUQlQjQlRUIlQjQlOTAlMjAlRUIlQUMlQjQlRUMlOEElQTglMjAlRUMlOUQlQkMlRUMlOUQlQjQlRUMlOTUlQkMlMjIlMEF1cm9tYW5pemVkX3RleHQlMjAlM0QlMjB1cm9tYW5pemUodGV4dCUyQyUyMHVyb21hbl9wYXRoJTNEb3MuZW52aXJvbiU1QiUyMlVST01BTiUyMiU1RCklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIodGV4dCUzRHVyb21hbml6ZWRfdGV4dCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBc2V0X3NlZWQoNTU1KSUyMCUyMCUyMyUyMG1ha2UlMjBkZXRlcm1pbmlzdGljJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMG91dHB1dHMlMjAlM0QlMjBtb2RlbChpbnB1dHMlNUIlMjJpbnB1dF9pZHMlMjIlNUQpJTBBJTBBd2F2ZWZvcm0lMjAlM0QlMjBvdXRwdXRzLndhdmVmb3JtJTVCMCU1RA==",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>
uromanized_text = uromanize(text, uroman_path=os.environ[<span class="hljs-string">&quot;UROMAN&quot;</span>])

inputs = tokenizer(text=uromanized_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}}),pe=new $e({props:{title:"VitsConfig",local:"transformers.VitsConfig",headingTag:"h2"}}),me=new je({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/main/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-05) &#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/main/src/transformers/models/vits/configuration_vits.py#L24"}}),j=new nn({props:{anchor:"transformers.VitsConfig.example",$$slots:{default:[pn]},$$scope:{ctx:C}}}),ue=new $e({props:{title:"VitsTokenizer",local:"transformers.VitsTokenizer",headingTag:"h2"}}),he=new je({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/main/src/transformers/models/vits/tokenization_vits.py#L47"}}),fe=new je({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:"padding_side",val:": typing.Optional[bool] = 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/main/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/main/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__.padding_side",description:`<strong>padding_side</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The side on which the model should have padding applied. Should be selected between [&#x2018;right&#x2019;, &#x2018;left&#x2019;].
Default value is picked from the class attribute of the same name.`,name:"padding_side"},{anchor:"transformers.VitsTokenizer.__call__.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <a href="/docs/transformers/main/en/internal/file_utils#transformers.TensorType">TensorType</a>, <em>optional</em>) &#x2014;
If set, will return tensors instead of list of python integers. Acceptable values are:</p>
<ul>
<li><code>&apos;tf&apos;</code>: Return TensorFlow <code>tf.constant</code> objects.</li>
<li><code>&apos;pt&apos;</code>: Return PyTorch <code>torch.Tensor</code> objects.</li>
<li><code>&apos;np&apos;</code>: Return Numpy <code>np.ndarray</code> objects.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.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/main/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.`,name:"verbose"},{anchor:"transformers.VitsTokenizer.__call__.*kwargs",description:"*<strong>*kwargs</strong> &#x2014; passed to the <code>self.tokenize()</code> method",name:"*kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils_base.py#L2787",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/en/main_classes/tokenizer#transformers.BatchEncoding"
>BatchEncoding</a></p>
`}}),ge=new je({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/main/src/transformers/models/vits/tokenization_vits.py#L231"}}),_e=new $e({props:{title:"VitsModel",local:"transformers.VitsModel",headingTag:"h2"}}),ye=new je({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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/vits/modeling_vits.py#L1328"}}),be=new je({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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#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/main/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/main/src/transformers/models/vits/modeling_vits.py#L1362",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<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/main/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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.vits.modeling_vits.VitsModelOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),I=new dn({props:{$$slots:{default:[mn]},$$scope:{ctx:C}}}),Z=new nn({props:{anchor:"transformers.VitsModel.forward.example",$$slots:{default:[un]},$$scope:{ctx:C}}}),we=new cn({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/vits.md"}}),{c(){d=r("meta"),M=s(),b=r("p"),y=s(),m(w.$$.fragment),l=s(),m(T.$$.fragment),Ze=s(),B=r("p"),B.innerHTML=Ct,We=s(),q=r("p"),q.innerHTML=jt,Ne=s(),E=r("p"),E.textContent=$t,Re=s(),X=r("p"),X.textContent=It,He=s(),F=r("p"),F.textContent=Zt,Be=s(),L=r("p"),L.innerHTML=Wt,qe=s(),G=r("p"),G.innerHTML=Nt,Ee=s(),Q=r("p"),Q.innerHTML=Rt,Xe=s(),m(S.$$.fragment),Fe=s(),P=r("p"),P.textContent=Ht,Le=s(),m(A.$$.fragment),Ge=s(),Y=r("p"),Y.innerHTML=Bt,Qe=s(),m(D.$$.fragment),Se=s(),O=r("p"),O.textContent=qt,Pe=s(),m(K.$$.fragment),Ae=s(),ee=r("p"),ee.innerHTML=Et,Ye=s(),te=r("p"),te.innerHTML=Xt,De=s(),m(ne.$$.fragment),Oe=s(),oe=r("p"),oe.innerHTML=Ft,Ke=s(),m(se.$$.fragment),et=s(),ae=r("p"),ae.innerHTML=Lt,tt=s(),m(re.$$.fragment),nt=s(),ie=r("p"),ie.innerHTML=Gt,ot=s(),m(le.$$.fragment),st=s(),de=r("p"),de.innerHTML=Qt,at=s(),m(ce.$$.fragment),rt=s(),m(pe.$$.fragment),it=s(),k=r("div"),m(me.$$.fragment),ft=s(),ve=r("p"),ve.innerHTML=St,gt=s(),Me=r("p"),Me.innerHTML=Pt,_t=s(),m(j.$$.fragment),lt=s(),m(ue.$$.fragment),dt=s(),v=r("div"),m(he.$$.fragment),yt=s(),ke=r("p"),ke.textContent=At,bt=s(),Je=r("p"),Je.innerHTML=Yt,wt=s(),$=r("div"),m(fe.$$.fragment),Tt=s(),Ve=r("p"),Ve.textContent=Dt,vt=s(),ze=r("div"),m(ge.$$.fragment),ct=s(),m(_e.$$.fragment),pt=s(),J=r("div"),m(ye.$$.fragment),Mt=s(),xe=r("p"),xe.innerHTML=Ot,kt=s(),Ue=r("p"),Ue.innerHTML=Kt,Jt=s(),z=r("div"),m(be.$$.fragment),Vt=s(),Ce=r("p"),Ce.innerHTML=en,zt=s(),m(I.$$.fragment),xt=s(),m(Z.$$.fragment),mt=s(),m(we.$$.fragment),ut=s(),Ie=r("p"),this.h()},l(e){const t=ln("svelte-u9bgzb",document.head);d=i(t,"META",{name:!0,content:!0}),t.forEach(n),M=a(e),b=i(e,"P",{}),R(b).forEach(n),y=a(e),u(w.$$.fragment,e),l=a(e),u(T.$$.fragment,e),Ze=a(e),B=i(e,"P",{"data-svelte-h":!0}),c(B)!=="svelte-1843zcg"&&(B.innerHTML=Ct),We=a(e),q=i(e,"P",{"data-svelte-h":!0}),c(q)!=="svelte-tb18uu"&&(q.innerHTML=jt),Ne=a(e),E=i(e,"P",{"data-svelte-h":!0}),c(E)!=="svelte-niuxot"&&(E.textContent=$t),Re=a(e),X=i(e,"P",{"data-svelte-h":!0}),c(X)!=="svelte-1qg7ygc"&&(X.textContent=It),He=a(e),F=i(e,"P",{"data-svelte-h":!0}),c(F)!=="svelte-vfdo9a"&&(F.textContent=Zt),Be=a(e),L=i(e,"P",{"data-svelte-h":!0}),c(L)!=="svelte-2k481d"&&(L.innerHTML=Wt),qe=a(e),G=i(e,"P",{"data-svelte-h":!0}),c(G)!=="svelte-1fq9wh5"&&(G.innerHTML=Nt),Ee=a(e),Q=i(e,"P",{"data-svelte-h":!0}),c(Q)!=="svelte-1svcgd6"&&(Q.innerHTML=Rt),Xe=a(e),u(S.$$.fragment,e),Fe=a(e),P=i(e,"P",{"data-svelte-h":!0}),c(P)!=="svelte-1y4n4h"&&(P.textContent=Ht),Le=a(e),u(A.$$.fragment,e),Ge=a(e),Y=i(e,"P",{"data-svelte-h":!0}),c(Y)!=="svelte-1wosc4r"&&(Y.innerHTML=Bt),Qe=a(e),u(D.$$.fragment,e),Se=a(e),O=i(e,"P",{"data-svelte-h":!0}),c(O)!=="svelte-1es17w7"&&(O.textContent=qt),Pe=a(e),u(K.$$.fragment,e),Ae=a(e),ee=i(e,"P",{"data-svelte-h":!0}),c(ee)!=="svelte-yzebxy"&&(ee.innerHTML=Et),Ye=a(e),te=i(e,"P",{"data-svelte-h":!0}),c(te)!=="svelte-19haabz"&&(te.innerHTML=Xt),De=a(e),u(ne.$$.fragment,e),Oe=a(e),oe=i(e,"P",{"data-svelte-h":!0}),c(oe)!=="svelte-1n0rw17"&&(oe.innerHTML=Ft),Ke=a(e),u(se.$$.fragment,e),et=a(e),ae=i(e,"P",{"data-svelte-h":!0}),c(ae)!=="svelte-18r5pkw"&&(ae.innerHTML=Lt),tt=a(e),u(re.$$.fragment,e),nt=a(e),ie=i(e,"P",{"data-svelte-h":!0}),c(ie)!=="svelte-1fe484u"&&(ie.innerHTML=Gt),ot=a(e),u(le.$$.fragment,e),st=a(e),de=i(e,"P",{"data-svelte-h":!0}),c(de)!=="svelte-yn6uj7"&&(de.innerHTML=Qt),at=a(e),u(ce.$$.fragment,e),rt=a(e),u(pe.$$.fragment,e),it=a(e),k=i(e,"DIV",{class:!0});var x=R(k);u(me.$$.fragment,x),ft=a(x),ve=i(x,"P",{"data-svelte-h":!0}),c(ve)!=="svelte-517veh"&&(ve.innerHTML=St),gt=a(x),Me=i(x,"P",{"data-svelte-h":!0}),c(Me)!=="svelte-o55m63"&&(Me.innerHTML=Pt),_t=a(x),u(j.$$.fragment,x),x.forEach(n),lt=a(e),u(ue.$$.fragment,e),dt=a(e),v=i(e,"DIV",{class:!0});var V=R(v);u(he.$$.fragment,V),yt=a(V),ke=i(V,"P",{"data-svelte-h":!0}),c(ke)!=="svelte-7pjy9f"&&(ke.textContent=At),bt=a(V),Je=i(V,"P",{"data-svelte-h":!0}),c(Je)!=="svelte-1c3t5ty"&&(Je.innerHTML=Yt),wt=a(V),$=i(V,"DIV",{class:!0});var Te=R($);u(fe.$$.fragment,Te),Tt=a(Te),Ve=i(Te,"P",{"data-svelte-h":!0}),c(Ve)!=="svelte-kpxj0c"&&(Ve.textContent=Dt),Te.forEach(n),vt=a(V),ze=i(V,"DIV",{class:!0});var tn=R(ze);u(ge.$$.fragment,tn),tn.forEach(n),V.forEach(n),ct=a(e),u(_e.$$.fragment,e),pt=a(e),J=i(e,"DIV",{class:!0});var W=R(J);u(ye.$$.fragment,W),Mt=a(W),xe=i(W,"P",{"data-svelte-h":!0}),c(xe)!=="svelte-1es87hk"&&(xe.innerHTML=Ot),kt=a(W),Ue=i(W,"P",{"data-svelte-h":!0}),c(Ue)!=="svelte-hswkmf"&&(Ue.innerHTML=Kt),Jt=a(W),z=i(W,"DIV",{class:!0});var N=R(z);u(be.$$.fragment,N),Vt=a(N),Ce=i(N,"P",{"data-svelte-h":!0}),c(Ce)!=="svelte-ln6odr"&&(Ce.innerHTML=en),zt=a(N),u(I.$$.fragment,N),xt=a(N),u(Z.$$.fragment,N),N.forEach(n),W.forEach(n),mt=a(e),u(we.$$.fragment,e),ut=a(e),Ie=i(e,"P",{}),R(Ie).forEach(n),this.h()},h(){H(d,"name","hf:doc:metadata"),H(d,"content",fn),H(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),H($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),H(ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),H(v,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),H(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),H(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(e,t){p(document.head,d),o(e,M,t),o(e,b,t),o(e,y,t),h(w,e,t),o(e,l,t),h(T,e,t),o(e,Ze,t),o(e,B,t),o(e,We,t),o(e,q,t),o(e,Ne,t),o(e,E,t),o(e,Re,t),o(e,X,t),o(e,He,t),o(e,F,t),o(e,Be,t),o(e,L,t),o(e,qe,t),o(e,G,t),o(e,Ee,t),o(e,Q,t),o(e,Xe,t),h(S,e,t),o(e,Fe,t),o(e,P,t),o(e,Le,t),h(A,e,t),o(e,Ge,t),o(e,Y,t),o(e,Qe,t),h(D,e,t),o(e,Se,t),o(e,O,t),o(e,Pe,t),h(K,e,t),o(e,Ae,t),o(e,ee,t),o(e,Ye,t),o(e,te,t),o(e,De,t),h(ne,e,t),o(e,Oe,t),o(e,oe,t),o(e,Ke,t),h(se,e,t),o(e,et,t),o(e,ae,t),o(e,tt,t),h(re,e,t),o(e,nt,t),o(e,ie,t),o(e,ot,t),h(le,e,t),o(e,st,t),o(e,de,t),o(e,at,t),h(ce,e,t),o(e,rt,t),h(pe,e,t),o(e,it,t),o(e,k,t),h(me,k,null),p(k,ft),p(k,ve),p(k,gt),p(k,Me),p(k,_t),h(j,k,null),o(e,lt,t),h(ue,e,t),o(e,dt,t),o(e,v,t),h(he,v,null),p(v,yt),p(v,ke),p(v,bt),p(v,Je),p(v,wt),p(v,$),h(fe,$,null),p($,Tt),p($,Ve),p(v,vt),p(v,ze),h(ge,ze,null),o(e,ct,t),h(_e,e,t),o(e,pt,t),o(e,J,t),h(ye,J,null),p(J,Mt),p(J,xe),p(J,kt),p(J,Ue),p(J,Jt),p(J,z),h(be,z,null),p(z,Vt),p(z,Ce),p(z,zt),h(I,z,null),p(z,xt),h(Z,z,null),o(e,mt,t),h(we,e,t),o(e,ut,t),o(e,Ie,t),ht=!0},p(e,[t]){const x={};t&2&&(x.$$scope={dirty:t,ctx:e}),j.$set(x);const V={};t&2&&(V.$$scope={dirty:t,ctx:e}),I.$set(V);const Te={};t&2&&(Te.$$scope={dirty:t,ctx:e}),Z.$set(Te)},i(e){ht||(f(w.$$.fragment,e),f(T.$$.fragment,e),f(S.$$.fragment,e),f(A.$$.fragment,e),f(D.$$.fragment,e),f(K.$$.fragment,e),f(ne.$$.fragment,e),f(se.$$.fragment,e),f(re.$$.fragment,e),f(le.$$.fragment,e),f(ce.$$.fragment,e),f(pe.$$.fragment,e),f(me.$$.fragment,e),f(j.$$.fragment,e),f(ue.$$.fragment,e),f(he.$$.fragment,e),f(fe.$$.fragment,e),f(ge.$$.fragment,e),f(_e.$$.fragment,e),f(ye.$$.fragment,e),f(be.$$.fragment,e),f(I.$$.fragment,e),f(Z.$$.fragment,e),f(we.$$.fragment,e),ht=!0)},o(e){g(w.$$.fragment,e),g(T.$$.fragment,e),g(S.$$.fragment,e),g(A.$$.fragment,e),g(D.$$.fragment,e),g(K.$$.fragment,e),g(ne.$$.fragment,e),g(se.$$.fragment,e),g(re.$$.fragment,e),g(le.$$.fragment,e),g(ce.$$.fragment,e),g(pe.$$.fragment,e),g(me.$$.fragment,e),g(j.$$.fragment,e),g(ue.$$.fragment,e),g(he.$$.fragment,e),g(fe.$$.fragment,e),g(ge.$$.fragment,e),g(_e.$$.fragment,e),g(ye.$$.fragment,e),g(be.$$.fragment,e),g(I.$$.fragment,e),g(Z.$$.fragment,e),g(we.$$.fragment,e),ht=!1},d(e){e&&(n(M),n(b),n(y),n(l),n(Ze),n(B),n(We),n(q),n(Ne),n(E),n(Re),n(X),n(He),n(F),n(Be),n(L),n(qe),n(G),n(Ee),n(Q),n(Xe),n(Fe),n(P),n(Le),n(Ge),n(Y),n(Qe),n(Se),n(O),n(Pe),n(Ae),n(ee),n(Ye),n(te),n(De),n(Oe),n(oe),n(Ke),n(et),n(ae),n(tt),n(nt),n(ie),n(ot),n(st),n(de),n(at),n(rt),n(it),n(k),n(lt),n(dt),n(v),n(ct),n(pt),n(J),n(mt),n(ut),n(Ie)),n(d),_(w,e),_(T,e),_(S,e),_(A,e),_(D,e),_(K,e),_(ne,e),_(se,e),_(re,e),_(le,e),_(ce,e),_(pe,e),_(me),_(j),_(ue,e),_(he),_(fe),_(ge),_(_e,e),_(ye),_(be),_(I),_(Z),_(we,e)}}}const fn='{"title":"VITS","local":"vits","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Usage examples","local":"usage-examples","sections":[],"depth":2},{"title":"VitsConfig","local":"transformers.VitsConfig","sections":[],"depth":2},{"title":"VitsTokenizer","local":"transformers.VitsTokenizer","sections":[],"depth":2},{"title":"VitsModel","local":"transformers.VitsModel","sections":[],"depth":2}],"depth":1}';function gn(C){return sn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class kn extends an{constructor(d){super(),rn(this,d,gn,hn,on,{})}}export{kn as component};
