Skip to content

Commit

Permalink
Update speechrecognition.js
Browse files Browse the repository at this point in the history
  • Loading branch information
fustyles authored Oct 8, 2023
1 parent d7b7963 commit ba1452d
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions SpeechRecognition_20220729/speechrecognition.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,18 @@ if ('webkitSpeechRecognition' in window) {
//console.log("interim = " + Recognition_interim);
}
};

if (!document.getElementById("gamespan_recognition")) {
var obj = document.createElement('div');
obj.id = "gamespan_recognition";
obj.style.display = "none";
obj.style.position = "absolute";
obj.style.zIndex = "9999";
obj.draggable="true";
obj.setAttribute("onclick", "javascript:onclickid_set(this);");
obj.setAttribute("ondragstart", "javascript:event.dataTransfer.setData('div/plain',event.target.id);");
document.body.appendChild(obj);
}
}

function linebreak(s) {
Expand Down Expand Up @@ -114,3 +126,10 @@ async function span_interim(input_left, input_top, input_fontsize, input_zindex,
else
obj.style.display = "block";
}

function Recognition_recognitionFinish() {
}

function Recognition_texttonumber(text) {
return text.replace(//g,"0").replace(//g,"1").replace(//g,"2").replace(//g,"3").replace(//g,"4").replace(//g,"5").replace(//g,"6").replace(//g,"7").replace(//g,"8").replace(//g,"9").replace(//g,"10");
}

0 comments on commit ba1452d

Please sign in to comment.