From 9f43916bff0c9352a75817a43bf4d3099e5a319b Mon Sep 17 00:00:00 2001 From: ibugithub Date: Fri, 15 Sep 2023 17:46:13 +0600 Subject: [PATCH] Fix an issue --- js/askMe.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/js/askMe.js b/js/askMe.js index cc575bb3..d229d00e 100644 --- a/js/askMe.js +++ b/js/askMe.js @@ -44,7 +44,8 @@ document.addEventListener("DOMContentLoaded", () => { const ans = response.data.GPT.replace(regex, '
'); setResponse(ans); setIsLoading(false) - toogle() + speaker.src = "assets/images/spaker/speaker.svg"; + speaker_container.appendChild(speaker); }) .catch((error) => { console.error(error); @@ -76,7 +77,7 @@ document.addEventListener("DOMContentLoaded", () => { }; askButton.onclick = handleAsk -}); + // ...........mic Related js (Speech Recognition)............ @@ -171,7 +172,6 @@ mutedMic.addEventListener('click', startUsingMicrophone) // ............Text to speech........... const synth = window.speechSynthesis; -const inputForm = document.querySelector("form"); const inputTxt = document.querySelector("#response"); const voiceSelect = document.querySelector("select"); const speaker_container = document.querySelector("#speaker-container"); @@ -267,4 +267,5 @@ const toogle = () => { speak() } } -speaker.addEventListener('click', toogle) \ No newline at end of file +speaker.addEventListener('click', toogle) +}); \ No newline at end of file