Showing
2 changed files
with
4 additions
and
3 deletions
... | @@ -121,10 +121,11 @@ button:hover{ | ... | @@ -121,10 +121,11 @@ button:hover{ |
121 | #output{ | 121 | #output{ |
122 | margin:20px; | 122 | margin:20px; |
123 | display:flex; | 123 | display:flex; |
124 | - align-items:center; | 124 | + padding: 10px; |
125 | height:700px; | 125 | height:700px; |
126 | background-color:rgba(0,0,0,.87); | 126 | background-color:rgba(0,0,0,.87); |
127 | color:var(--text-color); | 127 | color:var(--text-color); |
128 | + font-size:20px; | ||
128 | } | 129 | } |
129 | #recordButton{ | 130 | #recordButton{ |
130 | line-height: 22px; | 131 | line-height: 22px; | ... | ... |
... | @@ -4,7 +4,7 @@ const recordButton = document.getElementById("recordButton"); | ... | @@ -4,7 +4,7 @@ const recordButton = document.getElementById("recordButton"); |
4 | const transcribeButton = document.getElementById("transcribeButton"); | 4 | const transcribeButton = document.getElementById("transcribeButton"); |
5 | recordButton.addEventListener("click", startRecording); | 5 | recordButton.addEventListener("click", startRecording); |
6 | transcribeButton.addEventListener("click", transcribeText); | 6 | transcribeButton.addEventListener("click", transcribeText); |
7 | -let cnt = 0; | 7 | +let cnt = 1; |
8 | function startRecording() { | 8 | function startRecording() { |
9 | let constraints = { audio: true, video:false } | 9 | let constraints = { audio: true, video:false } |
10 | recordButton.disabled = true; | 10 | recordButton.disabled = true; |
... | @@ -33,7 +33,7 @@ function uploadSoundData(blob) { | ... | @@ -33,7 +33,7 @@ function uploadSoundData(blob) { |
33 | let formData = new FormData(); | 33 | let formData = new FormData(); |
34 | xhr.onload = function(e) { | 34 | xhr.onload = function(e) { |
35 | if(this.readyState === 4) { | 35 | if(this.readyState === 4) { |
36 | - document.getElementById("output").innerHTML += `${cnt++}: ${JSON.parse(e.target.responseText)}<br>`; | 36 | + document.getElementById("output").innerHTML += `${cnt++}: ${JSON.parse(e.target.responseText)}<br><br>`; |
37 | } | 37 | } |
38 | }; | 38 | }; |
39 | formData.append("audio_data", blob, filename); | 39 | formData.append("audio_data", blob, filename); | ... | ... |
-
Please register or login to post a comment