천현우

fetching

......@@ -121,10 +121,11 @@ button:hover{
#output{
margin:20px;
display:flex;
align-items:center;
padding: 10px;
height:700px;
background-color:rgba(0,0,0,.87);
color:var(--text-color);
font-size:20px;
}
#recordButton{
line-height: 22px;
......
......@@ -4,7 +4,7 @@ const recordButton = document.getElementById("recordButton");
const transcribeButton = document.getElementById("transcribeButton");
recordButton.addEventListener("click", startRecording);
transcribeButton.addEventListener("click", transcribeText);
let cnt = 0;
let cnt = 1;
function startRecording() {
let constraints = { audio: true, video:false }
recordButton.disabled = true;
......@@ -33,7 +33,7 @@ function uploadSoundData(blob) {
let formData = new FormData();
xhr.onload = function(e) {
if(this.readyState === 4) {
document.getElementById("output").innerHTML += `${cnt++}: ${JSON.parse(e.target.responseText)}<br>`;
document.getElementById("output").innerHTML += `${cnt++}: ${JSON.parse(e.target.responseText)}<br><br>`;
}
};
formData.append("audio_data", blob, filename);
......