Skip to content

Commit

Permalink
Merge pull request #75 from appatalks/appatalks-patch-autospeak
Browse files Browse the repository at this point in the history
patch-autospeak lm-studio.js
  • Loading branch information
appatalks authored Dec 26, 2024
2 parents 799b0c5 + 585b023 commit bede290
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions core/js/lm-studio.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ function lmsSend() {
openAIMessages.push({ role: "user", content: sQuestion });
openAIMessages.push({ role: "assistant", content: candidate });
localStorage.setItem("openAIMessages", JSON.stringify(openAIMessages));

// Check the state of the checkbox and have fun
const checkbox = document.getElementById("autoSpeak");
if (checkbox.checked) {
speakText();
const audio = document.getElementById("audioPlayback");
audio.setAttribute("autoplay", true);
}
})
.catch(error => {
console.error("Error:", error);
Expand Down

0 comments on commit bede290

Please sign in to comment.