dueros用例 怎么采集两个mic的数据并保存的SD卡中呢?

xiaoseyihe
Posts: 9
Joined: Thu Sep 06, 2018 6:04 am

dueros用例 怎么采集两个mic的数据并保存的SD卡中呢?

Postby xiaoseyihe » Thu Oct 11, 2018 7:29 am

dueros用例 怎么采集两个mic的数据并保存的SD卡中呢?目前只能保存rec_engine_data_read(voiceData, ONE_FRAM_SIZE, 110 / portTICK_PERIOD_MS);中voiceData数据,这个应该是重采样后的数据,只有1路数据。

dueros 能通过修改重采样后的通道数获取两路mic吗?我尝试了一下,采集到的数据信号不对

i2s_stream_cfg_t i2s_cfg = I2S_STREAM_CFG_DEFAULT();
i2s_cfg.type = AUDIO_STREAM_READER;
i2s_stream_reader = i2s_stream_init(&i2s_cfg);
audio_element_info_t i2s_info = {0};
audio_element_getinfo(i2s_stream_reader, &i2s_info);
i2s_info.bits = 16;
i2s_info.channels = 2;
i2s_info.sample_rates = 48000;
audio_element_setinfo(i2s_stream_reader, &i2s_info);
#if 1
rsp_filter_cfg_t rsp_cfg = DEFAULT_RESAMPLE_FILTER_CONFIG();
rsp_cfg.src_rate = 48000;
rsp_cfg.src_ch = 2;
rsp_cfg.dest_rate = 16000;
rsp_cfg.dest_ch = 1**;------------(此处修改为2,采集到的信号不正常啊)**
rsp_cfg.type = AUDIO_CODEC_TYPE_ENCODER;
audio_element_handle_t filter = rsp_filter_init(&rsp_cfg);
#endif

Who is online

Users browsing this forum: No registered users and 21 guests