Cov txheej txheem:

Ntxiv Qhov Pib Pib Suab rau Google AIY Cov Khoom Siv Suab: 6 Cov Kauj Ruam (nrog Duab)
Ntxiv Qhov Pib Pib Suab rau Google AIY Cov Khoom Siv Suab: 6 Cov Kauj Ruam (nrog Duab)

Video: Ntxiv Qhov Pib Pib Suab rau Google AIY Cov Khoom Siv Suab: 6 Cov Kauj Ruam (nrog Duab)

Video: Ntxiv Qhov Pib Pib Suab rau Google AIY Cov Khoom Siv Suab: 6 Cov Kauj Ruam (nrog Duab)
Video: LOKY -Txhob Ua Yog Toog (Official MV )Hmong New Song 2024, Kaum ib hlis
Anonim
Image
Image
Kauj Ruam 2: Txheeb Xyuas Cov Ntaub Ntawv Voicehat.py kom paub ntau ntxiv
Kauj Ruam 2: Txheeb Xyuas Cov Ntaub Ntawv Voicehat.py kom paub ntau ntxiv

Phau ntawv qhia no yooj yim zoo nkauj. Kuv tau txaus siab heev rau Google AIY Lub Suab Khoom, tab sis zoo li ntawm kuv li Google Tsev ib txwm muaj suab nrov uas lawv ua kom paub tseeb tias lawv nquag mloog. Qhov no tsis yog teeb tsa los ntawm lub hauv paus ntawm ib qho piv txwv uas tau npaj ua ntej ntawm AIY Voice Kit duab.

Kuv tseem suav nrog qhov txuas mus rau Tshuag Pib thiab lees paub lub suab nrov uas kuv kaw los ntawm kuv lub Google Tsev tiag nrog kuv lub kaw kaw suab.

Nov yog peb mus-kuv thawj qhov kev qhia!

Kauj Ruam 1: Cov Khoom Siv & Cov Ntaub Ntawv xav tau

  1. Ua haujlwm tau zoo Google AIY Cov Khoom Siv Suab-los teeb tsa koj cov khoom siv mus ntsib official AIY Voice Kit page.
  2. Muaj peev xwm nkag mus rau koj tus Pi lub davhlau ya nyob twg ntawm SSH, VNC, lossis nrog tus saib xyuas thiab keyboard
  3. . Wav cov ntaub ntawv uas koj xav ua si thaum Pi tab tom mloog lub suab nkag-Yog tias tsis siv cov ntawv tshwj xeeb, rub tus qauv "St art Talking" file ntawm no lossis rub nws los ntawm qhov txuas txuas.
  4. (Tsis teb los tau) Lub khoos phis tawj audio uas tuaj yeem hloov pauv cov ntaub ntawv thiab hloov lawv qhov me ntsis thiab tus nqi piv txwv

Kauj Ruam 2: Kauj Ruam 2: Txheeb Xyuas Cov Ntaub Ntawv Voicehat.py kom paub ntau ntxiv

TSEEM CEEB

Kuv tsis siv daim duab tshiab ntawm kuv cov khoom siv suab uas suav nrog cov cai rau ob lub Suab thiab Lub Zeem Muag (piv txwv li aiyprojects-2018-01-03.img). Kuv tab tom siv tus lej los ntawm Cov Khoom Siv Lub Suab uas tuaj yeem pom ntawm Google AIY Raspbian GitHub. Kuv tus kheej lub tswv yim tsuas yog siv Cov Khoom Siv Lub Suab los ua kom yooj yim thiab tsis tas yuav cuam tshuam nrog Txoj Cai Kev Pom Zoo thaum koj ua haujlwm nrog koj lub suab khoom

Tsiv mus…

Cov kauj ruam no tsis tas yuav tsum tau ua, tab sis nws yuav qhia koj qhov twg Google tau faus cov lus qhia kom tau txais txoj haujlwm no yog tias koj xav ua qhov no ib kauj ruam ntxiv lossis nkag siab tias vim li cas cov lej kuv tab tom ntxiv ua haujlwm.

pi@raspberry: cd AIY-suab-khoom-python/src/aiy/

Tom qab ntawd peb yuav tshuaj xyuas cov ntaub ntawv voicehat.py hauv daim nplaub tshev ntawd:

pi@raspberry: ~/AIY-voice-kit-python/src/aiy/sudo nano voicehat.py

Cov duab txuas nrog qhia qhov twg koj tuaj yeem kawm paub txog Status UIs thiab yuav siv lub suab li cas thaum lub sijhawm ua haujlwm.

Zoo, tam sim no cia ntxiv qee qhov chaws rau ib qho piv txwv cov ntaub ntawv kom tau txais yam khoom no ua haujlwm.

Kauj Ruam 3: Kauj Ruam 3: Ntxiv Trigger Sound Code rau Demo Code

Kauj Ruam 3: Ntxiv Trigger Sound Code rau Demo Code
Kauj Ruam 3: Ntxiv Trigger Sound Code rau Demo Code

Ua ntej tshaj, mus rau AIY-lub suab-khoom-nab hab sej nplaub tshev thiab khiav qhov chaws

cd AIY-suab-khoom-nab hab sej

qhov chaw env/bin/qhib

cd csy

Tom qab ntawd siv 'sudo nano' rau hauv 'pab_grpc_demo.py' lossis 'pabcuam_library_demo.py'

Qhov sib txawv ntawm ob daim ntawv yog tias assistant_grpc_demo.py siv lub pob los ua Google Assistant thiab assistant_library_demo.py siv lo lus qhib "Ok, Google" los ua Google Assistant.

