이재호

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
1 curl -v -X POST "https://kakaoi-newtone-openapi.kakao.com/v1/synthesize" \ 1 curl -v -X POST "https://kakaoi-newtone-openapi.kakao.com/v1/synthesize" \
2 -H "Content-Type: application/xml" \ 2 -H "Content-Type: application/xml" \
3 --H "Authorization: KakaoAK b471fd473a02136533554c3c6c108c91" \ 3 +-H "Authorization: {KAKAO API KEY}" \
4 -d '<speak><voice name="WOMAN_READ_CALM">정상</voice> </speak>' > 0.mp3 4 -d '<speak><voice name="WOMAN_READ_CALM">정상</voice> </speak>' > 0.mp3
5 5
6 curl -v -X POST "https://kakaoi-newtone-openapi.kakao.com/v1/synthesize" \ 6 curl -v -X POST "https://kakaoi-newtone-openapi.kakao.com/v1/synthesize" \
7 -H "Content-Type: application/xml" \ 7 -H "Content-Type: application/xml" \
8 --H "Authorization: KakaoAK b471fd473a02136533554c3c6c108c91" \ 8 +-H "Authorization: {KAKAO API KEY}" \
9 --d '<speak><voice name="WOMAN_READ_CALM">미착용</voice></speak>' > 1.mp3 9 +-d '<speak><voice name="WOMAN_READ_CALM">마스크를 정확히 착용하세요.</voice></speak>' > 1.mp3
10 10
11 curl -v -X POST "https://kakaoi-newtone-openapi.kakao.com/v1/synthesize" \ 11 curl -v -X POST "https://kakaoi-newtone-openapi.kakao.com/v1/synthesize" \
12 -H "Content-Type: application/xml" \ 12 -H "Content-Type: application/xml" \
13 --H "Authorization: KakaoAK b471fd473a02136533554c3c6c108c91" \ 13 +-H "Authorization: {KAKAO API KEY}" \
14 --d '<speak><voice name="WOMAN_READ_CALM">턱스크</voice></speak>' > 2.mp3
15 -
16 -curl -v -X POST "https://kakaoi-newtone-openapi.kakao.com/v1/synthesize" \
17 --H "Content-Type: application/xml" \
18 --H "Authorization: KakaoAK b471fd473a02136533554c3c6c108c91" \
19 --d '<speak><voice name="WOMAN_READ_CALM">입스크</voice></speak>' > 3.mp3
20 -
21 -curl -v -X POST "https://kakaoi-newtone-openapi.kakao.com/v1/synthesize" \
22 --H "Content-Type: application/xml" \
23 --H "Authorization: KakaoAK b471fd473a02136533554c3c6c108c91" \
24 -d '<speak><voice name="WOMAN_READ_CALM">시작</voice> </speak>' > 4.mp3 14 -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){ ...@@ -14,7 +14,7 @@ router.get('/data', function(req, res, next){
14 14
15 data = { 15 data = {
16 image : "/images/"+id+".jpg", 16 image : "/images/"+id+".jpg",
17 - audio : "/audio"+id+".mp3" 17 + audio : "/audios/"+id+".mp3"
18 } 18 }
19 //데이터 확인 19 //데이터 확인
20 console.log(data); 20 console.log(data);
......
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
115 </div> 115 </div>
116 <div class="box2"> 116 <div class="box2">
117 <div id="check_image"> 117 <div id="check_image">
118 - <img class="alert_image" src="/images/1.jpg"> 118 + <img class="alert_image" src="/images/2.jpg">
119 </div> 119 </div>
120 120
121 <!-- 인풋 폼 나중에 합치기 --> 121 <!-- 인풋 폼 나중에 합치기 -->
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
147 <span id = "check_audio"> 147 <span id = "check_audio">
148 <!--초기값으로 '시작'이라는 음성을 사용 --> 148 <!--초기값으로 '시작'이라는 음성을 사용 -->
149 <!--auto play 기능을 위해 iframe 사용 --> 149 <!--auto play 기능을 위해 iframe 사용 -->
150 - <iframe src="/audios/4.mp3" allow="autoplay" id="audio" style="display:none"></iframe> 150 + <iframe src="/audios/3.mp3" allow="autoplay" id="audio" style="display:none"></iframe>
151 </span> 151 </span>
152 <!-- footer --> 152 <!-- footer -->
153 <footer> 153 <footer>
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
168 // https://github.com/googlecreativelab/teachablemachine-community/tree/master/libraries/image 168 // https://github.com/googlecreativelab/teachablemachine-community/tree/master/libraries/image
169 169
170 // the link to your model provided by Teachable Machine export panel 170 // the link to your model provided by Teachable Machine export panel
171 - const URL = "https://teachablemachine.withgoogle.com/models/2QtWMcVET/"; 171 + const URL = "https://teachablemachine.withgoogle.com/models/ujJHV9bKh/";
172 172
173 let model, webcam, labelContainer, maxPredictions; 173 let model, webcam, labelContainer, maxPredictions;
174 174
...@@ -225,7 +225,7 @@ ...@@ -225,7 +225,7 @@
225 225
226 //해당 항목의 일치확률이 몇프로 이상이어야 해당 항목이라 판단할지 결정하는 변수 226 //해당 항목의 일치확률이 몇프로 이상이어야 해당 항목이라 판단할지 결정하는 변수
227 var check_probablity=0.95; 227 var check_probablity=0.95;
228 - //0: 완벽 1: 안씀 2: 턱스크 3: 입스크 228 + //0: 완벽 1: 불량 2: 배경 -> 사람이 없는 경우
229 229
230 if(prediction[0].probability.toFixed(2)>check_probablity){ 230 if(prediction[0].probability.toFixed(2)>check_probablity){
231 predict_id=0; 231 predict_id=0;
...@@ -236,9 +236,6 @@ ...@@ -236,9 +236,6 @@
236 else if(prediction[2].probability.toFixed(2)>check_probablity){ 236 else if(prediction[2].probability.toFixed(2)>check_probablity){
237 predict_id=2; 237 predict_id=2;
238 } 238 }
239 - else if(prediction[3].probability.toFixed(2)>check_probablity){
240 - predict_id=3;
241 - }
242 239
243 //이전 결과와 다를떄만 ajax요청 240 //이전 결과와 다를떄만 ajax요청
244 //last_result_predict는 전역변수. 초기값 -999로 설정되어있다. 241 //last_result_predict는 전역변수. 초기값 -999로 설정되어있다.
...@@ -246,7 +243,7 @@ ...@@ -246,7 +243,7 @@
246 if(last_result_predict!=predict_id){ 243 if(last_result_predict!=predict_id){
247 244
248 //ajax로 서버에 그 id에 해당하는 이미지의 주소와 음성파일을 달라고 요청한다. 245 //ajax로 서버에 그 id에 해당하는 이미지의 주소와 음성파일을 달라고 요청한다.
249 - if(predict_id > 0){ 246 + if(predict_id >= 0){
250 //last_result_predict값을 지금 결과로 나온 predict로 초기화해준다. 247 //last_result_predict값을 지금 결과로 나온 predict로 초기화해준다.
251 last_result_predict = predict_id; 248 last_result_predict = predict_id;
252 $(function() { 249 $(function() {
......