Toggle navigation
Toggle navigation
This project
Loading...
Sign in
민병수
/
Voicoding
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
천현우
2021-06-06 18:09:17 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
661704f0aa99be909ad26997a87bfb4bbee7cc27
661704f0
1 parent
8a6e6938
fetching
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
Voicoding_web/Voico_Home.css
Voicoding_web/client.js
Voicoding_web/Voico_Home.css
View file @
661704f
...
...
@@ -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
;
...
...
Voicoding_web/client.js
View file @
661704f
...
...
@@ -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
);
...
...
Please
register
or
login
to post a comment