This demo was designed based on i.MX RT1060, the wav format audio files with 16kHz sample rate were embedded in the firmware. The Mel-spectrogram features were extracted from the audio while they were played through the speaker. The model take the feature map as input and can classify audio into two categories: snoring and normal breathing. The inference time was 6ms.
Model Size | Tensor Arena | Inference Time |
---|---|---|
19.4KB | 22KB | 6 ms |
- Download and install MDK Professional 5.38 or later from here
- SDK Version: 2.14.0
- MIMXRT1060-EVK board
- RK043FN02H-CT LCD Panel
- 3.5mm Loudspeaker
Mark: The code do not support MIMXRT1060-EVKB and MIMXRT1060-EVKC; The loudspeaker and SDcard are all can be bought on Amazon
- To download the whole project, run this cmd in your Git Bash
git clone https://github.com/nxp-appcodehub/dm-snoring-detection-based-on-rt1060
- Connect LCD panel and loudspeaker to the board.
- Use a Micro USB cable to connect the board to the PC.
Double click the file in the project folder as it shown in the pic, open it with MDK.
Click the 'build' button (position 1) to compile the project, and wait for the compilation to complete. You can see that there are no errors displayed below.
Next, click the 'Download' button (position 2) to program the board.
After the progress bar completes, press the reset button on the board.
The LCD panel will light up, and you can see as below.
Click the 'Begin' button on the LCD panel, and the demo will start running. The audio from the SDcard will be played in a loop through the speaker, while the audio feature map will be displayed in real-time within the rectangular area of the LCD panel and used as input for inferencing to determine if snoring occurs. The sensitivity of the detection can be adjusted using the sliding bar on the left. When a snoring signal is detected, the light on the right side of the LCD panel will change from green to red.
The testing wav audio consists of a continuous breathing sound with intermittent snoring sounds mixed in.
Questions regarding the content/correctness of this example can be entered as Issues within this GitHub repository.
Warning: For more general technical questions regarding NXP Microcontrollers and the difference in expected functionality, enter your questions on the NXP Community Forum
Version | Description / Update | Date |
---|---|---|
1.0 | Initial release on Application Code Hub | November 1st 2024 |
NXP, the NXP logo, NXP SECURE CONNECTIONS FOR A SMARTER WORLD, Airfast, Altivec, ByLink, CodeWarrior, ColdFire, ColdFire+, CoolFlux, CoolFlux DSP, DESFire, EdgeLock, EdgeScale, EdgeVerse, elQ, Embrace, Freescale, GreenChip, HITAG, ICODE and I-CODE, Immersiv3D, I2C-bus logo , JCOP, Kinetis, Layerscape, MagniV, Mantis, MCCI, MIFARE, MIFARE Classic, MIFARE FleX, MIFARE4Mobile, MIFARE Plus, MIFARE Ultralight, MiGLO, MOBILEGT, NTAG, PEG, Plus X, POR, PowerQUICC, Processor Expert, QorIQ, QorIQ Qonverge, RoadLink wordmark and logo, SafeAssure, SafeAssure logo , SmartLX, SmartMX, StarCore, Symphony, Tower, TriMedia, Trimension, UCODE, VortiQa, Vybrid are trademarks of NXP B.V. All other product or service names are the property of their respective owners. © 2021 NXP B.V.