Overview
This KB describes an example which records audio data collected by the PDM module of the Apollo3 Blue Plus and sends the data to the PC over USB. The default setting for the tool selects left channel only mono audio. In parallel to sending the raw audio, this example compresses the audio with OPUS and sends the compressed audio to the PC at the same time.
Software package:
Raw audio format:
-
Mono (Left), 16KHz 16bit sample, 1.5MHz PDM clock.
OPUS format:
-
20ms audio frame
-
Sample rate: 16KHz
-
Mono
-
Output bit rate: 32Kbps (8:1 compression)
-
Compress mode: CBR
-
Complexity: 4
-
Header: 8-byte-header
Project is located in the .\iar folder in the software package.
Running the Example
Requirements:
-
Segger JLINK installation directory in system environment variable PATH. (to enable calling of “jlink.exe“ from the script)
-
Anaconda Python environment installed and directory in system environment variable.
Python 3.7.0 or later, install necessary sub-modules when prompt. -
Apollo3 Blue Plus EVB (AMA3B2EVB) V1.0 + mikroBUS shield + DMIC click board.
Steps for operation:
-
Assemble the EVB, mikroBUS shield and DMIC click board as shown below:
Note that J1 and J3 are jumpered on the mikroBUS shield in the bottom left corner of the picture. The power jumpers are set for VDD_MCU = 1.8V.
-
Connect the board set to the PC via the USB connector/cable and power up.
-
Extract the example and navigate to the ...\pcm_recorder\quick_tools_amu2s folder. Run the batch file ap3pb_test_amu2s_pcm_20191202.bat.
-
Firmware will be downloaded to the EVB, and audio recording will be started via USB.
-
Speak, or play a test sound, toward the mics.
-
Press any key on keyboard to stop recording.
-
Once stopped, the batch script will save the following files into the folder.
With Keil project, use RTT for the demo following the steps below:
1. use rtt_logger.py to capture opus data via RTT.
2. stop record, opus file automatically saved.
3. run "opus_demo_tools_0.2.exe -d 16000 1 -input_file -output_file" //input_file from step 2.
Comments
0 comments
Article is closed for comments.