/libfvad-for-esp32c3

Libfvad for ESP32C3

Primary LanguageCMIT LicenseMIT

Libfvad for ESP32C3

This project can run libfvad on ESP32C3

ESP-IDF version

idf.py --version
ESP-IDF v5.2.1-76-gbf17be96b4

Pull source code

git clone https://github.com/huxiangjs/libfvad-for-esp32c3.git
cd libfvad-for-esp32c3/
git submodule update --init --recursive

Build

idf.py set-target esp32c3
idf.py menuconfig
idf.py build
idf.py flash

About test files

The test file is located at main/testdata/this_is_test.wav, which is a 17-second audio file.

If you want to use your own wav file, please make sure the wav file format meets the following requirements:

  1. Sampling depth: 16bit
  2. Sampling rate: 16kHz
  3. Number of channels: 1

Please refer to the wav2pcm.sh file for how to convert.

Test Results

audio len: 17112ms
frame len: 20ms
I (74689) libfvad: process_test:51:  +250ms
audio len: 17112ms
frame len: 20ms
-##########------------------########################################################################################################################################################################################################################################################################################################################################################################------------------------------------------------------------------------------#############################################################################################-#################################################################------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------##############################################################################------------------------------------------#########-------------------------------################################################################################################################################-------------------------------------------------------------------------------------------########################################################################################################--------------------------------------########################---#########################################################-----------------------------------------------------------------------------------------------------##########-----------------------------------------------##########-------------------------------------------------------------------------------#########--------------------------
I (75949) libfvad: process_test:51:  +260ms
audio len: 17112ms
frame len: 20ms
I (77199) libfvad: process_test:51:  +250ms

How to use it in your project

cd <your project>
mkdir -p components
cd components
git clone --recursive https://github.com/huxiangjs/libfvad-components-for-esp32c3.git fvad