Add the demo (#163)

This commit is contained in:
Gabriel de Marmiesse
2026-04-20 15:55:33 +02:00
committed by GitHub
parent c9ebef4d1a
commit 5304da453b
12 changed files with 169 additions and 29 deletions
+5 -3
View File
@@ -28,7 +28,7 @@
class="w-full border rounded p-2"
placeholder="Enter your text here..."
rows="4"
>Hello world. I am Kyutai's Pocket TTS. I'm fast enough to run on small CPUs. I hope you'll like me.</textarea>
>DEFAULT_TEXT_PROMPT</textarea>
</div>
<div class="bg-white p-4 rounded-lg shadow">
@@ -314,7 +314,9 @@
formData.append('voice_url', voiceUrl);
}
const response = await fetch('/tts', {
const ttsEndpoint = `${window.location.pathname.replace(/\/+$/, '')}/tts`;
const response = await fetch(ttsEndpoint, {
method: 'POST',
body: formData
});
@@ -392,4 +394,4 @@
});
</script>
</body>
</html>
</html>