import{S as il,i as cl,s as pl,e as s,k as p,w as A,t as a,M as ul,c as h,d as e,m as u,a as l,x as P,h as o,b as c,N as Ss,G as n,g as i,y as N,L as ml,q as O,o as I,B as G,v as dl}from"../../chunks/vendor-hf-doc-builder.js";import{I as Ut}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{C as Hs}from"../../chunks/CodeBlock-hf-doc-builder.js";import{D as fl}from"../../chunks/DocNotebookDropdown-hf-doc-builder.js";function gl(Ls){let T,zn,S,U,Vt,it,ea,Rt,aa,Jn,ct,Xn,V,oa,zt,sa,ha,Kn,H,R,Jt,pt,la,Xt,ra,Yn,z,ia,Kt,ca,pa,Qn,jt,Yt,ua,Wn,xt,ma,Zn,k,$t,Qt,da,fa,ga,w,Wt,va,ya,Zt,ba,_a,tn,Ea,ka,wa,j,nn,ja,xa,en,$a,qa,an,Ca,Da,te,J,Aa,ut,Pa,Na,ne,f,Oa,qt,Ia,Ga,on,Ta,Sa,sn,Ha,La,hn,Ma,Ba,ee,X,Fa,ln,Ua,Va,ae,L,K,rn,mt,Ra,cn,za,oe,Y,Ja,pn,Xa,Ka,se,Ct,Ya,he,m,Qa,un,Wa,Za,mn,to,no,dn,eo,ao,fn,oo,so,gn,ho,lo,le,g,ro,vn,io,co,yn,po,uo,bn,mo,fo,_n,go,vo,re,x,yo,En,bo,_o,kn,Eo,ko,ie,dt,ce,Q,wo,ft,jo,xo,pe,v,Ms,ue,Dt,$o,me,M,W,wn,gt,qo,jn,Co,de,At,Do,fe,Pt,Ao,ge,Nt,Po,ve,Z,xn,No,Oo,$n,Io,ye,tt,Go,qn,To,So,be,vt,_e,y,Bs,Ee,B,nt,Cn,yt,Ho,Ot,Lo,Dn,Mo,ke,et,Bo,An,Fo,Uo,we,at,Vo,Pn,Ro,zo,je,ot,Jo,Nn,Xo,Ko,xe,$,It,On,Yo,Qo,Wo,Gt,In,Zo,ts,ns,Tt,Gn,es,as,$e,st,os,Tn,ss,hs,qe,F,ht,Sn,bt,ls,Hn,rs,Ce,lt,is,Ln,cs,ps,De,d,us,Mn,ms,ds,St,fs,gs,Bn,vs,ys,Fn,bs,_s,Un,Es,ks,Ae,_t,Pe,rt,ws,Et,js,xs,Ne,b,Fs,Oe,q,$s,Vn,qs,Cs,Rn,Ds,As,Ie,Ht,Ps,Ge;return it=new Ut({}),ct=new fl({props:{classNames:"absolute z-10 right-0 top-0",options:[{label:"Google Colab",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/master/course/vi/chapter9/section3.ipynb"},{label:"Aws Studio",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/master/course/vi/chapter9/section3.ipynb"}]}}),pt=new Ut({}),mt=new Ut({}),dt=new Hs({props:{code:`import numpy as np
import gradio as gr


def reverse_audio(audio):
    sr, data = audio
    reversed_audio = (sr, np.flipud(data))
    return reversed_audio


mic = gr.Audio(source="microphone", type="numpy", label="Speak here...")
gr.Interface(reverse_audio, mic, "audio").launch()`,highlighted:`<span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np
<span class="hljs-keyword">import</span> gradio <span class="hljs-keyword">as</span> gr


<span class="hljs-keyword">def</span> <span class="hljs-title function_">reverse_audio</span>(<span class="hljs-params">audio</span>):
    sr, data = audio
    reversed_audio = (sr, np.flipud(data))
    <span class="hljs-keyword">return</span> reversed_audio


mic = gr.Audio(source=<span class="hljs-string">&quot;microphone&quot;</span>, <span class="hljs-built_in">type</span>=<span class="hljs-string">&quot;numpy&quot;</span>, label=<span class="hljs-string">&quot;Speak here...&quot;</span>)
gr.Interface(reverse_audio, mic, <span class="hljs-string">&quot;audio&quot;</span>).launch()`}}),gt=new Ut({}),vt=new Hs({props:{code:`import numpy as np
import gradio as gr

notes = ["C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B"]


def generate_tone(note, octave, duration):
    sr = 48000
    a4_freq, tones_from_a4 = 440, 12 * (octave - 4) + (note - 9)
    frequency = a4_freq * 2 ** (tones_from_a4 / 12)
    duration = int(duration)
    audio = np.linspace(0, duration, duration * sr)
    audio = (20000 * np.sin(audio * (2 * np.pi * frequency))).astype(np.int16)
    return (sr, audio)


gr.Interface(
    generate_tone,
    [
        gr.Dropdown(notes, type="index"),
        gr.Slider(minimum=4, maximum=6, step=1),
        gr.Textbox(type="number", value=1, label="Duration in seconds"),
    ],
    "audio",
).launch()`,highlighted:`<span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np
<span class="hljs-keyword">import</span> gradio <span class="hljs-keyword">as</span> gr

notes = [<span class="hljs-string">&quot;C&quot;</span>, <span class="hljs-string">&quot;C#&quot;</span>, <span class="hljs-string">&quot;D&quot;</span>, <span class="hljs-string">&quot;D#&quot;</span>, <span class="hljs-string">&quot;E&quot;</span>, <span class="hljs-string">&quot;F&quot;</span>, <span class="hljs-string">&quot;F#&quot;</span>, <span class="hljs-string">&quot;G&quot;</span>, <span class="hljs-string">&quot;G#&quot;</span>, <span class="hljs-string">&quot;A&quot;</span>, <span class="hljs-string">&quot;A#&quot;</span>, <span class="hljs-string">&quot;B&quot;</span>]


<span class="hljs-keyword">def</span> <span class="hljs-title function_">generate_tone</span>(<span class="hljs-params">note, octave, duration</span>):
    sr = <span class="hljs-number">48000</span>
    a4_freq, tones_from_a4 = <span class="hljs-number">440</span>, <span class="hljs-number">12</span> * (octave - <span class="hljs-number">4</span>) + (note - <span class="hljs-number">9</span>)
    frequency = a4_freq * <span class="hljs-number">2</span> ** (tones_from_a4 / <span class="hljs-number">12</span>)
    duration = <span class="hljs-built_in">int</span>(duration)
    audio = np.linspace(<span class="hljs-number">0</span>, duration, duration * sr)
    audio = (<span class="hljs-number">20000</span> * np.sin(audio * (<span class="hljs-number">2</span> * np.pi * frequency))).astype(np.int16)
    <span class="hljs-keyword">return</span> (sr, audio)


gr.Interface(
    generate_tone,
    [
        gr.Dropdown(notes, <span class="hljs-built_in">type</span>=<span class="hljs-string">&quot;index&quot;</span>),
        gr.Slider(minimum=<span class="hljs-number">4</span>, maximum=<span class="hljs-number">6</span>, step=<span class="hljs-number">1</span>),
        gr.Textbox(<span class="hljs-built_in">type</span>=<span class="hljs-string">&quot;number&quot;</span>, value=<span class="hljs-number">1</span>, label=<span class="hljs-string">&quot;Duration in seconds&quot;</span>),
    ],
    <span class="hljs-string">&quot;audio&quot;</span>,
).launch()`}}),yt=new Ut({}),bt=new Ut({}),_t=new Hs({props:{code:`from transformers import pipeline
import gradio as gr

model = pipeline("automatic-speech-recognition")


def transcribe_audio(mic=None, file=None):
    if mic is not None:
        audio = mic
    elif file is not None:
        audio = file
    else:
        return "You must either provide a mic recording or a file"
    transcription = model(audio)["text"]
    return transcription


gr.Interface(
    fn=transcribe_audio,
    inputs=[
        gr.Audio(source="microphone", type="filepath", optional=True),
        gr.Audio(source="upload", type="filepath", optional=True),
    ],
    outputs="text",
).launch()`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline
<span class="hljs-keyword">import</span> gradio <span class="hljs-keyword">as</span> gr

model = pipeline(<span class="hljs-string">&quot;automatic-speech-recognition&quot;</span>)


<span class="hljs-keyword">def</span> <span class="hljs-title function_">transcribe_audio</span>(<span class="hljs-params">mic=<span class="hljs-literal">None</span>, file=<span class="hljs-literal">None</span></span>):
    <span class="hljs-keyword">if</span> mic <span class="hljs-keyword">is</span> <span class="hljs-keyword">not</span> <span class="hljs-literal">None</span>:
        audio = mic
    <span class="hljs-keyword">elif</span> file <span class="hljs-keyword">is</span> <span class="hljs-keyword">not</span> <span class="hljs-literal">None</span>:
        audio = file
    <span class="hljs-keyword">else</span>:
        <span class="hljs-keyword">return</span> <span class="hljs-string">&quot;You must either provide a mic recording or a file&quot;</span>
    transcription = model(audio)[<span class="hljs-string">&quot;text&quot;</span>]
    <span class="hljs-keyword">return</span> transcription


gr.Interface(
    fn=transcribe_audio,
    inputs=[
        gr.Audio(source=<span class="hljs-string">&quot;microphone&quot;</span>, <span class="hljs-built_in">type</span>=<span class="hljs-string">&quot;filepath&quot;</span>, optional=<span class="hljs-literal">True</span>),
        gr.Audio(source=<span class="hljs-string">&quot;upload&quot;</span>, <span class="hljs-built_in">type</span>=<span class="hljs-string">&quot;filepath&quot;</span>, optional=<span class="hljs-literal">True</span>),
    ],
    outputs=<span class="hljs-string">&quot;text&quot;</span>,
).launch()`}}),{c(){T=s("meta"),zn=p(),S=s("h1"),U=s("a"),Vt=s("span"),A(it.$$.fragment),ea=p(),Rt=s("span"),aa=a("Hi\u1EC3u l\u1EDBp Interface"),Jn=p(),A(ct.$$.fragment),Xn=p(),V=s("p"),oa=a("Trong ph\u1EA7n n\xE0y, ch\xFAng ta s\u1EBD xem x\xE9t k\u1EF9 h\u01A1n v\u1EC1 l\u1EDBp "),zt=s("code"),sa=a("Interface"),ha=a(" v\xE0 hi\u1EC3u c\xE1c tham s\u1ED1 ch\xEDnh \u0111\u01B0\u1EE3c s\u1EED d\u1EE5ng \u0111\u1EC3 t\u1EA1o ra n\xF3."),Kn=p(),H=s("h2"),R=s("a"),Jt=s("span"),A(pt.$$.fragment),la=p(),Xt=s("span"),ra=a("C\xE1ch t\u1EA1o m\u1ED9t Interface"),Yn=p(),z=s("p"),ia=a("B\u1EA1n s\u1EBD nh\u1EADn th\u1EA5y r\u1EB1ng l\u1EDBp "),Kt=s("code"),ca=a("Interface"),pa=a(" c\xF3 3 tham s\u1ED1 b\u1EAFt bu\u1ED9c:"),Qn=p(),jt=s("p"),Yt=s("code"),ua=a("Interface(fn, inputs, outputs, ...)"),Wn=p(),xt=s("p"),ma=a("C\xE1c tham s\u1ED1 n\xE0y l\xE0:"),Zn=p(),k=s("ul"),$t=s("li"),Qt=s("code"),da=a("fn"),fa=a(": h\xE0m d\u1EF1 \u0111o\xE1n \u0111\u01B0\u1EE3c bao b\u1ECDc b\u1EDFi giao di\u1EC7n Gradio. H\xE0m n\xE0y c\xF3 th\u1EC3 nh\u1EADn m\u1ED9t ho\u1EB7c nhi\u1EC1u tham s\u1ED1 v\xE0 tr\u1EA3 v\u1EC1 m\u1ED9t ho\u1EB7c nhi\u1EC1u gi\xE1 tr\u1ECB"),ga=p(),w=s("li"),Wt=s("code"),va=a("inputs"),ya=a(": (c\xE1c) lo\u1EA1i th\xE0nh ph\u1EA7n \u0111\u1EA7u v\xE0o. Gradio cung c\u1EA5p nhi\u1EC1u th\xE0nh ph\u1EA7n \u0111\u01B0\u1EE3c t\u1EA1o s\u1EB5n nh\u01B0"),Zt=s("code"),ba=a('"image"'),_a=a(" hay "),tn=s("code"),Ea=a('"mic"'),ka=a("."),wa=p(),j=s("li"),nn=s("code"),ja=a("outputs"),xa=a(": (c\xE1c) lo\u1EA1i th\xE0nh ph\u1EA7n \u0111\u1EA7u ra. M\u1ED9t l\u1EA7n n\u1EEFa, Gradio cung c\u1EA5p nhi\u1EC1u th\xE0nh ph\u1EA7n \u0111\u01B0\u1EE3c t\u1EA1o s\u1EB5n, v\xED d\u1EE5: "),en=s("code"),$a=a('"image"'),qa=a(" hay "),an=s("code"),Ca=a('"label"'),Da=a("."),te=p(),J=s("p"),Aa=a("\u0110\u1EC3 c\xF3 danh s\xE1ch \u0111\u1EA7y \u0111\u1EE7 c\xE1c th\xE0nh ph\u1EA7n, "),ut=s("a"),Pa=a("xem t\xE0i li\u1EC7u Gradio"),Na=a(". M\u1ED7i th\xE0nh ph\u1EA7n \u0111\u01B0\u1EE3c t\u1EA1o s\u1EB5n c\xF3 th\u1EC3 \u0111\u01B0\u1EE3c t\xF9y ch\u1EC9nh b\u1EB1ng c\xE1ch kh\u1EDFi t\u1EA1o l\u1EDBp t\u01B0\u01A1ng \u1EE9ng v\u1EDBi th\xE0nh ph\u1EA7n."),ne=p(),f=s("p"),Oa=a("V\xED d\u1EE5: nh\u01B0 ch\xFAng ta \u0111\xE3 th\u1EA5y trong "),qt=s("a"),Ia=a("ph\u1EA7n tr\u01B0\u1EDBc"),Ga=a(", thay v\xEC truy\u1EC1n tham s\u1ED1 "),on=s("code"),Ta=a("input"),Sa=a(" v\xE0o trong "),sn=s("code"),Ha=a('"textbox"'),La=a(", b\u1EA1n c\xF3 th\u1EC3 truy\u1EC1n v\xE0o "),hn=s("code"),Ma=a('Textbox(lines=7, label="Prompt")'),Ba=a(" \u0111\u1EC3 t\u1EA1o m\u1ED9t h\u1ED9p v\u0103n b\u1EA3n c\xF3 7 d\xF2ng v\xE0 m\u1ED9t nh\xE3n."),ee=p(),X=s("p"),Fa=a("H\xE3y xem m\u1ED9t v\xED d\u1EE5 kh\xE1c, l\u1EA7n n\xE0y v\u1EDBi th\xE0nh ph\u1EA7n "),ln=s("code"),Ua=a("Audio"),Va=a("."),ae=p(),L=s("h2"),K=s("a"),rn=s("span"),A(mt.$$.fragment),Ra=p(),cn=s("span"),za=a("M\u1ED9t v\xED d\u1EE5 \u0111\u01A1n gi\u1EA3n v\u1EDBi \xE2m thanh"),oe=p(),Y=s("p"),Ja=a(`Nh\u01B0 \u0111\xE3 \u0111\u1EC1 c\u1EADp tr\u01B0\u1EDBc \u0111\xF3, Gradio cung c\u1EA5p nhi\u1EC1u \u0111\u1EA7u v\xE0o v\xE0 \u0111\u1EA7u ra kh\xE1c nhau.
V\xEC v\u1EADy, h\xE3y x\xE2y d\u1EF1ng m\u1ED9t  `),pn=s("code"),Xa=a("Interface"),Ka=a(" ho\u1EA1t \u0111\u1ED9ng v\u1EDBi \xE2m thanh."),se=p(),Ct=s("p"),Ya=a("Trong v\xED d\u1EE5 n\xE0y, ch\xFAng t\xF4i s\u1EBD x\xE2y d\u1EF1ng m\u1ED9t h\xE0m chuy\u1EC3n \u0111\u1ED5i \xE2m thanh sang \xE2m thanh m\xE0 nh\u1EADn t\u1EADp tin \xE2m thanh v\xE0 ch\u1EC9 c\u1EA7n \u0111\u1EA3o ng\u01B0\u1EE3c n\xF3."),he=p(),m=s("p"),Qa=a("Ch\xFAng ta s\u1EBD s\u1EED d\u1EE5ng th\xE0nh ph\u1EA7n "),un=s("code"),Wa=a("Audio"),Za=a(" cho \u0111\u1EA7u v\xE0o. Khi s\u1EED d\u1EE5ng th\xE0nh ph\u1EA7n "),mn=s("code"),to=a("Audio"),no=a(", b\u1EA1n c\xF3 th\u1EC3 ch\u1EC9 \u0111\u1ECBnh xem b\u1EA1n c\xF3 mu\u1ED1n "),dn=s("code"),eo=a("source"),ao=a(` c\u1EE7a \xE2m thanh l\xE0 m\u1ED9t t\u1EC7p m\xE0 ng\u01B0\u1EDDi d\xF9ng
t\u1EA3i l\xEAn ho\u1EB7c micr\xF4 m\xE0 ng\u01B0\u1EDDi d\xF9ng ghi l\u1EA1i gi\u1ECDng n\xF3i c\u1EE7a h\u1ECD. Trong tr\u01B0\u1EDDng h\u1EE3p n\xE0y, h\xE3y \u0111\u1EB7t n\xF3 th\xE0nh `),fn=s("code"),oo=a('"microphone"'),so=a(". Ch\u1EC9 cho vui th\xF4i, ch\xFAng ta s\u1EBD th\xEAm m\u1ED9t nh\xE3n v\xE0o ph\u1EA7n  "),gn=s("code"),ho=a("Audio"),lo=a(" c\u1EE7a m\xECnh c\xF3 n\u1ED9i dung \u201CSpeak here\u2026\u201D, ngh\u0129a l\xE0 \u201CN\xF3i \u1EDF \u0111\xE2y \u2026\u201C."),le=p(),g=s("p"),ro=a("Ngo\xE0i ra, ch\xFAng ta mu\u1ED1n nh\u1EADn \xE2m thanh d\u01B0\u1EDBi d\u1EA1ng m\u1EA3ng numpy \u0111\u1EC3 ta c\xF3 th\u1EC3 d\u1EC5 d\xE0ng \u201C\u0111\u1EA3o ng\u01B0\u1EE3c\u201D n\xF3 l\u1EA1i. V\xEC v\u1EADy, ch\xFAng ta s\u1EBD \u0111\u1EB7t "),vn=s("code"),io=a('"type"'),co=a(" l\xE0 "),yn=s("code"),po=a('"numpy"'),uo=a(`, chuy\u1EC3n \u0111\u1EA7u v\xE0o
d\u1EEF li\u1EC7u d\u01B0\u1EDBi d\u1EA1ng m\u1ED9t b\u1ED9 (`),bn=s("code"),mo=a("sample_rate"),fo=a(", "),_n=s("code"),go=a("data"),vo=a(") trong h\xE0m c\u1EE7a ch\xFAng ta."),re=p(),x=s("p"),yo=a("Ch\xFAng ta c\u0169ng s\u1EBD s\u1EED d\u1EE5ng th\xE0nh ph\u1EA7n \u0111\u1EA7u ra "),En=s("code"),bo=a("Audio"),_o=a(" c\xF3 th\u1EC3 t\u1EF1 \u0111\u1ED9ng hi\u1EC3n th\u1ECB m\u1ED9t b\u1ED9 tuple v\u1EDBi t\u1ED1c \u0111\u1ED9 m\u1EABu v\xE0 m\u1EA3ng d\u1EEF li\u1EC7u ph\u1EE9c t\u1EA1p d\u01B0\u1EDBi d\u1EA1ng t\u1EC7p \xE2m thanh c\xF3 th\u1EC3 ph\xE1t. Trong tr\u01B0\u1EDDng h\u1EE3p n\xE0y, ch\xFAng ta kh\xF4ng c\u1EA7n th\u1EF1c hi\u1EC7n b\u1EA5t k\u1EF3 t\xF9y ch\u1EC9nh n\xE0o, v\xEC v\u1EADy cta s\u1EBD s\u1EED d\u1EE5ng chu\u1ED7i ph\xEDm t\u1EAFt "),kn=s("code"),Eo=a('"audio"'),ko=a("."),ie=p(),A(dt.$$.fragment),ce=p(),Q=s("p"),wo=a("\u0110o\u1EA1n m\xE3 tr\xEAn s\u1EBD t\u1EA1o ra m\u1ED9t giao di\u1EC7n gi\u1ED1ng nh\u01B0 b\xEAn d\u01B0\u1EDBi (n\u1EBFu tr\xECnh duy\u1EC7t c\u1EE7a b\u1EA1n kh\xF4ng y\xEAu c\u1EA7u b\u1EA1n c\u1EA5p quy\u1EC1n \u0111\u1ED1i v\u1EDBi micr\xF4, "),ft=s("a"),jo=a("m\u1EDF b\u1EA3n demo sang m\u1ED9t tab kh\xE1c"),xo=a(".)"),pe=p(),v=s("iframe"),ue=p(),Dt=s("p"),$o=a("B\xE2y gi\u1EDD b\u1EA1n c\xF3 th\u1EC3 ghi l\u1EA1i gi\u1ECDng n\xF3i c\u1EE7a m\xECnh v\xE0 nghe th\u1EA5y ch\xEDnh m\xECnh \u0111ang n\xF3i ng\u01B0\u1EE3c l\u1EA1i - th\u1EADt ma qu\xE1i \u{1F47B}!"),me=p(),M=s("h2"),W=s("a"),wn=s("span"),A(gt.$$.fragment),qo=p(),jn=s("span"),Co=a("X\u1EED l\xFD nhi\u1EC1u \u0111\u1EA7u v\xE0o v\xE0 \u0111\u1EA7u ra"),de=p(),At=s("p"),Do=a("Gi\u1EA3 s\u1EED ch\xFAng ta c\xF3 m\u1ED9t h\xE0m ph\u1EE9c t\u1EA1p h\u01A1n, v\u1EDBi nhi\u1EC1u \u0111\u1EA7u v\xE0o v\xE0 \u0111\u1EA7u ra. Trong v\xED d\u1EE5 d\u01B0\u1EDBi \u0111\xE2y, ch\xFAng ta c\xF3 m\u1ED9t h\xE0m l\u1EA5y ch\u1EC9 m\u1EE5c th\u1EA3 xu\u1ED1ng, gi\xE1 tr\u1ECB thanh tr\u01B0\u1EE3t v\xE0 s\u1ED1, v\xE0 tr\u1EA3 v\u1EC1 m\u1ED9t m\u1EABu \xE2m thanh c\u1EE7a m\u1ED9t giai \u0111i\u1EC7u \xE2m nh\u1EA1c."),fe=p(),Pt=s("p"),Ao=a("H\xE3y xem c\xE1ch ch\xFAng ta chuy\u1EC3n danh s\xE1ch c\xE1c th\xE0nh ph\u1EA7n \u0111\u1EA7u v\xE0o v\xE0 \u0111\u1EA7u ra, v\xE0 xem li\u1EC7u b\u1EA1n c\xF3 th\u1EC3 theo d\xF5i nh\u1EEFng g\xEC \u0111ang x\u1EA3y ra kh\xF4ng."),ge=p(),Nt=s("p"),Po=a("Ch\xECa kh\xF3a \u1EDF \u0111\xE2y l\xE0 khi b\u1EA1n truy\u1EC1n v\xE0o:"),ve=p(),Z=s("ul"),xn=s("li"),No=a("danh s\xE1ch c\xE1c th\xE0nh ph\u1EA7n \u0111\u1EA7u v\xE0o, m\u1ED7i th\xE0nh ph\u1EA7n t\u01B0\u01A1ng \u1EE9ng v\u1EDBi m\u1ED9t tham s\u1ED1 theo th\u1EE9 t\u1EF1."),Oo=p(),$n=s("li"),Io=a("danh s\xE1ch c\xE1c th\xE0nh ph\u1EA7n \u0111\u1EA7u ra, m\u1ED7i th\xE0nh ph\u1EA7n t\u01B0\u01A1ng \u1EE9ng v\u1EDBi m\u1ED9t gi\xE1 tr\u1ECB tr\u1EA3 v\u1EC1."),ye=p(),tt=s("p"),Go=a("\u0110o\u1EA1n m\xE3 b\xEAn d\u01B0\u1EDBi cho th\u1EA5y c\xE1ch ba th\xE0nh ph\u1EA7n \u0111\u1EA7u v\xE0o x\u1EBFp h\xE0ng v\u1EDBi ba tham s\u1ED1 c\u1EE7a h\xE0m "),qn=s("code"),To=a("generate_tone()"),So=a(":"),be=p(),A(vt.$$.fragment),_e=p(),y=s("iframe"),Ee=p(),B=s("h3"),nt=s("a"),Cn=s("span"),A(yt.$$.fragment),Ho=p(),Ot=s("span"),Lo=a("Ph\u01B0\u01A1ng th\u1EE9c "),Dn=s("code"),Mo=a("launch()"),ke=p(),et=s("p"),Bo=a("Cho \u0111\u1EBFn nay, ch\xFAng t\xF4i \u0111\xE3 s\u1EED d\u1EE5ng ph\u01B0\u01A1ng th\u1EE9c "),An=s("code"),Fo=a("launch()"),Uo=a(" \u0111\u1EC3 kh\u1EDFi ch\u1EA1y giao di\u1EC7n, nh\u01B0ng ch\xFAng ta ch\u01B0a th\u1EF1c s\u1EF1 th\u1EA3o lu\u1EADn v\u1EC1 nh\u1EEFng g\xEC n\xF3 l\xE0m."),we=p(),at=s("p"),Vo=a("Theo m\u1EB7c \u0111\u1ECBnh, ph\u01B0\u01A1ng th\u1EE9c "),Pn=s("code"),Ro=a("launch()"),zo=a(" s\u1EBD kh\u1EDFi ch\u1EA1y b\u1EA3n demo trong m\u1ED9t m\xE1y ch\u1EE7 web \u0111ang ch\u1EA1y c\u1EE5c b\u1ED9. N\u1EBFu b\u1EA1n \u0111ang ch\u1EA1y m\xE3 c\u1EE7a m\xECnh trong notebook Jupyter ho\u1EB7c Colab, th\xEC Gradio s\u1EBD nh\xFAng GUI demo v\xE0o notebook \u0111\u1EC3 b\u1EA1n c\xF3 th\u1EC3 d\u1EC5 d\xE0ng s\u1EED d\u1EE5ng."),je=p(),ot=s("p"),Jo=a("B\u1EA1n c\xF3 th\u1EC3 t\xF9y ch\u1EC9nh h\xE0nh vi c\u1EE7a "),Nn=s("code"),Xo=a("launch()"),Ko=a(" th\xF4ng qua c\xE1c tham s\u1ED1 kh\xE1c nhau:"),xe=p(),$=s("ul"),It=s("li"),On=s("code"),Yo=a("inline"),Qo=a(" - c\xF3 hi\u1EC3n th\u1ECB giao di\u1EC7n n\u1ED9i tuy\u1EBFn tr\xEAn notebook Python hay kh\xF4ng."),Wo=p(),Gt=s("li"),In=s("code"),Zo=a("inbrowser"),ts=a(" - c\xF3 t\u1EF1 \u0111\u1ED9ng kh\u1EDFi ch\u1EA1y giao di\u1EC7n trong tab m\u1EDBi tr\xEAn tr\xECnh duy\u1EC7t m\u1EB7c \u0111\u1ECBnh hay kh\xF4ng."),ns=p(),Tt=s("li"),Gn=s("code"),es=a("share"),as=a(" - c\xF3 t\u1EA1o m\u1ED9t li\xEAn k\u1EBFt c\xF3 th\u1EC3 chia s\u1EBB c\xF4ng khai t\u1EEB m\xE1y t\xEDnh c\u1EE7a b\u1EA1n cho giao di\u1EC7n hay kh\xF4ng. Gi\u1ED1ng nh\u01B0 m\u1ED9t li\xEAn k\u1EBFt Google Drive!"),$e=p(),st=s("p"),os=a("Ch\xFAng t\xF4i s\u1EBD tr\xECnh b\xE0y chi ti\u1EBFt h\u01A1n v\u1EC1 tham s\u1ED1 "),Tn=s("code"),ss=a("share"),hs=a(" trong ph\u1EA7n ti\u1EBFp theo!"),qe=p(),F=s("h2"),ht=s("a"),Sn=s("span"),A(bt.$$.fragment),ls=p(),Hn=s("span"),rs=a("\u270F\uFE0F H\xE3y \xE1p d\u1EE5ng n\xF3!"),Ce=p(),lt=s("p"),is=a("H\xE3y x\xE2y d\u1EF1ng m\u1ED9t giao di\u1EC7n cho ph\xE9p b\u1EA1n gi\u1EDBi thi\u1EC7u m\xF4 h\xECnh "),Ln=s("strong"),cs=a("nh\u1EADn d\u1EA1ng gi\u1ECDng n\xF3i"),ps=a(". \u0110\u1EC3 l\xE0m cho n\xF3 th\xFA v\u1ECB, ch\xFAng ta s\u1EBD ch\u1EA5p nh\u1EADn ho\u1EB7c \u0111\u1EA7u v\xE0o micr\xF4 ho\u1EB7c m\u1ED9t t\u1EC7p \u0111\xE3 t\u1EA3i l\xEAn."),De=p(),d=s("p"),us=a("Nh\u01B0 th\u01B0\u1EDDng l\u1EC7, ch\xFAng ta s\u1EBD t\u1EA3i m\xF4 h\xECnh nh\u1EADn d\u1EA1ng gi\u1ECDng n\xF3i c\u1EE7a m\xECnh b\u1EB1ng c\xE1ch s\u1EED d\u1EE5ng h\xE0m "),Mn=s("code"),ms=a("pipeline()"),ds=a(` t\u1EEB \u{1F917} Transformers.
N\u1EBFu b\u1EA1n c\u1EA7n c\u1EADp nh\u1EADt nhanh, b\u1EA1n c\xF3 th\u1EC3 quay l\u1EA1i `),St=s("a"),fs=a("ph\u1EA7n \u0111\xF3 trong Ch\u01B0\u01A1ng 1"),gs=a(". Ti\u1EBFp theo, ch\xFAng ta s\u1EBD tri\u1EC3n khai m\u1ED9t h\xE0m "),Bn=s("code"),vs=a("transcribe_audio()"),ys=a(" \u0111\u1EC3 x\u1EED l\xFD \xE2m thanh v\xE0 tr\u1EA3 v\u1EC1 phi\xEAn \xE2m. Cu\u1ED1i c\xF9ng, ch\xFAng ta s\u1EBD g\xF3i h\xE0m n\xE0y trong m\u1ED9t "),Fn=s("code"),bs=a("Interface"),_s=a(" v\u1EDBi c\xE1c th\xE0nh ph\u1EA7n "),Un=s("code"),Es=a("Audio"),ks=a(" cho \u0111\u1EA7u v\xE0o v\xE0 ch\u1EC9 v\u0103n b\u1EA3n cho \u0111\u1EA7u ra. Nh\xECn chung, m\xE3 cho \u1EE9ng d\u1EE5ng n\xE0y nh\u01B0 sau:"),Ae=p(),A(_t.$$.fragment),Pe=p(),rt=s("p"),ws=a("N\u1EBFu tr\xECnh duy\u1EC7t c\u1EE7a b\u1EA1n kh\xF4ng y\xEAu c\u1EA7u b\u1EA1n c\u1EA5p quy\u1EC1n \u0111\u1ED1i v\u1EDBi micr\xF4, h\xE3y "),Et=s("a"),js=a("m\u1EDF b\u1EA3n demo trong m\u1ED9t tab ri\xEAng"),xs=a("."),Ne=p(),b=s("iframe"),Oe=p(),q=s("p"),$s=a("N\xF3 \u0111\xF3! B\xE2y gi\u1EDD b\u1EA1n c\xF3 th\u1EC3 s\u1EED d\u1EE5ng giao di\u1EC7n n\xE0y \u0111\u1EC3 phi\xEAn \xE2m \xE2m thanh. Ch\xFA \xFD \u1EDF \u0111\xE2y r\u1EB1ng b\u1EB1ng c\xE1ch \u0111\u1EB7t tham s\u1ED1 "),Vn=s("code"),qs=a("option"),Cs=a(" l\xE0 "),Rn=s("code"),Ds=a("True"),As=a(", ch\xFAng ta cho ph\xE9p ng\u01B0\u1EDDi d\xF9ng cung c\u1EA5p micr\xF4 ho\u1EB7c t\u1EC7p \xE2m thanh (ho\u1EB7c kh\xF4ng, nh\u01B0ng \u0111i\u1EC1u \u0111\xF3 s\u1EBD tr\u1EA3 l\u1EA1i th\xF4ng b\xE1o l\u1ED7i)."),Ie=p(),Ht=s("p"),Ps=a("Ti\u1EBFp t\u1EE5c xem c\xE1ch chia s\u1EBB giao di\u1EC7n c\u1EE7a b\u1EA1n v\u1EDBi nh\u1EEFng ng\u01B0\u1EDDi kh\xE1c!"),this.h()},l(t){const r=ul('[data-svelte="svelte-1phssyn"]',document.head);T=h(r,"META",{name:!0,content:!0}),r.forEach(e),zn=u(t),S=h(t,"H1",{class:!0});var Te=l(S);U=h(Te,"A",{id:!0,class:!0,href:!0});var Us=l(U);Vt=h(Us,"SPAN",{});var Vs=l(Vt);P(it.$$.fragment,Vs),Vs.forEach(e),Us.forEach(e),ea=u(Te),Rt=h(Te,"SPAN",{});var Rs=l(Rt);aa=o(Rs,"Hi\u1EC3u l\u1EDBp Interface"),Rs.forEach(e),Te.forEach(e),Jn=u(t),P(ct.$$.fragment,t),Xn=u(t),V=h(t,"P",{});var Se=l(V);oa=o(Se,"Trong ph\u1EA7n n\xE0y, ch\xFAng ta s\u1EBD xem x\xE9t k\u1EF9 h\u01A1n v\u1EC1 l\u1EDBp "),zt=h(Se,"CODE",{});var zs=l(zt);sa=o(zs,"Interface"),zs.forEach(e),ha=o(Se," v\xE0 hi\u1EC3u c\xE1c tham s\u1ED1 ch\xEDnh \u0111\u01B0\u1EE3c s\u1EED d\u1EE5ng \u0111\u1EC3 t\u1EA1o ra n\xF3."),Se.forEach(e),Kn=u(t),H=h(t,"H2",{class:!0});var He=l(H);R=h(He,"A",{id:!0,class:!0,href:!0});var Js=l(R);Jt=h(Js,"SPAN",{});var Xs=l(Jt);P(pt.$$.fragment,Xs),Xs.forEach(e),Js.forEach(e),la=u(He),Xt=h(He,"SPAN",{});var Ks=l(Xt);ra=o(Ks,"C\xE1ch t\u1EA1o m\u1ED9t Interface"),Ks.forEach(e),He.forEach(e),Yn=u(t),z=h(t,"P",{});var Le=l(z);ia=o(Le,"B\u1EA1n s\u1EBD nh\u1EADn th\u1EA5y r\u1EB1ng l\u1EDBp "),Kt=h(Le,"CODE",{});var Ys=l(Kt);ca=o(Ys,"Interface"),Ys.forEach(e),pa=o(Le," c\xF3 3 tham s\u1ED1 b\u1EAFt bu\u1ED9c:"),Le.forEach(e),Qn=u(t),jt=h(t,"P",{});var Qs=l(jt);Yt=h(Qs,"CODE",{});var Ws=l(Yt);ua=o(Ws,"Interface(fn, inputs, outputs, ...)"),Ws.forEach(e),Qs.forEach(e),Wn=u(t),xt=h(t,"P",{});var Zs=l(xt);ma=o(Zs,"C\xE1c tham s\u1ED1 n\xE0y l\xE0:"),Zs.forEach(e),Zn=u(t),k=h(t,"UL",{});var Lt=l(k);$t=h(Lt,"LI",{});var Ns=l($t);Qt=h(Ns,"CODE",{});var th=l(Qt);da=o(th,"fn"),th.forEach(e),fa=o(Ns,": h\xE0m d\u1EF1 \u0111o\xE1n \u0111\u01B0\u1EE3c bao b\u1ECDc b\u1EDFi giao di\u1EC7n Gradio. H\xE0m n\xE0y c\xF3 th\u1EC3 nh\u1EADn m\u1ED9t ho\u1EB7c nhi\u1EC1u tham s\u1ED1 v\xE0 tr\u1EA3 v\u1EC1 m\u1ED9t ho\u1EB7c nhi\u1EC1u gi\xE1 tr\u1ECB"),Ns.forEach(e),ga=u(Lt),w=h(Lt,"LI",{});var kt=l(w);Wt=h(kt,"CODE",{});var nh=l(Wt);va=o(nh,"inputs"),nh.forEach(e),ya=o(kt,": (c\xE1c) lo\u1EA1i th\xE0nh ph\u1EA7n \u0111\u1EA7u v\xE0o. Gradio cung c\u1EA5p nhi\u1EC1u th\xE0nh ph\u1EA7n \u0111\u01B0\u1EE3c t\u1EA1o s\u1EB5n nh\u01B0"),Zt=h(kt,"CODE",{});var eh=l(Zt);ba=o(eh,'"image"'),eh.forEach(e),_a=o(kt," hay "),tn=h(kt,"CODE",{});var ah=l(tn);Ea=o(ah,'"mic"'),ah.forEach(e),ka=o(kt,"."),kt.forEach(e),wa=u(Lt),j=h(Lt,"LI",{});var wt=l(j);nn=h(wt,"CODE",{});var oh=l(nn);ja=o(oh,"outputs"),oh.forEach(e),xa=o(wt,": (c\xE1c) lo\u1EA1i th\xE0nh ph\u1EA7n \u0111\u1EA7u ra. M\u1ED9t l\u1EA7n n\u1EEFa, Gradio cung c\u1EA5p nhi\u1EC1u th\xE0nh ph\u1EA7n \u0111\u01B0\u1EE3c t\u1EA1o s\u1EB5n, v\xED d\u1EE5: "),en=h(wt,"CODE",{});var sh=l(en);$a=o(sh,'"image"'),sh.forEach(e),qa=o(wt," hay "),an=h(wt,"CODE",{});var hh=l(an);Ca=o(hh,'"label"'),hh.forEach(e),Da=o(wt,"."),wt.forEach(e),Lt.forEach(e),te=u(t),J=h(t,"P",{});var Me=l(J);Aa=o(Me,"\u0110\u1EC3 c\xF3 danh s\xE1ch \u0111\u1EA7y \u0111\u1EE7 c\xE1c th\xE0nh ph\u1EA7n, "),ut=h(Me,"A",{href:!0,rel:!0});var lh=l(ut);Pa=o(lh,"xem t\xE0i li\u1EC7u Gradio"),lh.forEach(e),Na=o(Me,". M\u1ED7i th\xE0nh ph\u1EA7n \u0111\u01B0\u1EE3c t\u1EA1o s\u1EB5n c\xF3 th\u1EC3 \u0111\u01B0\u1EE3c t\xF9y ch\u1EC9nh b\u1EB1ng c\xE1ch kh\u1EDFi t\u1EA1o l\u1EDBp t\u01B0\u01A1ng \u1EE9ng v\u1EDBi th\xE0nh ph\u1EA7n."),Me.forEach(e),ne=u(t),f=h(t,"P",{});var C=l(f);Oa=o(C,"V\xED d\u1EE5: nh\u01B0 ch\xFAng ta \u0111\xE3 th\u1EA5y trong "),qt=h(C,"A",{href:!0});var rh=l(qt);Ia=o(rh,"ph\u1EA7n tr\u01B0\u1EDBc"),rh.forEach(e),Ga=o(C,", thay v\xEC truy\u1EC1n tham s\u1ED1 "),on=h(C,"CODE",{});var ih=l(on);Ta=o(ih,"input"),ih.forEach(e),Sa=o(C," v\xE0o trong "),sn=h(C,"CODE",{});var ch=l(sn);Ha=o(ch,'"textbox"'),ch.forEach(e),La=o(C,", b\u1EA1n c\xF3 th\u1EC3 truy\u1EC1n v\xE0o "),hn=h(C,"CODE",{});var ph=l(hn);Ma=o(ph,'Textbox(lines=7, label="Prompt")'),ph.forEach(e),Ba=o(C," \u0111\u1EC3 t\u1EA1o m\u1ED9t h\u1ED9p v\u0103n b\u1EA3n c\xF3 7 d\xF2ng v\xE0 m\u1ED9t nh\xE3n."),C.forEach(e),ee=u(t),X=h(t,"P",{});var Be=l(X);Fa=o(Be,"H\xE3y xem m\u1ED9t v\xED d\u1EE5 kh\xE1c, l\u1EA7n n\xE0y v\u1EDBi th\xE0nh ph\u1EA7n "),ln=h(Be,"CODE",{});var uh=l(ln);Ua=o(uh,"Audio"),uh.forEach(e),Va=o(Be,"."),Be.forEach(e),ae=u(t),L=h(t,"H2",{class:!0});var Fe=l(L);K=h(Fe,"A",{id:!0,class:!0,href:!0});var mh=l(K);rn=h(mh,"SPAN",{});var dh=l(rn);P(mt.$$.fragment,dh),dh.forEach(e),mh.forEach(e),Ra=u(Fe),cn=h(Fe,"SPAN",{});var fh=l(cn);za=o(fh,"M\u1ED9t v\xED d\u1EE5 \u0111\u01A1n gi\u1EA3n v\u1EDBi \xE2m thanh"),fh.forEach(e),Fe.forEach(e),oe=u(t),Y=h(t,"P",{});var Ue=l(Y);Ja=o(Ue,`Nh\u01B0 \u0111\xE3 \u0111\u1EC1 c\u1EADp tr\u01B0\u1EDBc \u0111\xF3, Gradio cung c\u1EA5p nhi\u1EC1u \u0111\u1EA7u v\xE0o v\xE0 \u0111\u1EA7u ra kh\xE1c nhau.
V\xEC v\u1EADy, h\xE3y x\xE2y d\u1EF1ng m\u1ED9t  `),pn=h(Ue,"CODE",{});var gh=l(pn);Xa=o(gh,"Interface"),gh.forEach(e),Ka=o(Ue," ho\u1EA1t \u0111\u1ED9ng v\u1EDBi \xE2m thanh."),Ue.forEach(e),se=u(t),Ct=h(t,"P",{});var vh=l(Ct);Ya=o(vh,"Trong v\xED d\u1EE5 n\xE0y, ch\xFAng t\xF4i s\u1EBD x\xE2y d\u1EF1ng m\u1ED9t h\xE0m chuy\u1EC3n \u0111\u1ED5i \xE2m thanh sang \xE2m thanh m\xE0 nh\u1EADn t\u1EADp tin \xE2m thanh v\xE0 ch\u1EC9 c\u1EA7n \u0111\u1EA3o ng\u01B0\u1EE3c n\xF3."),vh.forEach(e),he=u(t),m=h(t,"P",{});var _=l(m);Qa=o(_,"Ch\xFAng ta s\u1EBD s\u1EED d\u1EE5ng th\xE0nh ph\u1EA7n "),un=h(_,"CODE",{});var yh=l(un);Wa=o(yh,"Audio"),yh.forEach(e),Za=o(_," cho \u0111\u1EA7u v\xE0o. Khi s\u1EED d\u1EE5ng th\xE0nh ph\u1EA7n "),mn=h(_,"CODE",{});var bh=l(mn);to=o(bh,"Audio"),bh.forEach(e),no=o(_,", b\u1EA1n c\xF3 th\u1EC3 ch\u1EC9 \u0111\u1ECBnh xem b\u1EA1n c\xF3 mu\u1ED1n "),dn=h(_,"CODE",{});var _h=l(dn);eo=o(_h,"source"),_h.forEach(e),ao=o(_,` c\u1EE7a \xE2m thanh l\xE0 m\u1ED9t t\u1EC7p m\xE0 ng\u01B0\u1EDDi d\xF9ng
t\u1EA3i l\xEAn ho\u1EB7c micr\xF4 m\xE0 ng\u01B0\u1EDDi d\xF9ng ghi l\u1EA1i gi\u1ECDng n\xF3i c\u1EE7a h\u1ECD. Trong tr\u01B0\u1EDDng h\u1EE3p n\xE0y, h\xE3y \u0111\u1EB7t n\xF3 th\xE0nh `),fn=h(_,"CODE",{});var Eh=l(fn);oo=o(Eh,'"microphone"'),Eh.forEach(e),so=o(_,". Ch\u1EC9 cho vui th\xF4i, ch\xFAng ta s\u1EBD th\xEAm m\u1ED9t nh\xE3n v\xE0o ph\u1EA7n  "),gn=h(_,"CODE",{});var kh=l(gn);ho=o(kh,"Audio"),kh.forEach(e),lo=o(_," c\u1EE7a m\xECnh c\xF3 n\u1ED9i dung \u201CSpeak here\u2026\u201D, ngh\u0129a l\xE0 \u201CN\xF3i \u1EDF \u0111\xE2y \u2026\u201C."),_.forEach(e),le=u(t),g=h(t,"P",{});var D=l(g);ro=o(D,"Ngo\xE0i ra, ch\xFAng ta mu\u1ED1n nh\u1EADn \xE2m thanh d\u01B0\u1EDBi d\u1EA1ng m\u1EA3ng numpy \u0111\u1EC3 ta c\xF3 th\u1EC3 d\u1EC5 d\xE0ng \u201C\u0111\u1EA3o ng\u01B0\u1EE3c\u201D n\xF3 l\u1EA1i. V\xEC v\u1EADy, ch\xFAng ta s\u1EBD \u0111\u1EB7t "),vn=h(D,"CODE",{});var wh=l(vn);io=o(wh,'"type"'),wh.forEach(e),co=o(D," l\xE0 "),yn=h(D,"CODE",{});var jh=l(yn);po=o(jh,'"numpy"'),jh.forEach(e),uo=o(D,`, chuy\u1EC3n \u0111\u1EA7u v\xE0o
d\u1EEF li\u1EC7u d\u01B0\u1EDBi d\u1EA1ng m\u1ED9t b\u1ED9 (`),bn=h(D,"CODE",{});var xh=l(bn);mo=o(xh,"sample_rate"),xh.forEach(e),fo=o(D,", "),_n=h(D,"CODE",{});var $h=l(_n);go=o($h,"data"),$h.forEach(e),vo=o(D,") trong h\xE0m c\u1EE7a ch\xFAng ta."),D.forEach(e),re=u(t),x=h(t,"P",{});var Mt=l(x);yo=o(Mt,"Ch\xFAng ta c\u0169ng s\u1EBD s\u1EED d\u1EE5ng th\xE0nh ph\u1EA7n \u0111\u1EA7u ra "),En=h(Mt,"CODE",{});var qh=l(En);bo=o(qh,"Audio"),qh.forEach(e),_o=o(Mt," c\xF3 th\u1EC3 t\u1EF1 \u0111\u1ED9ng hi\u1EC3n th\u1ECB m\u1ED9t b\u1ED9 tuple v\u1EDBi t\u1ED1c \u0111\u1ED9 m\u1EABu v\xE0 m\u1EA3ng d\u1EEF li\u1EC7u ph\u1EE9c t\u1EA1p d\u01B0\u1EDBi d\u1EA1ng t\u1EC7p \xE2m thanh c\xF3 th\u1EC3 ph\xE1t. Trong tr\u01B0\u1EDDng h\u1EE3p n\xE0y, ch\xFAng ta kh\xF4ng c\u1EA7n th\u1EF1c hi\u1EC7n b\u1EA5t k\u1EF3 t\xF9y ch\u1EC9nh n\xE0o, v\xEC v\u1EADy cta s\u1EBD s\u1EED d\u1EE5ng chu\u1ED7i ph\xEDm t\u1EAFt "),kn=h(Mt,"CODE",{});var Ch=l(kn);Eo=o(Ch,'"audio"'),Ch.forEach(e),ko=o(Mt,"."),Mt.forEach(e),ie=u(t),P(dt.$$.fragment,t),ce=u(t),Q=h(t,"P",{});var Ve=l(Q);wo=o(Ve,"\u0110o\u1EA1n m\xE3 tr\xEAn s\u1EBD t\u1EA1o ra m\u1ED9t giao di\u1EC7n gi\u1ED1ng nh\u01B0 b\xEAn d\u01B0\u1EDBi (n\u1EBFu tr\xECnh duy\u1EC7t c\u1EE7a b\u1EA1n kh\xF4ng y\xEAu c\u1EA7u b\u1EA1n c\u1EA5p quy\u1EC1n \u0111\u1ED1i v\u1EDBi micr\xF4, "),ft=h(Ve,"A",{href:!0,target:!0});var Dh=l(ft);jo=o(Dh,"m\u1EDF b\u1EA3n demo sang m\u1ED9t tab kh\xE1c"),Dh.forEach(e),xo=o(Ve,".)"),Ve.forEach(e),pe=u(t),v=h(t,"IFRAME",{src:!0,frameborder:!0,height:!0,title:!0,class:!0,allow:!0,sandbox:!0}),l(v).forEach(e),ue=u(t),Dt=h(t,"P",{});var Ah=l(Dt);$o=o(Ah,"B\xE2y gi\u1EDD b\u1EA1n c\xF3 th\u1EC3 ghi l\u1EA1i gi\u1ECDng n\xF3i c\u1EE7a m\xECnh v\xE0 nghe th\u1EA5y ch\xEDnh m\xECnh \u0111ang n\xF3i ng\u01B0\u1EE3c l\u1EA1i - th\u1EADt ma qu\xE1i \u{1F47B}!"),Ah.forEach(e),me=u(t),M=h(t,"H2",{class:!0});var Re=l(M);W=h(Re,"A",{id:!0,class:!0,href:!0});var Ph=l(W);wn=h(Ph,"SPAN",{});var Nh=l(wn);P(gt.$$.fragment,Nh),Nh.forEach(e),Ph.forEach(e),qo=u(Re),jn=h(Re,"SPAN",{});var Oh=l(jn);Co=o(Oh,"X\u1EED l\xFD nhi\u1EC1u \u0111\u1EA7u v\xE0o v\xE0 \u0111\u1EA7u ra"),Oh.forEach(e),Re.forEach(e),de=u(t),At=h(t,"P",{});var Ih=l(At);Do=o(Ih,"Gi\u1EA3 s\u1EED ch\xFAng ta c\xF3 m\u1ED9t h\xE0m ph\u1EE9c t\u1EA1p h\u01A1n, v\u1EDBi nhi\u1EC1u \u0111\u1EA7u v\xE0o v\xE0 \u0111\u1EA7u ra. Trong v\xED d\u1EE5 d\u01B0\u1EDBi \u0111\xE2y, ch\xFAng ta c\xF3 m\u1ED9t h\xE0m l\u1EA5y ch\u1EC9 m\u1EE5c th\u1EA3 xu\u1ED1ng, gi\xE1 tr\u1ECB thanh tr\u01B0\u1EE3t v\xE0 s\u1ED1, v\xE0 tr\u1EA3 v\u1EC1 m\u1ED9t m\u1EABu \xE2m thanh c\u1EE7a m\u1ED9t giai \u0111i\u1EC7u \xE2m nh\u1EA1c."),Ih.forEach(e),fe=u(t),Pt=h(t,"P",{});var Gh=l(Pt);Ao=o(Gh,"H\xE3y xem c\xE1ch ch\xFAng ta chuy\u1EC3n danh s\xE1ch c\xE1c th\xE0nh ph\u1EA7n \u0111\u1EA7u v\xE0o v\xE0 \u0111\u1EA7u ra, v\xE0 xem li\u1EC7u b\u1EA1n c\xF3 th\u1EC3 theo d\xF5i nh\u1EEFng g\xEC \u0111ang x\u1EA3y ra kh\xF4ng."),Gh.forEach(e),ge=u(t),Nt=h(t,"P",{});var Th=l(Nt);Po=o(Th,"Ch\xECa kh\xF3a \u1EDF \u0111\xE2y l\xE0 khi b\u1EA1n truy\u1EC1n v\xE0o:"),Th.forEach(e),ve=u(t),Z=h(t,"UL",{});var ze=l(Z);xn=h(ze,"LI",{});var Sh=l(xn);No=o(Sh,"danh s\xE1ch c\xE1c th\xE0nh ph\u1EA7n \u0111\u1EA7u v\xE0o, m\u1ED7i th\xE0nh ph\u1EA7n t\u01B0\u01A1ng \u1EE9ng v\u1EDBi m\u1ED9t tham s\u1ED1 theo th\u1EE9 t\u1EF1."),Sh.forEach(e),Oo=u(ze),$n=h(ze,"LI",{});var Hh=l($n);Io=o(Hh,"danh s\xE1ch c\xE1c th\xE0nh ph\u1EA7n \u0111\u1EA7u ra, m\u1ED7i th\xE0nh ph\u1EA7n t\u01B0\u01A1ng \u1EE9ng v\u1EDBi m\u1ED9t gi\xE1 tr\u1ECB tr\u1EA3 v\u1EC1."),Hh.forEach(e),ze.forEach(e),ye=u(t),tt=h(t,"P",{});var Je=l(tt);Go=o(Je,"\u0110o\u1EA1n m\xE3 b\xEAn d\u01B0\u1EDBi cho th\u1EA5y c\xE1ch ba th\xE0nh ph\u1EA7n \u0111\u1EA7u v\xE0o x\u1EBFp h\xE0ng v\u1EDBi ba tham s\u1ED1 c\u1EE7a h\xE0m "),qn=h(Je,"CODE",{});var Lh=l(qn);To=o(Lh,"generate_tone()"),Lh.forEach(e),So=o(Je,":"),Je.forEach(e),be=u(t),P(vt.$$.fragment,t),_e=u(t),y=h(t,"IFRAME",{src:!0,frameborder:!0,height:!0,title:!0,class:!0,allow:!0,sandbox:!0}),l(y).forEach(e),Ee=u(t),B=h(t,"H3",{class:!0});var Xe=l(B);nt=h(Xe,"A",{id:!0,class:!0,href:!0});var Mh=l(nt);Cn=h(Mh,"SPAN",{});var Bh=l(Cn);P(yt.$$.fragment,Bh),Bh.forEach(e),Mh.forEach(e),Ho=u(Xe),Ot=h(Xe,"SPAN",{});var Os=l(Ot);Lo=o(Os,"Ph\u01B0\u01A1ng th\u1EE9c "),Dn=h(Os,"CODE",{});var Fh=l(Dn);Mo=o(Fh,"launch()"),Fh.forEach(e),Os.forEach(e),Xe.forEach(e),ke=u(t),et=h(t,"P",{});var Ke=l(et);Bo=o(Ke,"Cho \u0111\u1EBFn nay, ch\xFAng t\xF4i \u0111\xE3 s\u1EED d\u1EE5ng ph\u01B0\u01A1ng th\u1EE9c "),An=h(Ke,"CODE",{});var Uh=l(An);Fo=o(Uh,"launch()"),Uh.forEach(e),Uo=o(Ke," \u0111\u1EC3 kh\u1EDFi ch\u1EA1y giao di\u1EC7n, nh\u01B0ng ch\xFAng ta ch\u01B0a th\u1EF1c s\u1EF1 th\u1EA3o lu\u1EADn v\u1EC1 nh\u1EEFng g\xEC n\xF3 l\xE0m."),Ke.forEach(e),we=u(t),at=h(t,"P",{});var Ye=l(at);Vo=o(Ye,"Theo m\u1EB7c \u0111\u1ECBnh, ph\u01B0\u01A1ng th\u1EE9c "),Pn=h(Ye,"CODE",{});var Vh=l(Pn);Ro=o(Vh,"launch()"),Vh.forEach(e),zo=o(Ye," s\u1EBD kh\u1EDFi ch\u1EA1y b\u1EA3n demo trong m\u1ED9t m\xE1y ch\u1EE7 web \u0111ang ch\u1EA1y c\u1EE5c b\u1ED9. N\u1EBFu b\u1EA1n \u0111ang ch\u1EA1y m\xE3 c\u1EE7a m\xECnh trong notebook Jupyter ho\u1EB7c Colab, th\xEC Gradio s\u1EBD nh\xFAng GUI demo v\xE0o notebook \u0111\u1EC3 b\u1EA1n c\xF3 th\u1EC3 d\u1EC5 d\xE0ng s\u1EED d\u1EE5ng."),Ye.forEach(e),je=u(t),ot=h(t,"P",{});var Qe=l(ot);Jo=o(Qe,"B\u1EA1n c\xF3 th\u1EC3 t\xF9y ch\u1EC9nh h\xE0nh vi c\u1EE7a "),Nn=h(Qe,"CODE",{});var Rh=l(Nn);Xo=o(Rh,"launch()"),Rh.forEach(e),Ko=o(Qe," th\xF4ng qua c\xE1c tham s\u1ED1 kh\xE1c nhau:"),Qe.forEach(e),xe=u(t),$=h(t,"UL",{});var Bt=l($);It=h(Bt,"LI",{});var Is=l(It);On=h(Is,"CODE",{});var zh=l(On);Yo=o(zh,"inline"),zh.forEach(e),Qo=o(Is," - c\xF3 hi\u1EC3n th\u1ECB giao di\u1EC7n n\u1ED9i tuy\u1EBFn tr\xEAn notebook Python hay kh\xF4ng."),Is.forEach(e),Wo=u(Bt),Gt=h(Bt,"LI",{});var Gs=l(Gt);In=h(Gs,"CODE",{});var Jh=l(In);Zo=o(Jh,"inbrowser"),Jh.forEach(e),ts=o(Gs," - c\xF3 t\u1EF1 \u0111\u1ED9ng kh\u1EDFi ch\u1EA1y giao di\u1EC7n trong tab m\u1EDBi tr\xEAn tr\xECnh duy\u1EC7t m\u1EB7c \u0111\u1ECBnh hay kh\xF4ng."),Gs.forEach(e),ns=u(Bt),Tt=h(Bt,"LI",{});var Ts=l(Tt);Gn=h(Ts,"CODE",{});var Xh=l(Gn);es=o(Xh,"share"),Xh.forEach(e),as=o(Ts," - c\xF3 t\u1EA1o m\u1ED9t li\xEAn k\u1EBFt c\xF3 th\u1EC3 chia s\u1EBB c\xF4ng khai t\u1EEB m\xE1y t\xEDnh c\u1EE7a b\u1EA1n cho giao di\u1EC7n hay kh\xF4ng. Gi\u1ED1ng nh\u01B0 m\u1ED9t li\xEAn k\u1EBFt Google Drive!"),Ts.forEach(e),Bt.forEach(e),$e=u(t),st=h(t,"P",{});var We=l(st);os=o(We,"Ch\xFAng t\xF4i s\u1EBD tr\xECnh b\xE0y chi ti\u1EBFt h\u01A1n v\u1EC1 tham s\u1ED1 "),Tn=h(We,"CODE",{});var Kh=l(Tn);ss=o(Kh,"share"),Kh.forEach(e),hs=o(We," trong ph\u1EA7n ti\u1EBFp theo!"),We.forEach(e),qe=u(t),F=h(t,"H2",{class:!0});var Ze=l(F);ht=h(Ze,"A",{id:!0,class:!0,href:!0});var Yh=l(ht);Sn=h(Yh,"SPAN",{});var Qh=l(Sn);P(bt.$$.fragment,Qh),Qh.forEach(e),Yh.forEach(e),ls=u(Ze),Hn=h(Ze,"SPAN",{});var Wh=l(Hn);rs=o(Wh,"\u270F\uFE0F H\xE3y \xE1p d\u1EE5ng n\xF3!"),Wh.forEach(e),Ze.forEach(e),Ce=u(t),lt=h(t,"P",{});var ta=l(lt);is=o(ta,"H\xE3y x\xE2y d\u1EF1ng m\u1ED9t giao di\u1EC7n cho ph\xE9p b\u1EA1n gi\u1EDBi thi\u1EC7u m\xF4 h\xECnh "),Ln=h(ta,"STRONG",{});var Zh=l(Ln);cs=o(Zh,"nh\u1EADn d\u1EA1ng gi\u1ECDng n\xF3i"),Zh.forEach(e),ps=o(ta,". \u0110\u1EC3 l\xE0m cho n\xF3 th\xFA v\u1ECB, ch\xFAng ta s\u1EBD ch\u1EA5p nh\u1EADn ho\u1EB7c \u0111\u1EA7u v\xE0o micr\xF4 ho\u1EB7c m\u1ED9t t\u1EC7p \u0111\xE3 t\u1EA3i l\xEAn."),ta.forEach(e),De=u(t),d=h(t,"P",{});var E=l(d);us=o(E,"Nh\u01B0 th\u01B0\u1EDDng l\u1EC7, ch\xFAng ta s\u1EBD t\u1EA3i m\xF4 h\xECnh nh\u1EADn d\u1EA1ng gi\u1ECDng n\xF3i c\u1EE7a m\xECnh b\u1EB1ng c\xE1ch s\u1EED d\u1EE5ng h\xE0m "),Mn=h(E,"CODE",{});var tl=l(Mn);ms=o(tl,"pipeline()"),tl.forEach(e),ds=o(E,` t\u1EEB \u{1F917} Transformers.
N\u1EBFu b\u1EA1n c\u1EA7n c\u1EADp nh\u1EADt nhanh, b\u1EA1n c\xF3 th\u1EC3 quay l\u1EA1i `),St=h(E,"A",{href:!0});var nl=l(St);fs=o(nl,"ph\u1EA7n \u0111\xF3 trong Ch\u01B0\u01A1ng 1"),nl.forEach(e),gs=o(E,". Ti\u1EBFp theo, ch\xFAng ta s\u1EBD tri\u1EC3n khai m\u1ED9t h\xE0m "),Bn=h(E,"CODE",{});var el=l(Bn);vs=o(el,"transcribe_audio()"),el.forEach(e),ys=o(E," \u0111\u1EC3 x\u1EED l\xFD \xE2m thanh v\xE0 tr\u1EA3 v\u1EC1 phi\xEAn \xE2m. Cu\u1ED1i c\xF9ng, ch\xFAng ta s\u1EBD g\xF3i h\xE0m n\xE0y trong m\u1ED9t "),Fn=h(E,"CODE",{});var al=l(Fn);bs=o(al,"Interface"),al.forEach(e),_s=o(E," v\u1EDBi c\xE1c th\xE0nh ph\u1EA7n "),Un=h(E,"CODE",{});var ol=l(Un);Es=o(ol,"Audio"),ol.forEach(e),ks=o(E," cho \u0111\u1EA7u v\xE0o v\xE0 ch\u1EC9 v\u0103n b\u1EA3n cho \u0111\u1EA7u ra. Nh\xECn chung, m\xE3 cho \u1EE9ng d\u1EE5ng n\xE0y nh\u01B0 sau:"),E.forEach(e),Ae=u(t),P(_t.$$.fragment,t),Pe=u(t),rt=h(t,"P",{});var na=l(rt);ws=o(na,"N\u1EBFu tr\xECnh duy\u1EC7t c\u1EE7a b\u1EA1n kh\xF4ng y\xEAu c\u1EA7u b\u1EA1n c\u1EA5p quy\u1EC1n \u0111\u1ED1i v\u1EDBi micr\xF4, h\xE3y "),Et=h(na,"A",{href:!0,target:!0});var sl=l(Et);js=o(sl,"m\u1EDF b\u1EA3n demo trong m\u1ED9t tab ri\xEAng"),sl.forEach(e),xs=o(na,"."),na.forEach(e),Ne=u(t),b=h(t,"IFRAME",{src:!0,frameborder:!0,height:!0,title:!0,class:!0,allow:!0,sandbox:!0}),l(b).forEach(e),Oe=u(t),q=h(t,"P",{});var Ft=l(q);$s=o(Ft,"N\xF3 \u0111\xF3! B\xE2y gi\u1EDD b\u1EA1n c\xF3 th\u1EC3 s\u1EED d\u1EE5ng giao di\u1EC7n n\xE0y \u0111\u1EC3 phi\xEAn \xE2m \xE2m thanh. Ch\xFA \xFD \u1EDF \u0111\xE2y r\u1EB1ng b\u1EB1ng c\xE1ch \u0111\u1EB7t tham s\u1ED1 "),Vn=h(Ft,"CODE",{});var hl=l(Vn);qs=o(hl,"option"),hl.forEach(e),Cs=o(Ft," l\xE0 "),Rn=h(Ft,"CODE",{});var ll=l(Rn);Ds=o(ll,"True"),ll.forEach(e),As=o(Ft,", ch\xFAng ta cho ph\xE9p ng\u01B0\u1EDDi d\xF9ng cung c\u1EA5p micr\xF4 ho\u1EB7c t\u1EC7p \xE2m thanh (ho\u1EB7c kh\xF4ng, nh\u01B0ng \u0111i\u1EC1u \u0111\xF3 s\u1EBD tr\u1EA3 l\u1EA1i th\xF4ng b\xE1o l\u1ED7i)."),Ft.forEach(e),Ie=u(t),Ht=h(t,"P",{});var rl=l(Ht);Ps=o(rl,"Ti\u1EBFp t\u1EE5c xem c\xE1ch chia s\u1EBB giao di\u1EC7n c\u1EE7a b\u1EA1n v\u1EDBi nh\u1EEFng ng\u01B0\u1EDDi kh\xE1c!"),rl.forEach(e),this.h()},h(){c(T,"name","hf:doc:metadata"),c(T,"content",JSON.stringify(vl)),c(U,"id","hiu-lp-interface"),c(U,"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"),c(U,"href","#hiu-lp-interface"),c(S,"class","relative group"),c(R,"id","cch-to-mt-interface"),c(R,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(R,"href","#cch-to-mt-interface"),c(H,"class","relative group"),c(ut,"href","https://gradio.app/docs"),c(ut,"rel","nofollow"),c(qt,"href","/course/chapter9/2"),c(K,"id","mt-v-d-n-gin-vi-m-thanh"),c(K,"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"),c(K,"href","#mt-v-d-n-gin-vi-m-thanh"),c(L,"class","relative group"),c(ft,"href","https://huggingface.co/spaces/course-demos/audio-reverse"),c(ft,"target","_blank"),Ss(v.src,Ms="https://course-demos-audio-reverse.hf.space")||c(v,"src",Ms),c(v,"frameborder","0"),c(v,"height","250"),c(v,"title","Gradio app"),c(v,"class","container p-0 flex-grow space-iframe"),c(v,"allow","accelerometer; ambient-light-sensor; autoplay; battery; camera; document-domain; encrypted-media; fullscreen; geolocation; gyroscope; layout-animations; legacy-image-formats; magnetometer; microphone; midi; oversized-images; payment; picture-in-picture; publickey-credentials-get; sync-xhr; usb; vr ; wake-lock; xr-spatial-tracking"),c(v,"sandbox","allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-downloads"),c(W,"id","x-l-nhiu-u-vo-v-u-ra"),c(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"),c(W,"href","#x-l-nhiu-u-vo-v-u-ra"),c(M,"class","relative group"),Ss(y.src,Bs="https://course-demos-generate-tone.hf.space")||c(y,"src",Bs),c(y,"frameborder","0"),c(y,"height","450"),c(y,"title","Gradio app"),c(y,"class","container p-0 flex-grow space-iframe"),c(y,"allow","accelerometer; ambient-light-sensor; autoplay; battery; camera; document-domain; encrypted-media; fullscreen; geolocation; gyroscope; layout-animations; legacy-image-formats; magnetometer; microphone; midi; oversized-images; payment; picture-in-picture; publickey-credentials-get; sync-xhr; usb; vr ; wake-lock; xr-spatial-tracking"),c(y,"sandbox","allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-downloads"),c(nt,"id","phng-thc-launch"),c(nt,"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"),c(nt,"href","#phng-thc-launch"),c(B,"class","relative group"),c(ht,"id","hy-p-dng-n"),c(ht,"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"),c(ht,"href","#hy-p-dng-n"),c(F,"class","relative group"),c(St,"href","/course/chapter1/3"),c(Et,"href","https://huggingface.co/spaces/course-demos/audio-reverse"),c(Et,"target","_blank"),Ss(b.src,Fs="https://course-demos-asr.hf.space")||c(b,"src",Fs),c(b,"frameborder","0"),c(b,"height","550"),c(b,"title","Gradio app"),c(b,"class","container p-0 flex-grow space-iframe"),c(b,"allow","accelerometer; ambient-light-sensor; autoplay; battery; camera; document-domain; encrypted-media; fullscreen; geolocation; gyroscope; layout-animations; legacy-image-formats; magnetometer; microphone; midi; oversized-images; payment; picture-in-picture; publickey-credentials-get; sync-xhr; usb; vr ; wake-lock; xr-spatial-tracking"),c(b,"sandbox","allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-downloads")},m(t,r){n(document.head,T),i(t,zn,r),i(t,S,r),n(S,U),n(U,Vt),N(it,Vt,null),n(S,ea),n(S,Rt),n(Rt,aa),i(t,Jn,r),N(ct,t,r),i(t,Xn,r),i(t,V,r),n(V,oa),n(V,zt),n(zt,sa),n(V,ha),i(t,Kn,r),i(t,H,r),n(H,R),n(R,Jt),N(pt,Jt,null),n(H,la),n(H,Xt),n(Xt,ra),i(t,Yn,r),i(t,z,r),n(z,ia),n(z,Kt),n(Kt,ca),n(z,pa),i(t,Qn,r),i(t,jt,r),n(jt,Yt),n(Yt,ua),i(t,Wn,r),i(t,xt,r),n(xt,ma),i(t,Zn,r),i(t,k,r),n(k,$t),n($t,Qt),n(Qt,da),n($t,fa),n(k,ga),n(k,w),n(w,Wt),n(Wt,va),n(w,ya),n(w,Zt),n(Zt,ba),n(w,_a),n(w,tn),n(tn,Ea),n(w,ka),n(k,wa),n(k,j),n(j,nn),n(nn,ja),n(j,xa),n(j,en),n(en,$a),n(j,qa),n(j,an),n(an,Ca),n(j,Da),i(t,te,r),i(t,J,r),n(J,Aa),n(J,ut),n(ut,Pa),n(J,Na),i(t,ne,r),i(t,f,r),n(f,Oa),n(f,qt),n(qt,Ia),n(f,Ga),n(f,on),n(on,Ta),n(f,Sa),n(f,sn),n(sn,Ha),n(f,La),n(f,hn),n(hn,Ma),n(f,Ba),i(t,ee,r),i(t,X,r),n(X,Fa),n(X,ln),n(ln,Ua),n(X,Va),i(t,ae,r),i(t,L,r),n(L,K),n(K,rn),N(mt,rn,null),n(L,Ra),n(L,cn),n(cn,za),i(t,oe,r),i(t,Y,r),n(Y,Ja),n(Y,pn),n(pn,Xa),n(Y,Ka),i(t,se,r),i(t,Ct,r),n(Ct,Ya),i(t,he,r),i(t,m,r),n(m,Qa),n(m,un),n(un,Wa),n(m,Za),n(m,mn),n(mn,to),n(m,no),n(m,dn),n(dn,eo),n(m,ao),n(m,fn),n(fn,oo),n(m,so),n(m,gn),n(gn,ho),n(m,lo),i(t,le,r),i(t,g,r),n(g,ro),n(g,vn),n(vn,io),n(g,co),n(g,yn),n(yn,po),n(g,uo),n(g,bn),n(bn,mo),n(g,fo),n(g,_n),n(_n,go),n(g,vo),i(t,re,r),i(t,x,r),n(x,yo),n(x,En),n(En,bo),n(x,_o),n(x,kn),n(kn,Eo),n(x,ko),i(t,ie,r),N(dt,t,r),i(t,ce,r),i(t,Q,r),n(Q,wo),n(Q,ft),n(ft,jo),n(Q,xo),i(t,pe,r),i(t,v,r),i(t,ue,r),i(t,Dt,r),n(Dt,$o),i(t,me,r),i(t,M,r),n(M,W),n(W,wn),N(gt,wn,null),n(M,qo),n(M,jn),n(jn,Co),i(t,de,r),i(t,At,r),n(At,Do),i(t,fe,r),i(t,Pt,r),n(Pt,Ao),i(t,ge,r),i(t,Nt,r),n(Nt,Po),i(t,ve,r),i(t,Z,r),n(Z,xn),n(xn,No),n(Z,Oo),n(Z,$n),n($n,Io),i(t,ye,r),i(t,tt,r),n(tt,Go),n(tt,qn),n(qn,To),n(tt,So),i(t,be,r),N(vt,t,r),i(t,_e,r),i(t,y,r),i(t,Ee,r),i(t,B,r),n(B,nt),n(nt,Cn),N(yt,Cn,null),n(B,Ho),n(B,Ot),n(Ot,Lo),n(Ot,Dn),n(Dn,Mo),i(t,ke,r),i(t,et,r),n(et,Bo),n(et,An),n(An,Fo),n(et,Uo),i(t,we,r),i(t,at,r),n(at,Vo),n(at,Pn),n(Pn,Ro),n(at,zo),i(t,je,r),i(t,ot,r),n(ot,Jo),n(ot,Nn),n(Nn,Xo),n(ot,Ko),i(t,xe,r),i(t,$,r),n($,It),n(It,On),n(On,Yo),n(It,Qo),n($,Wo),n($,Gt),n(Gt,In),n(In,Zo),n(Gt,ts),n($,ns),n($,Tt),n(Tt,Gn),n(Gn,es),n(Tt,as),i(t,$e,r),i(t,st,r),n(st,os),n(st,Tn),n(Tn,ss),n(st,hs),i(t,qe,r),i(t,F,r),n(F,ht),n(ht,Sn),N(bt,Sn,null),n(F,ls),n(F,Hn),n(Hn,rs),i(t,Ce,r),i(t,lt,r),n(lt,is),n(lt,Ln),n(Ln,cs),n(lt,ps),i(t,De,r),i(t,d,r),n(d,us),n(d,Mn),n(Mn,ms),n(d,ds),n(d,St),n(St,fs),n(d,gs),n(d,Bn),n(Bn,vs),n(d,ys),n(d,Fn),n(Fn,bs),n(d,_s),n(d,Un),n(Un,Es),n(d,ks),i(t,Ae,r),N(_t,t,r),i(t,Pe,r),i(t,rt,r),n(rt,ws),n(rt,Et),n(Et,js),n(rt,xs),i(t,Ne,r),i(t,b,r),i(t,Oe,r),i(t,q,r),n(q,$s),n(q,Vn),n(Vn,qs),n(q,Cs),n(q,Rn),n(Rn,Ds),n(q,As),i(t,Ie,r),i(t,Ht,r),n(Ht,Ps),Ge=!0},p:ml,i(t){Ge||(O(it.$$.fragment,t),O(ct.$$.fragment,t),O(pt.$$.fragment,t),O(mt.$$.fragment,t),O(dt.$$.fragment,t),O(gt.$$.fragment,t),O(vt.$$.fragment,t),O(yt.$$.fragment,t),O(bt.$$.fragment,t),O(_t.$$.fragment,t),Ge=!0)},o(t){I(it.$$.fragment,t),I(ct.$$.fragment,t),I(pt.$$.fragment,t),I(mt.$$.fragment,t),I(dt.$$.fragment,t),I(gt.$$.fragment,t),I(vt.$$.fragment,t),I(yt.$$.fragment,t),I(bt.$$.fragment,t),I(_t.$$.fragment,t),Ge=!1},d(t){e(T),t&&e(zn),t&&e(S),G(it),t&&e(Jn),G(ct,t),t&&e(Xn),t&&e(V),t&&e(Kn),t&&e(H),G(pt),t&&e(Yn),t&&e(z),t&&e(Qn),t&&e(jt),t&&e(Wn),t&&e(xt),t&&e(Zn),t&&e(k),t&&e(te),t&&e(J),t&&e(ne),t&&e(f),t&&e(ee),t&&e(X),t&&e(ae),t&&e(L),G(mt),t&&e(oe),t&&e(Y),t&&e(se),t&&e(Ct),t&&e(he),t&&e(m),t&&e(le),t&&e(g),t&&e(re),t&&e(x),t&&e(ie),G(dt,t),t&&e(ce),t&&e(Q),t&&e(pe),t&&e(v),t&&e(ue),t&&e(Dt),t&&e(me),t&&e(M),G(gt),t&&e(de),t&&e(At),t&&e(fe),t&&e(Pt),t&&e(ge),t&&e(Nt),t&&e(ve),t&&e(Z),t&&e(ye),t&&e(tt),t&&e(be),G(vt,t),t&&e(_e),t&&e(y),t&&e(Ee),t&&e(B),G(yt),t&&e(ke),t&&e(et),t&&e(we),t&&e(at),t&&e(je),t&&e(ot),t&&e(xe),t&&e($),t&&e($e),t&&e(st),t&&e(qe),t&&e(F),G(bt),t&&e(Ce),t&&e(lt),t&&e(De),t&&e(d),t&&e(Ae),G(_t,t),t&&e(Pe),t&&e(rt),t&&e(Ne),t&&e(b),t&&e(Oe),t&&e(q),t&&e(Ie),t&&e(Ht)}}}const vl={local:"hiu-lp-interface",sections:[{local:"cch-to-mt-interface",title:"C\xE1ch t\u1EA1o m\u1ED9t Interface"},{local:"mt-v-d-n-gin-vi-m-thanh",title:"M\u1ED9t v\xED d\u1EE5 \u0111\u01A1n gi\u1EA3n v\u1EDBi \xE2m thanh"},{local:"x-l-nhiu-u-vo-v-u-ra",sections:[{local:"phng-thc-launch",title:"Ph\u01B0\u01A1ng th\u1EE9c `launch()`"}],title:"X\u1EED l\xFD nhi\u1EC1u \u0111\u1EA7u v\xE0o v\xE0 \u0111\u1EA7u ra"},{local:"hy-p-dng-n",title:"\u270F\uFE0F H\xE3y \xE1p d\u1EE5ng n\xF3!"}],title:"Hi\u1EC3u l\u1EDBp Interface"};function yl(Ls){return dl(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class wl extends il{constructor(T){super();cl(this,T,yl,gl,pl,{})}}export{wl as default,vl as metadata};
