kale-tts-1 / index.html
NERDDISCO's picture
Key letters off by default for new visitors; saved choices stay
15b2622
Raw History Blame Contribute Delete
9.69 kB
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
<meta name="color-scheme" content="dark">
<meta name="description" content="Natural speech from 100% synthetic data. Runs on device (CPU, GPU): 10 voices, 7.5M and 45.7M parameters, nothing uploaded.">
<title>kale-tts-1 · speech in your browser</title>
<meta property="og:type" content="website">
<meta property="og:title" content="kale-tts-1 · speech in your browser">
<meta property="og:description" content="Natural speech from 100% synthetic data. Runs on device (CPU, GPU): 10 voices, 7.5M and 45.7M parameters, nothing uploaded.">
<meta property="og:image" content="https://huggingface.co/spaces/KaleComputer/kale-tts-1/resolve/main/og.png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta name="twitter:card" content="summary_large_image">
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 32 32%22%3E%3Crect width=%2232%22 height=%2232%22 rx=%227%22 fill=%22%2305070b%22/%3E%3Cg transform=%22translate(9.6 6) scale(0.0706)%22%3E%3Cpath fill=%22%23f5f5f5%22 d=%22M56.1035 199.871H57.2725L135.975 72.0781H200.649V72.8574L142.598 163.248L210 282.469V283.248H147.662L102.078 204.547L52.208 283.248H0V0H56.1035V199.871Z%22/%3E%3C/g%3E%3C/svg%3E">
<link rel="stylesheet" href="./style.css?v=6">
<script>
// a private Hugging Face Space (opened with ?__sign=…): a service worker carries the sign to the page's later requests (sign.sw.js);
// the first time, the page reloads once it is in control. Elsewhere (public Space, local, the canvas card) this does nothing
(() => {
const sign = new URLSearchParams(location.search).get("__sign"), sw = navigator.serviceWorker;
if (!sw) return;
if (!sign) { // opened without a sign (a public Space, say): a sign worker left from earlier steps aside, so no stale sign is sent
if (/sign\.sw\.js/.test(sw.controller?.scriptURL ?? "")) sw.getRegistrations().then((rs) => Promise.all(rs.map((r) => r.unregister()))).then(() => location.reload());
return;
}
const url = new URL("./sign.sw.js?__sign=" + encodeURIComponent(sign), location.href).href;
if (sw.controller?.scriptURL === url) return; // already carrying this sign
let tried = false; try { tried = sessionStorage.getItem("kale-tts-1:signed") === url; sessionStorage.setItem("kale-tts-1:signed", url); } catch {}
if (tried) return; // one try per sign: never a reload loop
sw.register(url).then(() => sw.ready).then(() => location.reload()).catch(() => {});
})();
</script>
</head>
<body>
<div class="bgclip" aria-hidden="true">
<div id="halo" class="halo" aria-hidden="true"></div>
<canvas id="fx" class="fx" aria-hidden="true"></canvas>
</div>
<div class="page">
<!-- left: the whole demo as one column; right: the room for the waterfall / mountains (drawn on the canvas behind) -->
<div class="col">
<header class="top">
<h1 id="mtitle">kale-tts-1-nano</h1>
<div class="models" role="radiogroup" aria-label="Model">
<button class="mcard" role="radio" aria-checked="true" tabindex="0" data-m="kale-tts-1-nano" aria-labelledby="n-nano" aria-describedby="t-nano d-nano">
<span class="mname" id="n-nano">kale-tts-1-<b>nano</b></span>
<span class="mtraits" id="t-nano"><span class="mstate" aria-hidden="true"></span><span class="tag">tiniest</span><span class="sr">, </span><span class="tag">fastest</span></span>
<span class="spec" aria-hidden="true"><span class="k">params</span><span class="v">7.5M</span><span class="k">voices</span><span class="v">10</span><span class="k">download</span><span class="v dlv"><span class="k2">cpu</span><span>14.8 MB</span><span class="k2">webgpu</span><span>30.6 MB</span></span></span>
<span class="sr" id="d-nano">7.5M parameters, 10 voices, download 14.8 MB on the CPU, 30.6 MB on WebGPU.</span>
</button>
<button class="mcard" role="radio" aria-checked="false" tabindex="-1" data-m="kale-tts-1-tiny" aria-labelledby="n-tiny" aria-describedby="t-tiny d-tiny">
<span class="mname" id="n-tiny">kale-tts-1-<b>tiny</b></span>
<span class="mtraits" id="t-tiny"><span class="mstate" aria-hidden="true"></span><span class="tag">clearer</span><span class="sr">, </span><span class="tag">more expressive</span></span>
<span class="spec" aria-hidden="true"><span class="k">params</span><span class="v">45.7M</span><span class="k">voices</span><span class="v">10</span><span class="k">download</span><span class="v dlv"><span class="k2">cpu</span><span>79.9 MB</span><span class="k2">webgpu</span><span>183.2 MB</span></span></span>
<span class="sr" id="d-tiny">45.7M parameters, 10 voices, download 79.9 MB on the CPU, 183.2 MB on WebGPU.</span>
</button>
</div>
<span class="sr" role="progressbar" id="mprogress" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0" aria-label="Downloading the model" hidden></span>
<!-- the picked model's facts on this device: one quiet line under the cards -->
<div class="metrics">
<span class="stat"><span>Runs on</span> <b id="m-be">…</b><button class="retry" id="retry" title="WebGPU stopped this tab once; try it again" hidden>try WebGPU</button></span>
<span class="stat"><span>First sound</span> <b id="m-first">–</b></span>
<span class="stat"><span>Real time</span> <b id="m-rt">–</b></span>
</div>
</header>
<main>
<section class="play">
<!-- the prompt: the text, and play beside it -->
<section class="composer">
<textarea id="text" rows="5" maxlength="1200" aria-label="Text to speak" placeholder="Type something to say" spellcheck="false">Natural speech from 100% synthetic data.</textarea>
<button class="go" id="go" aria-label="Play" disabled><svg class="i-play" viewBox="0 0 24 24" width="16" height="16" aria-hidden="true"><path fill="currentColor" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round" d="M9 6.8v10.4L18 12z"/></svg><svg class="i-stop" viewBox="0 0 24 24" width="14" height="14" aria-hidden="true"><rect x="5" y="5" width="14" height="14" rx="2.5" fill="currentColor"/></svg></button>
</section>
<!-- the voices: women on the first row, men on the second, as wide as the composer -->
<div class="keys" id="keys" role="group" aria-label="Voices"></div>
<!-- the options: a line per voice and the key letters, each an Off | On picker (radio groups); the layout after the key letters -->
<div class="live" id="live">
<div class="opt" title="Each voice speaks its own line"><span class="opt-l" id="o-lines">a line per voice</span>
<span class="seg" role="radiogroup" aria-labelledby="o-lines"><button role="radio" data-seg="lines" data-v="0">Off</button><button role="radio" data-seg="lines" data-v="1">On</button></span></div>
<div class="opt opt-kbd" title="Show the letters on the voice keys and play the voices with the home row of your keyboard"><span class="opt-l" id="o-kbd">key letters</span>
<span class="seg" role="radiogroup" aria-labelledby="o-kbd"><button role="radio" data-seg="kbd" data-v="0">Off</button><button role="radio" data-seg="kbd" data-v="1">On</button></span>
<button class="layout" id="layout" aria-label="keyboard layout: auto" title="Which keyboard the letters follow (auto: this one)">layout: auto</button></div>
<span class="status sr" role="status" id="status">loading the model…</span>
</div>
<footer>
<p>Weights and code Apache-2.0, dataset CC BY 4.0, all <a href="https://huggingface.co/KaleComputer" target="_blank" rel="noopener">on Hugging Face</a></p>
</footer>
<!-- brought to you by Kale: the kale.computer footer's logo.svg, light grey, at the end of the column -->
<a class="brand" href="https://kale.computer" target="_blank" rel="noopener" aria-label="Brought to you by Kale"><span>brought to you by</span><svg viewBox="0 0 2546 1000" width="61" height="24" aria-hidden="true"><path fill="currentColor" d="M2192.2 225.806C2419.34 225.806 2545.67 368.279 2545.67 602.15C2545.67 626.344 2544.33 646.505 2541.64 672.043H2006.73C2026.89 767.473 2096.78 833.334 2198.92 833.334C2257.96 833.334 2316.71 813.249 2345.91 745.898H2538.06C2481.82 935.94 2338.63 1000 2188.1 1000C1967.69 1000 1818.58 838.71 1818.58 614.247C1818.58 388.44 1970.45 225.806 2192.2 225.806ZM1028.56 233.87C1128.02 233.87 1203.29 270.16 1251.68 344.085H1254.37C1253.02 311.827 1253.02 283.601 1253.02 248.655H1446.57V977.149H1253.02C1253.02 938.171 1253.02 920.697 1254.37 884.407H1251.68C1200.6 956.988 1117.27 995.966 1031.25 995.966C839.044 995.966 696.571 837.364 696.571 615.59C696.571 396.504 844.421 233.87 1028.56 233.87ZM193.548 689.515H197.58L469.085 248.655H692.203V251.344L491.935 563.171L724.461 974.461V977.149H509.407L352.149 705.644L180.107 977.149H0V0H193.548V689.515ZM1745.27 977.149H1551.72V1.34375H1745.27V977.149ZM1072.92 407.257C964.044 407.257 890.12 498.655 890.12 615.59C890.12 732.525 965.388 821.235 1072.92 821.235C1184.47 821.235 1257.05 737.902 1257.05 615.59C1257.05 494.622 1183.13 407.257 1072.92 407.257ZM2193.55 391.129C2100.81 391.129 2037.65 448.924 2012.11 532.258H2369.61C2350.79 444.892 2290.31 391.129 2193.55 391.129Z"/></svg></a>
<div class="stage">
<canvas id="line" class="line" aria-hidden="true"></canvas>
<div class="loadbar" id="loadbar"><i></i></div>
</div>
</section>
</main>
</div>
<div class="art" aria-hidden="true"></div>
</div>
<div class="toast" id="toast" role="status"></div>
<script type="module" src="./app.js?v=7"></script>
</body>
</html>