이재호

Update images and audios

No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
curl -v -X POST "https://kakaoi-newtone-openapi.kakao.com/v1/synthesize" \
-H "Content-Type: application/xml" \
-H "Authorization: KakaoAK b471fd473a02136533554c3c6c108c91" \
-H "Authorization: {KAKAO API KEY}" \
-d '<speak><voice name="WOMAN_READ_CALM">정상</voice> </speak>' > 0.mp3
curl -v -X POST "https://kakaoi-newtone-openapi.kakao.com/v1/synthesize" \
-H "Content-Type: application/xml" \
-H "Authorization: KakaoAK b471fd473a02136533554c3c6c108c91" \
-d '<speak><voice name="WOMAN_READ_CALM">미착용</voice></speak>' > 1.mp3
-H "Authorization: {KAKAO API KEY}" \
-d '<speak><voice name="WOMAN_READ_CALM">마스크를 정확히 착용하세요.</voice></speak>' > 1.mp3
curl -v -X POST "https://kakaoi-newtone-openapi.kakao.com/v1/synthesize" \
-H "Content-Type: application/xml" \
-H "Authorization: KakaoAK b471fd473a02136533554c3c6c108c91" \
-d '<speak><voice name="WOMAN_READ_CALM">턱스크</voice></speak>' > 2.mp3
curl -v -X POST "https://kakaoi-newtone-openapi.kakao.com/v1/synthesize" \
-H "Content-Type: application/xml" \
-H "Authorization: KakaoAK b471fd473a02136533554c3c6c108c91" \
-d '<speak><voice name="WOMAN_READ_CALM">입스크</voice></speak>' > 3.mp3
curl -v -X POST "https://kakaoi-newtone-openapi.kakao.com/v1/synthesize" \
-H "Content-Type: application/xml" \
-H "Authorization: KakaoAK b471fd473a02136533554c3c6c108c91" \
-H "Authorization: {KAKAO API KEY}" \
-d '<speak><voice name="WOMAN_READ_CALM">시작</voice> </speak>' > 4.mp3
......

33 KB | W: | H:

403 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

104 KB | W: | H:

41.5 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
......@@ -14,7 +14,7 @@ router.get('/data', function(req, res, next){
data = {
image : "/images/"+id+".jpg",
audio : "/audio"+id+".mp3"
audio : "/audios/"+id+".mp3"
}
//데이터 확인
console.log(data);
......
......@@ -115,7 +115,7 @@
</div>
<div class="box2">
<div id="check_image">
<img class="alert_image" src="/images/1.jpg">
<img class="alert_image" src="/images/2.jpg">
</div>
<!-- 인풋 폼 나중에 합치기 -->
......@@ -147,7 +147,7 @@
<span id = "check_audio">
<!--초기값으로 '시작'이라는 음성을 사용 -->
<!--auto play 기능을 위해 iframe 사용 -->
<iframe src="/audios/4.mp3" allow="autoplay" id="audio" style="display:none"></iframe>
<iframe src="/audios/3.mp3" allow="autoplay" id="audio" style="display:none"></iframe>
</span>
<!-- footer -->
<footer>
......@@ -168,7 +168,7 @@
// https://github.com/googlecreativelab/teachablemachine-community/tree/master/libraries/image
// the link to your model provided by Teachable Machine export panel
const URL = "https://teachablemachine.withgoogle.com/models/2QtWMcVET/";
const URL = "https://teachablemachine.withgoogle.com/models/ujJHV9bKh/";
let model, webcam, labelContainer, maxPredictions;
......@@ -225,7 +225,7 @@
//해당 항목의 일치확률이 몇프로 이상이어야 해당 항목이라 판단할지 결정하는 변수
var check_probablity=0.95;
//0: 완벽 1: 안씀 2: 턱스크 3: 입스크
//0: 완벽 1: 불량 2: 배경 -> 사람이 없는 경우
if(prediction[0].probability.toFixed(2)>check_probablity){
predict_id=0;
......@@ -236,9 +236,6 @@
else if(prediction[2].probability.toFixed(2)>check_probablity){
predict_id=2;
}
else if(prediction[3].probability.toFixed(2)>check_probablity){
predict_id=3;
}
//이전 결과와 다를떄만 ajax요청
//last_result_predict는 전역변수. 초기값 -999로 설정되어있다.
......@@ -246,7 +243,7 @@
if(last_result_predict!=predict_id){
//ajax로 서버에 그 id에 해당하는 이미지의 주소와 음성파일을 달라고 요청한다.
if(predict_id > 0){
if(predict_id >= 0){
//last_result_predict값을 지금 결과로 나온 predict로 초기화해준다.
last_result_predict = predict_id;
$(function() {
......