Cov txheej txheem:

Alexa Voice Assistant ntawm Raspberry Pi Zero Docking Hub: 6 Cov Kauj Ruam (nrog Duab)
Alexa Voice Assistant ntawm Raspberry Pi Zero Docking Hub: 6 Cov Kauj Ruam (nrog Duab)

Video: Alexa Voice Assistant ntawm Raspberry Pi Zero Docking Hub: 6 Cov Kauj Ruam (nrog Duab)

Video: Alexa Voice Assistant ntawm Raspberry Pi Zero Docking Hub: 6 Cov Kauj Ruam (nrog Duab)
Video: How to make Loki Miss Minutes Voice Assistant with raspberry pi zero w | Google Assistant 2024, Kaum ib hlis
Anonim
Image
Image
Alexa Lub Suab Pabcuam ntawm Raspberry Pi Zero Docking Hub
Alexa Lub Suab Pabcuam ntawm Raspberry Pi Zero Docking Hub

Txhawm rau tsim lub ntsej muag Alexa Lub Suab Pabcuam ntawm Pi Zero W nrog tsawg dua cov xov hlau thiab USB dongles, Kuv siv Makerspot's Raspberry Pi Zero Docking Hub. Lub chaw tso khoom no muaj lub suab ua suab uas tuaj yeem tuav lub microphone thiab tus hais lus los ntawm nws lub hli 3.5 lub suab.

Cia peb pib.

Kauj Ruam 1: Tau Cov Khoom No

Tau Cov Khoom No
Tau Cov Khoom No

Cov no yog cov khoom koj xav tau:

  1. 1x Raspberry Pi Zero W.
  2. 1x Raspberry Pi Zero Docking Hub
  3. 1x HDMI saib
  4. 1x HDMI cable (thov nco ntsoov Pi Zero W xav tau lub mini-HDMI txuas)
  5. 1 x 5v USB 1 A Power Adapter
  6. 1 x micro USB cable
  7. 1 x USB keyboard
  8. 1x USB nas
  9. 1x Mini-Microphone Rau Xov Tooj Xov Tooj/Ntsiav Tshuaj (ib qho uas txhawb nqa qhov chaw sib tham hais lus)
  10. 1x Sab Nraud Hais Lus nrog 3.5mm Audio Jack.
  11. 1x 3.5mm audio cable (txiv neej-rau-txiv neej)
  12. 1 x 8G micro SD daim npav
  13. PC (txhawm rau ua kom pom daim npav SD nrog Raspbian OS duab)

Kauj Ruam 2: Npaj SD Card Nrog Raspbian OS kawg (Ncab/Jessie)

Nws yuav yog lub tswv yim zoo los pib nrog Raspbian OS tshiab. Muaj ob peb txoj hauv kev los npaj Raspbian OS tshiab ntawm daim npav SD. Tab sis kuv pom tias siv Etcher nrog cov duab Raspbian tag nrho yog qhov ua tau zoo thiab tsis tshua muaj qhov ua yuam kev.

  1. Rub tawm thiab teeb tsa Etcher (https://etcher.io/) rau koj lub PC host.
  2. Rub tawm qhov tseeb Raspbian duab los ntawm
  3. Ntxig SD rau hauv koj lub PC
  4. Qhib Etcher, xaiv Raspbian duab, tom qab ntawv SD daim npav, thiab nyem Flash!

Thaum cov duab tau npaj tseg, tshem daim npav kom nyab xeeb thiab npaj rau theem tom ntej.

Kauj Ruam 3: Teeb Koj Li Pi thiab Docking Hub

Teeb Koj Pi thiab Docking Hub
Teeb Koj Pi thiab Docking Hub
Teeb Koj Pi thiab Docking Hub
Teeb Koj Pi thiab Docking Hub

Koj yuav tsum teeb tsa koj Pi Zero W ntawm Raspberry Pi Zero Docking Hub. Muaj 4 txheej ntawm cov ntsia hlau thiab kev sawv ntsug thiab nws yuav siv sijhawm tsawg dua li ib feeb los sib sau ua ke.

Ntxig daim npav SD npaj rau hauv Pi Zero W. Txuas koj lub monitor mus rau Pi Zero W's HDMI chaw nres nkoj (yuav tsum ua kom tiav ua ntej lub zog Pi), txuas USB keyboard thiab nas thiab thaum kawg txuas lub microphone thiab hais lus. Txhawm rau ua kom muaj zog, txuas 5v USB fais fab cable rau lub zog txuas ntawm lub chaw nres nkoj (Tsis yog PWR PORT ON THE PI).

Koj yuav tsum pom Raspbian OS ib txwm los ntawm tus saib.

Kauj Ruam 4: Kho Koj Li Pi

Configure Koj Pi
Configure Koj Pi
Configure Koj Pi
Configure Koj Pi
Configure Koj Pi
Configure Koj Pi

Teeb WiFi

Sab laug nas nias lub WiFi icon nyob rau sab saum toj. Xaiv koj lub network txuas. Koj tsuas yog yuav tsum tau ua ib zaug tshwj tsis yog lub network teeb tsa tau hloov pauv lossis xav tau hloov pauv.

Teeb Suab Default Audio

Cov kauj ruam no tseem ceeb kom tau txais Raspberry Pi Zero Docking Hub audio los ua haujlwm nrog lub neej ntawd Alexa software.

Pib lub davhlau ya nyob twg thiab kho /boot /config.txt

sudo nano /boot /config.txt

Lov tes taw analog thiab hdmi suab los ntawm kev sau '#' nyob rau hauv pem hauv ntej ntawm kab hauv qab no hauv cov ntawv:

#dtparam = audio = on

Nias ctrl-x, y, thiab nkag mus rau txuag.

Hauv tib lub davhlau ya nyob twg, hloov kho ~/.asoundrc

nano ~/.asoundrc

Hloov cov ntsiab lus ntawm cov ntawv ntawd nrog cov hauv qab no:

pwm! default {

hom ntsaws tus qhev {pcm "hw: 1, 0"}} ctl.! default {hom ntsaws daim npav 1}

Nias ctrl-x, y, thiab nkag mus rau txuag.

Hmoov tsis zoo, kuv tseem tsis tau nrhiav txoj hauv kev ruaj khov los teeb tsa lub neej ntawd. Lub sijhawm no, koj yuav tsum ua nws ntawm txhua qhov pib.

Pab kom SSH/VNC (Tsis teb los tau)

Yog tias koj tsis xav siv lub saib, keyboard, thiab nas thaum pib tom ntej, ua kom cov kev xaiv no tso cai rau koj nkag mus rau Pi. Cov kev xaiv no nyob hauv Preference/Raspberry Pi Configuration, tom qab ntawd mus rau Interfaces thiab kos cim SSH thiab VNC xaiv.

Kauj ruam 5: Nruab Alexa Software

Kuv yuav tsis rov hais dua cov lus qhia zoo los ntawm Alexa AVS tus qauv ua haujlwm. Tsuas yog mus rau lawv txoj haujlwm Github (txuas) thiab ua raws cov lus qhia muaj los teeb tsa Alexa software.

Txawm hais tias muaj qee qhov ntsiab lus yuav tsum nco ntsoov:

  1. Koj tuaj yeem hla Kauj Ruam 1 raws li koj tau teeb tsa koj Pi.
  2. Xaiv "1/ 3.5mm audio" hauv ib qho ntawm cov lus nug pom zoo nug los ntawm cov ntawv automated_install.sh.
  3. Kuv tsis tuaj yeem pib Sensory wake lo lus cav (kev qhia tsis raug cai), yog li kuv siv Snowboy (kitt_ai).

Kauj Ruam 6: Alexa, Tsib Tsib

Nrog koj zoo siab! Hais "High Five" rau Alexa.

Yog tias koj tau qhib SSH (lossis VNC server), koj tuaj yeem rov pib Pi thiab khiav Alexa software tsis muaj lub taub hau (tsis muaj lub saib/keyboard/nas). Hauv koj lub PC khiav peb SSH lub davhlau ya nyob twg thiab txuas rau Pi. Siv cov dav hlau ntawd los pib ua haujlwm Alexa (piv txwv li "npm pib", "mvn exec: exec", thiab "wakeWordAgent -e kitt_ai"). Lwm qhov kom zoo dua los khiav lub taub hau yog tias Alexa java program (mvn exec: exec) ua haujlwm me dua.

Zuag qhia tag nrho, Kuv zoo siab nrog kev ua tau zoo ntawm Alexa tus qauv khiav ntawm Pi - lub suab ntes tau zoo heev, raug thiab ntseeg tau. Muaj qhov ua tau zoo sib txawv ntawm haiv neeg Echo (Dot) thiab teeb tsa no tab sis qhov sib txawv tsis loj heev. Ib yam uas kuv tsis zoo siab txawm hais tias kuv tsis tuaj yeem tau txais Amazon Prime Music ua si ntawm qhov teeb tsa no txawm hais tias qee leej hais tias Prime Music tau txais kev txhawb nqa. Tej zaum muaj qhov sib txawv dab tsi Amazon tso cai ntawm Canada thiab Asmeskas lossis qee yam uas kuv tsis tau teeb tsa kom raug. Yog tias koj paub yuav ua li cas thiaj tau Prime Music nrog tus qauv Alexa, thov qhia rau kuv paub.

Pom zoo: