BPI-R18-AI(Allwinner SoC-Only 3-Mic Far-Field Dev Kit)

From Banana Pi Wiki
Jump to: navigation, search

Introduction[edit]

Overview

BPI-R18-AI Allwinner SoC-Only 3-Mic Far-Field Dev Kit for Amazon AVS with allwnner R18 chip design

Allwinner SoC-Only 3-Mic Far-Field Dev Kit is Allwinner’s official development board targeting at audio recognition field, which is certified by Amazon.Powered by Allwinner R18 Quad-core CortexTM-A53, Its rich features and cost-effectiveness make audio intelligence further close to our daily life.

Key Features[edit]

  • Integrates all AVS features on a single SoC
Supports for either Linux or Android
High performance with low power consumption
  • Reserves application headroom for non-AVS applications
Built-in battery-operated designs.
Supports 6 MICs both-side placement,configurable to 6/4/3/2 MICs

Hardware[edit]

The AVS Developer Kit is a qualified device enables Alexa Voice Service (AVS) that allows developer to interact with Alexa Voice Service hands-free. It includes a 6-mic array and one base board that provides various peripheral interfaces. Services to play music, ask questions, set alarms, play iHeartRadio, news, sports updates, weather and more are available on this kit. With Gmems’s front end algorithm, the developer kit is equipped with most advanced beamforming, noise reduction and echo cancellation technology so that your commands can be easily picked up even under noisy environment or during music is playing.

hardwares interface[edit]

Button description:

On mic-board there are 4 buttons, the functionality of each is listed below:

R18 pic 7.png

  • VOL- : voluome down;
  • VOL+ : volume up, force flash;
  • MUTE : Mute the microphone to enter private mode
  • POWER : power on/off

Cable connection:

R18 pic 8.png

micro-usb for adb and power supply:

R18 pic 9.png

serial comm with Allwinner TF-card uart debugger

Hardware Spec[edit]

Bpi-r18-avs SPEC.png

Dimensions[edit]

Bpi-r18-avs Maintop.jpg

BPI-R18-AI Kit[edit]

Allwinner SoC-Only 3-Mic Far-Field Dev Kit comes with three components - mainboard,MIC board,Flexible interconnection ribbon cable and copper pillars, power adapter is not included.

BPI-r18-avs kit.JPG

Software[edit]

AVS quick start guide[edit]

The AVS Developer Kit is a qualified device enables Alexa Voice Service (AVS) that allows developer to interact with Alexa Voice Service hands-free. It includes a 6-mic array and one base board that provides various peripheral interfaces. Services to play music, ask questions, set alarms, play iHeartRadio, news, sports updates, weather and more are available on this kit. With Gmems’s front end algorithm, the developer kit is equipped with most advanced beamforming, noise reduction and echo cancellation technology so that your commands can be easily picked up even under noisy environment or during music is playing.

Bpi-r18-avs ai.png

  • Get start with common tools

1.Via adb

adb is Android debug bridge. Typeadb shell in command line(windows) or Terminal(MacOS or Linux) to enter debug mode,developers can type commands here.:

R18 pic 1.png

2.Via serial Com

on windows, you need tools like SecureCRT or putty or MobaXterm to use serial port. On Ubuntu, minicom is the most popular application to debug via serial comm. This is the setting on MobaXterm:

R18 pic 2.png

3.push and pull files

adb push and adb pull commands can push data from PC to developer kit and pull data from developer kit to PC.

R18 pic 3.png

just drag the file to command line tool, it will display the directory automatically.

Connect to Internet:

Without internet, developer can’t enjoy the Alexa Voice Service. Type the command below to connect to Internet: wifi_connect_ap_test “ssid” “passwd” ssid and passwd are your network name and your password respectively.

R18 pic 4.png

Use SampleApp:

SampleApp is the application integrated with voice recording, Sensory’s wake word engine, Gmems’s front end algorithm and Alexa Voice Service. Developer can start hands-free experience with AVS Developer Kit by following commands:

TZ=UTC SampleApp /etc/avs/test.json /etc/avs/ DEBUG9

/etc/avs/test.json is the configuration file includes device registration information and user CA certificates.

R18 pic 5.png

Link SampleApp with your Amazon account:

1.adb pull /etc/avs/test.json /home/AVS

pull the default test.json file to /home/AVS/ directory.

The test.json layout is as follows:

{
"authDelegate":{
"clientSecret":"<Client Secret for your device from the Amazon Developer Portal>",
"deviceSerialNumber":"<A unique value that you create, similar to a SKU or UPC. E.g. "123456">",
"refreshToken":"${SDK_CONFIG_REFRESH_TOKEN}",
"clientId":"<Client ID for your device from the Amazon Developer Portal>",
"productId":"<Product ID for your device from the Amazon Developer Portal>"
},
"alertsCapabilityAgent":{
"databaseFilePath":"/<absolute-path-to-db-directory>/<db-file-name>",
"alarmSoundFilePath":"/<absolute-path-to-alarm-sound>/alarm_normal.mp3",
"alarmShortSoundFilePath":"/<absolute-path-to-short-alarm-sound>/alarm_short.wav",
"timerSoundFilePath":"/<absolute-path-to-timer-sound>/timer_normal.mp3",
"timerShortSoundFilePath":"/<absolute-path-to-short-timer-sound>/timer_short.wav"
},
"settings":{
"databaseFilePath":"/<absolute-path-to-db-directory>/<db-file-name>",
"defaultAVSClientSettings":{
"locale":"en-US"
}
},
"certifiedSender":{
"databaseFilePath":"/<absolute-path-to-db-directory>/<db-file-name>"
}
}

