Skip to content

Commit

Permalink
Merge pull request #27 from ibugithub/home-page
Browse files Browse the repository at this point in the history
Home page
  • Loading branch information
ibugithub authored Sep 15, 2023
2 parents 28a763f + 1f1b488 commit 756fc5e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions js/askMe.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ document.addEventListener("DOMContentLoaded", () => {
const ans = response.data.GPT.replace(regex, '<br>');
setResponse(ans);
setIsLoading(false)
toogle()
speaker.src = "assets/images/spaker/speaker.svg";
speaker_container.appendChild(speaker);
})
.catch((error) => {
console.error(error);
Expand Down Expand Up @@ -76,7 +77,7 @@ document.addEventListener("DOMContentLoaded", () => {
};

askButton.onclick = handleAsk
});



// ...........mic Related js (Speech Recognition)............
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -267,4 +267,5 @@ const toogle = () => {
speak()
}
}
speaker.addEventListener('click', toogle)
speaker.addEventListener('click', toogle)
});

0 comments on commit 756fc5e

Please sign in to comment.