import{s as $e,n as we,o as ke}from"../chunks/scheduler.f7e1785c.js";import{S as Se,i as Le,g as l,s as a,r as H,A as Ce,h as o,f as i,c as s,j as xe,u as M,x as r,k as ye,y as _e,a as n,v as P,d as E,t as q,w as R}from"../chunks/index.9f8f0838.js";import{H as V,E as He}from"../chunks/getInferenceSnippets.ba5f4cd0.js";function Me(le){let c,z,j,I,u,G,h,oe="Text-to-speech task (also called <em>speech synthesis</em>) comes with a range of challenges.",U,p,re=`First, just like in the previously discussed automatic speech recognition, the alignment between text and speech can be tricky.<br/>
However, unlike ASR, TTS is a <strong>one-to-many</strong> mapping problem, i.e. the same text can be synthesised in many different ways. Think about the diversity of voices and speaking styles in the speech you hear on a daily basis - each person has a different way of speaking the same sentence, but they are all valid and correct! Even different outputs (spectrograms or audio waveforms) can correspond to the same ground truth. The model has to learn to generate the correct duration and timing for each phoneme, word, or sentence which can be challenging,
especially for long and complex sentences.`,J,d,ce=`Next, there’s the long-distance dependency problem: language has a temporal aspect, and understanding the meaning of a
sentence often requires considering the context of surrounding words. Ensuring that the TTS model captures and retains
contextual information over long sequences is crucial for generating coherent and natural-sounding speech.`,K,f,ue=`Finally, training TTS models typically requires pairs of text and corresponding speech recordings. On top of that, to ensure
the model can generate speech that sounds natural for various speakers and speaking styles, data should contain diverse and
representative speech samples from multiple speakers. Collecting such data is expensive, time-consuming and for some languages
is not feasible. You may think, why not just take a dataset designed for ASR (automatic speech recognition) and use it for
training a TTS model? Unfortunately, automated speech recognition (ASR) datasets are not the best option. The features that
make it beneficial for ASR, such as excessive background noise, are typically undesirable in TTS. It’s great to be able to
pick out speach from a noisy street recording, but not so much if your voice assistant replies to you with cars honking
and construction going full-swing in the background. Still, some ASR datasets can sometimes be useful for fine-tuning,
as finding top-quality, multilingual, and multi-speaker TTS datasets can be quite challenging.`,F,g,he="Let’s explore a few datasets suitable for TTS that you can find on the 🤗 Hub.",B,m,O,T,pe=`<a href="https://huggingface.co/datasets/lj_speech" rel="nofollow">LJSpeech</a> is a dataset that consists of 13,100 English-language audio clips
paired with their corresponding transcriptions. The dataset contains recording of a single speaker reading sentences
from 7 non-fiction books in English. LJSpeech is often used as a benchmark for evaluating TTS models
due to its high audio quality and diverse linguistic content.`,D,b,N,v,de=`<a href="https://huggingface.co/datasets/facebook/multilingual_librispeech" rel="nofollow">Multilingual LibriSpeech</a> is a multilingual extension
of the LibriSpeech dataset, which is a large-scale collection of read English-language audiobooks. Multilingual LibriSpeech
expands on this by including additional languages, such as German, Dutch, Spanish, French, Italian, Portuguese, and Polish.
It offers audio recordings along with aligned transcriptions for each language. The dataset provides a valuable resource
for developing multilingual TTS systems and exploring cross-lingual speech synthesis techniques.`,Y,x,Z,y,fe=`<a href="https://huggingface.co/datasets/vctk" rel="nofollow">VCTK</a> is a dataset specifically designed for text-to-speech research and development.
It contains audio recordings of 110 English speakers with various accents. Each speaker reads out about 400 sentences,
which were selected from a newspaper, the rainbow passage and an elicitation paragraph used for the speech accent archive.
VCTK offers a valuable resource for training TTS models with varied voices and accents, enabling more natural and diverse
speech synthesis.`,Q,$,W,w,ge=`<a href="https://huggingface.co/datasets/cdminix/libritts-r-aligned" rel="nofollow">Libri-TTS/ LibriTTS-R</a> is a multi-speaker English corpus of
approximately 585 hours of read English speech at 24kHz sampling rate, prepared by Heiga Zen with the assistance of Google
Speech and Google Brain team members. The LibriTTS corpus is designed for TTS research. It is derived from the original
materials (mp3 audio files from LibriVox and text files from Project Gutenberg) of the LibriSpeech corpus. The main
differences from the LibriSpeech corpus are listed below:`,X,k,me="<li>The audio files are at 24kHz sampling rate.</li> <li>The speech is split at sentence breaks.</li> <li>Both original and normalized texts are included.</li> <li>Contextual information (e.g., neighbouring sentences) can be extracted.</li> <li>Utterances with significant background noise are excluded.</li>",ee,S,Te="Assembling a good dataset for TTS is no easy task as such dataset would have to possess several key characteristics:",te,L,be="<li>High-quality and diverse recordings that cover a wide range of speech patterns, accents, languages, and emotions. The recordings should be clear, free from background noise, and exhibit natural speech characteristics.</li> <li>Transcriptions: Each audio recording should be accompanied by its corresponding text transcription.</li> <li>Variety of linguistic content: The dataset should contain a diverse range of linguistic content, including different types of sentences, phrases, and words. It should cover various topics, genres, and domains to ensure the model’s ability to handle different linguistic contexts.</li>",ie,C,ve=`Good news is, it is unlikely that you would have to train a TTS model from scratch. In the next section we’ll look into
pre-trained models available on the 🤗 Hub.`,ne,_,ae,A,se;return u=new V({props:{title:"Text-to-speech datasets",local:"text-to-speech-datasets",headingTag:"h1"}}),m=new V({props:{title:"LJSpeech",local:"ljspeech",headingTag:"h2"}}),b=new V({props:{title:"Multilingual LibriSpeech",local:"multilingual-librispeech",headingTag:"h2"}}),x=new V({props:{title:"VCTK (Voice Cloning Toolkit)",local:"vctk-voice-cloning-toolkit",headingTag:"h2"}}),$=new V({props:{title:"Libri-TTS/ LibriTTS-R",local:"libri-tts-libritts-r",headingTag:"h2"}}),_=new He({props:{source:"https://github.com/huggingface/audio-transformers-course/blob/main/chapters/en/chapter6/tts_datasets.mdx"}}),{c(){c=l("meta"),z=a(),j=l("p"),I=a(),H(u.$$.fragment),G=a(),h=l("p"),h.innerHTML=oe,U=a(),p=l("p"),p.innerHTML=re,J=a(),d=l("p"),d.textContent=ce,K=a(),f=l("p"),f.textContent=ue,F=a(),g=l("p"),g.textContent=he,B=a(),H(m.$$.fragment),O=a(),T=l("p"),T.innerHTML=pe,D=a(),H(b.$$.fragment),N=a(),v=l("p"),v.innerHTML=de,Y=a(),H(x.$$.fragment),Z=a(),y=l("p"),y.innerHTML=fe,Q=a(),H($.$$.fragment),W=a(),w=l("p"),w.innerHTML=ge,X=a(),k=l("ul"),k.innerHTML=me,ee=a(),S=l("p"),S.textContent=Te,te=a(),L=l("ul"),L.innerHTML=be,ie=a(),C=l("p"),C.textContent=ve,ne=a(),H(_.$$.fragment),ae=a(),A=l("p"),this.h()},l(e){const t=Ce("svelte-u9bgzb",document.head);c=o(t,"META",{name:!0,content:!0}),t.forEach(i),z=s(e),j=o(e,"P",{}),xe(j).forEach(i),I=s(e),M(u.$$.fragment,e),G=s(e),h=o(e,"P",{"data-svelte-h":!0}),r(h)!=="svelte-z6r8q5"&&(h.innerHTML=oe),U=s(e),p=o(e,"P",{"data-svelte-h":!0}),r(p)!=="svelte-ey4ks9"&&(p.innerHTML=re),J=s(e),d=o(e,"P",{"data-svelte-h":!0}),r(d)!=="svelte-l4mvtu"&&(d.textContent=ce),K=s(e),f=o(e,"P",{"data-svelte-h":!0}),r(f)!=="svelte-7lz037"&&(f.textContent=ue),F=s(e),g=o(e,"P",{"data-svelte-h":!0}),r(g)!=="svelte-1iermkw"&&(g.textContent=he),B=s(e),M(m.$$.fragment,e),O=s(e),T=o(e,"P",{"data-svelte-h":!0}),r(T)!=="svelte-1a5eqv7"&&(T.innerHTML=pe),D=s(e),M(b.$$.fragment,e),N=s(e),v=o(e,"P",{"data-svelte-h":!0}),r(v)!=="svelte-b09uew"&&(v.innerHTML=de),Y=s(e),M(x.$$.fragment,e),Z=s(e),y=o(e,"P",{"data-svelte-h":!0}),r(y)!=="svelte-1hzutj7"&&(y.innerHTML=fe),Q=s(e),M($.$$.fragment,e),W=s(e),w=o(e,"P",{"data-svelte-h":!0}),r(w)!=="svelte-97018c"&&(w.innerHTML=ge),X=s(e),k=o(e,"UL",{"data-svelte-h":!0}),r(k)!=="svelte-14kma4g"&&(k.innerHTML=me),ee=s(e),S=o(e,"P",{"data-svelte-h":!0}),r(S)!=="svelte-19vpf29"&&(S.textContent=Te),te=s(e),L=o(e,"UL",{"data-svelte-h":!0}),r(L)!=="svelte-i4kcdr"&&(L.innerHTML=be),ie=s(e),C=o(e,"P",{"data-svelte-h":!0}),r(C)!=="svelte-1uxfg47"&&(C.textContent=ve),ne=s(e),M(_.$$.fragment,e),ae=s(e),A=o(e,"P",{}),xe(A).forEach(i),this.h()},h(){ye(c,"name","hf:doc:metadata"),ye(c,"content",Pe)},m(e,t){_e(document.head,c),n(e,z,t),n(e,j,t),n(e,I,t),P(u,e,t),n(e,G,t),n(e,h,t),n(e,U,t),n(e,p,t),n(e,J,t),n(e,d,t),n(e,K,t),n(e,f,t),n(e,F,t),n(e,g,t),n(e,B,t),P(m,e,t),n(e,O,t),n(e,T,t),n(e,D,t),P(b,e,t),n(e,N,t),n(e,v,t),n(e,Y,t),P(x,e,t),n(e,Z,t),n(e,y,t),n(e,Q,t),P($,e,t),n(e,W,t),n(e,w,t),n(e,X,t),n(e,k,t),n(e,ee,t),n(e,S,t),n(e,te,t),n(e,L,t),n(e,ie,t),n(e,C,t),n(e,ne,t),P(_,e,t),n(e,ae,t),n(e,A,t),se=!0},p:we,i(e){se||(E(u.$$.fragment,e),E(m.$$.fragment,e),E(b.$$.fragment,e),E(x.$$.fragment,e),E($.$$.fragment,e),E(_.$$.fragment,e),se=!0)},o(e){q(u.$$.fragment,e),q(m.$$.fragment,e),q(b.$$.fragment,e),q(x.$$.fragment,e),q($.$$.fragment,e),q(_.$$.fragment,e),se=!1},d(e){e&&(i(z),i(j),i(I),i(G),i(h),i(U),i(p),i(J),i(d),i(K),i(f),i(F),i(g),i(B),i(O),i(T),i(D),i(N),i(v),i(Y),i(Z),i(y),i(Q),i(W),i(w),i(X),i(k),i(ee),i(S),i(te),i(L),i(ie),i(C),i(ne),i(ae),i(A)),i(c),R(u,e),R(m,e),R(b,e),R(x,e),R($,e),R(_,e)}}}const Pe='{"title":"Text-to-speech datasets","local":"text-to-speech-datasets","sections":[{"title":"LJSpeech","local":"ljspeech","sections":[],"depth":2},{"title":"Multilingual LibriSpeech","local":"multilingual-librispeech","sections":[],"depth":2},{"title":"VCTK (Voice Cloning Toolkit)","local":"vctk-voice-cloning-toolkit","sections":[],"depth":2},{"title":"Libri-TTS/ LibriTTS-R","local":"libri-tts-libritts-r","sections":[],"depth":2}],"depth":1}';function Ee(le){return ke(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ae extends Se{constructor(c){super(),Le(this,c,Ee,Me,$e,{})}}export{Ae as component};
