import{s as K,n as Q,o as X}from"../chunks/scheduler.f7e1785c.js";import{S as Y,i as Z,g as l,s as i,r as M,A as ee,h as r,f as n,c as o,j as D,u as U,x as w,k as B,y as te,a,v as F,d as I,t as q,w as z}from"../chunks/index.9f8f0838.js";import{H as J,E as ne}from"../chunks/EditOnGithub.5a9bb8c5.js";function ae(j){let s,b,x,$,u,T,p,G=`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.`,_,m,N=`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:`,C,h,O="<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>",k,c,R=`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.`,P,d,S,f,V="In this unit we will talk about:",A,v,W='<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>',E,g,H,y,L;return u=new J({props:{title:"Unit 6. From text to speech",local:"unit-6-from-text-to-speech",headingTag:"h1"}}),d=new J({props:{title:"What you’ll learn and what you’ll build",local:"what-youll-learn-and-what-youll-build",headingTag:"h2"}}),g=new ne({props:{source:"https://github.com/huggingface/audio-transformers-course/blob/main/chapters/en/chapter6/introduction.mdx"}}),{c(){s=l("meta"),b=i(),x=l("p"),$=i(),M(u.$$.fragment),T=i(),p=l("p"),p.textContent=G,_=i(),m=l("p"),m.textContent=N,C=i(),h=l("ul"),h.innerHTML=O,k=i(),c=l("p"),c.textContent=R,P=i(),M(d.$$.fragment),S=i(),f=l("p"),f.textContent=V,A=i(),v=l("ul"),v.innerHTML=W,E=i(),M(g.$$.fragment),H=i(),y=l("p"),this.h()},l(e){const t=ee("svelte-u9bgzb",document.head);s=r(t,"META",{name:!0,content:!0}),t.forEach(n),b=o(e),x=r(e,"P",{}),D(x).forEach(n),$=o(e),U(u.$$.fragment,e),T=o(e),p=r(e,"P",{"data-svelte-h":!0}),w(p)!=="svelte-ivblhn"&&(p.textContent=G),_=o(e),m=r(e,"P",{"data-svelte-h":!0}),w(m)!=="svelte-7nvptx"&&(m.textContent=N),C=o(e),h=r(e,"UL",{"data-svelte-h":!0}),w(h)!=="svelte-xwfueb"&&(h.innerHTML=O),k=o(e),c=r(e,"P",{"data-svelte-h":!0}),w(c)!=="svelte-5lykth"&&(c.textContent=R),P=o(e),U(d.$$.fragment,e),S=o(e),f=r(e,"P",{"data-svelte-h":!0}),w(f)!=="svelte-1bx1oe2"&&(f.textContent=V),A=o(e),v=r(e,"UL",{"data-svelte-h":!0}),w(v)!=="svelte-14n9psg"&&(v.innerHTML=W),E=o(e),U(g.$$.fragment,e),H=o(e),y=r(e,"P",{}),D(y).forEach(n),this.h()},h(){B(s,"name","hf:doc:metadata"),B(s,"content",ie)},m(e,t){te(document.head,s),a(e,b,t),a(e,x,t),a(e,$,t),F(u,e,t),a(e,T,t),a(e,p,t),a(e,_,t),a(e,m,t),a(e,C,t),a(e,h,t),a(e,k,t),a(e,c,t),a(e,P,t),F(d,e,t),a(e,S,t),a(e,f,t),a(e,A,t),a(e,v,t),a(e,E,t),F(g,e,t),a(e,H,t),a(e,y,t),L=!0},p:Q,i(e){L||(I(u.$$.fragment,e),I(d.$$.fragment,e),I(g.$$.fragment,e),L=!0)},o(e){q(u.$$.fragment,e),q(d.$$.fragment,e),q(g.$$.fragment,e),L=!1},d(e){e&&(n(b),n(x),n($),n(T),n(p),n(_),n(m),n(C),n(h),n(k),n(c),n(P),n(S),n(f),n(A),n(v),n(E),n(H),n(y)),n(s),z(u,e),z(d,e),z(g,e)}}}const ie='{"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 oe(j){return X(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ue extends Y{constructor(s){super(),Z(this,s,oe,ae,K,{})}}export{ue as component};
