Skip to content

Latest commit

 

History

History
52 lines (44 loc) · 3.08 KB

README.md

File metadata and controls

52 lines (44 loc) · 3.08 KB

Overview

This application is a part of the TVM demo on MT3620 Azure Sphere. In our TVM demo, we deploy a DS-CNN Keyword Spotting model on Azure Sphere for the first time using Apache TVM. This model has two steps; the first step pre-processes the audio to extract MFCC features and second part runs processed audio through a DS-CNN model. We deploy feature extraction on Cortex-M4 core on Azure Sphere and DS-CNN model TVM runtime on Cortex-A7. To run this demo, you need to deploy this application and the partner application.

This repository showcases the audio pre-processing part of DS-CNN model on Cortex-M4. We present two demos here:

  • Demo1: We use pre-recorded audio files and perform pre-processing.
  • Demo2: We use an analog microphone to show a real-time demo.

Hardware Requirements

Software Requirements

Getting Started

  1. Export ARM_GNU_PATH="PATH/to/GCC/ARM/none/eabi/bin" in your environment.
  2. Follow these to build the application. Note that there are multiple WAV file under data that you can try.
$ cd ~/azsphere/apps/kws_mic
$ make clean
(Only DEMO1) => $ python3 python/mfcc.py -f (choose a WAV file)
$ make demo1(demo2)
  1. For DEMO2 connect the microphone to ADC interface on Azure Sphere:
    • H2.11 (ADC0) -> OUT
    • H2.2 (GND) -> GND
    • H3.3 (3.3) -> VCC
  2. Follow these to connect and flash this app on device. You need sudo access to connect to the device.
$ cd ~/azsphere/apps/kws_mic
$ make connect
$ make program
  1. Now, if you push button B on Azure Sphere the Cortex-M4 extracts the feature of audio samples and sends it to the Cortex-A7. If you already deployed the partner application, you will see change in LED colors.

Debugging

To enable debugging follow these steps:

  1. Connect to the debug UART (connect to H3.6 (IO0_TXD) and H3.2 (GND)).
  2. Rebuild the application using make demo1(demo2) CFLAGS=-DAS_DEBUG=1 and program it.

References

Here, we list some of the resources that we used to enable this demo: