1845 views|3 replies

1237

Posts

66

Resources
The OP
 

Voiceprint collection system based on Pingtouge RVB2601 [Copy link]

 

In the field of equipment monitoring, with the development of artificial intelligence technology, voiceprint monitoring technology has become increasingly mature in recent years. Voiceprint monitoring is to monitor the sound (20Hz~20kHz) generated during the operation of the equipment and judge the operating conditions of the equipment through analysis software. The RVB2601 development board of Pingtou Ge has dual-channel microphones and audio code chips, which can complete the most important audio collection task in the voiceprint collection system .

The RVB2601 development board used in this project is based on the design of the Pingtouge CH2601. It has an onboard JTAG debugger, WiFi chip W800 , audio acquisition ES7210 , digital microphone, 12864 OLED display, RGB three-color lights and user buttons . The microphone collects audio and reads the audio PCM data through ES 7210. A WAV file header is added to form a WAV file of a certain length and stored in a local flash-based file system. An embedded web server is run to facilitate access to audio playback through a browser. 12864 and buttons, RGB three-color lights are used for human-computer interaction.

RVB2601 controls ES7210 through I2C interface , reads PCM data through I2S interface, communicates with WIFI chip W800 through SPI interface, controls OLED screen through SPI interface, and drives buttons and three-color RGB lights through GPIO .

For audio acquisition code, refer to the example h2601_ft_demo :

void cmd_ft_mic_handler(uint32_t channel_status)

{

csi_error_t ret;

csi_codec_output_config_t output_config;

csi_codec_input_config_t input_config;

ret = csi_codec_init(&codec, 0);

if (ret != CSI_OK)

{

printf("csi_codec_init error\n");

return ;

}

codec_output_ch.ring_buf = &output_ring_buffer;

csi_codec_output_open(&codec, &codec_output_ch, 0);

/* output ch config */

csi_codec_output_attach_callback(&codec_output_ch, codec_output_event_cb_fun, NULL);

output_config.bit_width = 16;

output_config.sample_rate = 8000;

output_config.buffer = output_buf;

output_config.buffer_size = OUTPUT_BUF_SIZE;

output_config.period = 1024;

output_config.mode = CODEC_OUTPUT_SINGLE_ENDED;

csi_codec_output_config(&codec_output_ch, &output_config);

csi_codec_output_analog_gain(&codec_output_ch, 0xbf);

csi_codec_output_buffer_reset(&codec_output_ch);

csi_codec_output_link_dma(&codec_output_ch, &dma_ch_output_handle);

codec_input_ch.ring_buf = &input_ring_buffer;

csi_codec_input_open(&codec, &codec_input_ch, 0);

/* input ch config */

csi_codec_input_attach_callback(&codec_input_ch, codec_input_event_cb_fun, NULL);

input_config.bit_width = 16;

input_config.sample_rate = 8000;

input_config.buffer = input_buf;

input_config.buffer_size = INPUT_BUF_SIZE;

input_config.period = 1024;

input_config.mode = CODEC_INPUT_DIFFERENCE;

csi_codec_input_config(&codec_input_ch, &input_config);

csi_codec_input_analog_gain(&codec_input_ch, 0xbf);

csi_codec_input_link_dma(&codec_input_ch, &dma_ch_input_handle);

if (channel_status == 0)

{

es8156_all_data_left_channel(&es8156_dev);

}

else

{

es8156_all_data_right_channel(&es8156_dev);

}

printf("start repeater\n");

csi_codec_output_start(&codec_output_ch);

csi_codec_input_start(&codec_input_ch);

uint32_t times = 0U;

uint32_t read_size = 0U;

while (1)

{

while (new_data_flag < 48)

{

if (cb_input_transfer_flag)

{

read_size = csi_codec_input_read_async(&codec_input_ch, repeater_data_addr + (new_data_flag * 1024), 1024);

LOGD(TAG,"read size:%d",read_size);

cb_input_transfer_flag = 0U;

new_data_flag++;

}

}

new_data_flag=0;

led_refresh_low();

led_refresh_high();

ft_led_refresh();

aos_msleep(100);

}

printf("stop repeater\n");

csi_codec_input_stop(&codec_input_ch);

csi_codec_output_stop(&codec_output_ch);

csi_codec_input_link_dma(&codec_input_ch, NULL);

csi_codec_output_link_dma(&codec_output_ch, NULL);

csi_codec_output_detach_callback(&codec_output_ch);

csi_codec_input_detach_callback(&codec_input_ch);

csi_codec_uninit(&codec);

return;

}

5. Source Code

ch2601_my_project.7z (557.22 KB, downloads: 5)

6. Video Demonstration (Video Introduction + Link)

7. Project Summary (Project Text Summary + Post Sharing Link Summary)

I am very grateful to e eword and Pingtouge for organizing this event. This event allowed me to experience the development ecosystem of Pingtouge. AOS is an excellent RTOS. Although CDK is not very smooth to use, it is very powerful and can download and manage software components conveniently and quickly. Originally, I planned to store the collected audio PCM data in the file system after adding a WAV file header, and then run an embedded web server so that the collected audio WAV file can be accessed through the browser. However, after a period of time , I failed to successfully debug the file system based on the internal flash . Therefore, I could only collect PCM audio data this time, and the expected functions could not be realized. I will try again when more information in this area becomes available.

8. Others

平头哥RVB2601活动作品提交.docx (114.2 KB, downloads: 9)

Latest reply

I can't see it in the video. Are there any other demonstrations? What effects can be achieved?  Details Published on 2022-6-8 09:35
 
 

6841

Posts

11

Resources
2
 
The function is very powerful, I learned a lot, thank you for sharing!
 
 
 

4771

Posts

12

Resources
3
 
The audio collection is quite good. Generally speaking, the sound needs several steps to be filtered through background noise removal, or specific words need to be read to ensure that certain pronunciations are covered to meet the voiceprint.
 
 
 

9720

Posts

24

Resources
4
 

I can't see it in the video. Are there any other demonstrations? What effects can be achieved?

 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list