From 3f81139f0bd6804516577e6b8c37477a17f5b65e Mon Sep 17 00:00:00 2001 From: Evan King Date: Thu, 21 Nov 2024 16:45:25 -0600 Subject: [PATCH] Fix transcriptions text not being set in Chrome --- moonshine/demo/moonshine-web/src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moonshine/demo/moonshine-web/src/index.js b/moonshine/demo/moonshine-web/src/index.js index 9489941..9fe62bd 100644 --- a/moonshine/demo/moonshine-web/src/index.js +++ b/moonshine/demo/moonshine-web/src/index.js @@ -2,6 +2,7 @@ import Moonshine from "./moonshine.js" function setTranscription(text) { + console.log("setTranscription: " + text) document.getElementById("transcription").innerHTML = text } @@ -45,7 +46,6 @@ function toggleControls(isEnabled) { } function setAudio(audioBlob) { - console.log(audioBlob.length) var sound = document.getElementById("sound") sound.src = URL.createObjectURL(audioBlob) } @@ -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) }) }