less than 1 minute read

Tags: ,

  • 前行提要

    • 自己計畫寫 AI Side Project 四大主題:

    • 開始不到一週半,一堆炸彈和雷阿~~:zap::zap::zap::zap::zap:

    • BUT 這就是我當初寫 賽PROJECT 的初衷阿!!! :heart::heart::heart:

Object Detection - WebCam

  • MediaDevices.getUserMedia()

  • Announcing WebRTC and Media Capture, JUN 7, 2017

  • I am not holding my breath….

    • 我的手機 Samsung S9+ AndroidObject Detection 跑起來都正常,但 APPLE 都會是黑螢幕,當初想說能不能用 Chorme 在 iphone 下開 Camera 結果查到 這篇

    • 後來修正後 已經測到 ipad (5th generation) ios: 13.1.3 目前用 Safari 開可以正常偵測到物件 :high_brightness:

  • 還沒解決的問題

    • iphone safari 開有兩種狀況

      • iphone 11 一開有抓到螢幕,也有呈現偵測到的 bounding box 然後就停住了… 像照相一樣!!! 就一張圖 XD

      • iphone 其他 一開就黑頻一遍 XD

Object Detection - Text to Speech

  •    function populateVoiceList() {
         if(typeof speechSynthesis === 'undefined') {
           return;
         }
         
         var voices = speechSynthesis.getVoices();
         
         for(i = 0; i < voices.length ; i++) {
           var option = document.createElement('option');
           option.textContent = voices[i].name + ' (' + voices[i].lang + ')';
             
           if(voices[i].default) {
             option.textContent += ' -- DEFAULT';
           }
         
           option.setAttribute('data-lang', voices[i].lang);
           option.setAttribute('data-name', voices[i].name);
           document.getElementById("voiceSelect").appendChild(option);
         }
       }
         
       populateVoiceList();
       if (typeof speechSynthesis !== 'undefined' && speechSynthesis.onvoiceschanged !== undefined) {
         speechSynthesis.onvoiceschanged = populateVoiceList;
       }
    
  • var voices = speechSynthesis.getVoices(); 寫在 function 裡面超級重要!!!

  • https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis/getVoices
  • 乾貨

    • http://teropa.info/blog/2016/07/28/javascript-systems-music.html
    • https://codepen.io/teropa/pen/gvwwZL/
    • https://medium.com/@oluwafunmi.ojo/getting-started-with-magenta-js-e7ffbcb64c21
    • https://tensorflow.github.io/magenta-js/music/demos/