Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2020-101
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
Sachith Fernando
2020-101
Commits
c217af8f
Commit
c217af8f
authored
Jan 09, 2021
by
LiniEisha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Integrate
parent
3820451b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
5 deletions
+13
-5
AttendanceApp/camera.py
AttendanceApp/camera.py
+1
-1
AttendanceApp/templates/AttendanceApp/Initiate_Lecture.html
AttendanceApp/templates/AttendanceApp/Initiate_Lecture.html
+7
-0
AttendanceApp/test.py
AttendanceApp/test.py
+1
-1
LectureSummarizingApp/Voice Recorder.py
LectureSummarizingApp/Voice Recorder.py
+3
-3
LectureSummarizingApp/api.py
LectureSummarizingApp/api.py
+1
-0
No files found.
AttendanceApp/camera.py
View file @
c217af8f
...
@@ -23,7 +23,7 @@ maskNet = load_model(os.path.join(settings.BASE_DIR,'face_detector/mask_detector
...
@@ -23,7 +23,7 @@ maskNet = load_model(os.path.join(settings.BASE_DIR,'face_detector/mask_detector
class
IPWebCam
(
object
):
class
IPWebCam
(
object
):
def
__init__
(
self
):
def
__init__
(
self
):
self
.
url
=
"http://192.168.8.10
3
:8080/shot.jpg"
self
.
url
=
"http://192.168.8.10
0
:8080/shot.jpg"
def
__del__
(
self
):
def
__del__
(
self
):
cv2
.
destroyAllWindows
()
cv2
.
destroyAllWindows
()
...
...
AttendanceApp/templates/AttendanceApp/Initiate_Lecture.html
View file @
c217af8f
...
@@ -55,6 +55,13 @@ function testAPI() {
...
@@ -55,6 +55,13 @@ function testAPI() {
.
then
((
out
)
=>
{})
.
then
((
out
)
=>
{})
.
catch
((
err
)
=>
alert
(
'
error:
'
+
err
));
.
catch
((
err
)
=>
alert
(
'
error:
'
+
err
));
//audio
var
audio_name
=
'
Lecture
'
;
fetch
(
'
http://127.0.0.1:8000/summary/lecture-audio/?audio_name=
'
+
audio_name
)
then
((
res
)
=>
res
.
json
())
.
then
((
out
)
=>
{})
.
catch
((
err
)
=>
alert
(
'
error:
'
+
err
));
}
}
var
time
=
'
time
'
;
var
time
=
'
time
'
;
function
f
()
{
function
f
()
{
...
...
AttendanceApp/test.py
View file @
c217af8f
...
@@ -12,7 +12,7 @@ def IPWebcamTest():
...
@@ -12,7 +12,7 @@ def IPWebcamTest():
# Replace the URL with your own IPwebcam shot.jpg IP:port
# Replace the URL with your own IPwebcam shot.jpg IP:port
# url = 'http://192.168.2.35:8080/shot.jpg'
# url = 'http://192.168.2.35:8080/shot.jpg'
url
=
'http://192.168.8.10
3
:8080/shot.jpg'
url
=
'http://192.168.8.10
0
:8080/shot.jpg'
# url = 'http://192.168.1.11:8080/startvideo?force=1&tag=rec'
# url = 'http://192.168.1.11:8080/startvideo?force=1&tag=rec'
# url = 'http://192.168.1.11:8080/stopvideo?force=1'
# url = 'http://192.168.1.11:8080/stopvideo?force=1'
...
...
LectureSummarizingApp/Voice Recorder.py
View file @
c217af8f
...
@@ -12,7 +12,7 @@ def AudioRecorder(audio):
...
@@ -12,7 +12,7 @@ def AudioRecorder(audio):
DESTINATION_DIR
=
os
.
path
.
join
(
BASE_DIR
,
"audioArray
\\
{}"
.
format
(
audio
))
DESTINATION_DIR
=
os
.
path
.
join
(
BASE_DIR
,
"audioArray
\\
{}"
.
format
(
audio
))
#for the audio
#for the audio
LECTURE_AUDIO_DIR
=
os
.
path
.
join
(
BASE_DIR
,
"lectures
\\
{}"
.
format
(
audio
))
LECTURE_AUDIO_DIR
=
os
.
path
.
join
(
BASE_DIR
,
"lectures
\\
Lecture_
{}"
.
format
(
audio
))
# Sampling frequency
# Sampling frequency
...
@@ -30,8 +30,8 @@ def AudioRecorder(audio):
...
@@ -30,8 +30,8 @@ def AudioRecorder(audio):
# This will convert the NumPy array to an audio
# This will convert the NumPy array to an audio
# file with the given sampling frequency
# file with the given sampling frequency
write
(
"recording0.wav"
,
freq
,
recording
)
write
(
DESTINATION_DIR
,
freq
,
recording
)
#Convert the NumPy array to audio file
#Convert the NumPy array to audio file
wv
.
write
(
"recording1.wav"
,
recording
,
freq
,
sampwidth
=
2
)
wv
.
write
(
LECTURE_AUDIO_DIR
,
recording
,
freq
,
sampwidth
=
2
)
\ No newline at end of file
\ No newline at end of file
LectureSummarizingApp/api.py
View file @
c217af8f
...
@@ -27,6 +27,7 @@ class LectureAudioAPI(APIView):
...
@@ -27,6 +27,7 @@ class LectureAudioAPI(APIView):
return
Response
(
lecture_audio_serializer
.
data
)
return
Response
(
lecture_audio_serializer
.
data
)
class
audioNoiseRemovedList
(
APIView
):
class
audioNoiseRemovedList
(
APIView
):
def
get
(
self
,
request
):
def
get
(
self
,
request
):
...
...
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