import{s as X,n as Y,o as Z}from"../chunks/scheduler.cd324960.js";import{S as ee,i as te,e as s,s as i,c as z,h as ne,a as r,d as n,b as o,f as J,g as F,j as w,k as K,l as ae,m as a,n as I,t as q,o as j,p as G}from"../chunks/index.d5c3adcc.js";import{C as ie,H as Q,E as oe}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.7d44181b.js";function le(N){let l,b,y,T,u,_,p,C,m,O=`In the previous unit, you learned how to use Transformers to convert spoken speech into text. Now let’s flip the
script and see how you can transform a given input text into an audio output that sounds like human speech.`,k,h,R=`The task we will study in this unit is called “Text-to-speech” (TTS). Models capable of converting text into audible
human speech have a wide range of potential applications:`,P,c,V="<li>Assistive apps: think about tools that can leverage these models to enable visually-impaired people to access digital content through the medium of sound.</li> <li>Audiobook narration: converting written books into audio form makes literature more accessible to individuals who prefer to listen or have difficulty with reading.</li> <li>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.</li> <li>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.</li>",S,d,W=`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’s 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.`,L,f,M,v,D="In this unit we will talk about:",E,g,B='<li><a href="tts_datasets">Datasets suitable for text-to-speech training</a></li> <li><a href="pre-trained_models">Pre-trained models for text-to-speech</a></li> <li><a href="fine-tuning">Fine-tuning SpeechT5 on a new language</a></li> <li><a href="evaluation">Evaluating TTS models</a></li>',A,x,H,$,U;return u=new ie({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),p=new Q({props:{title:"Unit 6. From text to speech",local:"unit-6-from-text-to-speech",headingTag:"h1"}}),f=new Q({props:{title:"What you’ll learn and what you’ll build",local:"what-youll-learn-and-what-youll-build",headingTag:"h2"}}),x=new oe({props:{source:"https://github.com/huggingface/audio-transformers-course/blob/main/chapters/en/chapter6/introduction.mdx"}}),{c(){l=s("meta"),b=i(),y=s("p"),T=i(),z(u.$$.fragment),_=i(),z(p.$$.fragment),C=i(),m=s("p"),m.textContent=O,k=i(),h=s("p"),h.textContent=R,P=i(),c=s("ul"),c.innerHTML=V,S=i(),d=s("p"),d.textContent=W,L=i(),z(f.$$.fragment),M=i(),v=s("p"),v.textContent=D,E=i(),g=s("ul"),g.innerHTML=B,A=i(),z(x.$$.fragment),H=i(),$=s("p"),this.h()},l(e){const t=ne("svelte-u9bgzb",document.head);l=r(t,"META",{name:!0,content:!0}),t.forEach(n),b=o(e),y=r(e,"P",{}),J(y).forEach(n),T=o(e),F(u.$$.fragment,e),_=o(e),F(p.$$.fragment,e),C=o(e),m=r(e,"P",{"data-svelte-h":!0}),w(m)!=="svelte-ivblhn"&&(m.textContent=O),k=o(e),h=r(e,"P",{"data-svelte-h":!0}),w(h)!=="svelte-7nvptx"&&(h.textContent=R),P=o(e),c=r(e,"UL",{"data-svelte-h":!0}),w(c)!=="svelte-xwfueb"&&(c.innerHTML=V),S=o(e),d=r(e,"P",{"data-svelte-h":!0}),w(d)!=="svelte-5lykth"&&(d.textContent=W),L=o(e),F(f.$$.fragment,e),M=o(e),v=r(e,"P",{"data-svelte-h":!0}),w(v)!=="svelte-1bx1oe2"&&(v.textContent=D),E=o(e),g=r(e,"UL",{"data-svelte-h":!0}),w(g)!=="svelte-14n9psg"&&(g.innerHTML=B),A=o(e),F(x.$$.fragment,e),H=o(e),$=r(e,"P",{}),J($).forEach(n),this.h()},h(){K(l,"name","hf:doc:metadata"),K(l,"content",se)},m(e,t){ae(document.head,l),a(e,b,t),a(e,y,t),a(e,T,t),I(u,e,t),a(e,_,t),I(p,e,t),a(e,C,t),a(e,m,t),a(e,k,t),a(e,h,t),a(e,P,t),a(e,c,t),a(e,S,t),a(e,d,t),a(e,L,t),I(f,e,t),a(e,M,t),a(e,v,t),a(e,E,t),a(e,g,t),a(e,A,t),I(x,e,t),a(e,H,t),a(e,$,t),U=!0},p:Y,i(e){U||(q(u.$$.fragment,e),q(p.$$.fragment,e),q(f.$$.fragment,e),q(x.$$.fragment,e),U=!0)},o(e){j(u.$$.fragment,e),j(p.$$.fragment,e),j(f.$$.fragment,e),j(x.$$.fragment,e),U=!1},d(e){e&&(n(b),n(y),n(T),n(_),n(C),n(m),n(k),n(h),n(P),n(c),n(S),n(d),n(L),n(M),n(v),n(E),n(g),n(A),n(H),n($)),n(l),G(u,e),G(p,e),G(f,e),G(x,e)}}}const se='{"title":"Unit 6. From text to speech","local":"unit-6-from-text-to-speech","sections":[{"title":"What you’ll learn and what you’ll build","local":"what-youll-learn-and-what-youll-build","sections":[],"depth":2}],"depth":1}';function re(N){return Z(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class he extends ee{constructor(l){super(),te(this,l,re,le,X,{})}}export{he as component};
