Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2023-191
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2023-191
2023-191
Commits
fbc1a42d
Commit
fbc1a42d
authored
Aug 20, 2023
by
Tharuka Dilshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Add audio to sign"
This reverts commit
948a40fe
parent
948a40fe
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1 addition
and
188 deletions
+1
-188
Frontend/src/App.js
Frontend/src/App.js
+0
-2
Frontend/src/components/SideNavBar.jsx
Frontend/src/components/SideNavBar.jsx
+1
-1
Frontend/src/pages/AudioToSign.jsx
Frontend/src/pages/AudioToSign.jsx
+0
-138
Frontend/src/styles/audioToSign.css
Frontend/src/styles/audioToSign.css
+0
-47
No files found.
Frontend/src/App.js
View file @
fbc1a42d
...
...
@@ -11,7 +11,6 @@ import Login from './pages/Login';
import
Register
from
'
./pages/Register
'
;
import
{
useEffect
,
useState
}
from
'
react
'
;
import
Test
from
'
./pages/Test
'
;
import
AudioToSign
from
'
./pages/AudioToSign
'
;
function
App
()
{
const
[
isLogged
,
setIsLogged
]
=
useState
(
sessionStorage
.
getItem
(
"
isLogged
"
));
...
...
@@ -31,7 +30,6 @@ function App() {
<
Routes
>
{
/* <Route path='*' element={<VideoToSign/>}/> */
}
<
Route
exact
path
=
'
/sign-detection
'
element
=
{
<
VideoToSign
/>
}
/
>
<
Route
exact
path
=
'
/audio-to-sign
'
element
=
{
<
AudioToSign
/>
}
/
>
<
/Routes>
<
/div
>
...
...
Frontend/src/components/SideNavBar.jsx
View file @
fbc1a42d
...
...
@@ -31,7 +31,7 @@ function SideNavBar() {
{
/* සංඥා ශබ්දකෝෂය */
}
<
NavLink
exact
to=
"/about"
className=
"nav-link main-nav-link"
activeClassName=
"active-link"
>
ix
{
d YíofldaIh
</
NavLink
>
{
/* ශබ්ද පරිවර්ථකය */
}
<
NavLink
exact
to=
"/
audio-to-sign
"
className=
"nav-link main-nav-link"
activeClassName=
"active-link"
>
Yío mßj¾:lh
</
NavLink
>
<
NavLink
exact
to=
"/
contact
"
className=
"nav-link main-nav-link"
activeClassName=
"active-link"
>
Yío mßj¾:lh
</
NavLink
>
{
/* සංඥා හඳුනාගැනීම */
}
<
NavLink
exact
to=
"/sign-detection"
className=
"nav-link main-nav-link "
activeClassName=
"active-link"
>
ix
{
d y÷kd.ekSu
</
NavLink
>
{
/* වාචික පුහුණුව */
}
...
...
Frontend/src/pages/AudioToSign.jsx
deleted
100644 → 0
View file @
948a40fe
import
React
,
{
useState
}
from
'
react
'
;
import
axios
from
'
axios
'
;
import
{
useRecordWebcam
}
from
'
react-record-webcam
'
;
import
RestService
from
"
../services/RestService
"
;
import
'
../styles/audioToSign.css
'
;
const
AudioToSign
=
()
=>
{
const
[
file
,
setFile
]
=
useState
(
null
);
const
handleFileChange
=
(
event
)
=>
{
const
selectedFile
=
event
.
target
.
files
[
0
];
setFile
(
selectedFile
);
};
// const handleUpload = () => {
// if (file) {
// try {
// const formData = new FormData();
// formData.append('audio1', file);
// axios.post('http://127.0.0.1:5000/uploadaudio', formData, {
// //axios.get('http://localhost:9000/', formData, {
// headers: {
// 'Content-Type': 'multipart/form-data',
// },
// });
// console.log('File uploaded successfully!');
// } catch (error) {
// console.error('Error uploading file:', error);
// }
// }
// };
//*************************************************** */
const
[
videoFile
,
setVideoFile
]
=
useState
(
null
);
const
[
audioFile
,
setAudioFile
]
=
useState
([]);
const
handleVideoFileChange
=
(
event
)
=>
{
setVideoFile
(
event
.
target
.
files
[
0
]);
};
const
handleAudioFileChange
=
(
event
)
=>
{
setAudioFile
(
event
.
target
.
files
[
0
]);
};
const
handleVideoUpload
=
()
=>
{
if
(
videoFile
)
{
const
formData
=
new
FormData
();
formData
.
append
(
'
video
'
,
videoFile
);
axios
.
post
(
'
http://127.0.0.1:5000/transcribe-audio
'
,
formData
)
.
then
(
response
=>
{
console
.
log
(
'
Video uploaded successfully
'
);
})
.
catch
(
error
=>
{
console
.
error
(
'
Error:
'
,
error
);
});
}
};
const
handleAudioUpload
=
()
=>
{
console
.
log
(
audioFile
)
const
formData
=
new
FormData
();
formData
.
append
(
'
audio1
'
,
audioFile
);
axios
.
post
(
'
http://127.0.0.1:5000/transcribe-audio
'
,
formData
)
.
then
(
response
=>
{
console
.
log
(
response
);
console
.
log
(
'
Audio uploaded successfully
'
);
})
.
catch
(
error
=>
{
console
.
error
(
'
Error:
'
,
error
);
});
};
return
(
<
div
className=
"col col-lg-12"
>
<
div
className=
'row'
>
<
h1
>
Upload Video
</
h1
>
</
div
>
<
div
className=
'row'
>
<
input
type=
"file"
accept=
"video/*"
onChange=
{
handleVideoFileChange
}
/>
{
/* <button onClick={handleVideoUpload}>Upload Video</button> */
}
<
button
className=
"btn video-btn"
onClick=
{
handleVideoUpload
}
>
Upload Video
</
button
>
</
div
>
<
div
className=
'row'
>
<
h1
>
Upload Audio
</
h1
>
</
div
>
<
div
className=
'row'
>
<
input
type=
"file"
onChange=
{
(
e
)
=>
setAudioFile
(
e
.
target
.
files
[
0
])
}
/>
{
/* <button onClick={handleAudioUpload}>Upload Audio</button> */
}
<
button
className=
"btn video-btn"
onClick=
{
handleAudioUpload
}
>
Upload Audio
</
button
>
</
div
>
<
br
/>
<
div
className=
"row"
>
<
div
className=
"col-6 col-sm-4"
>
<
h3
className=
"mt-4"
style=
{
{
fontFamily
:
'
FMAbayaBld
'
}
}
>
w¾:h (
</
h3
>
<
h1
className=
"d-flex align-items-center justify-content-center"
>
ffffs
</
h1
>
</
div
>
<
div
class=
"col-6 col-sm-4"
>
<
video
autoPlay
muted
className=
"video-box1"
/>
</
div
>
</
div
>
</
div
>
);
};
export
default
AudioToSign
;
Frontend/src/styles/audioToSign.css
deleted
100644 → 0
View file @
948a40fe
.video-box1
{
border-width
:
3px
;
border-color
:
#af2c00
;
border-style
:
solid
;
border-radius
:
2vw
;
box-shadow
:
0
4px
8px
0
rgba
(
0
,
0
,
0
,
0.552
),
0
10px
10px
0
rgba
(
0
,
0
,
0
,
0.338
);
/* box-shadow: 0 1px 10px 0 rgba(66, 66, 66, 0.336), 0 6px 20px 0 rgba(100, 100, 100, 0.082); */
/* width: 40vw; */
height
:
45vh
;
width
:
65vh
;
align-items
:
center
;
background-color
:
black
;
background-image
:
url('../images/Skulls.jpg')
;
}
.aa
{
align-items
:
end
;
}
.card
{
align-items
:
end
;
width
:
100%
;
background-color
:
transparent
;
border-color
:
transparent
;
}
section
{
margin
:
20px
;
}
input
::-webkit-file-upload-button
{
position
:
absolute
;
padding
:
6px
15px
;
background-color
:
rgb
(
230
,
154
,
78
);
border
:
none
;
border-radius
:
5px
;
color
:
white
;
text-transform
:
uppercase
;
box-shadow
:
0px
3px
3px
-2px
rgba
(
0
,
0
,
0
,
0.2
),
0px
3px
4px
0px
rgba
(
0
,
0
,
0
,
0.14
),
0px
1px
8px
0px
rgba
(
0
,
0
,
0
,
0.12
);
transition
:
100ms
ease-out
;
cursor
:
pointer
;
}
input
::-webkit-file-upload-button:hover
{
background-color
:
#9e8160
;
box-shadow
:
0px
3px
5px
-1px
rgba
(
0
,
0
,
0
,
0.2
),
0px
5px
8px
0px
rgba
(
0
,
0
,
0
,
0.14
),
0px
1px
14px
0px
rgba
(
0
,
0
,
0
,
0.12
)
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment