Spaces:
Sleeping
Sleeping
Update templates/chose voice page.html
Browse files
templates/chose voice page.html
CHANGED
|
@@ -287,19 +287,17 @@
|
|
| 287 |
function playSelectedVoiceAudio() {
|
| 288 |
const voiceCircle = document.getElementById("voice-circle");
|
| 289 |
const voice = voices[currentVoiceIndex];
|
| 290 |
-
|
| 291 |
-
|
| 292 |
-
audioElement.
|
| 293 |
-
audioElement.play().then(() => {
|
| 294 |
-
voiceCircle.classList.add("playing");
|
| 295 |
-
}).catch(err => {
|
| 296 |
console.error("Audio playback failed:", err);
|
| 297 |
});
|
| 298 |
-
|
| 299 |
audioElement.onended = () => {
|
| 300 |
voiceCircle.classList.remove("playing");
|
| 301 |
};
|
| 302 |
}
|
|
|
|
| 303 |
updateVoiceDisplay();
|
| 304 |
</script>
|
| 305 |
</body>
|
|
|
|
| 287 |
function playSelectedVoiceAudio() {
|
| 288 |
const voiceCircle = document.getElementById("voice-circle");
|
| 289 |
const voice = voices[currentVoiceIndex];
|
| 290 |
+
audioElement.src = `../final_audio/${voice.file}`;
|
| 291 |
+
voiceCircle.classList.add("playing");
|
| 292 |
+
audioElement.play().catch(err => {
|
|
|
|
|
|
|
|
|
|
| 293 |
console.error("Audio playback failed:", err);
|
| 294 |
});
|
| 295 |
+
|
| 296 |
audioElement.onended = () => {
|
| 297 |
voiceCircle.classList.remove("playing");
|
| 298 |
};
|
| 299 |
}
|
| 300 |
+
|
| 301 |
updateVoiceDisplay();
|
| 302 |
</script>
|
| 303 |
</body>
|