Skip to content

Commit

Permalink
Fix transcriptions text not being set in Chrome
Browse files Browse the repository at this point in the history
  • Loading branch information
evmaki committed Nov 21, 2024
1 parent a14e077 commit 3913312
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions moonshine/demo/moonshine-web/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Moonshine from "./moonshine.js"


function setTranscription(text) {
console.log("setTranscription: " + text)
document.getElementById("transcription").innerHTML = text
}

Expand Down Expand Up @@ -45,7 +46,6 @@ function toggleControls(isEnabled) {
}

function setAudio(audioBlob) {
console.log(audioBlob.length)
var sound = document.getElementById("sound")
sound.src = URL.createObjectURL(audioBlob)
}
Expand Down Expand Up @@ -96,7 +96,7 @@ window.onload = (event) => {
}
decoded.copyFromChannel(floatArray, 0)
moonshine.generate(floatArray).then((r) => {
document.getElementById("transcription").innerText = r
setTranscription(r)
toggleControls(true)
})
}
Expand Down

0 comments on commit 3913312

Please sign in to comment.