Skip to content

VICS Hardware Development

aidex-hackability edited this page Nov 7, 2017 · 2 revisions

Raspberry Platform

For the first Voice Input Control System (VICS) prototype development, a Raspberry Pi 3 Model B with ReSpeaker 2-Mics PiHAT audio input/capture sound card are used.

The steps to setup up the system mainly follows the alexa-avs-sample-app example, with the following exceptions.

ReSpeaker 2-Mics PiHAT Setup

The device driver / kernal module for the ReSpeaker 2-Mics PiHAT module is available for the Raspbian OS here. As the device driver patches to the Linux kernal, it is recommended to have Raspbian OS backed up (imaged) first before attempting the driver installation.

Using a terminal, perform the following:

  1. Update raspi-config using raspi-config
  2. Enable SPI interface, either by editing /boot/config.txt for using raspi-config
  3. Update Raspbian with sudo apt update && sudo apt upgrade
  4. Grab the latest device driver from [github](git clone https://github.com/respeaker/seeed-voicecard) and follow its installation steps.
  5. After reboot, test the audio play back and recording with this command:
pi@raspberrypi:~ $arecord -f cd -Dhw:0 | aplay -Dhw:0 (note for hw:0)

If the driver is correctly installed, one's voice input should be captured with the two onboard mics and playback from the 3.5mm audio jack from the PiHAT module.

The seeed2micvoicec device should be display with the following commands.

pi@raspberrypi:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: seeed2micvoicec [seeed-2mic-voicecard], device 0: bcm2835-i2s-wm8960-hifi wm8960-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
pi@raspberrypi:~ $ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: seeed2micvoicec [seeed-2mic-voicecard], device 0: bcm2835-i2s-wm8960-hifi wm8960-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Depending on the system setup and/or configuration, the PiHAT voice card might be on card 1 instead, if so, use -Dhw:1 for aplay and arecord instead.

Note that the the file ~/.asoundrc should matches with the output from aplay and arecord. For example:

pi@raspberrypi:~ $ more .asoundrc
pcm.!default {
  type asym
   playback.pcm {
     type plug
     slave.pcm "hw:0,0"
   }
   capture.pcm {
     type plug
     slave.pcm "hw:0,0"
   }
}

The default onboard 3.5mm jack might cause the AVS java sample app not outputting audio, so it is better to disable the default audio output before installing the AVS java sample app, as per this.

  • Open /boot/config.txt
  • Find the following:
  • dtparam=audio=on
  • Comment it out as such
  • #dtparam=audio=on
  • Reboot

AVS Java Sample App Installation

Follow alexa-avs-sample-app instructions.

Clone this wiki locally