Spaces:
Running
Running
Update index.html
Browse files- index.html +14 -1
index.html
CHANGED
@@ -224,6 +224,11 @@
|
|
224 |
display: none;
|
225 |
animation: pulse 1s infinite;
|
226 |
}
|
|
|
|
|
|
|
|
|
|
|
227 |
</style>
|
228 |
</head>
|
229 |
<body class="bg-gradient-to-br from-gray-900 to-gray-800 text-gray-100 min-h-screen">
|
@@ -559,6 +564,10 @@
|
|
559 |
|
560 |
function convertToSpeech(text, model) {
|
561 |
const removeMarkdown = document.getElementById('removeMarkdown').checked;
|
|
|
|
|
|
|
|
|
562 |
|
563 |
fetch('/api/tts', {
|
564 |
method: 'POST',
|
@@ -577,6 +586,10 @@
|
|
577 |
currentAudio.volume = document.getElementById('volumeSlider').value / 100;
|
578 |
currentAudio.play();
|
579 |
}
|
|
|
|
|
|
|
|
|
580 |
});
|
581 |
}
|
582 |
|
@@ -699,4 +712,4 @@
|
|
699 |
handleResize(); // Initial check
|
700 |
</script>
|
701 |
</body>
|
702 |
-
</html>
|
|
|
224 |
display: none;
|
225 |
animation: pulse 1s infinite;
|
226 |
}
|
227 |
+
|
228 |
+
/* Loading animation for play button */
|
229 |
+
.loading {
|
230 |
+
animation: pulse 1s infinite;
|
231 |
+
}
|
232 |
</style>
|
233 |
</head>
|
234 |
<body class="bg-gradient-to-br from-gray-900 to-gray-800 text-gray-100 min-h-screen">
|
|
|
564 |
|
565 |
function convertToSpeech(text, model) {
|
566 |
const removeMarkdown = document.getElementById('removeMarkdown').checked;
|
567 |
+
const playBtn = document.getElementById('playBtn');
|
568 |
+
|
569 |
+
// Aplicar la clase de animaci贸n al bot贸n de reproducci贸n
|
570 |
+
playBtn.classList.add('loading');
|
571 |
|
572 |
fetch('/api/tts', {
|
573 |
method: 'POST',
|
|
|
586 |
currentAudio.volume = document.getElementById('volumeSlider').value / 100;
|
587 |
currentAudio.play();
|
588 |
}
|
589 |
+
})
|
590 |
+
.finally(() => {
|
591 |
+
// Remover la clase de animaci贸n despu茅s de que la conversi贸n haya terminado
|
592 |
+
playBtn.classList.remove('loading');
|
593 |
});
|
594 |
}
|
595 |
|
|
|
712 |
handleResize(); // Initial check
|
713 |
</script>
|
714 |
</body>
|
715 |
+
</html>
|