import{s as ke,n as Se,o as Le}from"../chunks/scheduler.cd324960.js";import{S as Ce,i as _e,e as l,s as a,c as M,h as He,a as o,d as i,b as s,f as ye,g as P,j as r,k as we,l as Me,m as n,n as E,t as q,o as R,p as j}from"../chunks/index.d5c3adcc.js";import{C as Pe,H as A,E as Ee}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.92ea4747.js";function qe(re){let c,I,z,G,u,U,p,J,h,ce="Text-to-speech task (also called <em>speech synthesis</em>) comes with a range of challenges.",K,d,ue=`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.`,F,f,pe=`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.`,B,g,he=`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.`,O,m,de="Let’s explore a few datasets suitable for TTS that you can find on the 🤗 Hub.",D,T,N,b,fe=`<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.`,Y,v,Z,x,ge=`<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.`,Q,$,W,y,me=`<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.`,X,w,ee,k,Te=`<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:`,te,S,be="<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>",ie,L,ve="Assembling a good dataset for TTS is no easy task as such dataset would have to possess several key characteristics:",ne,C,xe="<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>",ae,_,$e=`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.`,se,H,le,V,oe;return u=new Pe({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),p=new A({props:{title:"Text-to-speech datasets",local:"text-to-speech-datasets",headingTag:"h1"}}),T=new A({props:{title:"LJSpeech",local:"ljspeech",headingTag:"h2"}}),v=new A({props:{title:"Multilingual LibriSpeech",local:"multilingual-librispeech",headingTag:"h2"}}),$=new A({props:{title:"VCTK (Voice Cloning Toolkit)",local:"vctk-voice-cloning-toolkit",headingTag:"h2"}}),w=new A({props:{title:"Libri-TTS/ LibriTTS-R",local:"libri-tts-libritts-r",headingTag:"h2"}}),H=new Ee({props:{source:"https://github.com/huggingface/audio-transformers-course/blob/main/chapters/en/chapter6/tts_datasets.mdx"}}),{c(){c=l("meta"),I=a(),z=l("p"),G=a(),M(u.$$.fragment),U=a(),M(p.$$.fragment),J=a(),h=l("p"),h.innerHTML=ce,K=a(),d=l("p"),d.innerHTML=ue,F=a(),f=l("p"),f.textContent=pe,B=a(),g=l("p"),g.textContent=he,O=a(),m=l("p"),m.textContent=de,D=a(),M(T.$$.fragment),N=a(),b=l("p"),b.innerHTML=fe,Y=a(),M(v.$$.fragment),Z=a(),x=l("p"),x.innerHTML=ge,Q=a(),M($.$$.fragment),W=a(),y=l("p"),y.innerHTML=me,X=a(),M(w.$$.fragment),ee=a(),k=l("p"),k.innerHTML=Te,te=a(),S=l("ul"),S.innerHTML=be,ie=a(),L=l("p"),L.textContent=ve,ne=a(),C=l("ul"),C.innerHTML=xe,ae=a(),_=l("p"),_.textContent=$e,se=a(),M(H.$$.fragment),le=a(),V=l("p"),this.h()},l(e){const t=He("svelte-u9bgzb",document.head);c=o(t,"META",{name:!0,content:!0}),t.forEach(i),I=s(e),z=o(e,"P",{}),ye(z).forEach(i),G=s(e),P(u.$$.fragment,e),U=s(e),P(p.$$.fragment,e),J=s(e),h=o(e,"P",{"data-svelte-h":!0}),r(h)!=="svelte-z6r8q5"&&(h.innerHTML=ce),K=s(e),d=o(e,"P",{"data-svelte-h":!0}),r(d)!=="svelte-ey4ks9"&&(d.innerHTML=ue),F=s(e),f=o(e,"P",{"data-svelte-h":!0}),r(f)!=="svelte-l4mvtu"&&(f.textContent=pe),B=s(e),g=o(e,"P",{"data-svelte-h":!0}),r(g)!=="svelte-7lz037"&&(g.textContent=he),O=s(e),m=o(e,"P",{"data-svelte-h":!0}),r(m)!=="svelte-1iermkw"&&(m.textContent=de),D=s(e),P(T.$$.fragment,e),N=s(e),b=o(e,"P",{"data-svelte-h":!0}),r(b)!=="svelte-1a5eqv7"&&(b.innerHTML=fe),Y=s(e),P(v.$$.fragment,e),Z=s(e),x=o(e,"P",{"data-svelte-h":!0}),r(x)!=="svelte-b09uew"&&(x.innerHTML=ge),Q=s(e),P($.$$.fragment,e),W=s(e),y=o(e,"P",{"data-svelte-h":!0}),r(y)!=="svelte-1hzutj7"&&(y.innerHTML=me),X=s(e),P(w.$$.fragment,e),ee=s(e),k=o(e,"P",{"data-svelte-h":!0}),r(k)!=="svelte-97018c"&&(k.innerHTML=Te),te=s(e),S=o(e,"UL",{"data-svelte-h":!0}),r(S)!=="svelte-14kma4g"&&(S.innerHTML=be),ie=s(e),L=o(e,"P",{"data-svelte-h":!0}),r(L)!=="svelte-19vpf29"&&(L.textContent=ve),ne=s(e),C=o(e,"UL",{"data-svelte-h":!0}),r(C)!=="svelte-i4kcdr"&&(C.innerHTML=xe),ae=s(e),_=o(e,"P",{"data-svelte-h":!0}),r(_)!=="svelte-1uxfg47"&&(_.textContent=$e),se=s(e),P(H.$$.fragment,e),le=s(e),V=o(e,"P",{}),ye(V).forEach(i),this.h()},h(){we(c,"name","hf:doc:metadata"),we(c,"content",Re)},m(e,t){Me(document.head,c),n(e,I,t),n(e,z,t),n(e,G,t),E(u,e,t),n(e,U,t),E(p,e,t),n(e,J,t),n(e,h,t),n(e,K,t),n(e,d,t),n(e,F,t),n(e,f,t),n(e,B,t),n(e,g,t),n(e,O,t),n(e,m,t),n(e,D,t),E(T,e,t),n(e,N,t),n(e,b,t),n(e,Y,t),E(v,e,t),n(e,Z,t),n(e,x,t),n(e,Q,t),E($,e,t),n(e,W,t),n(e,y,t),n(e,X,t),E(w,e,t),n(e,ee,t),n(e,k,t),n(e,te,t),n(e,S,t),n(e,ie,t),n(e,L,t),n(e,ne,t),n(e,C,t),n(e,ae,t),n(e,_,t),n(e,se,t),E(H,e,t),n(e,le,t),n(e,V,t),oe=!0},p:Se,i(e){oe||(q(u.$$.fragment,e),q(p.$$.fragment,e),q(T.$$.fragment,e),q(v.$$.fragment,e),q($.$$.fragment,e),q(w.$$.fragment,e),q(H.$$.fragment,e),oe=!0)},o(e){R(u.$$.fragment,e),R(p.$$.fragment,e),R(T.$$.fragment,e),R(v.$$.fragment,e),R($.$$.fragment,e),R(w.$$.fragment,e),R(H.$$.fragment,e),oe=!1},d(e){e&&(i(I),i(z),i(G),i(U),i(J),i(h),i(K),i(d),i(F),i(f),i(B),i(g),i(O),i(m),i(D),i(N),i(b),i(Y),i(Z),i(x),i(Q),i(W),i(y),i(X),i(ee),i(k),i(te),i(S),i(ie),i(L),i(ne),i(C),i(ae),i(_),i(se),i(le),i(V)),i(c),j(u,e),j(p,e),j(T,e),j(v,e),j($,e),j(w,e),j(H,e)}}}const Re='{"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 je(re){return Le(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ie extends Ce{constructor(c){super(),_e(this,c,je,qe,ke,{})}}export{Ie as component};