Rau ob qho ntawm cov ntaub ntawv no koj tsuas yog xav tau ntxiv ib kab ntawm cov cai:

status_ui.set_trigger_sound_wave ('/tsev/pi/googlestart.wav')

Qhov no xav tias koj tau tso koj lub suab pib hauv/home/pi/folder thiab npe nws googlestart.wav. Hloov cov no raws li txhua yam koj tau teev koj cov ntaub ntawv thiab txhua qhov chaw koj nyob.

Kab ntawm txoj cai peb tab tom nrhiav yog hauv qab no:

status_ui.status ('mloog')

Peb xav ntxiv peb kab tshiab ntawm kab ntawv ua ntej ntawd kab ntawm cov cai…

Rau qhov 'assistant_library_demo.py' piv txwv nws tuaj yeem pom ntawm no:

elif event.type == EventType. ON_CONVERSATION_ END_TURN_STARTED:

# Thiab tam sim no ntxiv peb cov cai status_ui.set_trigger_sound_wave ('tsev/pi/googlestart.wav') status_ui.status ('mloog')

Rau qhov 'assistant_grpc_demo.py' piv txwv nws tuaj yeem pom ntawm no:

khawm.wait_for_press ()

# Thiab tam sim no ntxiv peb cov cai status_ui.set_trigger_sound_wave ('/home/pi/googlestart.wav') status_ui.status ('mloog')

Qhov no xav tias koj tau tso koj lub suab pib hauv/home/pi/folder thiab npe nws googlestart.wav. Hloov cov no raws li txhua yam koj tau teev koj cov ntaub ntawv thiab txhua qhov chaw koj nyob.

Ntaus CTRL-X & Y kom txuag txhua yam.

*** NCO TSEG: Kuv tau pom ib yam dab tsi me ntsis goofy. Rau 'assistant_library_demo.py' ntxiv lub suab nrov zoo li tsis ua qhov txawv ntawm kev ua haujlwm ntawm kev hais lus paub. Rau 'tus pab cuam _grpc_demo.py' txawm li cas los xij, nws zoo li thaum koj muaj lub suab ua kom siv nws txiav thawj lo lus lossis ob lo lus uas koj hais. Tsis paub meej vim li cas. Tseem sim kom paub nws.

Kauj Ruam 4: Kauj Ruam 4: Khiav Txoj Cai thiab Ua Kom Txhua Yam Zoo Mus

pi@raspberry: cd AIY-suab-khoom-nab hab sej

thiab thauj khoom virtualenv

pi@raspberry: ~/AIY-voice-kit-python $ source env/bin/qhib

thiab khiav nws!

(env) pi@raspberry: ~/AIY-voice-kit-python $ src/assistant_library_demo.py

los yog

(env) pi@raspberry: ~/AIY-voice-kit-python $ src/assistant_grpc_demo.py

Tam sim no hais "Okay, Google" lossis Nias Lub Pob thiab saib seb nws puas ua haujlwm!

Nplooj ntawv tom ntej yuav pab koj yog tias koj muaj koj tus kheej cov ntaub ntawv raug cai thiab qhov tsim nyog me ntsis thiab tus nqi piv rau koj.wav cov ntaub ntawv

Kauj Ruam 5: Kauj Ruam 5: Tsim Koj Tus Kheej.wav Cov Ntaub Ntawv

Kauj Ruam 5: Tsim Koj Tus Kheej.wav Cov Ntaub Ntawv
Kauj Ruam 5: Tsim Koj Tus Kheej.wav Cov Ntaub Ntawv

Yog tias koj tsis xav siv kuv.wav cov ntaub ntawv ntawm tus qauv Google Tsev pib suab, koj yuav tsum tsim koj tus kheej.wav cov ntaub ntawv. Nws tau siv me ntsis ntawm kev sim thiab yuam kev kom tau txais qhov tseeb me ntsis thiab tus nqi coj mus ua haujlwm rau kuv.

Kuv siv Logic Pro X los ua txhua yam kuv kho (duab), uas yog qhov ua tiav DAW rau kev tsim thiab tsim cov nkauj. Ob txoj hauv kev kuv tau pom uas tuaj yeem tsim nyog yog Hloov lossis MediaHuman Audio Converter. Kuv xav tias koj tuaj yeem ua qhov no nrog Garageband yog tias koj muaj Mac, tab sis kuv tsis tau sim qhov ntawd.

Muaj peb ntu tseem ceeb ntawm koj cov ntaub ntawv uas xav tau rau nws los ua haujlwm nrog tus lej ua haujlwm.

  1. Yuav tsum yog MONO audio file
  2. Tus nqi piv txwv yuav tsum yog 32000
  3. Yuav tsum yog.wav cov ntaub ntawv
  4. (Tsis teb los tau) 16 ntsis kev daws teeb meem tau ua haujlwm zoo tshaj rau kuv

Kauj Ruam 6: Kauj Ruam 6: Ntxiv Lub Suab Pom Zoo?

Nov yog qhov uas kuv nyam yog leej twg muaj kev xav. Kuv yuav nyiam ntxiv qhov kev lees paub lub suab nrov yog tias lub kaw lus lees paub lub suab tawm tswv yim zoo li hauv Google Tsev ib txwm muaj.

Kuv tau txuas cov Tshuag Pom Zoo lub suab nrov hauv qab no rau koj kom yooj yim.

Txaus siab rau!

Pom zoo: