Synaptics CX20921 2mic AudioSmart 2-Mic Development Kit User Guide

June 5, 2024
Synaptics

Synaptics CX20921 2mic AudioSmart 2-Mic Development Kit

Synaptics CX20921 2mic AudioSmart-2-Mic-Development-Kit-
product

Quick Start Guide

This guide provides step-by-step instructions for setting up the 2 microphone development kit for Amazon AVS from Arrow. This kit consists of a Conexant AudioSmart™ 2-Mic Development Kit for Amazon AVS and a PICO-PI-IMX7 development board for the NXP i.MX 7D processor. It demonstrates how to access and test Amazon AVS, Amazon’s Java sample app (running on the PICO-PI-IMX7), a Node.js server for authorization (running on the PICO-PI-IMX7), and a third- party wake word engine that responds to “Alexa” (running the low-power Sensory wake word engine or the high-performance Sensory wake word engine).When finished, you’ll have a fully functioning Amazon AVS prototype that uses the Conexant AudioSmart™ 2-Mic Development Kit as an audio front end, and the PICO-PI-IMX7 i.MX 7D development board as the processor handling the “Alexa” wake word recognition and interface to Amazon’s AVS service. The processor system is also available as the PICO-IMX7 module, a production intent System on Module (SoM) for use in consumer products.

  • At time of first bootup make sure you are running the latest software image on your Pico-Pi. Check sections 4 and 5 for more details.

Hardware

The Arrow 2 microphone kit for Amazon AVS is available at

Conexant AudioSmart™ 2-Mic Development Kit for Amazon AVS, including;

  • CX20921 evaluation board, pre-flashed with firmware
  • Microphone module with two omnidirectional mics
  • Microphone holder board
  • Stereo 3.5mm Male-to-Male audio cable
  • Micro-USB cable
  • Type A to Type B USB cable
  • Cable assembly (colored wires)
  • +5V power supply for CX20921 evaluation board

PICO-PI-IMX7

In addition to the kit, you will also require:

  1. An external powered speaker with 3.5mm audio cable
  1. PC with internet connection and a USB port
  2. USB A to USB Type C cable
  3. Optional USB 5V power adaptor (or you can use your PC)

Setup Instructions

Hardware setup

  1. Plug the 3.5mm audio cable into the Microphone and Headphone jack on the PICO-PI-IMX7 board, and the “Line in” jack on the CX20921 evaluation board.
  2. Plug the USB A end of the USB A to micro USB cable into the USB A receptacle on the PICO-PI-IMX7 board, and the micro USB end into the CX20921 evaluation board USB Device port.
  3. Connect the powered speaker using a 3.5mm audio cable to the Lineout or Headphone Output jacks on the CX20921 evaluation board.
  4. Connect the Microphone board to the CX20921 evaluation board by plugging the 3.5mm cable into the Microphone Input jack (Mic 1) .Synaptics CX20921 2mic AudioSmart-2-Mic-Development-Kit-fig-3
  5. Place the Microphone board on top of the powered speakers using foam or putty (not provided in kit) for audio isolation as recommended in the Conexant External-Loudspeaker-Guidelines document.
  6. Connect a USB A to micro USB cable to the Serial Console connector on the PICO-PI-IMX7 board and your PC
  7. Connect +5V power supply included with the 2Mic Audio to the J1 connector on the CX20924 EVK board.
  8. Provide 5V power to the PICO-PI-IMX7 board at the USB Type C connector from your PC or a USB power adaptor.
  9. Connect the PICO-PI-IMX7 board to a network via Ethernet

Software installation

The PICO-PI-IMX7 board comes pre-loaded with a Yocto Linux image, requiring only the installation of the AVS support software that includes the “Alexa” wake word engine from Sensory. The latest Yocto Linux image is also available from http://download.technexion.net/files/avs-conexant

  • Register for an Amazon developer account
  • Unless you already have one, go ahead and create a free developer account at developer.amazon.com.
  • You should review the AVS Terms and Agreements here.Create Alexa Voice Service (AVS) project.

