Spaces:
Sleeping
Sleeping
Update static/script.js
Browse files13 unmodified lines1415161718192098 unmodified lines11912012112212312412512612712813 unmodified linesappContainer.innerHTML = `<div class="sidebar"><div class="logo-container"><div class="logo-top">SMARTDOCS</div><div class="logo-bottom">AI</div></div><a href="principal.html" class="home-link">98 unmodified linesresultElement.innerHTML = `<h3 class="centered-title">📝 Summary generated :</h3><br><p>${data.summary}</p>`;document.getElementById("documentResult").dataset.summaryText = data.summary;document.getElementById("downloadSection").style.display = "block";} else {resultElement.innerText = "❌ Summary not available.";}13 unmodified lines1415161718192098 unmodified lines11912012112212312412512612712812913013113213313413513613713813914013 unmodified linesappContainer.innerHTML = `<div class="sidebar"><div class="logo-container"><div class="logo-top">SMARTDOC</div><div class="logo-bottom">AI</div></div><a href="principal.html" class="home-link">98 unmodified linesresultElement.innerHTML = `<h3 class="centered-title">📝 Summary generated :</h3><br><p id="summaryText">${data.summary}</p><button id="playVoiceBtn" style="margin-top: 15px; padding: 10px; border: none; background-color: #4CAF50; color: white; border-radius: 8px; cursor: pointer;">🔊 Listen to summary</button>`;document.getElementById("documentResult").dataset.summaryText = data.summary;document.getElementById("downloadSection").style.display = "block";// 🎤 Ajouter l'effet vocalconst playVoiceBtn = document.getElementById("playVoiceBtn");playVoiceBtn.addEventListener("click", function () {const textToRead = document.getElementById("summaryText").textContent;const utterance = new SpeechSynthesisUtterance(textToRead);utterance.lang = "en-US"; // ou "fr-FR" si ton résumé est en françaiswindow.speechSynthesis.speak(utterance);});} else {resultElement.innerText = "❌ Summary not available.";}
static/script.js+15-3