Commit c217af8f authored by LiniEisha's avatar LiniEisha

Integrate

parent 3820451b
......@@ -23,7 +23,7 @@ maskNet = load_model(os.path.join(settings.BASE_DIR,'face_detector/mask_detector
class IPWebCam(object):
def __init__(self):
self.url = "http://192.168.8.103:8080/shot.jpg"
self.url = "http://192.168.8.100:8080/shot.jpg"
def __del__(self):
cv2.destroyAllWindows()
......
......@@ -55,6 +55,13 @@ function testAPI() {
.then((out) => {})
.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';
function f() {
......
......@@ -12,7 +12,7 @@ def IPWebcamTest():
# Replace the URL with your own IPwebcam shot.jpg IP:port
# url = 'http://192.168.2.35:8080/shot.jpg'
url = 'http://192.168.8.103:8080/shot.jpg'
url = 'http://192.168.8.100:8080/shot.jpg'
# url = 'http://192.168.1.11:8080/startvideo?force=1&tag=rec'
# url = 'http://192.168.1.11:8080/stopvideo?force=1'
......
......@@ -12,7 +12,7 @@ def AudioRecorder(audio):
DESTINATION_DIR = os.path.join(BASE_DIR, "audioArray\\{}".format(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
......@@ -30,8 +30,8 @@ def AudioRecorder(audio):
# This will convert the NumPy array to an audio
# file with the given sampling frequency
write("recording0.wav", freq, recording)
write(DESTINATION_DIR, freq, recording)
#Convert the NumPy array to audio file
wv.write("recording1.wav", recording, freq, sampwidth=2)
\ No newline at end of file
wv.write(LECTURE_AUDIO_DIR, recording, freq, sampwidth=2)
\ No newline at end of file
......@@ -27,6 +27,7 @@ class LectureAudioAPI(APIView):
return Response(lecture_audio_serializer.data)
class audioNoiseRemovedList(APIView):
def get(self, request):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment