Add the demo (#163)
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user