Skip to content

The snoring detection demo is based on the i.MX RT1060. WAV audio files can be played via the speaker and processed in a ML model to determine if there's snoring. The results are shown on a GUI designed with LVGL.

License

Notifications You must be signed in to change notification settings

nxp-appcodehub/dm-snoring-detection-based-on-rt1060

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NXP Application Code Hub

Snoring Detection based on RT1060 powered by AI\ML

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.

image

Model Size Tensor Arena Inference Time
19.4KB 22KB 6 ms

Boards: MIMXRT1060-EVK

Categories: AI/ML

Peripherals: DISPLAY

Toolchains: MDK

Table of Contents

  1. Software
  2. Hardware
  3. Setup
  4. Results
  5. FAQs
  6. Support
  7. Release Notes

1. Software

  • Download and install MDK Professional 5.38 or later from here
  • SDK Version: 2.14.0

2. Hardware

<style> .small-note { font-size: 0.8em; color: #161616; } </style>

Mark: The code do not support MIMXRT1060-EVKB and MIMXRT1060-EVKC; The loudspeaker and SDcard are all can be bought on Amazon

3. Setup

3.1 Step 1

  • 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

3.2 Step 2

  • Connect LCD panel and loudspeaker to the board.
  • Use a Micro USB cable to connect the board to the PC.

image

3.3 Step 3

Double click the file in the project folder as it shown in the pic, open it with MDK.

image

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.

image

Next, click the 'Download' button (position 2) to program the board.

image

After the progress bar completes, press the reset button on the board.

image

The LCD panel will light up, and you can see as below.

image

4. Results

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.

image

The testing wav audio consists of a continuous breathing sound with intermittent snoring sounds mixed in.

image

5. Support

Project Metadata

Board badge

Category badge

Peripheral badge Peripheral badge

Toolchain badge

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

Follow us on Youtube Follow us on LinkedIn Follow us on Facebook Follow us on Twitter

7. Release Notes

Version Description / Update Date
1.0 Initial release on Application Code Hub November 1st 2024
Trademarks and Service Marks: There are a number of proprietary logos, service marks, trademarks, slogans and product designations ("Marks") found on this Site. By making the Marks available on this Site, NXP is not granting you a license to use them in any fashion. Access to this Site does not confer upon you any license to the Marks under any of NXP or any third party's intellectual property rights. While NXP encourages others to link to our URL, no NXP trademark or service mark may be used as a hyperlink without NXP’s prior written permission. The following Marks are the property of NXP. This list is not comprehensive; the absence of a Mark from the list does not constitute a waiver of intellectual property rights established by NXP in a Mark.
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.

About

The snoring detection demo is based on the i.MX RT1060. WAV audio files can be played via the speaker and processed in a ML model to determine if there's snoring. The results are shown on a GUI designed with LVGL.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages