import{S as Ze,i as et,s as tt,e as o,k as l,w as De,t as h,M as at,c as n,d as t,m as r,a as i,x as Be,h as c,b as p,G as a,g as u,y as Je,L as ot,q as Ke,o as Qe,B as Xe,v as nt}from"../../chunks/vendor-hf-doc-builder.js";import{I as Ye}from"../../chunks/IconCopyLink-hf-doc-builder.js";function it(Te){let m,W,v,y,N,x,te,q,ae,j,k,oe,D,E,ne,B,d,F,ie,se,U,le,re,M,ue,he,z,ce,J,S,pe,K,w,g,C,T,de,H,fe,Q,A,me,X,f,V,I,ve,we,G,$,ye,ge,O,P,_e,be,R,L,xe,Y;return x=new Ye({}),T=new Ye({}),{c(){m=o("meta"),W=l(),v=o("h1"),y=o("a"),N=o("span"),De(x.$$.fragment),te=l(),q=o("span"),ae=h("Unit 6. From text to speech"),j=l(),k=o("p"),oe=h(`In the previous unit, you learned how to use Transformers to convert spoken speech into text. Now let\u2019s flip the
script and see how you can transform a given input text into an audio output that sounds like human speech.`),D=l(),E=o("p"),ne=h(`The task we will study in this unit is called \u201CText-to-speech\u201D (TTS). Models capable of converting text into audible
human speech have a wide range of potential applications:`),B=l(),d=o("ul"),F=o("li"),ie=h("Assistive apps: think about tools that can leverage these models to enable visually-impaired people to access digital content through the medium of sound."),se=l(),U=o("li"),le=h("Audiobook narration: converting written books into audio form makes literature more accessible to individuals who prefer to listen or have difficulty with reading."),re=l(),M=o("li"),ue=h("Virtual assistants: TTS models are a fundamental component of virtual assistants like Siri, Google Assistant, or Amazon Alexa. Once they have used a classification model to catch the wake word, and used ASR model to process your request, they can use a TTS model to respond to your inquiry."),he=l(),z=o("li"),ce=h("Entertainment, gaming and language learning: give voice to your NPC characters, narrate game events, or help language learners with examples of correct pronunciation and intonation of words and phrases."),J=l(),S=o("p"),pe=h(`These are just a few examples, and I am sure you can imagine many more! However, with so much power comes the responsibility,
and it is important to highlight that TTS models have the potential to be used for malicious purposes.
For example, with sufficient voice samples, malicious actors could potentially create convincing fake audio recordings, leading to
the unauthorized use of someone\u2019s voice for fraudulent purposes or manipulation. If you plan to collect data for fine-tuning
your own systems, carefully consider privacy and informed consent. Voice data should be obtained with explicit consent
from individuals, ensuring they understand the purpose, scope, and potential risks associated with their voice being used
in a TTS system. Please use text-to-speech responsibly.`),K=l(),w=o("h2"),g=o("a"),C=o("span"),De(T.$$.fragment),de=l(),H=o("span"),fe=h("What you'll learn and what you'll build"),Q=l(),A=o("p"),me=h("In this unit we will talk about:"),X=l(),f=o("ul"),V=o("li"),I=o("a"),ve=h("Datasets suitable for text-to-speech training"),we=l(),G=o("li"),$=o("a"),ye=h("Pre-trained models for text-to-speech"),ge=l(),O=o("li"),P=o("a"),_e=h("Fine-tuning SpeechT5 on a new language"),be=l(),R=o("li"),L=o("a"),xe=h("Evaluating TTS models"),this.h()},l(e){const s=at('[data-svelte="svelte-1phssyn"]',document.head);m=n(s,"META",{name:!0,content:!0}),s.forEach(t),W=r(e),v=n(e,"H1",{class:!0});var Z=i(v);y=n(Z,"A",{id:!0,class:!0,href:!0});var ke=i(y);N=n(ke,"SPAN",{});var Ee=i(N);Be(x.$$.fragment,Ee),Ee.forEach(t),ke.forEach(t),te=r(Z),q=n(Z,"SPAN",{});var Se=i(q);ae=c(Se,"Unit 6. From text to speech"),Se.forEach(t),Z.forEach(t),j=r(e),k=n(e,"P",{});var Ae=i(k);oe=c(Ae,`In the previous unit, you learned how to use Transformers to convert spoken speech into text. Now let\u2019s flip the
script and see how you can transform a given input text into an audio output that sounds like human speech.`),Ae.forEach(t),D=r(e),E=n(e,"P",{});var Ie=i(E);ne=c(Ie,`The task we will study in this unit is called \u201CText-to-speech\u201D (TTS). Models capable of converting text into audible
human speech have a wide range of potential applications:`),Ie.forEach(t),B=r(e),d=n(e,"UL",{});var _=i(d);F=n(_,"LI",{});var $e=i(F);ie=c($e,"Assistive apps: think about tools that can leverage these models to enable visually-impaired people to access digital content through the medium of sound."),$e.forEach(t),se=r(_),U=n(_,"LI",{});var Pe=i(U);le=c(Pe,"Audiobook narration: converting written books into audio form makes literature more accessible to individuals who prefer to listen or have difficulty with reading."),Pe.forEach(t),re=r(_),M=n(_,"LI",{});var Le=i(M);ue=c(Le,"Virtual assistants: TTS models are a fundamental component of virtual assistants like Siri, Google Assistant, or Amazon Alexa. Once they have used a classification model to catch the wake word, and used ASR model to process your request, they can use a TTS model to respond to your inquiry."),Le.forEach(t),he=r(_),z=n(_,"LI",{});var Ne=i(z);ce=c(Ne,"Entertainment, gaming and language learning: give voice to your NPC characters, narrate game events, or help language learners with examples of correct pronunciation and intonation of words and phrases."),Ne.forEach(t),_.forEach(t),J=r(e),S=n(e,"P",{});var qe=i(S);pe=c(qe,`These are just a few examples, and I am sure you can imagine many more! However, with so much power comes the responsibility,
and it is important to highlight that TTS models have the potential to be used for malicious purposes.
For example, with sufficient voice samples, malicious actors could potentially create convincing fake audio recordings, leading to
the unauthorized use of someone\u2019s voice for fraudulent purposes or manipulation. If you plan to collect data for fine-tuning
your own systems, carefully consider privacy and informed consent. Voice data should be obtained with explicit consent
from individuals, ensuring they understand the purpose, scope, and potential risks associated with their voice being used
in a TTS system. Please use text-to-speech responsibly.`),qe.forEach(t),K=r(e),w=n(e,"H2",{class:!0});var ee=i(w);g=n(ee,"A",{id:!0,class:!0,href:!0});var Fe=i(g);C=n(Fe,"SPAN",{});var Ue=i(C);Be(T.$$.fragment,Ue),Ue.forEach(t),Fe.forEach(t),de=r(ee),H=n(ee,"SPAN",{});var Me=i(H);fe=c(Me,"What you'll learn and what you'll build"),Me.forEach(t),ee.forEach(t),Q=r(e),A=n(e,"P",{});var ze=i(A);me=c(ze,"In this unit we will talk about:"),ze.forEach(t),X=r(e),f=n(e,"UL",{});var b=i(f);V=n(b,"LI",{});var Ce=i(V);I=n(Ce,"A",{href:!0});var He=i(I);ve=c(He,"Datasets suitable for text-to-speech training"),He.forEach(t),Ce.forEach(t),we=r(b),G=n(b,"LI",{});var Ve=i(G);$=n(Ve,"A",{href:!0});var Ge=i($);ye=c(Ge,"Pre-trained models for text-to-speech"),Ge.forEach(t),Ve.forEach(t),ge=r(b),O=n(b,"LI",{});var Oe=i(O);P=n(Oe,"A",{href:!0});var Re=i(P);_e=c(Re,"Fine-tuning SpeechT5 on a new language"),Re.forEach(t),Oe.forEach(t),be=r(b),R=n(b,"LI",{});var We=i(R);L=n(We,"A",{href:!0});var je=i(L);xe=c(je,"Evaluating TTS models"),je.forEach(t),We.forEach(t),b.forEach(t),this.h()},h(){p(m,"name","hf:doc:metadata"),p(m,"content",JSON.stringify(st)),p(y,"id","unit-6-from-text-to-speech"),p(y,"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(y,"href","#unit-6-from-text-to-speech"),p(v,"class","relative group"),p(g,"id","what-youll-learn-and-what-youll-build"),p(g,"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(g,"href","#what-youll-learn-and-what-youll-build"),p(w,"class","relative group"),p(I,"href","tts_datasets"),p($,"href","pre-trained_models"),p(P,"href","fine-tuning"),p(L,"href","evaluation")},m(e,s){a(document.head,m),u(e,W,s),u(e,v,s),a(v,y),a(y,N),Je(x,N,null),a(v,te),a(v,q),a(q,ae),u(e,j,s),u(e,k,s),a(k,oe),u(e,D,s),u(e,E,s),a(E,ne),u(e,B,s),u(e,d,s),a(d,F),a(F,ie),a(d,se),a(d,U),a(U,le),a(d,re),a(d,M),a(M,ue),a(d,he),a(d,z),a(z,ce),u(e,J,s),u(e,S,s),a(S,pe),u(e,K,s),u(e,w,s),a(w,g),a(g,C),Je(T,C,null),a(w,de),a(w,H),a(H,fe),u(e,Q,s),u(e,A,s),a(A,me),u(e,X,s),u(e,f,s),a(f,V),a(V,I),a(I,ve),a(f,we),a(f,G),a(G,$),a($,ye),a(f,ge),a(f,O),a(O,P),a(P,_e),a(f,be),a(f,R),a(R,L),a(L,xe),Y=!0},p:ot,i(e){Y||(Ke(x.$$.fragment,e),Ke(T.$$.fragment,e),Y=!0)},o(e){Qe(x.$$.fragment,e),Qe(T.$$.fragment,e),Y=!1},d(e){t(m),e&&t(W),e&&t(v),Xe(x),e&&t(j),e&&t(k),e&&t(D),e&&t(E),e&&t(B),e&&t(d),e&&t(J),e&&t(S),e&&t(K),e&&t(w),Xe(T),e&&t(Q),e&&t(A),e&&t(X),e&&t(f)}}}const st={local:"unit-6-from-text-to-speech",sections:[{local:"what-youll-learn-and-what-youll-build",title:"What you'll learn and what you'll build"}],title:"Unit 6. From text to speech "};function lt(Te){return nt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ht extends Ze{constructor(m){super();et(this,m,lt,it,tt,{})}}export{ht as default,st as metadata};
