Skip to main content

3.2.2 Array Microphone Usage Guide

Clone Repository

Please execute the following commands to clone the example code repository and enter the NLP example directory:

git clone https://gitee.com/bianbu/spacemit-demo.git
cd spacemit_demo/examples/NLP

Install Runtime Environment

Use the following commands to install dependencies and create a Python virtual environment:

sudo apt install libportaudio2 libopenblas-dev python3-venv python3-pip

python3 -m venv .venv
source .venv/bin/activate

pip install -r requirements.txt

Start Voice Capture Program

Run the following command to start the array microphone audio capture program:

python 04_asr_demo_db.py

After the program starts, press Enter to begin recording. This program captures mono audio with a maximum recording duration of 5 seconds.