RebeccaLab
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Help
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    --- title: 'Google AIY 2022' disqus: hackmd --- # Google AIY Project ###### tags:`Project 2022` ![downloads](https://img.shields.io/github/downloads/atom/atom/total.svg) ![build](https://img.shields.io/appveyor/ci/:user/:repo.svg) ![chat](https://img.shields.io/discord/:serverId.svg) [TOC] # 分工 音箱的中文功能 : 林廷翰,蔡宗唐 將資料建立到excel : 陳秉澤,林哲瑋 # 使用手冊 ==**以下步驟皆使用語音方式輸入**== ## 1.輸入"智慧音箱"啟動系統 等待音箱回應"你需要什麼功能呢" ## 2.選擇功能 選擇以下其中一種功能 * 行程 * 音樂 * 時間 * 計算機 * 收音機 * 錄音 * 地區氣溫 * 遊戲 * 取消 * 再見 ## 3.行程 輸入"行程"進入功能 選擇三種功能 * 加入 * 刪除 * 查詢 ### 加入 1. 音箱詢問行程日期(音箱沒聽清楚則重新詢問),並判斷日期是否符合常理。 2. 詢問行程時間(音箱沒聽清楚則重新詢問),並判斷時間是否符合常理。 3. 詢問欲加入之行程,並再次確認行程,若非此行程則重新詢問欲加入行程。 4. 行程建立成功後,詢問欲提早多久播報行程,再判斷輸入時. 間是否合理,超出範圍則重新輸入。 ### 刪除 1. 詢問欲刪除之行程(音箱沒聽清楚則重新詢問) 2. 確認欲刪除之行程有無錯誤,並查詢資料庫有無此行程。 3. 若存在兩個以上相同的行程,逐一播報出相同行程的ID及日期。若沒有相同的行程則直接刪除。 4. 詢問欲刪除形成的ID,然後刪除行程。 ### 查詢 1. 詢問欲查詢之行程(音箱沒聽清楚則重新詢問) 2. 查詢資料庫有無此行程。 3. 播報行程資訊。 ## 4.音樂 1. 詢問欲播放的音樂。 2. 查詢資料庫是否存在此音樂。 3. 存在音樂則播放音樂,不存在重新詢問欲查詢音樂或退出功能。 4. 播放途中可以快速按下實體按鈕暫停音樂播放,再次快速按下實體按鈕即可恢復播放 6. 播放途中可以長按實體按鈕並放開即可終止退出音樂播放 ## 5.時間 播報當下時間。 ## 6.計算機 1. 選擇五種功能 * 加法 * 減法 * 乘法 * 除法 * 指數 2. 輸入欲計算的算式。 3. 此計算機只能計算兩個值之結果如(3+4),(584*844)等等。 因為語音辨識的限制,有時會聽不清楚所講內容,例如語音輸入("4 除以2"), 有可能辨識成("4/12")進行運算。故限制使用者==只能進行兩個值之運算==。 ## 7.收音機 1. 選擇電台 * ICRT * Asia FM 2. 按下按鈕即可停止收音機播放 ## 8.錄音 1. 輸入檔名建立錄音檔 2. 輸入錄音時長 3. 開始錄音,時間到達預計時長便會停止錄音 ## 9.地區氣溫 1. 輸入欲查詢地區 2. 音箱播報當地氣溫 ## 10.遊戲 1. 語音輸入4位不重複數字,共有10次機會 2. 輸入完數字會告知幾A幾B,A為正確位置正確數字,B為錯誤位置正確數字 3. 10次未猜出則遊戲結束,成功猜對則會播報成功音效 ## 11.取消 在其他功能執行時,若臨時想退出功能,在任何智慧音箱等待輸入期間輸入"取消"即可退出功能 ## 12.再見 關閉智慧音箱 # Connect To your Voice Kit ==將**Voice Kit連上電源 "不要接在電腦主機上"**== ## 方法一: ### **在GooglePlay商店下載`Google AIY Project`APP** (https://play.google.com/store/apps/details?id=com.google.android.apps.aiy) ![](https://i.imgur.com/tTlWPTr.png =400x) ### **按照APP指示完成連線並取得IP address:** ### **點選Voice Kit** ![](https://i.imgur.com/1NH2O2M.png =400x) ### **點選Connect** ![](https://i.imgur.com/t6ApYrf.png =400x) ### **點選CONTINUE** ![](https://i.imgur.com/MvHwHfP.png =400x) ### **打開Voice Kit上蓋,點選CONTINUE** ![](https://i.imgur.com/v8pVerZ.png =400x) ### **長按圖片所指按鈕五秒直至旁邊LED燈開始閃爍** ![](https://i.imgur.com/wu9NPAj.png =400x) ![](https://i.imgur.com/0QIARlb.jpg =400x) ### **點選Allow Access** ![](https://i.imgur.com/Rbou3G2.png =400x) ### **點選找到的Voice Kit 進行連線** ![](https://i.imgur.com/NGPutdx.png =400x) ### **選擇與電腦相同之wifi連線** ![](https://i.imgur.com/Cmt39GP.png =400x) ### **連線成功,點選CONTINUE** ![](https://i.imgur.com/GRmcGMD.png =400x) ### **成功取得IP Address** ![](https://i.imgur.com/Z3qmcre.png =400x) **跳到==用安全殼層連線至Voice Kit==繼續連線動作** ## 方法二: ### **另外準備兩條線和一個轉接頭** ``` 一條usb hub Hdmi母轉mini Hdmi公轉接線 usb轉mini Hdmi轉接頭 ``` ==usb hub== ![](https://i.imgur.com/oOAJsZ2.jpg =400x) ==Hdmi母轉mini Hdmi公轉接線== ![](https://i.imgur.com/gEFJAMZ.jpg =400x) ==usb轉mini Hdmi轉接頭== ![](https://i.imgur.com/jEC8alS.jpg =400x) ### **開始連線** * 先將滑鼠與鍵盤接usb hub上,接上usb轉mini Hdmi轉接頭 * 插入Voice Kit * 將螢幕的hdmi線接上Hdmi母轉mini Hdmi公轉接線 * 插入Voice Kit ![](https://i.imgur.com/HgZsDRT.jpg) ### **接上電源線等待Voice Kit開機** ![](https://i.imgur.com/rWzRew8.jpg) * 點選右上角wifi圖示,連接和電腦相同之wifi ![](https://i.imgur.com/TtFu4hb.jpg) * 連線成功後將滑鼠移至wifi圖案上,獲得IP address ![](https://i.imgur.com/bI8WAit.jpg) ## 用安全殼層連線至Voice Kit ### **下載安全殼層擴充功能** (https://chrome.google.com/webstore/detail/secure-shell/iodihamcpbpeioajjeobimgagajmlibd) ### **開啟安全殼層** ``` 點選"連線對話方塊" ``` ![](https://i.imgur.com/0Con34W.jpg =500x) ### 如上圖所取得IP Address **pi@是預設輸入,在後面打上取得的IP Address後按下連線** ![](https://i.imgur.com/dmP8Pdl.png) ### **輸入密碼`raspberry`** **raspberry為預設密碼** ![](https://i.imgur.com/rr6VUJY.png) ### **連線成功** ![](https://i.imgur.com/vhKN467.png) # 測試音量 * 輸入alsamixer ![](https://i.imgur.com/Fcv0iVg.jpg) * 畫面會顯示如下,利用方向鍵上下或直接輸入來調整音量大小 ![](https://i.imgur.com/UozXize.jpg) * 完成後按ESC離開 * 輸入`/home/pi/AIY-projects-python/checkpoints/check_audio.py` ![](https://i.imgur.com/h80VVb9.jpg) * 依照指示即會聽到'test',之後進行錄音並回放,完成音量測試 參考網址 https://aiyprojects.withgoogle.com/voice#connect # 安裝中文輸入法 ## 安裝步驟 * 請參考下列網址依照步驟安裝新酷音中文輸入法 > https://hugheschung.blogspot.com/2019/01/raspberry-pi_24.html?m=1 ## 輸入SCIM遭遇問題 * 在執行中文輸入法卻發現打不開時,執行`scim -d`時發現報錯如下 ![](https://i.imgur.com/iUrZQuq.png) * 執行`ps -ef | grep scim`發現有4個SCIM相關程序執行中 ![](https://i.imgur.com/JzEWpV5.png) * 使用kill指令刪除全部4個程序利用他們的PID刪除 * 例如`kill 4706` * 成功刪除後再次輸入`scim -d`即可正常啟動 ![](https://i.imgur.com/n3SjhHW.png) * 參考網址 > https://www.cnblogs.com/txk1452/archive/2012/12/27/2835024.html # 可能遭遇問題 ## 開始工具列消失 * 若遇到如下圖一樣沒有開始工具列的情況且無法連線wifi,請參照此方法排除 * ![](https://i.imgur.com/hvF7FdY.jpg) * 先檢查是否有==raspi-config==這個指令 * 若沒有先參考這篇文章 https://blog.csdn.net/no1xium/article/details/107477055 ### 安裝raspi-config指令開啟SSH 1. 安裝依賴 `sudo apt install whiptail parted lua5.1 alsa-utils psmisc` 2. 從Raspberrypi官網下載最新的deb安裝包 `wget http://archive.raspberrypi.org/debian/pool/main/r/raspi-config/raspi-config_20200707_all.deb` * 最後all.deb的數字是開發版本,可參考http://archive.raspberrypi.org/debian/pool/main/r/raspi-config/ 替換成最新版本 3. 安裝Deb安裝包 `sudo dpkg -i raspi-config_20200707_all.deb` 4. 若裝好還是提示缺少依賴執行錯誤 `sudo apt install -f -y` 5. 運行raspi-config,需要sudo或以上權限 `sudo raspi-config` 6. 出現下列視窗 ![](https://i.imgur.com/wmGfVQZ.png) * 版本不同視窗UI可能會稍微不同,不影響 7. 選擇 Interfacing Options 進入 8. 選擇 ssh 進入 9. 選 YES. 10. 訊息顯示SSH開啟選擇確認離開 11. 選finish回到指令列 ### 利用終端連線到wifi(若使用APP連線方法失效) #### 查看網路狀態 `$ ifconfig -a` * 查看網路狀態,如果沒有出現wlan0的介面,可能是wifi沒有開或者介面沒有開啟wlan0 `$ ifconfig wlan0` * 查看wlan0介面資訊 #### 用rfkill 開啟 wifi `$ rfkill list` * (rfkill:Red Hat Customer Portal,用來開關、查詢藍芽及無線網路功能)其中的soft block代表軟體屏蔽,軟體層面可用rfkill來開啟或關閉 ![](https://i.imgur.com/OpgHcl6.png) ==可能沒有藍芽選項,不影響== `$ rfkill unblock wifi` * 開啟wifi(Turn On WiFi) #### 開啟網路介面 `$ sudo ifconfig wlan0 up` * 開啟wlan0網卡介面 (關閉則是 $ sudo ifconfig wlan0 down) #### 查看所掃描到的wifi `$ sudo iw dev wlan0 scan` * 掃描wifi資訊 `$ sudo iw dev wlan0 scan | grep SSID` * 找出所有掃描到的wifi名稱就像列出在Windows10上所搜尋到的熱點,如下圖 ![](https://i.imgur.com/9acOdgd.png) #### 修改連線設定檔 `$ sudo nano /etc/wpa_supplicant/wpa_supplicant.conf` ==ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 #country=TW 國碼,這行不一定要加 network={ ssid="WIFI名稱" psk="WIFI密碼" }== #### 進行連線、要IP `$ sudo wpa_cli -i wlan0 reconfigure` 如果出現 "OK" 代表成功連上熱點或WAP了, 趕快用 $ ifconfig 來看是否已經拿到IP、趕快 $ ping 8.8.8.8 看看 沒問題就可Ctrl+z中斷 如果出現 fail to connect to non-global ctrl_ifname wlan0 代表有問題, 首先先確定/etc/wpa_supplicant/wpa_supplicant.conf的檔案設定輸入正確 `$ ifconfig` 會出現如下圖所示,反白部分就是IP address,問題解決,可回去連上安全殼層 ![](https://i.imgur.com/LnTXwJa.png) #### 出現fail to connect to non-global ctrl_ifname wlan0 `$ sudo wpa_cli reconfigure` 如果出現 fail to connect to non-global ctrl_ifname nil 首先先確定連線設定檔案/etc/wpa_supplicant/wpa_supplicant.conf 設定輸入正確 再修改以下設定 `$ sudo nano /etc/network/interfaces` ==source-directory /etc/network/interfaces.d auto wlan0 iface wlan0 inet manual wap-conf /etc/wpa_supplicant/wpa_supplicant.conf== `$ sudo dhclient wlan0` 如果執行完畢代表成功連上了(如果出現File exists表示之前已經有連上了) 趕快用 $ ifconfig 來看是否已經拿到IP、趕快 $ ping 8.8.8.8 看看 如果遲遲沒有反應表示連線不上。 ## 建立新的.py檔 若是想要建立新的空白.py檔來執行或測試,可能會發現無法執行且會發現檔名呈現白色如下圖 ![](https://i.imgur.com/BGwu7S6.png) * 綠色為可執行檔,白色不可執行 依照以下步驟即可將開檔案轉變為可執行檔 首先執行一次,若發現錯誤代碼如下 ![](https://i.imgur.com/k6EsTC1.png) ==使用== `$ chmod u+x ./"你的檔名"` * 將檔案轉成可執行狀態 若想使用voice kit內建函式如say()出現錯誤代碼如下,且確定有import正確函式 ![](https://i.imgur.com/QWLu6KJ.png) ==加入以下代碼至最上面== ``` #!/usr/bin/env python3 # Copyright 2017 Google Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # coding=utf-8 """A demo of the Google CloudSpeech recognizer.""" ``` * 即可正確執行檔案並發現檔案名字變成綠色 ## 控制執行緒,不讓Child Thread影響Parent Thread #### flag無法使用 在我們所撰寫的程式中,許多地方會常常用到 `client.recognize(language_code=args.language,hint_phrases=hints)` 開啟智慧音箱進行語音辨識,當進入Child Thread中執行,便會一直使用到上述的client.recognize函式,但同時Parent Thread也會使用到client.recognize函式,導致音箱來不及處理,發出"裝置忙碌中"的提示讓程式無法順利執行,所以便想使用==flag==來控制client.recognize函式。 一開始令flag = 0,在Parent Thread設定條件,當flag == 0時,可以在Parent Thread啟用client.recognize函式,一旦進入Child Thread則將flag設為1,只可以在Child Thread啟用client.recognize函式 但實際執行發現Thread沒有共享記憶體,當flag == 1時已經在Child Thread裡面,flag無實際作用,所以此方法無法避免裝置忙碌發生。 最後使用==事件Event==來解決上述問題,可參考此網站 [https://www.liujiangblog.com/course/python/79](https://) ## 執行sudo apt-get update發生錯誤 #### 錯誤代碼 * 若錯誤代碼顯示 ``` NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY 0E98404D386FA1D9 ``` 由於無法取得它們的公鑰,以下簽章無法進行驗證,就參照這張圖片 把錯誤代碼 改成linux顯示的代碼![](https://i.imgur.com/SwkK8fO.jpg) ## 無法取出及備份正在編譯的檔案 當我們想備份編譯到一半的程式碼,拔出音箱記憶卡插入電腦存取時,會發現找不我們所想要的目錄及檔案如下圖 ![](https://i.imgur.com/Sb9dRHN.png) 這時候我們可以參考以下這支影片 ==https://www.youtube.com/watch?v=W20kbiBLZwg== * 首先先去下載"Diskinternals Linux Reader"程式 參考載點: https://diskinternals-linux-reader.en.softonic.com/ * 安裝並啟動程式後,找到對應磁碟打開 ![](https://i.imgur.com/1S2MRa4.jpg) * 選取想要的資料夾後按上方的==save==按鈕,選擇輸出路徑就能成功備份資料 ![](https://i.imgur.com/BSY2IZ2.jpg) ## 重新安裝樹梅派作業系統 當我們的樹梅派裝置有毀損導致無發編譯或進入系統時,可以重新安裝樹梅派作業系統來繼續編譯 * 首先請將編譯到一半之檔案或媒體備份 * 準備一張乾淨的記憶卡 * 到樹梅派官網下載Raspberry Pi Imager > https://www.raspberrypi.com/software/ ![](https://i.imgur.com/HNzB8MS.png) * 下載完成後將作業系統存入記憶卡,插上樹梅派即完成 # 進度報告 ## 3/11: * Download the AIY Projects app 並嘗試與手機連線 * 新增 Secure Shell Extension 擴充功能在瀏覽器並學習基本操作 * 構思機器外觀(加裝在模型上,自己做外殼...等等) ## 3/18: * 成功與AIY Projects app並取得IP address ![](https://i.imgur.com/prNpGLU.png =400x) * 成功利用所獲取IP address在Secure Shell Extension 擴充功能上連線到板子 ![](https://i.imgur.com/GHLBYwq.png) * 成功測試及調整音量大小並確認喇叭沒有異常 ![](https://i.imgur.com/Mk2VibI.png) * 成功在Google Cloud Platform上建立project, credentials, OAuth client ID ![](https://i.imgur.com/3Q1ANm1.png) * 成功在Secure Shell Extension上建立assistant.json並確認有在目錄中 ## 3/19 ~ 4/16 直至4/16為止都在解決Google assitant的驗證問題,解決後發現程式已被寫死,要使用Google Cloud Speech才能辨識中文並輸出。 ## 4/16 ~ 4/23 4/16至4/23處理Cloud Speech的驗證問題。在驗證完成後成功啟用中文語音辨識並且能夠輸出所說的話,但是卻沒辦法執行範例的語音指令,於是照著網站教學進行更新,卻發生許多不預期的錯誤。因為沒有備份原始程式碼,導致無法回到上一步動作,到目前為止仍然在處理此問題。 ## 4/23 ~ 4/26 4/23至4/28 詢問上屆負責此專題的學長後,修改了基底程式碼,依然無法恢復,並且衍生出更多不預期的問題,最後決定重灌整個系統,但是重灌後卻連SSH都無法連線。現在正努力嘗試修復... 通過google assistant的憑證 ![](https://i.imgur.com/z7CTIW2.jpg) ==音箱可辨識輸入的語音且能與之對話== ![](https://i.imgur.com/QjiU4LZ.jpg) ==發現google assistant無法支援中文== ![](https://i.imgur.com/c5N8bTZ.jpg) ==嘗試從程式碼直接更改語言== ![](https://i.imgur.com/byrayLZ.jpg) ==直接從樹莓派系統內更改也無法== ![](https://i.imgur.com/nsn3hre.jpg) ==嘗試直接從內建程式碼把EN改為TW== ![](https://i.imgur.com/4PX79Id.jpg) ==利用cloud speech可成功用中文對話== ![](https://i.imgur.com/SxTRe7O.jpg) ==但是他無法執行跟他說的指令,所以我們依照網路教學更改幾行程式碼,卻無法執行此demo程式== ![](https://i.imgur.com/p6mZEkX.jpg) ==我們重灌img映像檔,卻連線ssh存取遭拒== ![](https://i.imgur.com/wpBTi5D.png) ## 5/5 * SSH連線成功 ==排除辦法== ``` 點選安全殼層 -> 選項 -> SSH檔案 -> 清除 -> 儲存 點選安全殼層 -> 連線對話方塊 -> 輸入ip ->重新連線成功 ``` ![](https://i.imgur.com/XWffvUJ.jpg) * 語音辨識成功,能辨識英文及中文且輸出文字 * 能根據辨識到的特定指令做出動作並做出語音回應 ==打開電燈== ![](https://i.imgur.com/Y3EjjKm.jpg) ![](https://i.imgur.com/wjIq4Ph.jpg =400x) ==關掉電燈== ![](https://i.imgur.com/OKpMNln.jpg) ![](https://i.imgur.com/8r30WRX.jpg =400x) ## 5/12 ~ 5/26 * 準備開始寫計畫書所構思之程式,但在開始安裝相關套件時,許多必要套件已經不支援手上voice kit版本,無法安裝成功,嘗試許多套件後,只成功裝上 ==xlsx== 套件,連基本鬧鐘功能都無法實現,現在繼續嘗試相關套件的安裝。 ==目前安裝失敗的套件== ``` 1.aptitude 2.node.JS 3.Node npm pandas(裝到一半就卡住了) 4.libasounds2 ``` * 目前還找不到解決方法 ## 7/12 * 排除版本更新後有可能遇到開始工具列消失沒有顯示,無法連上wifi使用ssh編寫的問題,排除辦法已更新在==可能遭遇問題==區域 * 成功建立資料庫 * 新增行程時可以顯示當下日期及時間 * 可以使用語音新增行程並存入資料庫中 * 現在遭遇問題: ``` 目前正在思考程式的邏輯架構如何設計 我們該如何從資料庫中抓取已經存取的資料進程式中與當下的時間進行比對? ``` ## 9/6 * 能語音新增及顯示當前所有行程 * 能根據語音輸入刪除資料庫中所選擇行程 * 原本要對資料庫進行排序,但使用orderby函示無法實質排序資料庫,之後決定不使用排序功能,而是利用multiprocessing,利用當下時間對比資料庫有無符合的項目,不需要使用排序 * 現在遭遇問題 ``` 正在學習如何利用multiprocessing功能同時進行兩個程式功能, 使得父親process能持續比對當前時間,兒子process能根據功能對比資料庫內資料執行對應動作 ``` ## 10/5 * 目前音樂功能的播放方法是先在Linux環境依照youtube網址下載到裝置中,再利用audio.play_wav()函式,在python環境下播放目錄中所指定的音樂。 * 但由於裝置記憶體十分短缺,目前正在嘗試另一種方法,將歌曲相關資料如(歌名、歌手、影片網址)存入資料庫中,需要播放時,根據篩選內容選出的歌曲取出網址進行串流播放,藉此省下記憶體資源 ## 10/12 * 新增計算機功能 ![](https://i.imgur.com/h1kFitU.png) * 使用方法 ``` 1.語音輸入"計算機"進入功能 2.選擇五種功能("加法","減法","乘法","除法","指數") 並語音輸入所選擇功能 3.此計算機只能計算兩個值之結果如(3+4),(584*844)等等 因為語音辨識的限制,有時會聽不清楚所講內容。 例如語音輸入("4除以2"),有可能辨識成("4/12")進行運算。 故限制使用者只能進行兩個值之運算 ``` ## 10/15 * Table重建欄位,新增了"ID"這個欄位因為id具有唯一性,所以在刪除資料時,比較方便操作 ![](https://i.imgur.com/afWtDL3.jpg) ## 11/16 * 由於不明原因,編譯到一半時樹梅派作業系統出現錯誤,無法正常編譯,無法進入系統及終端,直到11/11備份好資料後,重新安裝樹梅派作業系統,才能重新開始編譯專題 ## 11/19 * 由於受到硬體限制,單一喇叭無法同時播放音訊同時接收聲音,原本在音樂功能中原先想使用語音輸入新增"暫停","恢復播放","終止播放"功能,但基於上述理由,改為使用實體按鈕偵測實行。 ###### tags: `Templates` `Documentation`

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully