import{s as ua,o as Ma,n as ya}from"../chunks/scheduler.9bc65507.js";import{S as fa,i as wa,g as a,s as o,u as h,m as ba,A as Ja,h as n,f as t,c as r,j as d,v as m,y as i,n as Ta,k as p,o as c,a as s,w as u,d as M,t as y,x as f}from"../chunks/index.78c82d43.js";import{T as ga}from"../chunks/Tip.87d55b76.js";import{I as v}from"../chunks/IconCopyLink.bedaa44d.js";import{C as b}from"../chunks/CodeBlock.48618ec2.js";function ja(vt){let J,Y="You can safely ignore a warning such as:",j,g,T;return g=new b({props:{code:"U29tZSUyMHdlaWdodHMlMjBvZiUyMFdhdjJWZWMyRm9yQ1RDJTIwd2VyZSUyMG5vdCUyMGluaXRpYWxpemVkJTIwZnJvbSUyMHRoZSUyMG1vZGVsJTIwY2hlY2twb2ludCUyMGF0JTIwZmFjZWJvb2slMkZtbXMtMWItYWxsJTIwYW5kJTIwYXJlJTIwbmV3bHklMjBpbml0aWFsaXplZCUyMGJlY2F1c2UlMjB0aGUlMjBzaGFwZXMlMjBkaWQlMjBub3QlMjBtYXRjaCUzQSUwQS0lMjBsbV9oZWFkLmJpYXMlM0ElMjBmb3VuZCUyMHNoYXBlJTIwdG9yY2guU2l6ZSglNUIxNTQlNUQpJTIwaW4lMjB0aGUlMjBjaGVja3BvaW50JTIwYW5kJTIwdG9yY2guU2l6ZSglNUIzMTQlNUQpJTIwaW4lMjB0aGUlMjBtb2RlbCUyMGluc3RhbnRpYXRlZCUwQS0lMjBsbV9oZWFkLndlaWdodCUzQSUyMGZvdW5kJTIwc2hhcGUlMjB0b3JjaC5TaXplKCU1QjE1NCUyQyUyMDEyODAlNUQpJTIwaW4lMjB0aGUlMjBjaGVja3BvaW50JTIwYW5kJTIwdG9yY2guU2l6ZSglNUIzMTQlMkMlMjAxMjgwJTVEKSUyMGluJTIwdGhlJTIwbW9kZWwlMjBpbnN0YW50aWF0ZWQlMEFZb3UlMjBzaG91bGQlMjBwcm9iYWJseSUyMFRSQUlOJTIwdGhpcyUyMG1vZGVsJTIwb24lMjBhJTIwZG93bi1zdHJlYW0lMjB0YXNrJTIwdG8lMjBiZSUyMGFibGUlMjB0byUyMHVzZSUyMGl0JTIwZm9yJTIwcHJlZGljdGlvbnMlMjBhbmQlMjBpbmZlcmVuY2Uu",highlighted:`Some weights of Wav2Vec2ForCTC were not initialized from the model checkpoint at facebook/mms-1b-all and are newly initialized because the shapes did not match:
- lm_head.bias: found shape torch.Size([154]) in the checkpoint and torch.Size([314]) in the model instantiated
- lm_head.weight: found shape torch.Size([154, 1280]) in the checkpoint and torch.Size([314, 1280]) in the model instantiated
You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.`}}),{c(){J=a("p"),J.textContent=Y,j=o(),h(g.$$.fragment)},l(w){J=n(w,"P",{"data-svelte-h":!0}),i(J)!=="svelte-17yglm5"&&(J.textContent=Y),j=r(w),m(g.$$.fragment,w)},m(w,U){s(w,J,U),s(w,j,U),u(g,w,U),T=!0},p:ya,i(w){T||(M(g.$$.fragment,w),T=!0)},o(w){y(g.$$.fragment,w),T=!1},d(w){w&&(t(J),t(j)),f(g,w)}}}function va(vt){let J,Y,j,g,T,w,U,S,Al,at,ss="MMS",Ut,k,$,ut,A,ql,nt,as="Overview",kt,q,ns=`The MMS model was proposed in <a href="https://arxiv.org/abs/2305.13516" rel="nofollow">Scaling Speech Technology to 1,000+ Languages</a>
by Vineel Pratap, Andros Tjandra, Bowen Shi, Paden Tomasello, Arun Babu, Sayani Kundu, Ali Elkahky, Zhaoheng Ni, Apoorv Vyas, Maryam Fazel-Zarandi, Alexei Baevski, Yossi Adi, Xiaohui Zhang, Wei-Ning Hsu, Alexis Conneau, Michael Auli`,Wt,L,os="The abstract from the paper is the following:",Zt,P,rs=`<em>Expanding the language coverage of speech technology has the potential to improve access to information for many more people.
However, current speech technology is restricted to about one hundred languages which is a small fraction of the over 7,000
languages spoken around the world.
The Massively Multilingual Speech (MMS) project increases the number of supported languages by 10-40x, depending on the task.
The main ingredients are a new dataset based on readings of publicly available religious texts and effectively leveraging
self-supervised learning. We built pre-trained wav2vec 2.0 models covering 1,406 languages,
a single multilingual automatic speech recognition model for 1,107 languages, speech synthesis models
for the same number of languages, as well as a language identification model for 4,017 languages.
Experiments show that our multilingual speech recognition model more than halves the word error rate of
Whisper on 54 languages of the FLEURS benchmark while being trained on a small fraction of the labeled data.</em>`,Ct,K,is='Here are the different models open sourced in the MMS project. The models and code are originally released <a href="https://github.com/facebookresearch/fairseq/tree/main/examples/mms" rel="nofollow">here</a>. We have add them to the <code>transformers</code> framework, making them easier to use.',It,W,V,Mt,D,Ll,ot,ps="Automatic Speech Recognition (ASR)",Rt,O,cs='The ASR model checkpoints  can be found here : <a href="https://huggingface.co/facebook/mms-1b-fl102" rel="nofollow">mms-1b-fl102</a>, <a href="https://huggingface.co/facebook/mms-1b-l1107" rel="nofollow">mms-1b-l1107</a>, <a href="https://huggingface.co/facebook/mms-1b-all" rel="nofollow">mms-1b-all</a>. For best accuracy, use the <code>mms-1b-all</code> model.',Xt,ee,ds="Tips:",Bt,te,hs=`<li>All ASR models accept a float array corresponding to the raw waveform of the speech signal. The raw waveform should be pre-processed with <a href="/docs/transformers/v4.33.3/en/model_doc/wav2vec2#transformers.Wav2Vec2FeatureExtractor">Wav2Vec2FeatureExtractor</a>.</li> <li>The models were trained using connectionist temporal classification (CTC) so the model output has to be decoded using
<a href="/docs/transformers/v4.33.3/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer">Wav2Vec2CTCTokenizer</a>.</li> <li>You can load different language adapter weights for different languages via <a href="/docs/transformers/v4.33.3/en/model_doc/wav2vec2#transformers.Wav2Vec2ForCTC.load_adapter">load_adapter()</a>. Language adapters only consists of roughly 2 million parameters
and can therefore be efficiently loaded on the fly when needed.</li>`,_t,Z,N,yt,le,Pl,rt,ms="Loading",$t,se,us=`By default MMS loads adapter weights for English. If you want to load adapter weights of another language
make sure to specify <code>target_lang=&lt;your-chosen-target-lang&gt;</code> as well as <code>&quot;ignore_mismatched_sizes=True</code>.
The <code>ignore_mismatched_sizes=True</code> keyword has to be passed to allow the language model head to be resized according
to the vocabulary of the specified language.
Similarly, the processor should be loaded with the same target language`,Vt,ae,Nt,G,Gt,ne,Ms="If you want to use the ASR pipeline, you can load your chosen target language as such:",Et,oe,zt,C,E,ft,re,Kl,it,ys="Inference",xt,ie,fs=`Next, let’s look at how we can run MMS in inference and change adapter layers after having called <code>~PretrainedModel.from_pretrained</code>
First, we load audio data in different languages using the <a href="https://github.com/huggingface/datasets" rel="nofollow">Datasets</a>.`,Ht,pe,Ft,ce,ws="Next, we load the model and processor",Qt,de,Yt,he,bs=`Now we process the audio data, pass the processed audio data to the model and transcribe the model output,
just like we usually do for <a href="/docs/transformers/v4.33.3/en/model_doc/wav2vec2#transformers.Wav2Vec2ForCTC">Wav2Vec2ForCTC</a>.`,St,me,At,ue,Js=`We can now keep the same model in memory and simply switch out the language adapters by
calling the convenient <a href="/docs/transformers/v4.33.3/en/model_doc/wav2vec2#transformers.Wav2Vec2ForCTC.load_adapter">load_adapter()</a> function for the model and <a href="/docs/transformers/v4.33.3/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.set_target_lang">set_target_lang()</a> for the tokenizer.
We pass the target language as an input - <code>&quot;fra&quot;</code> for French.`,qt,Me,Lt,ye,Ts="In the same way the language can be switched out for all other supported languages. Please have a look at:",Pt,fe,Kt,we,gs="to see all supported languages.",Dt,be,js='To further improve performance from ASR models, language model decoding can be used. See the documentation <a href="https://huggingface.co/facebook/mms-1b-all" rel="nofollow">here</a> for further details.',Ot,I,z,wt,Je,Dl,pt,vs="Speech Synthesis (TTS)",el,Te,Us=`MMS-TTS uses the same model architecture as VITS, which was added to 🤗 Transformers in v4.33. MMS trains a separate
model checkpoint for each of the 1100+ languages in the project. All available checkpoints can be found on the Hugging
Face Hub: <a href="https://huggingface.co/models?sort=trending&amp;search=facebook%2Fmms-tts" rel="nofollow">facebook/mms-tts</a>, and the inference
documentation under <a href="https://huggingface.co/docs/transformers/main/en/model_doc/vits" rel="nofollow">VITS</a>.`,tl,R,x,bt,ge,Ol,ct,ks="Inference",ll,je,Ws="To use the MMS model, first update to the latest version of the Transformers library:",sl,ve,al,Ue,Zs=`Since the flow-based model in VITS is non-deterministic, it is good practice to set a seed to ensure reproducibility of
the outputs.`,nl,ke,Cs=`<li>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:</li>`,ol,We,rl,Ze,Is="The resulting waveform can be saved as a <code>.wav</code> file:",il,Ce,pl,Ie,Rs="Or displayed in a Jupyter Notebook / Google Colab:",cl,Re,dl,Xe,Xs=`For certain languages with non-Roman alphabets, 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.`,hl,Be,Bs=`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>:`,ml,_e,ul,$e,_s=`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.`,Ml,Ve,$s="To do this, first clone the uroman repository to your local machine and set the bash variable <code>UROMAN</code> to the local path:",yl,Ne,fl,Ge,Vs=`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:`,wl,Ee,bl,ze,Ns="<strong>Tips:</strong>",Jl,xe,Gs="<li>The MMS-TTS checkpoints are trained on lower-cased, un-punctuated text. By default, the <code>VitsTokenizer</code> <em>normalizes</em> the inputs by removing any casing and punctuation, to avoid passing out-of-vocabulary characters to the model. Hence, the model is agnostic to casing and punctuation, so these should be avoided in the text prompt. You can disable normalisation by setting <code>noramlize=False</code> in the call to the tokenizer, but this will lead to un-expected behaviour and is discouraged.</li> <li>The speaking rate can be varied by setting the attribute <code>model.speaking_rate</code> to a chosen value. Likewise, the randomness of the noise is controlled by <code>model.noise_scale</code>:</li>",Tl,He,gl,X,H,Jt,Fe,es,dt,Es="Language Identification (LID)",jl,Qe,zs='Different LID models are available based on the number of languages they can recognize - <a href="https://huggingface.co/facebook/mms-lid-126" rel="nofollow">126</a>, <a href="https://huggingface.co/facebook/mms-lid-256" rel="nofollow">256</a>, <a href="https://huggingface.co/facebook/mms-lid-512" rel="nofollow">512</a>, <a href="https://huggingface.co/facebook/mms-lid-1024" rel="nofollow">1024</a>, <a href="https://huggingface.co/facebook/mms-lid-2048" rel="nofollow">2048</a>, <a href="https://huggingface.co/facebook/mms-lid-4017" rel="nofollow">4017</a>.',vl,B,F,Tt,Ye,ts,ht,xs="Inference",Ul,Se,kl,Ae,Hs="Next, we load a couple of audio samples via <code>datasets</code>. Make sure that the audio data is sampled to 16000 kHz.",Wl,qe,Zl,Le,Fs="Next, we load the model and processor",Cl,Pe,Il,Ke,Qs='Now we process the audio data, pass the processed audio data to the model to classify it into a language, just like we usually do for Wav2Vec2 audio classification models such as <a href="https://huggingface.co/harshit345/xlsr-wav2vec-speech-emotion-recognition" rel="nofollow">ehcalabres/wav2vec2-lg-xlsr-en-speech-emotion-recognition</a>',Rl,De,Xl,Oe,Ys="To see all the supported languages of a checkpoint, you can print out the language ids as follows:",Bl,et,_l,_,Q,gt,tt,ls,mt,Ss="Audio Pretrained Models",$l,lt,As='Pretrained models are available for two different sizes - <a href="https://huggingface.co/facebook/mms-300m" rel="nofollow">300M</a> , <a href="https://huggingface.co/facebook/mms-1b" rel="nofollow">1Bil</a>. The architecture is based on the Wav2Vec2 model, so one can refer to <a href="wav2vec2">Wav2Vec2’s documentation page</a> for further details on how to finetune with models for various downstream tasks.',Vl,jt,Nl;return S=new v({}),A=new v({}),D=new v({}),le=new v({}),ae=new b({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFdhdjJWZWMyRm9yQ1RDJTJDJTIwQXV0b1Byb2Nlc3NvciUwQSUwQW1vZGVsX2lkJTIwJTNEJTIwJTIyZmFjZWJvb2slMkZtbXMtMWItYWxsJTIyJTBBdGFyZ2V0X2xhbmclMjAlM0QlMjAlMjJmcmElMjIlMEElMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZChtb2RlbF9pZCUyQyUyMHRhcmdldF9sYW5nJTNEdGFyZ2V0X2xhbmcpJTBBbW9kZWwlMjAlM0QlMjBXYXYyVmVjMkZvckNUQy5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWQlMkMlMjB0YXJnZXRfbGFuZyUzRHRhcmdldF9sYW5nJTJDJTIwaWdub3JlX21pc21hdGNoZWRfc2l6ZXMlM0RUcnVlKQ==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Wav2Vec2ForCTC, AutoProcessor

model_id = <span class="hljs-string">&quot;facebook/mms-1b-all&quot;</span>
target_lang = <span class="hljs-string">&quot;fra&quot;</span>

processor = AutoProcessor.from_pretrained(model_id, target_lang=target_lang)
model = Wav2Vec2ForCTC.from_pretrained(model_id, target_lang=target_lang, ignore_mismatched_sizes=<span class="hljs-literal">True</span>)`}}),G=new ga({props:{$$slots:{default:[ja]},$$scope:{ctx:vt}}}),oe=new b({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBbW9kZWxfaWQlMjAlM0QlMjAlMjJmYWNlYm9vayUyRm1tcy0xYi1hbGwlMjIlMEF0YXJnZXRfbGFuZyUyMCUzRCUyMCUyMmZyYSUyMiUwQSUwQXBpcGUlMjAlM0QlMjBwaXBlbGluZShtb2RlbCUzRG1vZGVsX2lkJTJDJTIwbW9kZWxfa3dhcmdzJTNEJTdCJTIydGFyZ2V0X2xhbmclMjIlM0ElMjAlMjJmcmElMjIlMkMlMjAlMjJpZ25vcmVfbWlzbWF0Y2hlZF9zaXplcyUyMiUzQSUyMFRydWUlN0Qp",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline

model_id = <span class="hljs-string">&quot;facebook/mms-1b-all&quot;</span>
target_lang = <span class="hljs-string">&quot;fra&quot;</span>

pipe = pipeline(model=model_id, model_kwargs={<span class="hljs-string">&quot;target_lang&quot;</span>: <span class="hljs-string">&quot;fra&quot;</span>, <span class="hljs-string">&quot;ignore_mismatched_sizes&quot;</span>: <span class="hljs-literal">True</span>})`}}),re=new v({}),pe=new b({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTJDJTIwQXVkaW8lMEElMEElMjMlMjBFbmdsaXNoJTBBc3RyZWFtX2RhdGElMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIybW96aWxsYS1mb3VuZGF0aW9uJTJGY29tbW9uX3ZvaWNlXzEzXzAlMjIlMkMlMjAlMjJlbiUyMiUyQyUyMHNwbGl0JTNEJTIydGVzdCUyMiUyQyUyMHN0cmVhbWluZyUzRFRydWUpJTBBc3RyZWFtX2RhdGElMjAlM0QlMjBzdHJlYW1fZGF0YS5jYXN0X2NvbHVtbiglMjJhdWRpbyUyMiUyQyUyMEF1ZGlvKHNhbXBsaW5nX3JhdGUlM0QxNjAwMCkpJTBBZW5fc2FtcGxlJTIwJTNEJTIwbmV4dChpdGVyKHN0cmVhbV9kYXRhKSklNUIlMjJhdWRpbyUyMiU1RCU1QiUyMmFycmF5JTIyJTVEJTBBJTBBJTIzJTIwRnJlbmNoJTBBc3RyZWFtX2RhdGElMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIybW96aWxsYS1mb3VuZGF0aW9uJTJGY29tbW9uX3ZvaWNlXzEzXzAlMjIlMkMlMjAlMjJmciUyMiUyQyUyMHNwbGl0JTNEJTIydGVzdCUyMiUyQyUyMHN0cmVhbWluZyUzRFRydWUpJTBBc3RyZWFtX2RhdGElMjAlM0QlMjBzdHJlYW1fZGF0YS5jYXN0X2NvbHVtbiglMjJhdWRpbyUyMiUyQyUyMEF1ZGlvKHNhbXBsaW5nX3JhdGUlM0QxNjAwMCkpJTBBZnJfc2FtcGxlJTIwJTNEJTIwbmV4dChpdGVyKHN0cmVhbV9kYXRhKSklNUIlMjJhdWRpbyUyMiU1RCU1QiUyMmFycmF5JTIyJTVE",highlighted:`<span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset, Audio

<span class="hljs-comment"># English</span>
stream_data = load_dataset(<span class="hljs-string">&quot;mozilla-foundation/common_voice_13_0&quot;</span>, <span class="hljs-string">&quot;en&quot;</span>, split=<span class="hljs-string">&quot;test&quot;</span>, streaming=<span class="hljs-literal">True</span>)
stream_data = stream_data.cast_column(<span class="hljs-string">&quot;audio&quot;</span>, Audio(sampling_rate=<span class="hljs-number">16000</span>))
en_sample = <span class="hljs-built_in">next</span>(<span class="hljs-built_in">iter</span>(stream_data))[<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>]

<span class="hljs-comment"># French</span>
stream_data = load_dataset(<span class="hljs-string">&quot;mozilla-foundation/common_voice_13_0&quot;</span>, <span class="hljs-string">&quot;fr&quot;</span>, split=<span class="hljs-string">&quot;test&quot;</span>, streaming=<span class="hljs-literal">True</span>)
stream_data = stream_data.cast_column(<span class="hljs-string">&quot;audio&quot;</span>, Audio(sampling_rate=<span class="hljs-number">16000</span>))
fr_sample = <span class="hljs-built_in">next</span>(<span class="hljs-built_in">iter</span>(stream_data))[<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>]`}}),de=new b({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFdhdjJWZWMyRm9yQ1RDJTJDJTIwQXV0b1Byb2Nlc3NvciUwQWltcG9ydCUyMHRvcmNoJTBBJTBBbW9kZWxfaWQlMjAlM0QlMjAlMjJmYWNlYm9vayUyRm1tcy0xYi1hbGwlMjIlMEElMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZChtb2RlbF9pZCklMEFtb2RlbCUyMCUzRCUyMFdhdjJWZWMyRm9yQ1RDLmZyb21fcHJldHJhaW5lZChtb2RlbF9pZCk=",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Wav2Vec2ForCTC, AutoProcessor
<span class="hljs-keyword">import</span> torch

model_id = <span class="hljs-string">&quot;facebook/mms-1b-all&quot;</span>

processor = AutoProcessor.from_pretrained(model_id)
model = Wav2Vec2ForCTC.from_pretrained(model_id)`}}),me=new b({props:{code:"aW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGVuX3NhbXBsZSUyQyUyMHNhbXBsaW5nX3JhdGUlM0QxNl8wMDAlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQWlkcyUyMCUzRCUyMHRvcmNoLmFyZ21heChvdXRwdXRzJTJDJTIwZGltJTNELTEpJTVCMCU1RCUwQXRyYW5zY3JpcHRpb24lMjAlM0QlMjBwcm9jZXNzb3IuZGVjb2RlKGlkcyklMEElMjMlMjAnam9lJTIwa2V0b24lMjBkaXNhcHByb3ZlZCUyMG9mJTIwZmlsbXMlMjBhbmQlMjBidXN0ZXIlMjBhbHNvJTIwaGFkJTIwcmVzZXJ2YXRpb25zJTIwYWJvdXQlMjB0aGUlMjBtZWRpYSc=",highlighted:`inputs = processor(en_sample, sampling_rate=<span class="hljs-number">16_000</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

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

ids = torch.argmax(outputs, dim=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>]
transcription = processor.decode(ids)
<span class="hljs-comment"># &#x27;joe keton disapproved of films and buster also had reservations about the media&#x27;</span>`}}),Me=new b({props:{code:"cHJvY2Vzc29yLnRva2VuaXplci5zZXRfdGFyZ2V0X2xhbmcoJTIyZnJhJTIyKSUwQW1vZGVsLmxvYWRfYWRhcHRlciglMjJmcmElMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGZyX3NhbXBsZSUyQyUyMHNhbXBsaW5nX3JhdGUlM0QxNl8wMDAlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQWlkcyUyMCUzRCUyMHRvcmNoLmFyZ21heChvdXRwdXRzJTJDJTIwZGltJTNELTEpJTVCMCU1RCUwQXRyYW5zY3JpcHRpb24lMjAlM0QlMjBwcm9jZXNzb3IuZGVjb2RlKGlkcyklMEElMjMlMjAlMjJjZSUyMGRlcm5pZXIlMjBlc3QlMjB2b2wlQzMlQTklMjB0b3V0JTIwYXUlMjBsb25nJTIwZGUlMjBsJ2hpc3RvaXJlJTIwcm9tYWluZSUyMg==",highlighted:`processor.tokenizer.set_target_lang(<span class="hljs-string">&quot;fra&quot;</span>)
model.load_adapter(<span class="hljs-string">&quot;fra&quot;</span>)

inputs = processor(fr_sample, sampling_rate=<span class="hljs-number">16_000</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

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

ids = torch.argmax(outputs, dim=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>]
transcription = processor.decode(ids)
<span class="hljs-comment"># &quot;ce dernier est volé tout au long de l&#x27;histoire romaine&quot;</span>`}}),fe=new b({props:{code:"cHJvY2Vzc29yLnRva2VuaXplci52b2NhYi5rZXlzKCk=",highlighted:"processor.tokenizer.vocab.keys()"}}),Je=new v({}),ge=new v({}),ve=new b({props:{code:"cGlwJTIwaW5zdGFsbCUyMC0tdXBncmFkZSUyMHRyYW5zZm9ybWVycyUyMGFjY2VsZXJhdGU=",highlighted:"pip install --upgrade transformers accelerate"}}),We=new b({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>]`}}),Ce=new b({props:{code:"aW1wb3J0JTIwc2NpcHklMEElMEFzY2lweS5pby53YXZmaWxlLndyaXRlKCUyMnN5bnRoZXNpemVkX3NwZWVjaC53YXYlMjIlMkMlMjByYXRlJTNEbW9kZWwuY29uZmlnLnNhbXBsaW5nX3JhdGUlMkMlMjBkYXRhJTNEd2F2ZWZvcm0p",highlighted:`<span class="hljs-keyword">import</span> scipy

scipy.io.wavfile.write(<span class="hljs-string">&quot;synthesized_speech.wav&quot;</span>, rate=model.config.sampling_rate, data=waveform)`}}),Re=new b({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)`}}),_e=new b({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)`}}),Ne=new b({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>)`}}),Ee=new b({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>]`}}),He=new b({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwVml0c1Rva2VuaXplciUyQyUyMFZpdHNNb2RlbCUyQyUyMHNldF9zZWVkJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwVml0c1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtbXMtdHRzLWVuZyUyMiklMEFtb2RlbCUyMCUzRCUyMFZpdHNNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZtbXMtdHRzLWVuZyUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIodGV4dCUzRCUyMkhlbGxvJTIwLSUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEElMjMlMjBtYWtlJTIwZGV0ZXJtaW5pc3RpYyUwQXNldF9zZWVkKDU1NSklMjAlMjAlMEElMEElMjMlMjBtYWtlJTIwc3BlZWNoJTIwZmFzdGVyJTIwYW5kJTIwbW9yZSUyMG5vaXN5JTBBbW9kZWwuc3BlYWtpbmdfcmF0ZSUyMCUzRCUyMDEuNSUwQW1vZGVsLm5vaXNlX3NjYWxlJTIwJTNEJTIwMC44JTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMG91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyk=",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>)

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

<span class="hljs-comment"># make speech faster and more noisy</span>
model.speaking_rate = <span class="hljs-number">1.5</span>
model.noise_scale = <span class="hljs-number">0.8</span>

<span class="hljs-keyword">with</span> torch.no_grad():
   outputs = model(**inputs)`}}),Fe=new v({}),Ye=new v({}),Se=new b({props:{code:"cGlwJTIwaW5zdGFsbCUyMHRvcmNoJTIwYWNjZWxlcmF0ZSUyMGRhdGFzZXRzJTVCYXVkaW8lNUQlMEFwaXAlMjBpbnN0YWxsJTIwLS11cGdyYWRlJTIwdHJhbnNmb3JtZXJz",highlighted:`pip install torch accelerate datasets[audio]
pip install --upgrade transformers`}}),qe=new b({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTJDJTIwQXVkaW8lMEElMEElMjMlMjBFbmdsaXNoJTBBc3RyZWFtX2RhdGElMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIybW96aWxsYS1mb3VuZGF0aW9uJTJGY29tbW9uX3ZvaWNlXzEzXzAlMjIlMkMlMjAlMjJlbiUyMiUyQyUyMHNwbGl0JTNEJTIydGVzdCUyMiUyQyUyMHN0cmVhbWluZyUzRFRydWUpJTBBc3RyZWFtX2RhdGElMjAlM0QlMjBzdHJlYW1fZGF0YS5jYXN0X2NvbHVtbiglMjJhdWRpbyUyMiUyQyUyMEF1ZGlvKHNhbXBsaW5nX3JhdGUlM0QxNjAwMCkpJTBBZW5fc2FtcGxlJTIwJTNEJTIwbmV4dChpdGVyKHN0cmVhbV9kYXRhKSklNUIlMjJhdWRpbyUyMiU1RCU1QiUyMmFycmF5JTIyJTVEJTBBJTBBJTIzJTIwQXJhYmljJTBBc3RyZWFtX2RhdGElMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIybW96aWxsYS1mb3VuZGF0aW9uJTJGY29tbW9uX3ZvaWNlXzEzXzAlMjIlMkMlMjAlMjJhciUyMiUyQyUyMHNwbGl0JTNEJTIydGVzdCUyMiUyQyUyMHN0cmVhbWluZyUzRFRydWUpJTBBc3RyZWFtX2RhdGElMjAlM0QlMjBzdHJlYW1fZGF0YS5jYXN0X2NvbHVtbiglMjJhdWRpbyUyMiUyQyUyMEF1ZGlvKHNhbXBsaW5nX3JhdGUlM0QxNjAwMCkpJTBBYXJfc2FtcGxlJTIwJTNEJTIwbmV4dChpdGVyKHN0cmVhbV9kYXRhKSklNUIlMjJhdWRpbyUyMiU1RCU1QiUyMmFycmF5JTIyJTVE",highlighted:`<span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset, Audio

<span class="hljs-comment"># English</span>
stream_data = load_dataset(<span class="hljs-string">&quot;mozilla-foundation/common_voice_13_0&quot;</span>, <span class="hljs-string">&quot;en&quot;</span>, split=<span class="hljs-string">&quot;test&quot;</span>, streaming=<span class="hljs-literal">True</span>)
stream_data = stream_data.cast_column(<span class="hljs-string">&quot;audio&quot;</span>, Audio(sampling_rate=<span class="hljs-number">16000</span>))
en_sample = <span class="hljs-built_in">next</span>(<span class="hljs-built_in">iter</span>(stream_data))[<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>]

<span class="hljs-comment"># Arabic</span>
stream_data = load_dataset(<span class="hljs-string">&quot;mozilla-foundation/common_voice_13_0&quot;</span>, <span class="hljs-string">&quot;ar&quot;</span>, split=<span class="hljs-string">&quot;test&quot;</span>, streaming=<span class="hljs-literal">True</span>)
stream_data = stream_data.cast_column(<span class="hljs-string">&quot;audio&quot;</span>, Audio(sampling_rate=<span class="hljs-number">16000</span>))
ar_sample = <span class="hljs-built_in">next</span>(<span class="hljs-built_in">iter</span>(stream_data))[<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>]`}}),Pe=new b({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFdhdjJWZWMyRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbiUyQyUyMEF1dG9GZWF0dXJlRXh0cmFjdG9yJTBBaW1wb3J0JTIwdG9yY2glMEElMEFtb2RlbF9pZCUyMCUzRCUyMCUyMmZhY2Vib29rJTJGbW1zLWxpZC0xMjYlMjIlMEElMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvRmVhdHVyZUV4dHJhY3Rvci5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWQpJTBBbW9kZWwlMjAlM0QlMjBXYXYyVmVjMkZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKG1vZGVsX2lkKQ==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Wav2Vec2ForSequenceClassification, AutoFeatureExtractor
<span class="hljs-keyword">import</span> torch

model_id = <span class="hljs-string">&quot;facebook/mms-lid-126&quot;</span>

processor = AutoFeatureExtractor.from_pretrained(model_id)
model = Wav2Vec2ForSequenceClassification.from_pretrained(model_id)`}}),De=new b({props:{code:"JTIzJTIwRW5nbGlzaCUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3Nvcihlbl9zYW1wbGUlMkMlMjBzYW1wbGluZ19yYXRlJTNEMTZfMDAwJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEFsYW5nX2lkJTIwJTNEJTIwdG9yY2guYXJnbWF4KG91dHB1dHMlMkMlMjBkaW0lM0QtMSklNUIwJTVELml0ZW0oKSUwQWRldGVjdGVkX2xhbmclMjAlM0QlMjBtb2RlbC5jb25maWcuaWQybGFiZWwlNUJsYW5nX2lkJTVEJTBBJTIzJTIwJ2VuZyclMEElMEElMjMlMjBBcmFiaWMlMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoYXJfc2FtcGxlJTJDJTIwc2FtcGxpbmdfcmF0ZSUzRDE2XzAwMCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMG91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBbGFuZ19pZCUyMCUzRCUyMHRvcmNoLmFyZ21heChvdXRwdXRzJTJDJTIwZGltJTNELTEpJTVCMCU1RC5pdGVtKCklMEFkZXRlY3RlZF9sYW5nJTIwJTNEJTIwbW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCbGFuZ19pZCU1RCUwQSUyMyUyMCdhcmEn",highlighted:`<span class="hljs-comment"># English</span>
inputs = processor(en_sample, sampling_rate=<span class="hljs-number">16_000</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

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

lang_id = torch.argmax(outputs, dim=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>].item()
detected_lang = model.config.id2label[lang_id]
<span class="hljs-comment"># &#x27;eng&#x27;</span>

<span class="hljs-comment"># Arabic</span>
inputs = processor(ar_sample, sampling_rate=<span class="hljs-number">16_000</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

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

lang_id = torch.argmax(outputs, dim=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>].item()
detected_lang = model.config.id2label[lang_id]
<span class="hljs-comment"># &#x27;ara&#x27;</span>`}}),et=new b({props:{code:"cHJvY2Vzc29yLmlkMmxhYmVsLnZhbHVlcygp",highlighted:"processor.id2label.values()"}}),tt=new v({}),{c(){J=a("meta"),Y=o(),j=a("p"),g=o(),T=a("h1"),w=a("a"),U=a("span"),h(S.$$.fragment),Al=o(),at=a("span"),at.textContent=ss,Ut=o(),k=a("h2"),$=a("a"),ut=a("span"),h(A.$$.fragment),ql=o(),nt=a("span"),nt.textContent=as,kt=o(),q=a("p"),q.innerHTML=ns,Wt=o(),L=a("p"),L.textContent=os,Zt=o(),P=a("p"),P.innerHTML=rs,Ct=o(),K=a("p"),K.innerHTML=is,It=o(),W=a("h3"),V=a("a"),Mt=a("span"),h(D.$$.fragment),Ll=o(),ot=a("span"),ot.textContent=ps,Rt=o(),O=a("p"),O.innerHTML=cs,Xt=o(),ee=a("p"),ee.textContent=ds,Bt=o(),te=a("ul"),te.innerHTML=hs,_t=o(),Z=a("h4"),N=a("a"),yt=a("span"),h(le.$$.fragment),Pl=o(),rt=a("span"),rt.textContent=ms,$t=o(),se=a("p"),se.innerHTML=us,Vt=o(),h(ae.$$.fragment),Nt=o(),h(G.$$.fragment),Gt=o(),ne=a("p"),ne.textContent=Ms,Et=o(),h(oe.$$.fragment),zt=o(),C=a("h4"),E=a("a"),ft=a("span"),h(re.$$.fragment),Kl=o(),it=a("span"),it.textContent=ys,xt=o(),ie=a("p"),ie.innerHTML=fs,Ht=o(),h(pe.$$.fragment),Ft=o(),ce=a("p"),ce.textContent=ws,Qt=o(),h(de.$$.fragment),Yt=o(),he=a("p"),he.innerHTML=bs,St=o(),h(me.$$.fragment),At=o(),ue=a("p"),ue.innerHTML=Js,qt=o(),h(Me.$$.fragment),Lt=o(),ye=a("p"),ye.textContent=Ts,Pt=o(),h(fe.$$.fragment),Kt=o(),we=a("p"),we.textContent=gs,Dt=o(),be=a("p"),be.innerHTML=js,Ot=o(),I=a("h3"),z=a("a"),wt=a("span"),h(Je.$$.fragment),Dl=o(),pt=a("span"),pt.textContent=vs,el=o(),Te=a("p"),Te.innerHTML=Us,tl=o(),R=a("h4"),x=a("a"),bt=a("span"),h(ge.$$.fragment),Ol=o(),ct=a("span"),ct.textContent=ks,ll=o(),je=a("p"),je.textContent=Ws,sl=o(),h(ve.$$.fragment),al=o(),Ue=a("p"),Ue.textContent=Zs,nl=o(),ke=a("ul"),ke.innerHTML=Cs,ol=o(),h(We.$$.fragment),rl=o(),Ze=a("p"),Ze.innerHTML=Is,il=o(),h(Ce.$$.fragment),pl=o(),Ie=a("p"),Ie.textContent=Rs,cl=o(),h(Re.$$.fragment),dl=o(),Xe=a("p"),Xe.innerHTML=Xs,hl=o(),Be=a("p"),Be.innerHTML=Bs,ml=o(),h(_e.$$.fragment),ul=o(),$e=a("p"),$e.innerHTML=_s,Ml=o(),Ve=a("p"),Ve.innerHTML=$s,yl=o(),h(Ne.$$.fragment),fl=o(),Ge=a("p"),Ge.innerHTML=Vs,wl=o(),h(Ee.$$.fragment),bl=o(),ze=a("p"),ze.innerHTML=Ns,Jl=o(),xe=a("ul"),xe.innerHTML=Gs,Tl=o(),h(He.$$.fragment),gl=o(),X=a("h3"),H=a("a"),Jt=a("span"),h(Fe.$$.fragment),es=o(),dt=a("span"),dt.textContent=Es,jl=o(),Qe=a("p"),Qe.innerHTML=zs,vl=o(),B=a("h4"),F=a("a"),Tt=a("span"),h(Ye.$$.fragment),ts=o(),ht=a("span"),ht.textContent=xs,Ul=ba(`

First, we install transformers and some other libraries

	`),h(Se.$$.fragment),kl=o(),Ae=a("p"),Ae.innerHTML=Hs,Wl=o(),h(qe.$$.fragment),Zl=o(),Le=a("p"),Le.textContent=Fs,Cl=o(),h(Pe.$$.fragment),Il=o(),Ke=a("p"),Ke.innerHTML=Qs,Rl=o(),h(De.$$.fragment),Xl=o(),Oe=a("p"),Oe.textContent=Ys,Bl=o(),h(et.$$.fragment),_l=o(),_=a("h3"),Q=a("a"),gt=a("span"),h(tt.$$.fragment),ls=o(),mt=a("span"),mt.textContent=Ss,$l=o(),lt=a("p"),lt.innerHTML=As,Vl=o(),jt=a("p"),this.h()},l(e){const l=Ja("svelte-1phssyn",document.head);J=n(l,"META",{name:!0,content:!0}),l.forEach(t),Y=r(e),j=n(e,"P",{}),d(j).forEach(t),g=r(e),T=n(e,"H1",{class:!0});var st=d(T);w=n(st,"A",{id:!0,class:!0,href:!0});var qs=d(w);U=n(qs,"SPAN",{});var Ls=d(U);m(S.$$.fragment,Ls),Ls.forEach(t),qs.forEach(t),Al=r(st),at=n(st,"SPAN",{"data-svelte-h":!0}),i(at)!=="svelte-1w7mcrw"&&(at.textContent=ss),st.forEach(t),Ut=r(e),k=n(e,"H2",{class:!0});var Gl=d(k);$=n(Gl,"A",{id:!0,class:!0,href:!0});var Ps=d($);ut=n(Ps,"SPAN",{});var Ks=d(ut);m(A.$$.fragment,Ks),Ks.forEach(t),Ps.forEach(t),ql=r(Gl),nt=n(Gl,"SPAN",{"data-svelte-h":!0}),i(nt)!=="svelte-1jsw1pg"&&(nt.textContent=as),Gl.forEach(t),kt=r(e),q=n(e,"P",{"data-svelte-h":!0}),i(q)!=="svelte-1lu69tn"&&(q.innerHTML=ns),Wt=r(e),L=n(e,"P",{"data-svelte-h":!0}),i(L)!=="svelte-vfdo9a"&&(L.textContent=os),Zt=r(e),P=n(e,"P",{"data-svelte-h":!0}),i(P)!=="svelte-omjokx"&&(P.innerHTML=rs),Ct=r(e),K=n(e,"P",{"data-svelte-h":!0}),i(K)!=="svelte-139x4qi"&&(K.innerHTML=is),It=r(e),W=n(e,"H3",{class:!0});var El=d(W);V=n(El,"A",{id:!0,class:!0,href:!0});var Ds=d(V);Mt=n(Ds,"SPAN",{});var Os=d(Mt);m(D.$$.fragment,Os),Os.forEach(t),Ds.forEach(t),Ll=r(El),ot=n(El,"SPAN",{"data-svelte-h":!0}),i(ot)!=="svelte-dngwwu"&&(ot.textContent=ps),El.forEach(t),Rt=r(e),O=n(e,"P",{"data-svelte-h":!0}),i(O)!=="svelte-1ganmax"&&(O.innerHTML=cs),Xt=r(e),ee=n(e,"P",{"data-svelte-h":!0}),i(ee)!=="svelte-axv494"&&(ee.textContent=ds),Bt=r(e),te=n(e,"UL",{"data-svelte-h":!0}),i(te)!=="svelte-16ccy8h"&&(te.innerHTML=hs),_t=r(e),Z=n(e,"H4",{class:!0});var zl=d(Z);N=n(zl,"A",{id:!0,class:!0,href:!0});var ea=d(N);yt=n(ea,"SPAN",{});var ta=d(yt);m(le.$$.fragment,ta),ta.forEach(t),ea.forEach(t),Pl=r(zl),rt=n(zl,"SPAN",{"data-svelte-h":!0}),i(rt)!=="svelte-1b4tp0j"&&(rt.textContent=ms),zl.forEach(t),$t=r(e),se=n(e,"P",{"data-svelte-h":!0}),i(se)!=="svelte-yw6zrr"&&(se.innerHTML=us),Vt=r(e),m(ae.$$.fragment,e),Nt=r(e),m(G.$$.fragment,e),Gt=r(e),ne=n(e,"P",{"data-svelte-h":!0}),i(ne)!=="svelte-vujju9"&&(ne.textContent=Ms),Et=r(e),m(oe.$$.fragment,e),zt=r(e),C=n(e,"H4",{class:!0});var xl=d(C);E=n(xl,"A",{id:!0,class:!0,href:!0});var la=d(E);ft=n(la,"SPAN",{});var sa=d(ft);m(re.$$.fragment,sa),sa.forEach(t),la.forEach(t),Kl=r(xl),it=n(xl,"SPAN",{"data-svelte-h":!0}),i(it)!=="svelte-199uz7g"&&(it.textContent=ys),xl.forEach(t),xt=r(e),ie=n(e,"P",{"data-svelte-h":!0}),i(ie)!=="svelte-883u4f"&&(ie.innerHTML=fs),Ht=r(e),m(pe.$$.fragment,e),Ft=r(e),ce=n(e,"P",{"data-svelte-h":!0}),i(ce)!=="svelte-11gbe5o"&&(ce.textContent=ws),Qt=r(e),m(de.$$.fragment,e),Yt=r(e),he=n(e,"P",{"data-svelte-h":!0}),i(he)!=="svelte-1ynvejj"&&(he.innerHTML=bs),St=r(e),m(me.$$.fragment,e),At=r(e),ue=n(e,"P",{"data-svelte-h":!0}),i(ue)!=="svelte-1633gt9"&&(ue.innerHTML=Js),qt=r(e),m(Me.$$.fragment,e),Lt=r(e),ye=n(e,"P",{"data-svelte-h":!0}),i(ye)!=="svelte-1okcee"&&(ye.textContent=Ts),Pt=r(e),m(fe.$$.fragment,e),Kt=r(e),we=n(e,"P",{"data-svelte-h":!0}),i(we)!=="svelte-ftdh8u"&&(we.textContent=gs),Dt=r(e),be=n(e,"P",{"data-svelte-h":!0}),i(be)!=="svelte-19swadf"&&(be.innerHTML=js),Ot=r(e),I=n(e,"H3",{class:!0});var Hl=d(I);z=n(Hl,"A",{id:!0,class:!0,href:!0});var aa=d(z);wt=n(aa,"SPAN",{});var na=d(wt);m(Je.$$.fragment,na),na.forEach(t),aa.forEach(t),Dl=r(Hl),pt=n(Hl,"SPAN",{"data-svelte-h":!0}),i(pt)!=="svelte-1ayam3d"&&(pt.textContent=vs),Hl.forEach(t),el=r(e),Te=n(e,"P",{"data-svelte-h":!0}),i(Te)!=="svelte-1c7flxd"&&(Te.innerHTML=Us),tl=r(e),R=n(e,"H4",{class:!0});var Fl=d(R);x=n(Fl,"A",{id:!0,class:!0,href:!0});var oa=d(x);bt=n(oa,"SPAN",{});var ra=d(bt);m(ge.$$.fragment,ra),ra.forEach(t),oa.forEach(t),Ol=r(Fl),ct=n(Fl,"SPAN",{"data-svelte-h":!0}),i(ct)!=="svelte-199uz7g"&&(ct.textContent=ks),Fl.forEach(t),ll=r(e),je=n(e,"P",{"data-svelte-h":!0}),i(je)!=="svelte-1e3j2ci"&&(je.textContent=Ws),sl=r(e),m(ve.$$.fragment,e),al=r(e),Ue=n(e,"P",{"data-svelte-h":!0}),i(Ue)!=="svelte-1fyd5jc"&&(Ue.textContent=Zs),nl=r(e),ke=n(e,"UL",{"data-svelte-h":!0}),i(ke)!=="svelte-llt2bz"&&(ke.innerHTML=Cs),ol=r(e),m(We.$$.fragment,e),rl=r(e),Ze=n(e,"P",{"data-svelte-h":!0}),i(Ze)!=="svelte-1wosc4r"&&(Ze.innerHTML=Is),il=r(e),m(Ce.$$.fragment,e),pl=r(e),Ie=n(e,"P",{"data-svelte-h":!0}),i(Ie)!=="svelte-1es17w7"&&(Ie.textContent=Rs),cl=r(e),m(Re.$$.fragment,e),dl=r(e),Xe=n(e,"P",{"data-svelte-h":!0}),i(Xe)!=="svelte-wf3m3a"&&(Xe.innerHTML=Xs),hl=r(e),Be=n(e,"P",{"data-svelte-h":!0}),i(Be)!=="svelte-19haabz"&&(Be.innerHTML=Bs),ml=r(e),m(_e.$$.fragment,e),ul=r(e),$e=n(e,"P",{"data-svelte-h":!0}),i($e)!=="svelte-1cubh3b"&&($e.innerHTML=_s),Ml=r(e),Ve=n(e,"P",{"data-svelte-h":!0}),i(Ve)!=="svelte-14ycm1z"&&(Ve.innerHTML=$s),yl=r(e),m(Ne.$$.fragment,e),fl=r(e),Ge=n(e,"P",{"data-svelte-h":!0}),i(Ge)!=="svelte-d0ppi5"&&(Ge.innerHTML=Vs),wl=r(e),m(Ee.$$.fragment,e),bl=r(e),ze=n(e,"P",{"data-svelte-h":!0}),i(ze)!=="svelte-z7vo8h"&&(ze.innerHTML=Ns),Jl=r(e),xe=n(e,"UL",{"data-svelte-h":!0}),i(xe)!=="svelte-1rftsk8"&&(xe.innerHTML=Gs),Tl=r(e),m(He.$$.fragment,e),gl=r(e),X=n(e,"H3",{class:!0});var Ql=d(X);H=n(Ql,"A",{id:!0,class:!0,href:!0});var ia=d(H);Jt=n(ia,"SPAN",{});var pa=d(Jt);m(Fe.$$.fragment,pa),pa.forEach(t),ia.forEach(t),es=r(Ql),dt=n(Ql,"SPAN",{"data-svelte-h":!0}),i(dt)!=="svelte-ui46hf"&&(dt.textContent=Es),Ql.forEach(t),jl=r(e),Qe=n(e,"P",{"data-svelte-h":!0}),i(Qe)!=="svelte-1d4axu2"&&(Qe.innerHTML=zs),vl=r(e),B=n(e,"H4",{class:!0});var Yl=d(B);F=n(Yl,"A",{id:!0,class:!0,href:!0});var ca=d(F);Tt=n(ca,"SPAN",{});var da=d(Tt);m(Ye.$$.fragment,da),da.forEach(t),ca.forEach(t),ts=r(Yl),ht=n(Yl,"SPAN",{"data-svelte-h":!0}),i(ht)!=="svelte-199uz7g"&&(ht.textContent=xs),Yl.forEach(t),Ul=Ta(e,`

First, we install transformers and some other libraries

	`),m(Se.$$.fragment,e),kl=r(e),Ae=n(e,"P",{"data-svelte-h":!0}),i(Ae)!=="svelte-biwzt4"&&(Ae.innerHTML=Hs),Wl=r(e),m(qe.$$.fragment,e),Zl=r(e),Le=n(e,"P",{"data-svelte-h":!0}),i(Le)!=="svelte-11gbe5o"&&(Le.textContent=Fs),Cl=r(e),m(Pe.$$.fragment,e),Il=r(e),Ke=n(e,"P",{"data-svelte-h":!0}),i(Ke)!=="svelte-1tsaj8l"&&(Ke.innerHTML=Qs),Rl=r(e),m(De.$$.fragment,e),Xl=r(e),Oe=n(e,"P",{"data-svelte-h":!0}),i(Oe)!=="svelte-p73t64"&&(Oe.textContent=Ys),Bl=r(e),m(et.$$.fragment,e),_l=r(e),_=n(e,"H3",{class:!0});var Sl=d(_);Q=n(Sl,"A",{id:!0,class:!0,href:!0});var ha=d(Q);gt=n(ha,"SPAN",{});var ma=d(gt);m(tt.$$.fragment,ma),ma.forEach(t),ha.forEach(t),ls=r(Sl),mt=n(Sl,"SPAN",{"data-svelte-h":!0}),i(mt)!=="svelte-1ikudun"&&(mt.textContent=Ss),Sl.forEach(t),$l=r(e),lt=n(e,"P",{"data-svelte-h":!0}),i(lt)!=="svelte-ktt37j"&&(lt.innerHTML=As),Vl=r(e),jt=n(e,"P",{}),d(jt).forEach(t),this.h()},h(){p(J,"name","hf:doc:metadata"),p(J,"content",JSON.stringify(Ua)),p(w,"id","mms"),p(w,"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"),p(w,"href","#mms"),p(T,"class","relative group"),p($,"id","overview"),p($,"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"),p($,"href","#overview"),p(k,"class","relative group"),p(V,"id","automatic-speech-recognition-asr"),p(V,"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"),p(V,"href","#automatic-speech-recognition-asr"),p(W,"class","relative group"),p(N,"id","loading"),p(N,"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"),p(N,"href","#loading"),p(Z,"class","relative group"),p(E,"id","inference"),p(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"),p(E,"href","#inference"),p(C,"class","relative group"),p(z,"id","speech-synthesis-tts"),p(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"),p(z,"href","#speech-synthesis-tts"),p(I,"class","relative group"),p(x,"id","inference"),p(x,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(x,"href","#inference"),p(R,"class","relative group"),p(H,"id","language-identification-lid"),p(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"),p(H,"href","#language-identification-lid"),p(X,"class","relative group"),p(F,"id","inference"),p(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"),p(F,"href","#inference"),p(B,"class","relative group"),p(Q,"id","audio-pretrained-models"),p(Q,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(Q,"href","#audio-pretrained-models"),p(_,"class","relative group")},m(e,l){c(document.head,J),s(e,Y,l),s(e,j,l),s(e,g,l),s(e,T,l),c(T,w),c(w,U),u(S,U,null),c(T,Al),c(T,at),s(e,Ut,l),s(e,k,l),c(k,$),c($,ut),u(A,ut,null),c(k,ql),c(k,nt),s(e,kt,l),s(e,q,l),s(e,Wt,l),s(e,L,l),s(e,Zt,l),s(e,P,l),s(e,Ct,l),s(e,K,l),s(e,It,l),s(e,W,l),c(W,V),c(V,Mt),u(D,Mt,null),c(W,Ll),c(W,ot),s(e,Rt,l),s(e,O,l),s(e,Xt,l),s(e,ee,l),s(e,Bt,l),s(e,te,l),s(e,_t,l),s(e,Z,l),c(Z,N),c(N,yt),u(le,yt,null),c(Z,Pl),c(Z,rt),s(e,$t,l),s(e,se,l),s(e,Vt,l),u(ae,e,l),s(e,Nt,l),u(G,e,l),s(e,Gt,l),s(e,ne,l),s(e,Et,l),u(oe,e,l),s(e,zt,l),s(e,C,l),c(C,E),c(E,ft),u(re,ft,null),c(C,Kl),c(C,it),s(e,xt,l),s(e,ie,l),s(e,Ht,l),u(pe,e,l),s(e,Ft,l),s(e,ce,l),s(e,Qt,l),u(de,e,l),s(e,Yt,l),s(e,he,l),s(e,St,l),u(me,e,l),s(e,At,l),s(e,ue,l),s(e,qt,l),u(Me,e,l),s(e,Lt,l),s(e,ye,l),s(e,Pt,l),u(fe,e,l),s(e,Kt,l),s(e,we,l),s(e,Dt,l),s(e,be,l),s(e,Ot,l),s(e,I,l),c(I,z),c(z,wt),u(Je,wt,null),c(I,Dl),c(I,pt),s(e,el,l),s(e,Te,l),s(e,tl,l),s(e,R,l),c(R,x),c(x,bt),u(ge,bt,null),c(R,Ol),c(R,ct),s(e,ll,l),s(e,je,l),s(e,sl,l),u(ve,e,l),s(e,al,l),s(e,Ue,l),s(e,nl,l),s(e,ke,l),s(e,ol,l),u(We,e,l),s(e,rl,l),s(e,Ze,l),s(e,il,l),u(Ce,e,l),s(e,pl,l),s(e,Ie,l),s(e,cl,l),u(Re,e,l),s(e,dl,l),s(e,Xe,l),s(e,hl,l),s(e,Be,l),s(e,ml,l),u(_e,e,l),s(e,ul,l),s(e,$e,l),s(e,Ml,l),s(e,Ve,l),s(e,yl,l),u(Ne,e,l),s(e,fl,l),s(e,Ge,l),s(e,wl,l),u(Ee,e,l),s(e,bl,l),s(e,ze,l),s(e,Jl,l),s(e,xe,l),s(e,Tl,l),u(He,e,l),s(e,gl,l),s(e,X,l),c(X,H),c(H,Jt),u(Fe,Jt,null),c(X,es),c(X,dt),s(e,jl,l),s(e,Qe,l),s(e,vl,l),s(e,B,l),c(B,F),c(F,Tt),u(Ye,Tt,null),c(B,ts),c(B,ht),s(e,Ul,l),u(Se,e,l),s(e,kl,l),s(e,Ae,l),s(e,Wl,l),u(qe,e,l),s(e,Zl,l),s(e,Le,l),s(e,Cl,l),u(Pe,e,l),s(e,Il,l),s(e,Ke,l),s(e,Rl,l),u(De,e,l),s(e,Xl,l),s(e,Oe,l),s(e,Bl,l),u(et,e,l),s(e,_l,l),s(e,_,l),c(_,Q),c(Q,gt),u(tt,gt,null),c(_,ls),c(_,mt),s(e,$l,l),s(e,lt,l),s(e,Vl,l),s(e,jt,l),Nl=!0},p(e,[l]){const st={};l&2&&(st.$$scope={dirty:l,ctx:e}),G.$set(st)},i(e){Nl||(M(S.$$.fragment,e),M(A.$$.fragment,e),M(D.$$.fragment,e),M(le.$$.fragment,e),M(ae.$$.fragment,e),M(G.$$.fragment,e),M(oe.$$.fragment,e),M(re.$$.fragment,e),M(pe.$$.fragment,e),M(de.$$.fragment,e),M(me.$$.fragment,e),M(Me.$$.fragment,e),M(fe.$$.fragment,e),M(Je.$$.fragment,e),M(ge.$$.fragment,e),M(ve.$$.fragment,e),M(We.$$.fragment,e),M(Ce.$$.fragment,e),M(Re.$$.fragment,e),M(_e.$$.fragment,e),M(Ne.$$.fragment,e),M(Ee.$$.fragment,e),M(He.$$.fragment,e),M(Fe.$$.fragment,e),M(Ye.$$.fragment,e),M(Se.$$.fragment,e),M(qe.$$.fragment,e),M(Pe.$$.fragment,e),M(De.$$.fragment,e),M(et.$$.fragment,e),M(tt.$$.fragment,e),Nl=!0)},o(e){y(S.$$.fragment,e),y(A.$$.fragment,e),y(D.$$.fragment,e),y(le.$$.fragment,e),y(ae.$$.fragment,e),y(G.$$.fragment,e),y(oe.$$.fragment,e),y(re.$$.fragment,e),y(pe.$$.fragment,e),y(de.$$.fragment,e),y(me.$$.fragment,e),y(Me.$$.fragment,e),y(fe.$$.fragment,e),y(Je.$$.fragment,e),y(ge.$$.fragment,e),y(ve.$$.fragment,e),y(We.$$.fragment,e),y(Ce.$$.fragment,e),y(Re.$$.fragment,e),y(_e.$$.fragment,e),y(Ne.$$.fragment,e),y(Ee.$$.fragment,e),y(He.$$.fragment,e),y(Fe.$$.fragment,e),y(Ye.$$.fragment,e),y(Se.$$.fragment,e),y(qe.$$.fragment,e),y(Pe.$$.fragment,e),y(De.$$.fragment,e),y(et.$$.fragment,e),y(tt.$$.fragment,e),Nl=!1},d(e){e&&(t(Y),t(j),t(g),t(T),t(Ut),t(k),t(kt),t(q),t(Wt),t(L),t(Zt),t(P),t(Ct),t(K),t(It),t(W),t(Rt),t(O),t(Xt),t(ee),t(Bt),t(te),t(_t),t(Z),t($t),t(se),t(Vt),t(Nt),t(Gt),t(ne),t(Et),t(zt),t(C),t(xt),t(ie),t(Ht),t(Ft),t(ce),t(Qt),t(Yt),t(he),t(St),t(At),t(ue),t(qt),t(Lt),t(ye),t(Pt),t(Kt),t(we),t(Dt),t(be),t(Ot),t(I),t(el),t(Te),t(tl),t(R),t(ll),t(je),t(sl),t(al),t(Ue),t(nl),t(ke),t(ol),t(rl),t(Ze),t(il),t(pl),t(Ie),t(cl),t(dl),t(Xe),t(hl),t(Be),t(ml),t(ul),t($e),t(Ml),t(Ve),t(yl),t(fl),t(Ge),t(wl),t(bl),t(ze),t(Jl),t(xe),t(Tl),t(gl),t(X),t(jl),t(Qe),t(vl),t(B),t(Ul),t(kl),t(Ae),t(Wl),t(Zl),t(Le),t(Cl),t(Il),t(Ke),t(Rl),t(Xl),t(Oe),t(Bl),t(_l),t(_),t($l),t(lt),t(Vl),t(jt)),t(J),f(S),f(A),f(D),f(le),f(ae,e),f(G,e),f(oe,e),f(re),f(pe,e),f(de,e),f(me,e),f(Me,e),f(fe,e),f(Je),f(ge),f(ve,e),f(We,e),f(Ce,e),f(Re,e),f(_e,e),f(Ne,e),f(Ee,e),f(He,e),f(Fe),f(Ye),f(Se,e),f(qe,e),f(Pe,e),f(De,e),f(et,e),f(tt)}}}const Ua={local:"mms",sections:[{local:"overview",sections:[{local:"automatic-speech-recognition-asr",sections:[{local:"loading",title:"Loading"},{local:"inference",title:"Inference"}],title:"Automatic Speech Recognition (ASR)"},{local:"speech-synthesis-tts",sections:[{local:"inference",title:"Inference"}],title:"Speech Synthesis (TTS)"},{local:"language-identification-lid",sections:[{local:"inference",title:"Inference"}],title:"Language Identification (LID)"},{local:"audio-pretrained-models",title:"Audio Pretrained Models"}],title:"Overview"}],title:"MMS"};function ka(vt){return Ma(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Xa extends fa{constructor(J){super(),wa(this,J,ka,va,ua,{})}}export{Xa as component};
