Amazon Alexa
參考固件
固件:ROC-RK3308-CC Alexa
Amazon授權(quán)
使用 Alexa Voice Service,首先你需要注冊(cè)一個(gè)Amazon賬號(hào),向 Amazon 注冊(cè)你的產(chǎn)品,并對(duì)你的 alexa client 進(jìn)行授權(quán)。
第一步,按照官方指導(dǎo),仔細(xì)的按照步驟,注冊(cè)你的產(chǎn)品,并創(chuàng)建安全配置文件。
第二步,得到你的 Client ID 和 Product ID
獲取 Product ID:
獲取 Client ID:
使用流程
注意:Alexa Voice Service 不支持中文。
● 上電開(kāi)機(jī),如果沒(méi)有配置網(wǎng)絡(luò),先進(jìn)行配網(wǎng)。
● 將上面獲得的Client ID 和 Product ID填入 /oem/AlexaClientSDKConfig.json的deviceInfo屬性:
"deviceInfo":{ // Unique device serial number. e.g. 123456 "deviceSerialNumber":"123456", // The Client ID of the Product from developer.amazon.com "clientId":"YOUR_CLIENT_ID", // Product ID from developer.amazon.com "productId":"YOUR_PRODUCT_ID" },
● 執(zhí)行下面命令啟動(dòng) Alexa
SampleApp /oem/AlexaClientSDKConfig.json /oem/resources/
● 第一次啟動(dòng)需要進(jìn)行認(rèn)證授權(quán),按提示打開(kāi)對(duì)應(yīng)網(wǎng)頁(yè),輸入驗(yàn)證碼進(jìn)行認(rèn)證即可
################################## # NOT YET AUTHORIZED # ################################## ################################################################################################ # To authorize, browse to: 'https://amazon.com/us/code' and enter the code: AT4HLU # ################################################################################################ ################################################# # Checking for authorization (1)... # #################################################
● 認(rèn)證過(guò)程中,稍等幾分鐘后,就可以與 Alexa 進(jìn)行對(duì)話,可通過(guò)呼叫“alexa”喚醒,不過(guò)大部分交互體驗(yàn)都要通過(guò)命令行引導(dǎo)。
+----------------------------------------------------------------------------+ | Options: | | Wake word: | | Simply say Alexa and begin your query. | | Tap to talk: | | Press 't' and Enter followed by your query (no need for the 'Alexa').| | Hold to talk: | | Press 'h' followed by Enter to simulate holding a button. | | Then say your query (no need for the 'Alexa'). | | Press 'h' followed by Enter to simulate releasing a button. | | Stop an interaction: | | Press 's' and Enter to stop an ongoing interaction. | | Privacy mode (microphone off): | | Press 'm' and Enter to turn on and off the microphone. | | Echo Spatial Perception (ESP): This is for testing purpose only! | | Press 'e' followed by Enter at any time to adjust ESP settings. | | Playback Controls: | | Press '1' for a 'PLAY' button press. | | Press '2' for a 'PAUSE' button press. | | Press '3' for a 'NEXT' button press. | | Press '4' for a 'PREVIOUS' button press. | | Settings: | | Press 'c' followed by Enter at any time to see the settings screen. | | Speaker Control: | | Press 'p' followed by Enter at any time to adjust speaker settings. | | Firmware Version: | | Press 'f' followed by Enter at any time to report a different | | firmware version. | | Info: | | Press 'i' followed by Enter at any time to see the help screen. | | Reset device: | | Press 'k' followed by Enter at any time to reset your device. This | | will erase any data stored in the device and you will have to | | re-register your device. | | This option will also exit the application. | | Reauthorize device: | | Press 'z' followed by Enter at any time to re-authorize your device. | | This will erase any data stored in the device and initiate | | re-authorization. | | Quit: | | Press 'q' followed by Enter at any time to quit the application. | +----------------------------------------------------------------------------+
資源
Alexa 源碼目錄:
SDK/external/alexaClientSDK/
Buildroot 的 Alexa package 目錄:
SDK/buildroot/package/rockchip/alexaClientSDK/
Alexa 沒(méi)有自啟動(dòng)入口,需要進(jìn)入系統(tǒng)后自己手動(dòng)啟動(dòng)Alexa,方法如上一節(jié)。如果需要自啟動(dòng),則可以參考DuerOS。
編譯方法
● 編譯之前,亦可將上面獲得的Client ID 和 Product ID填入SDK/device/rockchip/rk3308/alexa/AlexaClientSDKConfig.json的deviceInfo屬性,這樣固件就默認(rèn)的帶有了Client ID 和 Product ID信息。
"deviceInfo":{ // Unique device serial number. e.g. 123456 "deviceSerialNumber":"123456", // The Client ID of the Product from developer.amazon.com "clientId":"YOUR_CLIENT_ID", // Product ID from developer.amazon.com "productId":"YOUR_PRODUCT_ID" },
● 甚至可以從已經(jīng)認(rèn)證過(guò)的設(shè)備中,拷貝/oem/application-necessities/cblAuthDelegate.db到SDK中device/rockchip/rk3308/alexa/application-necessities/cblAuthDelegate.db,這樣Alexa就會(huì)跳過(guò)認(rèn)證,直接開(kāi)始對(duì)話。
● 編輯 device/rockchip/rk3308/BoardConfig.mk 文件,將 OEM_PATH=oem 修改為 OEM_PATH=alexa,保存退出
● 配置 firefly_rk3308_release
source buildroot/build/envsetup.sh
選擇[1],按回車(chē),配置成功后如下
● Buildroot配置:BR2_PACKAGE_ALEXACLIENTSDK
make menuconfig
進(jìn)入圖形選擇界面,輸入 /,跳出搜索界面如下,輸入BR2_PACKAGE_ALEXACLIENTSDK,按回車(chē)進(jìn)行搜索
選擇[1],然后按空格選擇上 alexa client sdk
前面有 [ * ] 號(hào),表示已經(jīng)選上,然后< Save >保存,并< Exit >退出圖形界面,輸入配置保存命令:
make savedefconfig
保存配置,不保存的話,會(huì)在一鍵編譯腳本中被重置
● 在編譯前,如果當(dāng)前倉(cāng)庫(kù)不是第一次編譯,需要執(zhí)行:
make gst1-plugins-good-reconfigure && make gst1-plugins-good-rebuild
● 最后全部編譯
./build.sh
-
嵌入式主板
+關(guān)注
關(guān)注
7文章
6086瀏覽量
35614 -
Firefly
+關(guān)注
關(guān)注
2文章
538瀏覽量
7130 -
RK3308
+關(guān)注
關(guān)注
1文章
39瀏覽量
1197
發(fā)布評(píng)論請(qǐng)先 登錄
相關(guān)推薦
ROC-RK3308主板CC固件編譯的知識(shí)點(diǎn)解析,絕對(duì)實(shí)用
請(qǐng)問(wèn)ROC-RK3308-CC支持Amazon Alexa語(yǔ)音服務(wù)嗎
ROC-RK3308-CC板子Amazon授權(quán)使用流程
ROC-RK3308-CC開(kāi)發(fā)板使用Alexa Voice Service步驟
fireflyROC-RK3308B-CC--啟動(dòng)模式說(shuō)明
fireflyROC-RK3308B主板CC教程簡(jiǎn)介
微雪電子RK3308主板CC啟動(dòng)模式介紹
微雪電子RK3308主板CC上手介紹
Core 3308Y固件ROC RK3308B CC PLUS Buildroot MiniGUI

Core 3308Y固件ROC RK3308B CC PLUS支持Docker固件

Core 3308Y固件ROC RK3308B CC Buildroot NoUI固件

ROC RK3308B CC Buildroot Qt Desktop固件

IoT四核64位開(kāi)源主板ROC RK3308B CC規(guī)格書(shū)

四核64位開(kāi)源主板ROC RK3308B CC Plus規(guī)格書(shū)

評(píng)論