NOTE: The deviceSerialNumber is a unique identifier that you create. It is not provided by Amazon or Allwinner.

The refreshToken is the only parameter related to your own account, please follow below steps to create your own refreshToken. You can keep other parameters same as the default test.json.

1. You can keep other parameters same as the default test.json.
2. install python and pip on your Linux environment, then install Flask and requests: pip install flask requests if there is any other missing python packages.please install them in the similar way.
3. Keep the same product ID, client ID and client secret in the default test.json, put the test.json under the same directory of AuthServer.py
4. start AuthServer by running: python AuthServer.py, You should see a message that indicates the server is running.
5. Open your favorite browser and navigate to: [1](http://localhost:3000)
6. Follow the on-screen instructions.
7. After you've entered your credentials, the server should terminate itself, and test.json will be populated with your refresh toke
8. adb push C:\test.json /etc/avs/ push the new test.json to reference kit.
9. run SampleApp again and enjoy your iHeartRadio or Kindle or Amazon music.

Offline quick test tools:

sample-wakeup is an offline tool to test wake-up rate for “Alexa” wake word. The purpose of this tool is to avoid network issue for Chinese developers. Developers can quickly test the performance of front end algorithm and Sensory’s Alexa wake word engine without connecting to Internet. Alexa Voice Service is not supported under offline mode. To use it, simply type the following commands:

sample-wakeup /etc/avs

R18 pic 6.png

Flash the recovery image:

Necessary tools:

1.PhoenixSuit--------Flash tool on windows

1.LiveSuit-------------Flsh tool on Ubuntu

2.adb driver

3.mini-USB cable

4.recovery.iso------------firmware image


Steps:

1.install the software, please see Livesuit.doc and PhoenixSuitUserManualV1.0.doc for more information.

2.download the image from our website, select the image in PhoenixSuit and Livesuit.

3.Unplug power cable and mini-USB from the board, press the VOL+ button and hold it until plug in the mini-USB cable to PC, release the button, it should ask if format the device is necessary before start flashing.

Note: documents, configuration file, software, scripts, drivers mentioned in this guide are shipped with the User guide.

amazon AVS project[edit]

BPI-R18-AVS 10.jpg

https://developer.amazon.com/alexa-voice-service/dev-kits/allwinner-3-mic

Allwinner[edit]

Allwinner.png

http://allwinnertech.com/index.php?c=market&a=index&id=59

Resources[edit]

Image Release[edit]

zmazon AVS image[edit]

  • 2018-05-17 update Allwinner SoC-Only 3-Mic Far-Field Dev Kit image
how to use please see : 3.1 AVS quick start guide
tina_tulip-noma_card0 2018-05-17.img
google driver download link:https://drive.google.com/file/d/1ApEv0g1fD7n3kZh6j_m2Skb8WcEd5sKO/view?usp=sharing
baidu cloud download link:https://pan.baidu.com/s/1s8rPzzxnTTE0BlS7Z9I0xA
forum pthread:http://forum.banana-pi.org/t/bpi-r18-new-image-allwinner-soc-only-3-mic-far-field-dev-kit-image-20180206/4860


  • 2018-02-06 update Allwinner SoC-Only 3-Mic Far-Field Dev Kit image
how to use please see : 3.1 AVS quick start guide
R18 tina_tulip-noma_uart0_wufan_camera_20180206
google driver download link:https://drive.google.com/file/d/1yugHTuX2OXHQkggb52FQfHOVUVrtjKDH/view?usp=sharing
baidu cloud download link:https://pan.baidu.com/s/1ghjcQsV
forum pthread:http://forum.banana-pi.org/t/bpi-r18-new-image-allwinner-soc-only-3-mic-far-field-dev-kit-image-20180206/4860

Ubuntu[edit]

kernel 4.4[edit]

  • 2018-4-17 update Ubuntu 16.04.4 with linux kernel 4.4.89
image name:2018-04-17-ubuntu-16.04-mate-desktop-demo3-k4.4.89-vdpau-3-mic-docker-bpi-r18-avs-aarch64-sd-emmc.img.zip
Google Drive: https://drive.google.com/open?id=1dlfo9LGNcrc-_cpKd1uJnrNx0PdonBnK
MD5: 4b7e163d260e58a39ba8905e7ed39943
Forum pthread:http://forum.banana-pi.org/t/bpi-r18-avs-new-image-ubuntu-16-04-4-with-linux-kernel-4-4-89-2018-4-17/5435