CONEXANT NXP 2MIC FOR AVSSynaptics CX20921 2mic AudioSmart-2-Mic-
Development-Kit-fig-5

Create a device and security profile

  • Follow the steps here to register your product and create a security profile.

Make note of the following parameters. You’ll need these in step 16 below.

  • ProductID (also referred to as Device Type ID),
  • ClientID, and
  • ClientSecret

Important: Make sure your Allowed Origins and Allowed Return URLs are set under Security Profile > Web Settings (see Create a device and security profile): Synaptics CX20921 2mic AudioSmart-2-Mic-Development-Kit-
fig-6

Allowed Origins: https://localhost:3000

Allowed Return URLs

  1. Open a serial console (Putty or Tera Tern) on your PC and select the board’s COM port number enumerated by the host system. Use the following port settings:Synaptics CX20921 2mic AudioSmart-2-Mic-Development-Kit-fig-7
  2. Power on the board. Make sure everything is connected before the system boots up.
  3. On your serial console, login by typing “root”Synaptics CX20921 2mic AudioSmart-2-Mic-Development-Kit-fig-25
  4. On the serial console, clone the “alexa-picopi-autobuild” repo

cd ~ git clone https://github.com/NXPmicro/alexa-picopi-autobuild.git

Update the install script with your credentials

Before you run the install script, you need to update the script with the credentials that you got in step 11 – ProductID, ClientID, ClientSecret. Type the following in serial console:

cd ~/alexa-picopi-autobuild

nano automated_install.shSynaptics CX20921 2mic AudioSmart-2-Mic-
Development-Kit-fig-8

Paste the values for ProductID, ClientID, and ClientSecret that you got from Step 11 above. The changes should look like this:

  • ProductID=”alexa_nxp”
  • ClientID=”amzn1.application-xxxxx.xxxxxxxxx”
  • ClientSecret=”bc79a2xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”

Type ctrl-X and then Y, and then press Enter to save the changes to the file.

Run the automated install script

  • You are now ready to run the install script. This will install all dependencies, including the wake word engine from Sensory.
  • The install script will install all project files in the folder that the script is run from.
  • To run the script. On the serial console, navigate to the folder where the project was cloned. Then run the following command.

cd ~/alexa-picopi-autobuild bash automated_install.sh

  • You’ll be prompted to answer a few simple questions. These help to ensure that you’ve completed all necessary prerequisites before continuing. Synaptics CX20921 2mic AudioSmart-2-Mic-Development-Kit-fig-9

Get the current IP from your PicoPi boardSynaptics CX20921 2mic
AudioSmart-2-Mic-Development-Kit-fig-10

  • On you host machine install VNC viewer. You can download it from download VNC viewer (available for Mac, Linux, Windows, and more).
  • Open a VNC Viewer window and enter your PicoPi’s IP address.Synaptics CX20921 2mic AudioSmart-2-Mic-Development-Kit-fig-11
  • Make sure you have connected into the PicoPi board.Synaptics CX20921 2mic AudioSmart-2-Mic-Development-Kit-fig-12

un your web service, sample app and wake word engine.
Now that installation is complete, you’ll need to run three commands in 3 separate terminal windows:

  1. Terminal Window 1: to run the web service for authorization
  2. Terminal Window 2: to run the sample app to communicate with AVS
  3. Terminal Window 3: to run the wake word engine which allows you to start an interaction using the phrase “Alexa”.

Note: These commands must be run in order.

Terminal Window 1

On your VNC session, open a new terminal window and type the following commands to bring up the web service which is used to authorize your sample app with AVS:

  • cd /home/root/alexa-picopi-autobuild/alexa-avs-sample-app/samples cd companion service && npm start Synaptics CX20921 2mic AudioSmart-2-Mic-Development-Kit-fig-13

Synaptics CX20921 2mic AudioSmart-2-Mic-Development-Kit-
fig-14

  • The server is now running on port 3000 and you are ready to start the client.
  • See API Overview > Authorization to learn more about authorization.

Terminal Window 2

On your VNC session, go back to your desktop. Open a new terminal window and type the following commands to run the sample app, which communicates with AVS:

  • cd /home/root/alexa-picopi-autobuild/alexa-avs-sample-app/samples cd javaclient && mvn exec:exec

NOTE
Ignore the warning message “Warning: JAVA_HOME environment variable is not set.”Synaptics CX20921 2mic AudioSmart-2-Mic-Development-Kit-
fig-15

Synaptics CX20921 2mic AudioSmart-2-Mic-Development-Kit-
fig-16

  • See API Overview > Interfaces to learn more about the messages sent to/from AVS.
  • Let’s walk through the next few steps relevant to Window 2.
  • When you run the client, a window should pop up with a message that says – Please register your device by visiting the following URL in a web browser and following the instructions: https://localhost:3000/provision/d340f629bd685deeff28a917. Would you like to open the URL automatically in your default browser?Synaptics CX20921 2mic AudioSmart-2-Mic-Development-Kit-fig-17

Click on “Yes” to open the URL in your default browser.

NOTE: Make sure you DO NOT click OK on the next pop up “Login to Register/Authenticate your device” yet.

  • On your VNC session, go back to your desktop. Open a new terminal window and type the following command to open a Chromium browser.
  • google-chrome about:blank

Once browser has opened, paste the URL copied in the last step. You may get a warning from the browser. You can get around it by clicking on Advanced -> Proceed to localhost(unsafe). Synaptics CX20921 2mic AudioSmart-2-Mic-
Development-Kit-fig-18

Synaptics CX20921 2mic AudioSmart-2-Mic-Development-Kit-
fig-19

  • You’ll be taken to a Login with Amazon web page. Enter your Amazon credentials.Synaptics CX20921 2mic AudioSmart-2-Mic-Development-Kit-fig-20
  • You will now be redirected to a URL beginning with https://localhost:3000/authresponsefollowed by a query string. The body of the web page will say device tokens ready.
  • Return to the Java application and click the OK button. The client is now ready to accept Alexa requests.Synaptics CX20921 2mic AudioSmart-2-Mic-Development-Kit-fig-22

Synaptics CX20921 2mic AudioSmart-2-Mic-Development-Kit-
fig-23

Terminal Window 3

  • Skip this step to run the same app without a wake word engine.
  • This project supports one third-party wake word engines: Sensory’s TrulyHandsFree. The -e parameter is used to select the agent and supports one value for {{engine}}: sensory.
  • On your VNC session, go back to your desktop. Open a new terminal window and use the following commands to bring up a wake word engine from Sensory. The wake word engine will allow you to initiate interactions using the phrase “Alexa”.
    To use the Sensory wake word engine, type

cd /home/root/alexa-picopi-autobuild/alexa-avs-sample-app/samples cd wakeWordAgent/src && ./wakeWordAgent -e sensory Synaptics CX20921 2mic
AudioSmart-2-Mic-Development-Kit-fig-24

Now you have a working hands-free AVS prototype! Use the following resources to learn more about available wake word engines:

Sensory

Currently, only Sensory wake-word is supported.

Testing Alexa

  • Talk to Alexa: You can now talk to Alexa by simply using the wake word “Alexa”. Try the following –

Say “Alexa”, then wait for the beep. Now say “what’s the time?”

Say “Alexa”, then wait for the beep. Now say “what’s the weather in Seattle?”

  • If you prefer, you can also click on the “Listen” button, instead of using the wake word. Click the “Listen” button and wait for the audio cue before beginning to speak. It may take a second or  two before you hear the audio cue.

Log-out instructions: Sample App Log Out Instructions.

Board recovery and update instructions

  • Please check build date on your board’s U-boot banner and table below to find the system image you are running. The latest software image and instructions on how to flash your board can be found at http://download.technexion.net/files/avs-conexant

Revision history

Date Document Changes Software image Build Date
08/11/2017 First release avs-alexa-picopi-imx7d-RC4-20170803 Jun 19 2017
08/16/2017 Minor format changes avs-alexa-picopi-imx7d-RC4-20170803 Jun 19

2017

References

Read User Manual Online (PDF format)

Loading......

Download This Manual (PDF format)

Download this manual  >>

Related Manuals