|
1 | | - |
| 1 | +# Pathological Voice Diagnosis |
| 2 | + |
| 3 | +* [Introduction](#introduction) |
| 4 | + * [Function](#function) |
| 5 | + * [System Architecture](#system-architecture) |
| 6 | +* [Hardware and Software Setup](#hardware-and-software-setup) |
| 7 | + * [Required Hardware](#required-hardware) |
| 8 | + * [Required Software](#required-software) |
| 9 | + * [Hardware Connection](#hardware-connection) |
| 10 | +* [User Manual](#user-manual) |
| 11 | + * [Before Running This Application](#before-running-this-application) |
| 12 | + * [Run This Application](#run-this-application) |
| 13 | + |
| 14 | +## Introduction |
| 15 | +This application is based on the ARC IoT Development Kit which work for Pathological speech diagnosis at the edge.Firstly, the diagnostic model of pathological speech classification was trained based on lightweight RBK-NET network, and then the model was deployed using TensorFlow Lite for Microcontrollers (TFLM). Finally, the model was imported into ARC IoTDK development board through OSP.To achieve the Pathological speech diagnosis detection at the edge. |
| 16 | + |
| 17 | +### Function |
| 18 | + |
| 19 | +- Pathological Voice Diagnosis。At present, healthy and pathological speech can be recognized |
| 20 | + |
| 21 | +- Display the current voice status |
| 22 | + |
| 23 | +### System Architecture |
| 24 | + |
| 25 | +![system_architecture][0] |
| 26 | + |
| 27 | +## Hardware and Software Setup |
| 28 | +### Required Hardware |
| 29 | +- ARC IoT Development Kit |
| 30 | + |
| 31 | +  |
| 32 | + |
| 33 | +- WM8978 CODEC module |
| 34 | + |
| 35 | +  |
| 36 | + |
| 37 | +- OLED MC096GX (0.96inch ) |
| 38 | + |
| 39 | +  |
| 40 | + |
| 41 | +### Required Software |
| 42 | +- DesignWare ARC MetaWare Development Toolkit |
| 43 | +- TensorFlow Lite for Microcontrollers |
| 44 | +- emcARC OSP |
| 45 | +- Serial port terminal, such as putty, tera-term or minicom |
| 46 | + |
| 47 | +### Hardware Connection |
| 48 | + |
| 49 | + |
| 50 | +1.Connect I2C pins of WM8978 to I2C0 of IoT DK. |
| 51 | + |
| 52 | +2.Connect I2S pins of WM8978 to I2S_RX of IoT DK.**The REF_CLK should not be connected untile the initialization of WM8978 is finished**. |
| 53 | + |
| 54 | +3.MAX7219 pins. |
| 55 | + |
| 56 | +|OLED MC096GX pins|IoT DK pins | |
| 57 | +|-----------------|-------------| |
| 58 | +|GND |GND | |
| 59 | +|VCC |3.3V | |
| 60 | +|SCL |I2C0_SCL | |
| 61 | +|SDA |I2C0_SDA | |
| 62 | + |
| 63 | +## User Manual |
| 64 | + |
| 65 | +### Before Running This Application |
| 66 | +- Download source code of Pathological Voice Diagnosis from github. |
| 67 | +- Make sure all the connections are correct. |
| 68 | +- The link script file has been modified to ensure the heap and stack are large enough and the addresses of program sections have also been redirected.Make sure the link script is correct. |
| 69 | + |
| 70 | +### Run This Application |
| 71 | + |
| 72 | +- Open serial terminal and configure it to right COM port and 115200bps. |
| 73 | +- Download with USB-JTAG or use bootloader to boot the program. |
| 74 | +- Connect the MCLK(REF_CLK) wire when seeing "Please connet the mclk !"at serial terminal. |
| 75 | +- Speak to the Mic.You'll see pathological or healthy result shows on the OLED screen. |
| 76 | + |
| 77 | +#### Makefile |
| 78 | + |
| 79 | +- Selected MLI Lib here, then you can use MLI Lib API in your application: |
| 80 | + |
| 81 | + LIB_SEL = embarc_mli |
| 82 | + |
| 83 | +- Target options about IoT DK and toolchain: |
| 84 | + |
| 85 | + BOARD = iotdk |
| 86 | + BD_VER = 10 |
| 87 | + TOOLCHAIN = gnu |
| 88 | + |
| 89 | +- The middleware used in your application: |
| 90 | + |
| 91 | + MID_SEL = common u8glib |
| 92 | + |
| 93 | +See [ embARC Example User Guide][40], **"Options to Hard-Code in the Application Makefile"** for more detailed information about **Makefile Options**. |
| 94 | + |
| 95 | +#### Flie structure |
| 96 | + |
| 97 | +| file | Function | |
| 98 | +| ------------------- | -----------------------------------------| |
| 99 | +| main.c | Initialization and main loop | |
| 100 | +| CppAddWrapper.h | TensorFlow Lite Wrapper header | |
| 101 | +| mfcc.c/mfcc.h | Algorithm of extracting mfcc features | |
| 102 | +| codec.c/codec.h | Recive and store audio frames(interrupt)| |
| 103 | +| FFT.c/FFT.h | Fast Fourier transform | |
| 104 | +| wm8978.c/wm8978.h | Config wm8978 through I2C | |
| 105 | +| wm8978i2s.c/.h | I2S driver | |
| 106 | + |
| 107 | +[0]: ./images/System_Architecture.PNG "system_architecture" |
| 108 | +[1]: ./images/ARC_IoT_Development_Kit.jpg "ARC IoT Development Kit" |
| 109 | +[2]: ./images/WM8978_CODEC_module.jpg "WM8978 CODEC module" |
| 110 | +[3]: ./images/OLED(MC096GX).jpg "OLED MC096GX" |
| 111 | + |
| 112 | +[40]: http://embarc.org/embarc_osp/doc/embARC_Document/html/page_example.html " embARC Example User Guide" |
0 commit comments