Cov txheej txheem:

VOCAL ASSISTANT Snips.Ai Tiv Thaiv Koj Tus Kheej: 18 Kauj Ruam
VOCAL ASSISTANT Snips.Ai Tiv Thaiv Koj Tus Kheej: 18 Kauj Ruam

Video: VOCAL ASSISTANT Snips.Ai Tiv Thaiv Koj Tus Kheej: 18 Kauj Ruam

Video: VOCAL ASSISTANT Snips.Ai Tiv Thaiv Koj Tus Kheej: 18 Kauj Ruam
Video: BATTLE PRIME LAW REFORM 2024, Kaum ib hlis
Anonim
VOCAL ASSISTANT Snips. Ai Tiv Thaiv Koj Tus Kheej
VOCAL ASSISTANT Snips. Ai Tiv Thaiv Koj Tus Kheej

Hauv lub hlis dhau los, Kuv tau sim ntau tus pab hais suab. Kuv txij li los txog rau qhov xaus uas tso siab rau cov servers nruab nrab hauv tsev los ntawm Google thiab Amazon rau cov haujlwm yooj yim xws li tig lub teeb lossis kaw kuv qhov muag tsis pom, yog, kom muab nws maj mam, qhov kev xav tsis txaus ntseeg. Kuv kuj nyob hauv Fabkis. Nws tsis nkag siab tias kuv cov ntaub ntawv hla dej hiav txwv Atlantic los yaug lub qhov tso quav ntawm kuv lub tsev hauv Paris. Qhov cuam tshuam txog kev ceev ntiag tug yog ib qho kev txhawj xeeb pom tseeb thaum Amazon lossis Google tau nkag mus rau txhua qhov kev thov suab. Txawm hais tias qhov kev sib cav nkees qub uas "Kuv tsis muaj dab tsi los zais" nws tsis muaj qhov zais cia tias cov koom haum no tau siv tau cov ntaub ntawv tus kheej rau lub hom phiaj kev lag luam. Cov kev pabcuam ntawm Google thiab Amazon tsis muaj kev ywj pheej tiag tiag hauv kev nkag siab ntawm kev ywj pheej. Rau kev yooj yim vim peb feem ntau zam peb tus kheej rau cov kev pabcuam no. Lawv yog cov kev pabcuam zoo sib xws, lees paub. Tab sis dua koj tsis muaj dab tsi los nkaum, txoj cai?

Nov yog kev qhia ua kom yooj yim pab uas tuaj yeem ua haujlwm offline, lub ntsiab lus txhua qhov kev thov koj ua yuav ua tiav hauv zos hauv koj lub tsev. Txhawm rau ua qhov no peb yuav siv Snips, nws yog Fab Kis pib uas muaj qhov txiaj ntsig zoo los ua haujlwm offline. Txhawm rau ua kom pom tseeb thiab yooj yim peb tab tom yuav ua tus pab cuam ruam heev, yooj yim txaus kom nkag siab txog lub tsev tsim khoom yog li tom qab ua rau koj yuav ua rau koj tus kheej nthuav ntau dua. Yog li hnub no peb tus pabcuam yuav suav ob tus lej koj yuav hais thiab rov ua cov lus teb: Koj yuav nug: "ntau npaum li cas 1 ntxiv 2" Nws yuav teb: "3"

Kev koom nrog: Kuv tsis koom nrog SNIPS. AI, tab sis kuv tab tom ua daim npav suab rau raspberry pi uas muaj txhua yam hauv ib qho RASPIAUDIO. COM nws yog lub kaus mom DAC+Hais lus+lub microphone+khawm thiab coj, koj tuaj yeem xaiv siv kuv daim npav suab lossis siv koj tus kheej daim npav suab).

Kauj Ruam 1: Yam Koj Yuav Tsum Paub Ua Ntej Pib

Thaum kawg ntawm qhov kev qhia no koj yuav muaj:

  • Kev nkag siab meej ntawm kev tsim qauv ntawm tus pab suab
  • Koj yuav nkag siab qhov txiaj ntsig ntawm tus pabcuam offline
  • Koj yuav paub cov lus muaj txiaj ntsig zoo rau txhua tus pabcuam
  • Koj yuav yog tus ua haujlwm tab sis tsis muaj txiaj ntsig-tus pab cuam ruam tuaj yeem ua qee qhov ntxiv
  • Koj yuav muaj kuv vam qhov kev cia siab ua tus pab lossis tsis muaj txiaj ntsig tab sis qhov ntawd tiv thaiv koj tus kheej

Koj xav tau dab tsi:

  • Pib nkag siab txog Raspberry PI thiab Linux kab hais kom ua
  • Sijhawm: kwv yees li 20mn txog 1h nyob ntawm koj qhov kev txawj ntse Internet txuas los tsim tus pabcuam, tom qab ntawd koj tus pabcuam yuav tuaj yeem ua haujlwm offline!
  • Raspberry PI 3 lossis 3b+ yav dhau los yuav ua haujlwm ib yam, Xoom yuav qeeb heev
  • Lub hwj chim muab Keyboard, nas, thiab tshuaj ntsuam, lub hwj chim rau raspberry
  • PC lossis Mac khiav ntawm Linux txhawm rau tswj hwm raspberry PI
  • Cov ntaub thaiv npog nrog cov neeg hais lus peb yuav siv ntawm no Raspiaudio M IC+, nws yog lub kaus mom me me nrog txhua yam nyob hauv lub Microphone, DAC, lub tshuab ua kom nrov, hais lus, thawb lub pob thiab coj. Nws kuj tseem tuaj yeem siv raspberry built-in audio (yog li ntawd zoo), hais lus sab nrauv nthuav dav thiab sab nraud USB microphone.

Txheej txheem txheej txheem:

Peb yuav xub tsim tus pabcuam online ntawm tus pabcuam tom qab ntawd peb yuav teeb tsa nws ntawm Raspberry PI. Hauv txoj hauv kev no peb siv nas, keyboard los teeb rau Raspberry, tom qab ntawd koj lub khoos phis tawj ntawm Linux txhawm rau teeb tsa thiab teeb tsa tus pabcuam siv lub cuab yeej hu ua SAM.

Kauj ruam 2: Sau npe

Sau npe
Sau npe

Ntawm koj lub khoos phis tawj Linux mus rau https://console.snips.ai/ thiab sau npe, tsim tus pabcuam tshiab:

Kauj Ruam 3: Teeb Tus Pabcuam

Teeb Tus Pabcuam
Teeb Tus Pabcuam

Muab nws lub npe, xaiv koj hom lus thiab nyem rau ntawm tsim

Kauj Ruam 4: Xaiv Cov Lus Tseeb (tseem hu ua Lo Lus Kub) "Hav Snips" thiab Ntxiv Kev Txawj Ntse

Xaiv Wake Up Lo lus (tseem hu ua Lo Lus Kub) "Hav Snips" thiab Ntxiv Kev Txawj Ntse
Xaiv Wake Up Lo lus (tseem hu ua Lo Lus Kub) "Hav Snips" thiab Ntxiv Kev Txawj Ntse

Kauj Ruam 5: Tsim Kev Txawj Ntse

Tsim Txuj Ci
Tsim Txuj Ci

Koj yuav pom qee qhov txuj ci ua ntej tau qhia los ntawm lwm tus ntau ntawm lawv tsis ua haujlwm li ntawd

qhov kawg nws muaj txiaj ntsig ntau dua thiab lom zem los ua peb tus kheej, nyem rau "tsim txuj ci tshiab"

Kauj Ruam 6: Tom qab ntawd Ntxiv Cov Lus Qhia thiab Nyem rau Tsim:

Tom qab ntawd Ntxiv Cov Lus Qhia thiab Nyem rau Tsim
Tom qab ntawd Ntxiv Cov Lus Qhia thiab Nyem rau Tsim

Kauj Ruam 7: Nyem rau Kho Kom Zoo Dua:

Nyem rau Edit Skill
Nyem rau Edit Skill

Kauj Ruam 8: Tsim Lub Hom Phiaj Tshiab

Tsim Kev Ntseeg Tshiab
Tsim Kev Ntseeg Tshiab

Rau lub vijtsam tom ntej koj yuav xav tau cov lus me ntsis:

  • "Txuj ci" yog lub luag haujlwm los ua, ntawm no muaj peev xwm suav tus lej 1 + tus lej 2
  • "Kev xav": yog qhov kev thov koj yuav hais nrov nrov kom ua tiav qhov txuj ci no, piv txwv li, koj tuaj yeem muaj "ntau npaum li cas yog 1 ntxiv rau 2" thiab ntau yam ntxiv, ntau qhov koj muaj ntau dua qhov koj yuav tuaj yeem hais rau koj tus pab.
  • “Qhov qhib” yog qhov hloov pauv hauv koj qhov kev thov ntawm no tus lej 1 thiab tus lej 2
  • Kev nqis tes ua: yuav ua li cas, qhov tseeb ntawm tus lej 1 + tus lej 2 tom qab ntawd hais qhov tshwm sim

Kauj Ruam 9: Peb Yuav Ua Yooj Yim Zej Zog ntawm NumberOne + NumberTwo:

Peb Yuav Ua Yooj Yim Zej Zog ntawm NumberOne + NumberTwo
Peb Yuav Ua Yooj Yim Zej Zog ntawm NumberOne + NumberTwo

Kauj ruam 10: Indentify Slots

Indentify Slots
Indentify Slots

Txheeb xyuas peb 2 qhov sib txawv raws qhov qhib, hais qhia hom "Tus lej", thiab khij lub npov "qhov xav tau" nws yuav hais kab lus no yog tias ib qho ntawm qhov tsis hnov zoo:

Kauj Ruam 11: Qhia Nws Qhov Chaw Nyob Qhov Twg

Qhia Nws Qhov Chaw Nyob Qhov Twg
Qhia Nws Qhov Chaw Nyob Qhov Twg

Tam sim no peb yuav tsum qhia tus pabcuam sib txawv rau kev nkag siab lub hom phiaj no, ntau yam koj ntaus ntawv kom zoo nws yog los hais rau koj tus pabcuam ib txwm, ib zaug koj tau ntaus cov lus nug koj yuav tsum txheeb xyuas koj lub qhov (sib txawv) los ntawm ob-nias rau ntawm "Ib" thiab "ob" thiab xaiv qhov qhib.

Thaum koj ua tiav nyem rau "Txuag", tom qab ntawd rov qab los ntawm lub vijtsam dhau los: "Tsev> MyDumb pabcuam> Kuv lub laij lej"

Kauj Ruam 12: Sijhawm rau Qee Yam Ua

Sijhawm rau Qee Yam Ua!
Sijhawm rau Qee Yam Ua!

Lub sijhawm ntawd tus pabcuam yuav nkag siab cov lus nug los ntawm kev qhia tus lej 1 thiab tus lej 2, tabsis yuav ua li cas nrog ob tus lej no. Peb yuav sau peb tus kheej cov ntawv, nyem rau ntawm Action-Code Snippets

Kauj Ruam 13: Ntaus Tsab Ntawv

Ntaus Ntawv
Ntaus Ntawv

Nov yog Python tsab ntawv peb yuav txiav thiab muab tshuaj txhuam, Tsis muaj dab tsi los cawm, tom qab qhov no peb tau ua tiav nrog tus pab! copy/paster los ntawm no:

#tau txais thawj tus nqi thiab tus nqi thib ob thiab hloov nws mus rau ib qho integerA = int (intentMessage.slots.numberOne.first (). tus nqi)

B = int (intentMessage.slots.numberTwo.first (). Tus nqi)

#Sum A + B.

C = A + IB

#Hloov qhov tshwm sim hauv txoj hlua

resul = 'cov lus teb yog' + str (C) + 'kuv tus tswv nyob zoo'

#ntu yog lo lus nug + lus teb, nws yuav hais qhov txiaj ntsig thiab kaw qhov kev sib tham

current_session_id = intentMessage.session_id hermes.publish_end_session (tam sim no_session_id, resul)

Kauj Ruam 14: Hlawv Raspbian Stretch Lite ntawm daim npav SD tshiab

Hlawv Raspbian Stretch Lite ntawm Fresh SD Card
Hlawv Raspbian Stretch Lite ntawm Fresh SD Card

Raspbian Buster tseem tsis tau txais kev txhawb nqa los ntawm Snips Platform (tuaj ntawm SNIPS pab pawg ua qhov hloov tshiab !!)

Thov siv Raspbian Stretch:

downloads.raspberrypi.org/raspbian/images/raspbian-2018-04-19/2018-04-18-raspbian-stretch.zip

(Yog tias koj tsis paub nrog tus txheej txheem saib ntawm no

Kauj Ruam 15: Txuas Koj Raspberry

Txuas koj Raspberry
Txuas koj Raspberry

Sudo raspi-teeb tsa

Teeb koj cov txheej txheem keyboard (yog tias tsis yog qwery), teeb tsa wifi siv cov kev xaiv hauv zos:

  • Xaiv Network Options los teeb tsa koj li wifi SSID/password, lossis tsuas yog txuas lub ethernet cable rau koj lub router
  • Xaiv cov kev xaiv cuam tshuam los pab ssh (raws li nws yuav siv tom qab)

Kauj Ruam 16: Nco Ntsoov Koj Tus Raspberry's IP

Coj Nco Txog Koj Raspberry's IP
Coj Nco Txog Koj Raspberry's IP

Txheeb xyuas tias koj tau txuas nrog koj lub router hom ifconfig thiab sau tseg ntawm IP chaw nyob

siv:

ifconfig

Kauj Ruam 17: Nruab Raspiaudio MIC+ Sound Card

Yog tias koj muaj MIC+ los ntawm RASPIAUDIO. COM ntsaws daim npav thiab ntaus:

sudo wget -O mic mic.raspiaudio.com

sudo tsoo mic

● Reboot, tom qab ntawv sim:

udo wget -O test test.raspiaudio.com

sudo bash xeem

● Nias lub pob daj koj yuav tsum hnov "sab laug, hauv ntej sab xis" tom qab ntawv yuav kaw suab uas qhia tias lub mic thiab hais lus ua haujlwm tau zoo.

Kauj Ruam 18: Nruab Nrog Tus Pabcuam ntawm Raspberry Los Ntawm Koj Lub Linux PC/MAC

rov ua dua cov pob khoom npe thiab nruab npm

sudo apt-tau hloov tshiab

raspi-teeb tsa theem thiab pab kom SSH (cuam tshuam kev xaiv-SSH)

sudo apt-tau nruab npm

Nruab sam rau koj lub khoos phis tawj Linux:

sudo npm nruab -g snips -sam

  • Ib daim ntawv tiav nrog koj daim ntawv pov thawj uas koj tau tsim ua ntej ntawm snips.ai

    sam login

  • Txuas rau koj tus raspberry pi nrog Sam:

    sam txuas "ip_address_of raspberry"

    yog tias koj tau txais qhov yuam kev koj yuav tsum rov qab mus rau theem raspi-teeb tsa thiab pab kom SSH (cuam tshuam kev xaiv-SSH)

  • Pib lub installer ntawm Raspberry Pi siv:

    sam pib

  • Koj yuav tau txais: "Txhim kho Snips Platform cov khoom. Qhov no yuav siv ob peb feeb… Ua tiav teeb tsa Snips Platform cov khoom”… nws yuav siv sijhawm ib pliag kom tiav
  • Txhawm rau teeb tsa tus pab hom:

    sam nruab pab

  • Ntaus cov hauv qab no kom pom lub console:

    Sam saib

  • Sim nws! Hais:

    • "Hav Snips" koj hnov lub suab nrov
    • "Ntau npaum li cas 20 ntxiv rau 22?" tom qab ntawd nws yuav tsum teb rov qab "42"
  • Yog tias nws tsis ua haujlwm:

    • Txheeb xyuas qhov xwm txheej ntawm SAM siv:

      sam xwm txheej

    • Kho lub microphone thiab hais lus nce ntawm Raspberry Pi:

      alsamixer

Pom zoo: